From: Jean-Marc Pigeon (Delson) Date: Mon, 7 Apr 2025 00:11:14 +0000 (-0400) Subject: Client is unable to read incoming TLS char! X-Git-Tag: tag-0.7~24 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=5aeef2d36c9aa0143fe8d9b73f2253ac65945a16;p=jmp%2Fmailleur Client is unable to read incoming TLS char! --- diff --git a/app/feeder.c b/app/feeder.c index 4c9ca37..f7cf255 100644 --- a/app/feeder.c +++ b/app/feeder.c @@ -186,7 +186,7 @@ static _Bool docommand(SOCPTR *socptr,int numline,char *line) _Bool status; char *param; -status=false; +status=true; if ((param=strchr(line,' '))!=(char *)0) { *param='\000'; //cut line param++; //pointer on parameter @@ -196,16 +196,17 @@ switch (getcmd(line)) { if ((status=gomodetls(socptr))==false) (void) report(numline,line,"Unable to set TLS mode"); break; - case 2 : //GOTLS - if (param==(char *)0) - (void) report(numline,line,"Missing 'seconds' parameters"); - else { + case 2 : //SLEEP + if (param!=(char *)0) (void) sleep(atoi(param)); - status=true; + else { + (void) report(numline,line,"Missing 'seconds' parameters"); + status=false; } break; default : (void) report(numline,line,"Unknown command"); + status=false; break; } return status; @@ -254,6 +255,7 @@ while (proceed==true) { case 1 : //waiting for a line with CRLF received=(char *)0; got=tcp_getline(socptr,WAITLINE,&received); + (void) rou_alert(0,"%s, received=<%s>",OPEP,received); switch (got) { case 0 : //Reading timeout (void) rou_alert(0,"Unable to receive line in due time"); diff --git a/data-tst/feed00.tst b/data-tst/feed00.tst index 12be1b2..43a8c79 100644 --- a/data-tst/feed00.tst +++ b/data-tst/feed00.tst @@ -10,9 +10,9 @@ # S: outgoing data # T: Test titre or Info T:basic test function -R:220 emlrcvr ESMTP emlrcvr... +R:220 mailleur.example.com ESMTP emlrcvr... S:EHLO example.com -R:250-emlrcvr ready, your IP/FQDN=[127.0.0.1/localhost.localdomain] +R:250-mailleur.example.com ready, your IP/FQDN=[127.0.0.1/localhost.localdomain] R:250-SIZE 52428800 R:250-ORGN R:250-STARTTLS @@ -21,7 +21,7 @@ R:250-ENHANCEDSTATUSCODES R:250-AUTH PLAIN LOGIN R:250 HELP C:GOTLS -C:SLEEP 10 +R:250 HELP #send a empty ehlo S:EHLO R:501 5.5.4 syntax error (domain part missing), closing connection. diff --git a/lib/subrou.c b/lib/subrou.c index 3ef608c..44e121d 100644 --- a/lib/subrou.c +++ b/lib/subrou.c @@ -21,7 +21,7 @@ //version definition #define VERSION "0.6" -#define RELEASE "50" +#define RELEASE "51" #define BRANCH "dvl" //Public variables