diff options
author | Dave Brolley <brolley@redhat.com> | 2009-11-02 16:38:41 -0500 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-11-02 16:38:41 -0500 |
commit | de0f2f04c229fb48ec598ddf2ffffb6a329ebab5 (patch) | |
tree | 2d7e880c823aa073dda1114c0115290e2be3a444 /stap-server-connect.c | |
parent | 41b0a0c67e5848de4c621a53f6b2d0acb92b901f (diff) | |
download | systemtap-steved-de0f2f04c229fb48ec598ddf2ffffb6a329ebab5.tar.gz systemtap-steved-de0f2f04c229fb48ec598ddf2ffffb6a329ebab5.tar.xz systemtap-steved-de0f2f04c229fb48ec598ddf2ffffb6a329ebab5.zip |
More logging for stap-server initscript.
Diffstat (limited to 'stap-server-connect.c')
-rw-r--r-- | stap-server-connect.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/stap-server-connect.c b/stap-server-connect.c index c4d8da88..f70810a4 100644 --- a/stap-server-connect.c +++ b/stap-server-connect.c @@ -410,9 +410,6 @@ handle_connection(PRFileDesc *tcpSocket) goto cleanup; } - /* Log the accepted connection. */ - printf ("Accepted connection!\n"); - /* Create a temporary files and directories. */ memcpy (requestFileName + sizeof (requestFileName) - 1 - 6, "XXXXXX", 6); rc = mkstemp(requestFileName); @@ -548,8 +545,26 @@ accept_connection(PRFileDesc *listenSocket) break; } + /* Log the accepted connection. */ + printf ("Accepted connection from %d.%d.%d.%d:%d\n", + (addr.inet.ip ) & 0xff, + (addr.inet.ip >> 8) & 0xff, + (addr.inet.ip >> 16) & 0xff, + (addr.inet.ip >> 24) & 0xff, + addr.inet.port); + fflush (stdout); + /* Accepted the connection, now handle it. */ /*result =*/ handle_connection (tcpSocket); + + printf ("Request from %d.%d.%d.%d:%d complete\n", + (addr.inet.ip ) & 0xff, + (addr.inet.ip >> 8) & 0xff, + (addr.inet.ip >> 16) & 0xff, + (addr.inet.ip >> 24) & 0xff, + addr.inet.port); + fflush (stdout); + #if 0 /* Not necessary */ if (result != SECSuccess) { |