summaryrefslogtreecommitdiffstats
path: root/source/printing/print_cups.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/printing/print_cups.c')
-rw-r--r--source/printing/print_cups.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/source/printing/print_cups.c b/source/printing/print_cups.c
index 2df846aa579..77615dfe90f 100644
--- a/source/printing/print_cups.c
+++ b/source/printing/print_cups.c
@@ -73,9 +73,9 @@ cups_passwd_cb(const char *prompt) /* I - Prompt */
* system.
*/
-void cups_printer_fn(void (*fn)(char *, char *))
+void
+cups_printer_fn(void (*fn)(char *, char *)) /* I - Function to call */
{
- /* I - Function to call */
http_t *http; /* HTTP connection to server */
ipp_t *request, /* IPP Request */
*response; /* IPP Response */
@@ -195,11 +195,9 @@ void cups_printer_fn(void (*fn)(char *, char *))
break;
if (info == NULL || !info[0])
- (*fn)(name, make_model);
+ (*fn)(unix_to_dos_static(name), make_model);
else
- (*fn)(name,info);
-
-
+ (*fn)(unix_to_dos_static(name), info);
}
ippDelete(response);
@@ -267,7 +265,8 @@ cups_printername_ok(char *name) /* I - Name of printer */
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME,
"requested-attributes", NULL, "printer-uri");
- slprintf(uri, sizeof(uri) - 1, "ipp://localhost/printers/%s", name);
+ slprintf(uri, sizeof(uri) - 1, "ipp://localhost/printers/%s",
+ dos_to_unix_static(name));
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);
@@ -665,10 +664,6 @@ cups_job_submit(int snum, struct printjob *pjob)
httpClose(http);
- if ( ret == 0 )
- unlink(pjob->filename);
- /* else print_job_end will do it for us */
-
return (ret);
}
@@ -1113,9 +1108,9 @@ cups_queue_resume(int snum)
DEBUG(5,("cups_queue_resume(%d)\n", snum));
- /*
- * Make sure we don't ask for passwords...
- */
+ /*
+ * Make sure we don't ask for passwords...
+ */
cupsSetPasswordCB(cups_passwd_cb);
@@ -1161,9 +1156,9 @@ cups_queue_resume(int snum)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name",
NULL, current_user_info.unix_name);
- /*
- * Do the request and get back a response...
- */
+ /*
+ * Do the request and get back a response...
+ */
ret = 1;