diff options
author | Werner Koch <[email protected]> | 2010-04-22 15:51:01 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2010-04-22 15:51:01 +0000 |
commit | a00b1ede5403f1e38534cc3b232739f20b8567e9 (patch) | |
tree | 239c649c1e39b1f828bed2d7e34e8666f3463289 | |
parent | comment fix (diff) | |
download | libassuan-a00b1ede5403f1e38534cc3b232739f20b8567e9.tar.gz libassuan-a00b1ede5403f1e38534cc3b232739f20b8567e9.zip |
Sho the pid in the the hello line.
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/assuan-listen.c | 13 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2222e74..3409bc8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-04-22 Werner Koch <[email protected]> + + * assuan-listen.c (assuan_accept): Show the PID with the default + hello message. + 2010-04-19 Werner Koch <[email protected]> * system-w32.c (is_socket): New. diff --git a/src/assuan-listen.c b/src/assuan-listen.c index c37c3a5..55ddd0a 100644 --- a/src/assuan-listen.c +++ b/src/assuan-listen.c @@ -112,7 +112,18 @@ assuan_accept (assuan_context_t ctx) 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; |