From 8339cdb9f3214011af03f0140f90da0483cc15be Mon Sep 17 00:00:00 2001 From: tradke Date: Thu, 7 Mar 2002 11:50:39 +0000 Subject: Print HTTP connect messages only if 'HTTPD::verbose' is set to "yes". git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@157 1faa4e14-9dd3-4be0-9f0e-ffe519881164 --- src/Sockets.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/Sockets.c') diff --git a/src/Sockets.c b/src/Sockets.c index 0eebf89..4cf670c 100644 --- a/src/Sockets.c +++ b/src/Sockets.c @@ -11,6 +11,7 @@ @@*/ #include "cctk.h" +#include "cctk_Parameters.h" #include "util_Network.h" #include @@ -240,6 +241,8 @@ int HTTP_Poll(cGH *cctkGH, long sec, long usec) httpSocket *this; httpSocket *next; + DECLARE_CCTK_PARAMETERS + if(sec >=0) { @@ -278,11 +281,13 @@ int HTTP_Poll(cGH *cctkGH, long sec, long usec) } else { - fprintf (stderr, - "Server: connect from host %s, port %hd.\n", - inet_ntoa (clientname.sin_addr), - ntohs (clientname.sin_port)); - + if (verbose) + { + CCTK_VInfo (CCTK_THORNSTRING, + "Server: connect from host %s, port %hd", + inet_ntoa (clientname.sin_addr), + ntohs (clientname.sin_port)); + } SocketCreate(new); } } -- cgit v1.2.3