]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Setting the PRINTER or LPDEST environment variables to "name/instance" did not
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 13 Aug 2010 01:26:53 +0000 (01:26 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 13 Aug 2010 01:26:53 +0000 (01:26 +0000)
work (STR #3485)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@9256 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.4.txt
cups/dest.c

index a79102c4071b023e25a3e9cb625a85cb287ec819..181592c2d3aa7367d200f40980e81bea19575db4 100644 (file)
@@ -5,6 +5,8 @@ CHANGES IN CUPS V1.4.5
 
        - Documentation fixes (STR #3542)
        - Localization fixes (STR #3635, STR #3636)
+       - Setting the PRINTER or LPDEST environment variables to "name/instance"
+         did not work (STR #3485)
        - The scheduler did not handle the JobRetryLimit setting properly
          (STR #3466)
        - The lpstat command always showed a remote job ID of 0 for shared
index b3235f6dde4ab0bc9add179b04a2cb90384675b3..8ebd7bb12759d196752fdc4ce54c95d66b39332c 100644 (file)
@@ -502,7 +502,19 @@ cupsGetNamedDest(http_t     *http, /* I - Connection to server or @code CUPS_HTT
     set_as_default = 1;
     name           = _cupsUserDefault(defname, sizeof(defname));
 
-    if (!name && home)
+    if (name)
+    {
+      char     *ptr;                   /* Temporary pointer... */
+
+      if ((ptr = strchr(defname, '/')) != NULL)
+      {
+        *ptr++   = '\0';
+       instance = ptr;
+      }
+      else
+        instance = NULL;
+    }
+    else if (home)
     {
      /*
       * No default in the environment, try the user's lpoptions files...