From: msweet Date: Wed, 10 Jul 2013 14:08:39 +0000 (+0000) Subject: The default IPP version did not always get set before creating a new IPP X-Git-Tag: release-1.7rc1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=567f49cba3b63f7f27ee623c29550f39a7bb6ddb;p=thirdparty%2Fcups.git The default IPP version did not always get set before creating a new IPP request message () git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11113 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/CHANGES-1.6.txt b/CHANGES-1.6.txt index e564c9d930..896badedd2 100644 --- a/CHANGES-1.6.txt +++ b/CHANGES-1.6.txt @@ -5,6 +5,8 @@ CHANGES IN CUPS V1.6.3 - The configure script now prefers Clang over GCC. - Fixed a compile problem on AIX (STR #4307) + - The default IPP version did not always get set before creating a new + IPP request message () - The lp, lpq, lpr, and lpstat now display an error message advising the use of the /version=1.1 ServerName option () - Added documentation about the /version=1.1 option to ServerName in diff --git a/cups/globals.c b/cups/globals.c index b343bcf322..41a5854cdc 100644 --- a/cups/globals.c +++ b/cups/globals.c @@ -219,7 +219,6 @@ cups_globals_alloc(void) cg->any_root = 1; cg->expired_certs = 1; cg->expired_root = 1; - cg->server_version = 20; #ifdef DEBUG /* diff --git a/cups/ipp.c b/cups/ipp.c index 409a0ec826..fc813d658b 100644 --- a/cups/ipp.c +++ b/cups/ipp.c @@ -2741,6 +2741,9 @@ ippNew(void) * Set default version - usually 2.0... */ + if (cg->server_version == 0) + _cupsSetDefaults(); + temp->request.any.version[0] = cg->server_version / 10; temp->request.any.version[1] = cg->server_version % 10; temp->use = 1; diff --git a/cups/usersys.c b/cups/usersys.c index d01fe08b57..9a2df68b65 100644 --- a/cups/usersys.c +++ b/cups/usersys.c @@ -370,6 +370,8 @@ cupsSetServer(const char *server) /* I - Server name */ else if (!strcmp(options, "version=2.2")) cg->server_version = 22; } + else + cg->server_version = 20; if (cg->server[0] != '/' && (port = strrchr(cg->server, ':')) != NULL && !strchr(port, ']') && isdigit(port[1] & 255))