]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Problem with routine send_to_mx
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Sun, 15 Jun 2025 05:00:21 +0000 (01:00 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Sun, 15 Jun 2025 05:00:21 +0000 (01:00 -0400)
lib/lvleml.c
lib/subrou.c

index 42980f98d3a0529de0c04a248facba92658203b9..de9e911f2ebb7e2107f8d4745cca584b9a67aa3f 100644 (file)
@@ -1258,7 +1258,7 @@ while (proceed==true) {
         phase=999;      //No need to go further
         }
       break;
-    case 5      :  {    //sending originator
+    case 4      :  {    //sending originator
       int rspcode;
 
       rspcode=simple_smtp_command(rmt,"MAIL FROM: <%s>",(*tosend)->mailfrom);
@@ -1273,7 +1273,7 @@ while (proceed==true) {
         }
       break;
       }
-    case 6      :  {    //sending recipient list
+    case 5      :  {    //sending recipient list
       TRATYP **dest;
 
       dest=tosend;
@@ -1287,10 +1287,10 @@ while (proceed==true) {
         }
       break;
       }
-    case 7      :      //closing current connection with MX
+    case 6      :      //closing current connection with MX
       (void) close_mx(rmt);
       break;
-    case 8      :       //cleaning recipient list
+    case 7      :       //cleaning recipient list
       (void) free(tosend);
       tosend=(TRATYP **)0;
       phase=0;          //Lets see if we have other recipient
index 78d86b48fb0fa68b7f9c96e91a31c01882efcc85..fb1fa5b545e2a87b54cfd7a57dd55d0f5cd79123 100644 (file)
@@ -273,20 +273,8 @@ return str;
 char *rou_stripcrlf(char *line)
 
 {
-if (line!=(char *)0) {
-  register int taille;
-  register char *ptr;
-
-  taille=strlen(line)-1;
-  ptr=line+taille;
-  while ((*ptr=='\n') || (*ptr=='\r')) {
-    *ptr='\000';
-    taille--;
-    if (taille<0)
-      break;
-    ptr--;
-    }
-  }
+if (line!=(char *)0)
+  line[strcspn(line,"\r\n")]='\000';
 return line;
 }