]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The scheduler did not return non-shared printers to local clients unless
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 9 Mar 2016 15:45:21 +0000 (15:45 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 9 Mar 2016 15:45:21 +0000 (15:45 +0000)
they connected to the domain socket (<rdar://problem/24566996>)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@13128 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES.txt
scheduler/client.c

index 32a2dcd9346f87253004b5f2af49065b007d26d7..a51b57fedc578808abeb95965a60204ffa2688f9 100644 (file)
@@ -1,8 +1,10 @@
-CHANGES.txt - 2.2b1 - 2016-03-07
+CHANGES.txt - 2.2b1 - 2016-03-09
 --------------------------------
 
 CHANGES IN CUPS V2.2b1
 
+       - The scheduler did not return non-shared printers to local clients
+         unless they connected to the domain socket (<rdar://problem/24566996>)
        - The scheduler now reads the spool directory if one or more job cache
          entries point to deleted jobs (<rdar://problem/24048846>)
        - Added support for disc media sizes (<rdar://problem/20219536>)
index ec5d780447107287315fde4cc0657eb32299e1ea..d5611147c3ae34b117123b91f25b1f86e71be09c 100644 (file)
@@ -143,7 +143,12 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
   * Save the connected address and port number...
   */
 
-  con->clientaddr = lis->address;
+  addrlen = sizeof(con->clientaddr);
+
+  if (getsockname(httpGetFd(con->http), (struct sockaddr *)&con->clientaddr, &addrlen) || addrlen == 0)
+    con->clientaddr = lis->address;
+
+  cupsdLogClient(con, CUPSD_LOG_DEBUG, "Server address is \"%s\".", httpAddrString(&con->clientaddr, name, sizeof(name)));
 
  /*
   * Check the number of clients on the same address...