From: Jean-Marc Pigeon (Delson) Date: Fri, 9 May 2025 15:16:06 +0000 (-0400) Subject: Code cleaning (tstfeed OK) X-Git-Tag: tag-0.8~115 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=06e4382ee28755ed9ad0147ab7e3d6ed8ca6aba7;p=jmp%2Fmailleur Code cleaning (tstfeed OK) --- diff --git a/data-feed/xxfeed.tst b/data-feed/xxfeed.tst index 0494b0a..e22830b 100644 --- a/data-feed/xxfeed.tst +++ b/data-feed/xxfeed.tst @@ -4,7 +4,7 @@ T:Very Simple email sending R:220 mailleur.example.com ESMTP (cleartext) emlrcvr... C:ORGN 127.127.0.2 R:220 mailleur.example.com ESMTP (cleartext) emlrcvr... -C:WAIT 100 +#C:WAIT 100 #==================================================== S:HELO example.com #R:250-mailleur.example.com, link (cleartext) ready, your IP/FQDN=[127.127.0.2/feed2.example.com] diff --git a/lib/devlog.c b/lib/devlog.c index 7fc569a..cb1c64f 100644 --- a/lib/devlog.c +++ b/lib/devlog.c @@ -80,7 +80,7 @@ event=(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 : //do we have a log name? if (logname==(char *)0) { @@ -237,7 +237,7 @@ log=(LOGTYP *)logptr; 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 a log reference? if (log==(LOGTYP *)0) diff --git a/lib/devsoc.c b/lib/devsoc.c index b69555f..1d8d291 100644 --- a/lib/devsoc.c +++ b/lib/devsoc.c @@ -291,7 +291,7 @@ _Bool proceed; 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 the connect still active if (soc->connected==false) //no!, no need to shutdown @@ -317,9 +317,6 @@ while (proceed==true) { "(errno=<%s>)", OPEP,soc->ip,soc->port,strerror(errno)); } - (void) rou_alert(0,"JMPDBG %s sleep in",OPEP,phase); - (void) sleep(1); //JMPDBG - (void) rou_alert(0,"JMPDBG %s sleep out",OPEP,phase); break; default : //SAFE Guard proceed=false; diff --git a/lib/gestcp.c b/lib/gestcp.c index ab7d2b9..5c7d17e 100644 --- a/lib/gestcp.c +++ b/lib/gestcp.c @@ -47,7 +47,7 @@ got=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 : //link still open? if (soc_receive(socptr)<0) { diff --git a/lib/lvleml.c b/lib/lvleml.c index 6bd69d2..a06e222 100644 --- a/lib/lvleml.c +++ b/lib/lvleml.c @@ -747,7 +747,7 @@ _Bool proceed; 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 : //check for binding if (contact==(CONTYP *)0) { diff --git a/lib/modrec.c b/lib/modrec.c index b52ee54..41b7df4 100644 --- a/lib/modrec.c +++ b/lib/modrec.c @@ -121,7 +121,7 @@ intstat=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 : //waiting contact (void) rou_checkleak(true); @@ -154,7 +154,6 @@ while (proceed==true) { case 3 : //connection terminated contact=eml_dropcontact(contact); (void) rou_checkleak(false); - (void) rou_alert(0,"%s JMPBG apres checleak",OPEP); break; default : //SAFE guard proceed=false; @@ -231,13 +230,13 @@ while (proceed==true) { break; case 4 : //Relax time phase=0; //lets continue to check childs - (void) rou_alert(0,"%s, start sleep",OPEP); - (void) sleep(10); //signal received to exit fast. + (void) rou_alert(5,"%s, start sleep",OPEP); + (void) sleep(5); //signal received to exit fast. if (childout==true) { - (void) rou_alert(0,"%s, Got child out",OPEP); + (void) rou_alert(5,"%s, Got child out",OPEP); childout=false; } - (void) rou_alert(0,"%s, Exit from sleep",OPEP); + (void) rou_alert(5,"%s, Exit from sleep",OPEP); if ((hangup==true)||(reload==true)) phase=999; //exiting under signal break; diff --git a/lib/subrou.c b/lib/subrou.c index 0f2257a..7319908 100644 --- a/lib/subrou.c +++ b/lib/subrou.c @@ -91,7 +91,6 @@ if ((debug>2)&&(current!=onoff)) { (void) snprintf(cmd,sizeof(cmd),"sed -i '/%d/d' %s",getpid(),ENABLE); break; } - (void) rou_alert(0,"JMPDBG leak command=<%s>",cmd); if ((status=system(cmd))!=0) { (void) rou_alert(0,"status '%d' to memleak command <%s> (bug?)",status,cmd); } diff --git a/lib/unisig.c b/lib/unisig.c index 2cb0513..4a8009a 100644 --- a/lib/unisig.c +++ b/lib/unisig.c @@ -89,18 +89,10 @@ PUBLIC void sig_alrm(int sig) { #define OPEP "unisig.c:sig_alrm" -(void) rou_alert(0,"%s, signal <%s> received",OPEP,strsignal(sig)); +(void) rou_alert(9,"%s, signal <%s> received",OPEP,strsignal(sig)); switch (sig) { case SIGCHLD : { -/* - struct signalfd_siginfo sfd_si; - - if (read(sfd,&sfd_si,sizeof(sfd_si))<0) { - (void) rou_alert(0,"%s, Unable to get siginfo (error=<%s>)", - OPEP,strerror(errno)); - } - */ childout=true; while (waitpid(-1,(int *)0,WNOHANG)>0); } @@ -139,7 +131,6 @@ switch (sig) } //able to receive next signal (void) signal(sig,sig_alrm); -(void) rou_alert(0,"%s, signal <%s> exited",OPEP,strsignal(sig)); #undef OPEP } /*