From: Jean-Marc Pigeon (Delson) Date: Fri, 11 Jul 2025 14:30:07 +0000 (-0400) Subject: set 'links'=0 within table remotes when starting receiver X-Git-Tag: tag-0.14~134 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=722a3b80147ba20a8f80997d83f705e1b5e9c523;p=jmp%2Fmailleur set 'links'=0 within table remotes when starting receiver --- diff --git a/Makefile.dbg b/Makefile.dbg index 1c5e4cc..e667988 100644 --- a/Makefile.dbg +++ b/Makefile.dbg @@ -69,7 +69,7 @@ onefeed : debug @ \ bin/feeder \ -f \ - -d 9 \ + -d 2 \ -c ./conf/$(APPNAME).conf.dvl \ $(TESTIP) \ $(TESTPORT) \ diff --git a/app/feeder.c b/app/feeder.c index 99a8c60..e040dfd 100644 --- a/app/feeder.c +++ b/app/feeder.c @@ -609,7 +609,6 @@ while (proceed==true) { } break; case 3 : //discarding comment - (void) rou_alert(0,"%s action='%c' line=<%s>",OPEP,action,line); switch (action) { case 'C' : //command to execute status=docommand(fd,numline,line); diff --git a/data-feed/feed05.tst b/data-feed/feed05.tst index e60d838..58fdaa6 100644 --- a/data-feed/feed05.tst +++ b/data-feed/feed05.tst @@ -4,7 +4,7 @@ C:CONNECT #==================================================== R:220 mailleur.example.com, ESMTP (cleartext) mailleur... S:helo example.com -R:250 mailleur.example.com, link (cleartext) ready, your IP/FQDN=[127.127.0.25/No.Reverse] +R:250 mailleur.example.com, link (cleartext) ready, your IP/FQDN=[127.127.99.25/No.Reverse] S:QUIT R:221 2.0.0 Bye, closing connection... #------------------------------------------------------------------------- diff --git a/lib/gessql.c b/lib/gessql.c index 90e658b..b0f8448 100644 --- a/lib/gessql.c +++ b/lib/gessql.c @@ -85,6 +85,19 @@ return isok; */ /********************************************************/ /* */ +/* Procedure to set all remotes links value to zero*/ +/* */ +/********************************************************/ +PUBLIC void sql_droplinks(SQLPTR *sqlptr) + +{ +(void) sql_request(sqlptr,"update "RMTTBL" set links=0"); +} +/* +^L +*/ +/********************************************************/ +/* */ /* Procedure to update the database with respond */ /* Record associated with TRA. */ /* Return the number of record stored within the */ diff --git a/lib/gessql.h b/lib/gessql.h index f736773..665d54a 100644 --- a/lib/gessql.h +++ b/lib/gessql.h @@ -12,6 +12,9 @@ #include "unieml.h" #include "devsql.h" +//procedure to remove ALL link counts within the remotes tables +extern void sql_droplinks(SQLPTR *sqlptr); + //procedure to update transaction information extern int sql_update_tradb(SQLPTR *sqlptr,TRATYP **tralist); diff --git a/lib/lvleml.c b/lib/lvleml.c index de17d15..44c9085 100644 --- a/lib/lvleml.c +++ b/lib/lvleml.c @@ -84,6 +84,7 @@ static CONTYP *freecontact(CONTYP *contact) if (contact!=(CONTYP *)0) { (void) freesessid(contact); + (void) sql_droplinks(contact->sqlptr); contact->sqlptr=sql_closesql(contact->sqlptr); contact->logptr=log_closelog(contact->logptr); contact->recipients=(RCPTYP **)rou_freelist((void **)contact->recipients, @@ -2209,6 +2210,7 @@ while (proceed==true) { } break; case 2 : //waiting from contact + (void) sql_droplinks(contact->sqlptr); if ((contact->socptr=soc_accept(socptr,pos))==(SOCPTR *)0) { (void) rou_alert(3,"%s Unable to open contact",OPEP); contact=freecontact(contact);