]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Adjusting socpurge execution sequence (before starttls)
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 4 Jul 2025 10:09:06 +0000 (06:09 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 4 Jul 2025 10:09:06 +0000 (06:09 -0400)
Makefile.dbg
lib/devsoc.c

index e130466d106f581aa85b974abcc638ae795c4d71..6b8b4725c4f4cba6e38e96b4c92cc159f9f2a0ee 100644 (file)
@@ -43,7 +43,7 @@ digest        :  clean debug
                -r $(TESTDIR)                           \
                -c ./conf/$(APPNAME).conf.dvl           \
                -d 9                                    \
-               "|192.219.254.70|1025|1"
+               "|127.127.10.25|1025|1"
 
 onercvr        :  clean debug
           @                                            \
index 7da7ef49d754388598b609813dd4e7a9d8aa68e9..98aeeb38751838907e7755d2704a3f39af42b5b9 100644 (file)
@@ -386,6 +386,7 @@ while (proceed==true) {
         phase=999;      //No char,no need to check for line
       break;
     case 1      :       //do we have a buffer full;
+      //(void) rou_alert(0,"%s capile=<%s>",OPEP,soc->carpile);
       if (soc->carin>=(soc->maxcarin)-1) {
         //Overload! trying to overcome by extending carpile an adding an EOL
         soc->carpile=(char *)realloc(soc->carpile,(soc->carin+5)*sizeof(char));
@@ -1521,26 +1522,25 @@ SOCTYP *soc;
 ok=false;
 soc=(SOCTYP *)socptr;
 if ((soc!=(SOCTYP *)0)&&(soc->modtls==false)) {
+  char *peerip;
 
+  peerip=(char *)0;
+  switch (server)       {
+    case true   :
+      peerip=soc_getaddrinfo(socptr,false,false);
+      (void) socpurge(soc,peerip);
+      peerip=rou_freestr(peerip);
+      break;
+    case false  :
+      break;
+    }
   soc->tls=tls_opentls(soc->handle,server);
   if (soc->tls!=(TLSTYP *)0) {
-    char *peerip;
-
-    peerip=(char *)0;
     soc->proto=pro_smtps;
     soc->modtls=true;
     ok=true;
-    switch (server)       {
-      case true   :
-        peerip=soc_getaddrinfo(socptr,false,false);
-        (void) socpurge(soc,peerip);
-        break;
-      case false  :
-        break;
-      }
     (void) tls_verify(soc->tls);
     soc->cipherid=tls_getcipherid(soc->tls);
-    peerip=rou_freestr(peerip);
     }
   }
 return ok;