]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Able to update the sessions table
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Sun, 29 Jun 2025 12:06:18 +0000 (08:06 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Sun, 29 Jun 2025 12:06:18 +0000 (08:06 -0400)
lib/devsql.c
lib/lvleml.c
lib/unisql.h

index 2b5b4ebba6e506331f2d21c2fd9b93fec5bad85a..9853ad50605af6bafe3e08f73ed457b8a59d715a 100644 (file)
@@ -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)
index 9f8fe6cd74c26e44e8d9af9f2650812dc2542ac4..4657b19b431018c988443e18e2844e93a0087621 100644 (file)
@@ -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;
index 839eecc98458e7bc0decfda83599a5c1073c2d74..67400d75105f3e1310de9568b608cd5aee6c39e1 100644 (file)
@@ -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