From a49bcb8d98995bd2707f3316f276ba1f0b0b8706 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Fri, 13 Jun 2025 05:15:25 -0400 Subject: [PATCH] queue directory is now clean once email is sent --- Makefile | 6 ++++++ lib/geseml.c | 4 ++++ lib/unieml.c | 59 ---------------------------------------------------- lib/unieml.h | 11 ---------- 4 files changed, 10 insertions(+), 70 deletions(-) diff --git a/Makefile b/Makefile index 67ade01..efa51d4 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,12 @@ TESTITER= 1 #-------------------------------------------------------------------- #To test sorter dosorter: + @ bin/sorter \ + -d 2 \ + -c ./conf/mailleur.conf.dvl \ + -r $(TESTDIR) + +donesort: @ bin/sorter \ -f \ -d 2 \ diff --git a/lib/geseml.c b/lib/geseml.c index e9c211b..57bdcc5 100644 --- a/lib/geseml.c +++ b/lib/geseml.c @@ -499,8 +499,12 @@ if (list!=(TRATYP **)0) { while (*ptr!=(TRATYP *)0) { if ((*ptr)->code=='C') { if (eml_countqfile((*ptr)->sessid,-1)==0) { + char fname[200]; + (void) rou_alert(0,"%s JMPDBG need to remove <%s>",OPEP,(*ptr)->sessid); + (void) snprintf(fname,sizeof(fname),"%s.%s",(*ptr)->sessid,EXTCNT); (void) eml_deleteqfile((*ptr)->sessid); + (void) eml_deleteqfile(fname); } } else diff --git a/lib/unieml.c b/lib/unieml.c index fd66b8c..93a03b0 100644 --- a/lib/unieml.c +++ b/lib/unieml.c @@ -45,65 +45,6 @@ static VOCTYP vocsmtp[]={ /********************************************************/ /* */ /* Procedure to free memory used by a list of */ -/* session id. */ -/* */ -/********************************************************/ -PUBLIC SIDTYP **eml_freesid(SIDTYP **list) - -{ -if (list!=(SIDTYP **)0) { - SIDTYP **ptr; - - ptr=list; - while (*ptr!=(SIDTYP *)0) { - (void) free(*ptr); - ptr++; - } - (void) free(list); - list=(SIDTYP **)0; - } -return list; -} -/* -^L -*/ -/********************************************************/ -/* */ -/* Procedure to add an session ID to a list of */ -/* session ID */ -/* */ -/********************************************************/ -PUBLIC SIDTYP *eml_addsid(SIDTYP ***list,char *sessid) - -{ -SIDTYP *found; - -found=(SIDTYP *)0; -if (*list!=(SIDTYP **)0) { - SIDTYP **ptr; - - ptr=*list; - while (*ptr!=(SIDTYP *)0) { - if (strcmp(sessid,(*ptr)->sessid)==0) { - found=*ptr; - break; - } - ptr++; - } - } -if (found==(SIDTYP *)0) { - found=(SIDTYP *)calloc(1,sizeof(SIDTYP)); - found->sessid=sessid; - *list=(SIDTYP **)rou_addlist((void **)*list,(void *)found); - } -return found; -} -/* -^L -*/ -/********************************************************/ -/* */ -/* Procedure to free memory used by a list of */ /* recipient. */ /* */ /********************************************************/ diff --git a/lib/unieml.h b/lib/unieml.h index f2be473..071cbb1 100644 --- a/lib/unieml.h +++ b/lib/unieml.h @@ -64,17 +64,6 @@ typedef struct { //*definition of recipient char *userid; //recipient email userid }RCPTYP; -typedef struct { //definition of SID reference - int count; //Number of SESSID reference - char *sessid; //Session ID reference - }SIDTYP; - -//Freeing list of sessid -extern SIDTYP **eml_freesid(SIDTYP **list); - -//adding an session ID to a list of session -extern SIDTYP *eml_addsid(SIDTYP ***list,char *sessid); - //procedure to Free one recipient info extern RCPTYP *eml_freerecipient(RCPTYP *info); -- 2.47.3