summaryrefslogtreecommitdiff
path: root/source3/printing/print_cups.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-06-13 12:11:26 +0200
committerVolker Lendecke <vl@samba.org>2010-06-13 12:40:27 +0200
commit3f7e2222f47d5960cece48dd751470bcc0983d93 (patch)
treeca449c0608ae34500e1613697d0788258351d5ce /source3/printing/print_cups.c
parent1b13755698464581fb1b4a3083f5930d7b408ea4 (diff)
downloadsamba-3f7e2222f47d5960cece48dd751470bcc0983d93.tar.gz
samba-3f7e2222f47d5960cece48dd751470bcc0983d93.tar.bz2
samba-3f7e2222f47d5960cece48dd751470bcc0983d93.zip
s3: Remove the pointless PRINTERNAME macro
Diffstat (limited to 'source3/printing/print_cups.c')
-rw-r--r--source3/printing/print_cups.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
index 76a13cf3b4..043cc96930 100644
--- a/source3/printing/print_cups.c
+++ b/source3/printing/print_cups.c
@@ -962,7 +962,8 @@ static int cups_job_submit(int snum, struct printjob *pjob)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
"attributes-natural-language", NULL, language->language);
- if (!push_utf8_talloc(frame, &printername, PRINTERNAME(snum), &size)) {
+ if (!push_utf8_talloc(frame, &printername, lp_printername(snum),
+ &size)) {
goto out;
}
slprintf(uri, sizeof(uri) - 1, "ipp://localhost/printers/%s",
@@ -1033,7 +1034,8 @@ static int cups_job_submit(int snum, struct printjob *pjob)
}
if ((response = cupsDoFileRequest(http, request, uri, pjob->filename)) != NULL) {
if (response->request.status.status_code >= IPP_OK_CONFLICT) {
- DEBUG(0,("Unable to print file to %s - %s\n", PRINTERNAME(snum),
+ DEBUG(0,("Unable to print file to %s - %s\n",
+ lp_printername(snum),
ippErrorString(cupsLastError())));
} else {
ret = 0;
@@ -1046,7 +1048,8 @@ static int cups_job_submit(int snum, struct printjob *pjob)
}
}
} else {
- DEBUG(0,("Unable to print file to `%s' - %s\n", PRINTERNAME(snum),
+ DEBUG(0,("Unable to print file to `%s' - %s\n",
+ lp_printername(snum),
ippErrorString(cupsLastError())));
}
@@ -1471,7 +1474,8 @@ static int cups_queue_pause(int snum)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
"attributes-natural-language", NULL, language->language);
- if (!push_utf8_talloc(frame, &printername, PRINTERNAME(snum), &size)) {
+ if (!push_utf8_talloc(frame, &printername, lp_printername(snum),
+ &size)) {
goto out;
}
slprintf(uri, sizeof(uri) - 1, "ipp://localhost/printers/%s",
@@ -1491,13 +1495,15 @@ static int cups_queue_pause(int snum)
if ((response = cupsDoRequest(http, request, "/admin/")) != NULL) {
if (response->request.status.status_code >= IPP_OK_CONFLICT) {
- DEBUG(0,("Unable to pause printer %s - %s\n", PRINTERNAME(snum),
+ DEBUG(0,("Unable to pause printer %s - %s\n",
+ lp_printername(snum),
ippErrorString(cupsLastError())));
} else {
ret = 0;
}
} else {
- DEBUG(0,("Unable to pause printer %s - %s\n", PRINTERNAME(snum),
+ DEBUG(0,("Unable to pause printer %s - %s\n",
+ lp_printername(snum),
ippErrorString(cupsLastError())));
}
@@ -1572,7 +1578,8 @@ static int cups_queue_resume(int snum)
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
"attributes-natural-language", NULL, language->language);
- if (!push_utf8_talloc(frame, &printername, PRINTERNAME(snum), &size)) {
+ if (!push_utf8_talloc(frame, &printername, lp_printername(snum),
+ &size)) {
goto out;
}
slprintf(uri, sizeof(uri) - 1, "ipp://localhost/printers/%s",
@@ -1592,13 +1599,15 @@ static int cups_queue_resume(int snum)
if ((response = cupsDoRequest(http, request, "/admin/")) != NULL) {
if (response->request.status.status_code >= IPP_OK_CONFLICT) {
- DEBUG(0,("Unable to resume printer %s - %s\n", PRINTERNAME(snum),
+ DEBUG(0,("Unable to resume printer %s - %s\n",
+ lp_printername(snum),
ippErrorString(cupsLastError())));
} else {
ret = 0;
}
} else {
- DEBUG(0,("Unable to resume printer %s - %s\n", PRINTERNAME(snum),
+ DEBUG(0,("Unable to resume printer %s - %s\n",
+ lp_printername(snum),
ippErrorString(cupsLastError())));
}