]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Disconnect detected and debug code cleanned
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 31 Mar 2025 19:54:48 +0000 (15:54 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 31 Mar 2025 19:54:48 +0000 (15:54 -0400)
app/feeder.c
lib/devsoc.c
lib/modrec.c
lib/subrou.c

index 9c9ac7eb2d23b18393ffb234f63807bacf012903..f651f758a626a8b39352fc10b54295e315d6ddbf 100644 (file)
@@ -103,7 +103,7 @@ tocheck=strlen(line);
 phase=0;
 proceed=true;
 while (proceed==true) {
-  //(void) rou_alert(0,"JMPDBG %s, phase='%d'",OPEP,phase);
+  //(void) rou_alert(0,"%s JMPDBG, phase='%d'",OPEP,phase);
   switch (phase) {
     case 0      :       //do we have a "..." sequence at the end
       if (tocheck>0) {
@@ -119,7 +119,6 @@ while (proceed==true) {
     case 1      :       //waiting for a line with CRLF
       received=(char *)0;
       got=tcp_getline(socptr,WAITLINE,&received);
-      (void) rou_alert(0,"%s, JMPDNG got='%d'",OPEP,got);
       switch (got) {
         case  0 :       //Reading timeout
           (void) rou_alert(0,"Unable to receive line in due time");
@@ -156,6 +155,7 @@ while (proceed==true) {
   phase++;
   }
 return status;
+#undef  OPEP
 }
 /*
 \f
@@ -168,6 +168,7 @@ return status;
 static _Bool scanline(SOCPTR *socptr,int numline,char *line)
 
 {
+#define OPEP "feeder.c:scanline"
 _Bool status;
 int phase;
 _Bool proceed;
@@ -175,7 +176,7 @@ _Bool proceed;
 status=true;
 phase=0;
 proceed=true;
-(void) rou_alert(0,"JMPDBG phase='%d' line=<%s>",phase,line);
+(void) rou_alert(5,"%s line=<%s>",OPEP,line);
 while (proceed==true) {
   switch (phase) {
     case 0      :       //removing first space
@@ -212,6 +213,7 @@ while (proceed==true) {
   phase++;
   }
 return status;
+#undef  OPEP
 }
 /*
 \f
index 812eb1aaa07047a13f02ce3efd5537b600e8c3eb..f683b79a0f2a6d9634a0e0db2d3dbdd857b7afab 100644 (file)
@@ -601,7 +601,7 @@ ai=(struct addrinfo *)0;
 phase=0;
 proceed=true;
 while (proceed==true) {
-  (void) rou_alert(0,"JMPDBG %s phase='%d'",OPEP,phase);
+  //(void) rou_alert(0,"JMPDBG %s phase='%d'",OPEP,phase);
   switch (phase) {
     case 0      :       //Do we have parameters
       if ((ip==(const char *)0)||(port==(const char *)0)) {
@@ -923,20 +923,17 @@ if (soc!=(SOCTYP *)0) {
   status=poll(polling,1,millisec);
   (void) sigprocmask(SIG_SETMASK,&origmask,(sigset_t *)0);
   switch (status) {
-    case -1     :
-      (void) rou_alert(0,"%s Polling error (error=<%s>)",OPEP,strerror(errno));
+    case -1     :       //polling error
+      //(void) rou_alert(0,"%s JMPDBG Poll error=<%s>",OPEP,strerror(errno));
       break;
-    case  0     :
-      (void) rou_alert(0,"%s Polling timeout millisec='%d'",OPEP,millisec);
+    case  0     :       //polling timeout
+      //(void) rou_alert(0,"%s JMPDBG Polling timeout",OPEP);
       break;
-    case 1      :
-      (void) rou_alert(0,"%s Polling return millisec='%d' revent='%08x",
-                          OPEP,millisec,polling[0].revents);
+    case 1      :       //polling early return (data or event)
+      //(void) rou_alert(0,"%s JMPDBG Polling return",OPEP);
       status=-2;        //wlets say it is disconnected
-      if (isconnected(soc)==true) {
+      if (isconnected(soc)==true) 
         status=soc_receive(socptr);
-        (void) rou_alert(0,"%s JMPDBG soc_recieve status='%d'",OPEP,status);
-        }
       break;
     default     :
       break;
@@ -1087,7 +1084,7 @@ buffer=(char *)0;
 phase=0;
 proceed=true;
 while (proceed==true) {
-  (void) rou_alert(0,"JMPDBG %s phase='%d'",OPEP,phase);
+  //(void) rou_alert(0,"JMPDBG %s phase='%d'",OPEP,phase);
   switch (phase) {
     case 0      :       //is socket available
       if (soc==(SOCTYP *)0) {
@@ -1115,8 +1112,6 @@ while (proceed==true) {
           got=recv(soc->handle,buffer,limit,MSG_DONTWAIT);
           break;
         }
-      (void) rou_alert(0,"%s, JMPDBG got=%d char buffer=<%s> errno='%d'",
-                          OPEP,got,buffer,errno);
       break;
     case 3      :       //check about recieved data
       switch (got) {
index 0c9933cb91b2623a97265958eaabc2d3e5822cef..c3cf5c2be3b24d7daa455735299332bacdc78976 100644 (file)
@@ -62,7 +62,6 @@ for (int i=0;i<argc;i++) {
   proto=pro_smtp; 
   ipnum=DFLTIP;
   port=SMTPORT;
-  (void) rou_alert(0,"JMPDBG argv[%d]=<%s>",i,argv[i]);
   for (int j=0;j<3;j++) {
     char *sofar;
 
@@ -379,6 +378,5 @@ while (proceed==true) {
     }
   phase++;
   }
-(void) rou_alert(0,"JMPDBG %s exiting",OPEP);
 #undef  OPEP
 }
index 4f57ae930bcfb6d10524c10a5f919e8a8bf43197..d7bcb9cab4b820540e5a112267ba58d4b56bd29c 100644 (file)
@@ -21,7 +21,7 @@
 
 //version definition 
 #define VERSION "0.6"
-#define RELEASE "36"
+#define RELEASE "37"
 #define BRANCH "dvl"
 
 //Public variables