*
* 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
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
request = ippNew();
- request->request.op.operation_id = OPERATION_NOVELL_MGMT;
+ request->request.op.operation_id = (ipp_op_t)OPERATION_NOVELL_MGMT;
request->request.op.request_id = 1;
language = cupsLangDefault();
return(0);
}
-BOOL iprint_cache_reload(void)
+bool iprint_cache_reload(void)
{
http_t *http = NULL; /* HTTP connection to server */
ipp_t *request = NULL, /* IPP Request */
ipp_attribute_t *attr; /* Current attribute */
cups_lang_t *language = NULL; /* Default language */
int i;
- BOOL ret = False;
+ bool ret = False;
DEBUG(5, ("reloading iprint printcap cache\n"));
request = ippNew();
- request->request.op.operation_id = OPERATION_NOVELL_LIST_PRINTERS;
+ request->request.op.operation_id =
+ (ipp_op_t)OPERATION_NOVELL_LIST_PRINTERS;
request->request.op.request_id = 1;
language = cupsLangDefault();
ipp_attribute_t *attr; /* Current attribute */
cups_lang_t *language = NULL; /* Default language */
char uri[HTTP_MAX_URI]; /* printer-uri attribute */
- char *clientname = NULL; /* hostname of client for job-originating-host attribute */
+ const char *clientname = NULL; /* hostname of client for job-originating-host attribute */
+ char addr[INET6_ADDRSTRLEN];
DEBUG(5,("iprint_job_submit(%d, %p (%d))\n", snum, pjob, pjob->sysjob));
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
NULL, pjob->user);
- clientname = client_name();
+ clientname = client_name(get_client_fd());
if (strcmp(clientname, "UNKNOWN") == 0) {
- clientname = client_addr();
+ clientname = client_addr(get_client_fd(),addr,sizeof(addr));
}
-
+
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"job-originating-host-name", NULL,
clientname);
if (qcount >= qalloc) {
qalloc += 16;
- temp = SMB_REALLOC_ARRAY(queue, print_queue_struct, qalloc);
+ queue = SMB_REALLOC_ARRAY(queue, print_queue_struct, qalloc);
- if (temp == NULL) {
+ if (queue == NULL) {
DEBUG(0,("iprint_queue_get: Not enough memory!"));
qcount = 0;
- SAFE_FREE(queue);
goto out;
}
-
- queue = temp;
}
temp = queue + qcount;
static int iprint_queue_pause(int snum)
{
- return(-1); //Not supported without credentials
+ return(-1); /* Not supported without credentials */
}
static int iprint_queue_resume(int snum)
{
- return(-1); //Not supported without credentials
+ return(-1); /* Not supported without credentials */
}
/*******************************************************************
#else
/* this keeps fussy compilers happy */
+ void print_iprint_dummy(void);
void print_iprint_dummy(void) {}
#endif /* HAVE_IPRINT */