./data-queue/
+dbgsorter: clean debug
+ @ mkdir -p $(TESTDIR)/var/spool/$(APPNAME)/queue
+ @ cp -a \
+ data-queue/* \
+ $(TESTDIR)/var/spool/$(APPNAME)/queue
+ @ gdb \
+ --args \
+ bin/sorter \
+ -f \
+ -d 2 \
+ -c ./conf/mailleur.conf.dvl \
+ -r $(TESTDIR)
+
#--------------------------------------------------------------------
#To test sender
sender : clean debug newtest
#define OPEP "geseml.c:eml_doneqfile,"
_Bool check;
+SIDTYP **sids;
check=true;
-(void) rou_alert(0,"%s JMPDBG check done",OPEP);
+sids=(SIDTYP **)0;
+(void) rou_alert(0,"%s JMPDBG trying check",OPEP);
+if (list!=(TRATYP **)0) {
+ while (*list!=(TRATYP *)0) {
+ SIDTYP *found;
+
+ found=eml_addsid(&sids,(*list)->sessid);
+ switch ((*list)->code) {
+ case 'C' : //completed
+ break;
+ default :
+ found->count++;
+ break;
+ }
+ list++;
+ }
+ }
+if (sids!=(SIDTYP **)0) {
+ SIDTYP **ptr;
+
+ ptr=sids;
+ while (*ptr!=(SIDTYP *)0) {
+ if ((*ptr)->count==0) {
+ (void) rou_alert(0,"%s JMPDBG need to remove <%s>",OPEP,(*ptr)->sessid);
+ (void) eml_deleteqfile((*ptr)->sessid);
+ }
+ ptr++;
+ }
+ sids=eml_freesid(sids);
+ }
return check;
#undef OPEP
/********************************************************/
/* */
/* 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. */
/* */
/********************************************************/
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);
+
+//get a session unique id
+extern char *eml_getmainsesid();
+
+//procedure to add recipient to a recipient 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);