From: Jean-Marc Pigeon (Delson) Date: Sun, 15 Jun 2025 05:00:21 +0000 (-0400) Subject: Problem with routine send_to_mx X-Git-Tag: tag-0.9~176 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=dd22da57108b29e98337ae90dbc821376eaefcd1;p=jmp%2Fmailleur Problem with routine send_to_mx --- diff --git a/lib/lvleml.c b/lib/lvleml.c index 42980f9..de9e911 100644 --- a/lib/lvleml.c +++ b/lib/lvleml.c @@ -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 diff --git a/lib/subrou.c b/lib/subrou.c index 78d86b4..fb1fa5b 100644 --- a/lib/subrou.c +++ b/lib/subrou.c @@ -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; }