]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Not data accepted is working
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Thu, 12 Jun 2025 20:53:01 +0000 (16:53 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Thu, 12 Jun 2025 20:53:01 +0000 (16:53 -0400)
app/feeder.c

index c6b84acc29b9039d93c737052975d9fb5555b31c..aeec29b06e3f8b4b1101cf847b0cad108126890d 100644 (file)
@@ -128,6 +128,7 @@ static _Bool dosenddata(FEEDTYP *fd,int *numline,char *expected)
 int status;
 char *line;
 char *action;
+int numdata;
 char data[300];
 int phase;
 _Bool proceed;
@@ -135,6 +136,7 @@ _Bool proceed;
 status=false;
 line=(char *)0;
 action="DATA";
+numdata=0;
 (void) strcpy(data,"");
 phase=0;
 proceed=true;
@@ -161,6 +163,7 @@ while (proceed==true) {
         _Bool completed;
 
         completed=false;
+        numdata++;
         (*numline)++;
         (void) eml_removecrlf(data);
         if (data[1]!=':') {
@@ -178,7 +181,8 @@ while (proceed==true) {
           case 'C'      :       //data marker
             switch (data[2]) {
               case '.'  :       //end of data marker
-                (void) tcp_write(fd->socptr,".");
+                if (numdata>1)  //could be empty data
+                  (void) tcp_write(fd->socptr,".");
                 completed=true;
                 break;
               case 'T'  :       //timer data