From: Jean-Marc Pigeon (Delson) Date: Sun, 29 Jun 2025 12:06:18 +0000 (-0400) Subject: Able to update the sessions table X-Git-Tag: tag-0.11~22 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=a7ae7f7f857be0bcd59612e38369736652bcd42a;p=jmp%2Fmailleur Able to update the sessions table --- diff --git a/lib/devsql.c b/lib/devsql.c index 2b5b4eb..9853ad5 100644 --- a/lib/devsql.c +++ b/lib/devsql.c @@ -447,8 +447,7 @@ for (int i=0;(isok==true)&&(sesfield[i]!=(char *)0);i++) { data=sql_gooddata(sql,(*ses)->efrom); break; case 3 : //taille - (*ses)->taille=5555; - (void) rou_asprintf(&data,"%d",(*ses)->taille); + (void) rou_asprintf(&data,"%lu",(*ses)->taille); break; default : isok=false; @@ -467,7 +466,6 @@ for (int i=0;(isok==true)&&(sesfield[i]!=(char *)0);i++) { data=rou_freestr(data); cmtset=rou_freestr(cmtset); cmtset=newset; - (void) rou_alert(0,"JMPDBG cmtset=<%s>",cmtset); } } if (isok==true) diff --git a/lib/lvleml.c b/lib/lvleml.c index 9f8fe6c..4657b19 100644 --- a/lib/lvleml.c +++ b/lib/lvleml.c @@ -38,8 +38,8 @@ static void freesessid(CONTYP *contact) { if (contact->session!=(SESTYP *)0) { - (void) sql_mngses(contact->sqlptr,sql_update,&(contact->session)); contact->session->sfrom=strdup(contact->mailfrom); + (void) sql_mngses(contact->sqlptr,sql_update,&(contact->session)); contact->session=sql_freeses(contact->session); } } @@ -554,7 +554,7 @@ static _Bool getdata(CONTYP *contact) _Bool done; FILE *queue; _Bool completed; -int total; +u_long total; TIMESPEC start; int phase; _Bool proceed; @@ -623,6 +623,7 @@ while (proceed==true) { phase=999; //Unable to create count file??? break; case 7 : //renameing directive + contact->session->taille=total; if (eml_renameqfile(contact->session->sessid,EXTMP,EXTRANS)==false) phase=999; //Trouble trouble break; diff --git a/lib/unisql.h b/lib/unisql.h index 839eecc..67400d7 100644 --- a/lib/unisql.h +++ b/lib/unisql.h @@ -33,7 +33,7 @@ typedef struct { char *sessid; //session id char *sfrom; //the "mail from" comming from SMTP exchange char *efrom; //the "mail from" as within the email itself - int taille; //Email size + u_long taille; //Email size }SESTYP; //procedure to free space used by an USRTYP