]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Correctly log the connected client from a domain socket.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 12 Feb 2014 16:15:46 +0000 (16:15 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 12 Feb 2014 16:15:46 +0000 (16:15 +0000)
Update the comment in the launchd plist to avoid a BBEdit syntax coloring bug.

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

scheduler/client.c
scheduler/org.cups.cupsd.plist

index eac78f3cbe7d2060c7d35eefa343336acfe4ce97..743df7bc5a21bd59977758ca70fe8f845c62f8b2 100644 (file)
@@ -274,17 +274,17 @@ cupsdAcceptClient(cupsd_listener_t *lis)/* I - Listener socket */
     char       peername[256];          /* Name of process */
 
     peersize = sizeof(peerpid);
-    if (!getsockopt(con->number, SOL_LOCAL, LOCAL_PEERPID, &peerpid,
+    if (!getsockopt(httpGetFd(con->http), SOL_LOCAL, LOCAL_PEERPID, &peerpid,
                     &peersize))
     {
-      if (!proc_name(peerpid, peername, sizeof(peername)))
+      if (!proc_name((int)peerpid, peername, sizeof(peername)))
        cupsdLogClient(con, CUPSD_LOG_DEBUG,
                       "Accepted from %s (Domain ???[%d])",
                        httpGetHostname(con->http, NULL, 0), (int)peerpid);
       else
        cupsdLogClient(con, CUPSD_LOG_DEBUG,
                        "Accepted from %s (Domain %s[%d])",
-                       httpGetHostname(con->http, NULL, 0), name, (int)peerpid);
+                       httpGetHostname(con->http, NULL, 0), peername, (int)peerpid);
     }
     else
 #  endif /* __APPLE__ */
index 2529f62e56a07bb3ff0ef23a7c3a41c41cc2dba4..7a5e0fd011845b5119b9d1aa254d2673e2bc014a 100644 (file)
@@ -21,8 +21,7 @@
                <string>/usr/sbin/cupsd</string>
                <string>-l</string>
        </array>
-       <!-- These environment variables are only used when CUPS is compiled
-            with --enable-debug-printfs -->
+       <!-- These environment variables are only used when CUPS is compiled with debug-printfs support -->
        <key>EnvironmentVariables</key>
        <dict>
                <key>CUPS_DEBUG_LOG</key>