diff options
author | Didier Raboud <odyx@debian.org> | 2020-02-13 10:59:10 +0100 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2020-02-13 10:59:10 +0100 |
commit | 8c74e1b72c41a6530fd316736510a53b4cc570c8 (patch) | |
tree | 549b682f0316c5458e151ae029d086c41f7085ab /bjnp-commands.c | |
parent | 11874d78e076f2255fc3229a8ad89c164762bcb8 (diff) |
New upstream version 2.0.3
Diffstat (limited to 'bjnp-commands.c')
-rw-r--r-- | bjnp-commands.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/bjnp-commands.c b/bjnp-commands.c index fbf0aa8..e8706a3 100644 --- a/bjnp-commands.c +++ b/bjnp-commands.c @@ -1,7 +1,7 @@ /* * Low level TCP and UDP IO communication implementation for * bjnp backend for the Common UNIX Printing System (CUPS). - * Copyright 2008-2014 by Louis Lagendijk + * Copyright 2008-2020 by Louis Lagendijk * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,7 +30,8 @@ clear_cmd(bjnp_command_t *cmd) } static void -bjnp_set_command_header(uint8_t dev_type, uint16_t seq_no, uint16_t session_id, bjnp_command_t *cmd, char cmd_code, +bjnp_set_command_header(uint8_t dev_type, uint16_t seq_no, uint16_t session_id, bjnp_command_t *cmd, + char cmd_code, int command_len) { /* @@ -47,7 +48,7 @@ bjnp_set_command_header(uint8_t dev_type, uint16_t seq_no, uint16_t session_id, } void bjnp_defaults_set_command_header(bjnp_command_t *cmd, char cmd_code, - int command_len) + int command_len) { bjnp_set_command_header(BJNP_CMD_PRINT, 0, 0, cmd, cmd_code, command_len); } @@ -55,10 +56,10 @@ void bjnp_defaults_set_command_header(bjnp_command_t *cmd, char cmd_code, int bjnp_printer_set_command_header(printer_t *printer, bjnp_command_t *cmd, char cmd_code, - int command_len) + int command_len) { - bjnp_set_command_header( /* printer-> dev_type */ BJNP_CMD_PRINT, ++printer->serial, - printer->session_id, cmd, cmd_code, command_len); + bjnp_set_command_header(/* printer-> dev_type */ BJNP_CMD_PRINT, ++printer->serial, + printer->session_id, cmd, cmd_code, command_len); return printer->serial; } @@ -222,7 +223,7 @@ bjnp_get_status(printer_t *printer, char *status_buf) clear_cmd(&cmd); bjnp_printer_set_command_header(printer, &cmd, CMD_UDP_GET_STATUS, - sizeof(cmd.udp_get_status)); + sizeof(cmd.udp_get_status)); bjnp_hexdump(LOG_DEBUG2, "Get printer status", (char *) &cmd, sizeof(cmd.udp_get_status)); @@ -288,7 +289,7 @@ int bjnp_send_job_details(http_addr_t *addr, const char *user, const char *title clear_cmd(&cmd); bjnp_defaults_set_command_header(&cmd, CMD_UDP_PRINT_JOB_DET, - sizeof(cmd.udp_job_details)); + sizeof(cmd.udp_job_details)); /* create payload */ |