diff options
author | tradke <tradke@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2002-03-07 11:50:39 +0000 |
---|---|---|
committer | tradke <tradke@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2002-03-07 11:50:39 +0000 |
commit | 8339cdb9f3214011af03f0140f90da0483cc15be (patch) | |
tree | bca4c86f8fcd64e375a8f47cdeca32663e7ba0ca /src/Sockets.c | |
parent | 040e933cd88c2d6ee5ae5dd26cab90de69169fb7 (diff) |
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
Diffstat (limited to 'src/Sockets.c')
-rw-r--r-- | src/Sockets.c | 15 |
1 files changed, 10 insertions, 5 deletions
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 <stdio.h> @@ -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); } } |