summaryrefslogtreecommitdiff
path: root/source3/printing/print_cups.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-05-11 10:30:42 +0200
committerGünther Deschner <gd@samba.org>2011-05-11 11:36:07 +0200
commitf99d6f079a0060e4d08d7384bdf230d4d2c62b86 (patch)
treea0c6150bc07c1e3ef3312a9c8fe10cb07d8968d8 /source3/printing/print_cups.c
parent05e8881fef02e309a6dfbaee544f11c3d5088278 (diff)
downloadsamba-f99d6f079a0060e4d08d7384bdf230d4d2c62b86.tar.gz
samba-f99d6f079a0060e4d08d7384bdf230d4d2c62b86.tar.bz2
samba-f99d6f079a0060e4d08d7384bdf230d4d2c62b86.zip
s3-printing: make cups_pull_comment_location() work again.
we deal with lp_cups_server in cups_connect() already, inside the URI all our other cups functions we use ipp://localhost, do the same here. Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed May 11 11:36:07 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/printing/print_cups.c')
-rw-r--r--source3/printing/print_cups.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
index ea2fc1d7c4..077d82bcbf 100644
--- a/source3/printing/print_cups.c
+++ b/source3/printing/print_cups.c
@@ -1585,7 +1585,6 @@ bool cups_pull_comment_location(TALLOC_CTX *mem_ctx,
ipp_attribute_t *attr; /* Current attribute */
cups_lang_t *language = NULL; /* Default language */
char uri[HTTP_MAX_URI];
- char *server = NULL;
char *sharename = NULL;
char *name = NULL;
static const char *requested[] =/* Requested attributes */
@@ -1626,21 +1625,11 @@ bool cups_pull_comment_location(TALLOC_CTX *mem_ctx,
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE,
"attributes-natural-language", NULL, language->language);
- if (lp_cups_server() != NULL && strlen(lp_cups_server()) > 0) {
- if (!push_utf8_talloc(frame, &server, lp_cups_server(), &size)) {
- goto out;
- }
- } else {
- server = talloc_strdup(frame,cupsServer());
- }
- if (!server) {
- goto out;
- }
if (!push_utf8_talloc(frame, &sharename, printername, &size)) {
goto out;
}
- slprintf(uri, sizeof(uri) - 1, "ipp://%s/printers/%s",
- server, sharename);
+ slprintf(uri, sizeof(uri) - 1, "ipp://localhost/printers/%s",
+ sharename);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI,
"printer-uri", NULL, uri);