nps: poci/nws_poci.c - removed debug junk - don't syslog to stderr...

baggins baggins at pld-linux.org
Fri Sep 16 19:08:46 CEST 2005


Author: baggins                      Date: Fri Sep 16 17:08:46 2005 GMT
Module: nps                           Tag: HEAD
---- Log message:
- removed debug junk
- don't syslog to stderr (/dev/null in this case)
- include PID in syslog messages

---- Files affected:
nps/poci:
   nws_poci.c (1.14 -> 1.15) 

---- Diffs:

================================================================
Index: nps/poci/nws_poci.c
diff -u nps/poci/nws_poci.c:1.14 nps/poci/nws_poci.c:1.15
--- nps/poci/nws_poci.c:1.14	Wed Sep 14 00:51:48 2005
+++ nps/poci/nws_poci.c	Fri Sep 16 19:08:41 2005
@@ -97,12 +97,12 @@
     char 	errMsg[BUFSIZE];
 
     // prepare to write stuff to syslog, in case there is an error
-    openlog("NWS_POCI", LOG_PERROR, LOG_DAEMON );
-/*
+    openlog("NWS_POCI", LOG_PID, LOG_DAEMON );
+
     if( daemon(0,0) != 0) {        //we run as a daemon
         syslog(LOG_INFO, "daemon call failed\n");
     }
-*/
+
     getPlatIp();        //causes firewall to be set, and jnet adapter to get
                         //the correct ip address as deemed by the sp
 
@@ -116,7 +116,6 @@
         fprintf(pidFile, "%d",getpid());
         fclose(pidFile);
     }
-
     
     pociHandler();
 
@@ -1848,7 +1847,6 @@
 
     //tasks.
     //1.  edit start-up script to change platform ip addr.
-fprintf(stderr, "buf: %s\n", buf);
 
     //first, filter out the IP addresses from the incoming
     //parameters.
@@ -1866,9 +1864,6 @@
     while (isdigit(*token) || (*token == '.')) token++;
     *token = '\0';
     
-fprintf(stderr, "platIp: %s\n", platIp);
-fprintf(stderr, "spIp: %s\n", spIp);
-
     if(strlen((char *)platIp) < 3 || strlen((char *)spIp) < 3) {
         snprintf(command,BUFSIZE,
             "<error>Invalid ip addresses plat = %s, sp = %s</error>"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/nps/poci/nws_poci.c?r1=1.14&r2=1.15&f=u




More information about the pld-cvs-commit mailing list