[svn] assuan - r373 - trunk/src

svn author wk cvs at cvs.gnupg.org
Thu Apr 22 17:51:02 CEST 2010


Author: wk
Date: 2010-04-22 17:51:01 +0200 (Thu, 22 Apr 2010)
New Revision: 373

Modified:
   trunk/src/ChangeLog
   trunk/src/assuan-listen.c
Log:
Sho the pid in the the hello line.


Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog	2010-04-20 10:52:43 UTC (rev 372)
+++ trunk/src/ChangeLog	2010-04-22 15:51:01 UTC (rev 373)
@@ -1,3 +1,8 @@
+2010-04-22  Werner Koch  <wk at g10code.com>
+
+	* assuan-listen.c (assuan_accept): Show the PID with the default
+	hello message.
+
 2010-04-19  Werner Koch  <wk at g10code.com>
 
 	* system-w32.c (is_socket): New.

Modified: trunk/src/assuan-listen.c
===================================================================
--- trunk/src/assuan-listen.c	2010-04-20 10:52:43 UTC (rev 372)
+++ trunk/src/assuan-listen.c	2010-04-22 15:51:01 UTC (rev 373)
@@ -112,7 +112,18 @@
   else if (p)
     rc = assuan_write_line (ctx, p);
   else
-    rc = assuan_write_line (ctx, "OK Pleased to meet you");
+    {
+      static char const okstr[] = "OK Pleased to meet you";
+      pid_t apid = assuan_get_pid (ctx);
+      if (apid != ASSUAN_INVALID_PID)
+        {
+          char tmpbuf[50];
+          snprintf (tmpbuf, sizeof tmpbuf, "%s, process %i", okstr, (int)apid);
+          rc = assuan_write_line (ctx, tmpbuf);
+        }
+      else
+        rc = assuan_write_line (ctx, okstr);
+    }
   if (rc)
     return rc;
     




More information about the Gnupg-commits mailing list