From d39617c9a1c768f72c7cc760f47e58c71c919484 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Fri, 20 Jun 2025 17:29:58 -0400 Subject: [PATCH] Able to write data to mailref1 --- app/feeder.c | 4 ++-- lib/gestcp.c | 9 ++++----- lib/gestcp.h | 2 +- lib/lvleml.c | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/feeder.c b/app/feeder.c index 4b19c4a..6293e10 100644 --- a/app/feeder.c +++ b/app/feeder.c @@ -99,8 +99,8 @@ static int sendout(SOCPTR *socptr,char *line) { int taille; -taille=tcp_Swrite(socptr,line); -taille+=tcp_Swrite(socptr,CRLF); +taille=tcp_write(socptr,line); +taille+=tcp_write(socptr,CRLF); return taille; } /* diff --git a/lib/gestcp.c b/lib/gestcp.c index 79d540c..7b46c45 100644 --- a/lib/gestcp.c +++ b/lib/gestcp.c @@ -122,7 +122,7 @@ return got; /* return the number of char sent on channel. */ /* */ /********************************************************/ -PUBLIC int tcp_Swrite(SOCPTR *socptr,char *buffer) +PUBLIC int tcp_write(SOCPTR *socptr,char *buffer) { int sent; @@ -134,7 +134,6 @@ if (socptr!=(SOCPTR *)0) { taille=strlen(buffer); if (taille>0) sent=soc_writebuffer(socptr,buffer,taille); - (void) rou_alert(0,"JMPDBG Swrite=<%s>",buffer); } return sent; } @@ -210,7 +209,7 @@ va_start(args,fmt); va_end(args); (void) log_fprintlog(rmt->logptr,false,strloc); (void) strcat(strloc,CRLF); -(void) tcp_Swrite(rmt->socptr,strloc); +(void) tcp_write(rmt->socptr,strloc); return tcp_get_smtp_reply(rmt,WAITRMT,resp); } /* @@ -270,12 +269,12 @@ while (proceed==true) { if ((strlen(data)>0)&&(data[0]=='.')) (void) memmove(data,data+1,strlen(data+1)); (void) strcat(data,CRLF); - sent+=tcp_Swrite(rmt->socptr,data); + sent+=tcp_write(rmt->socptr,data); } break; } case 2 : //end of transmission - sent+=tcp_Swrite(rmt->socptr,ENDDATA); + sent+=tcp_write(rmt->socptr,ENDDATA); break; case 3 : //closing datafile qfile=eml_closeqfile(qfile); diff --git a/lib/gestcp.h b/lib/gestcp.h index dc8b78d..734a60c 100644 --- a/lib/gestcp.h +++ b/lib/gestcp.h @@ -31,7 +31,7 @@ PUBLIC char *tcp_addline(char *buffer,char *line); extern int tcp_getline(SOCPTR *socptr,u_int secwait,char **lineptr); //Transmit formated data to the contact channel -extern int tcp_Swrite(SOCPTR *socptr,char *buffer); +extern int tcp_write(SOCPTR *socptr,char *buffer); //wait and answer from remote and return the reply code extern int tcp_get_smtp_reply(RMTTYP *rmt,int wait,char ***resp); diff --git a/lib/lvleml.c b/lib/lvleml.c index 40e1380..959fa1c 100644 --- a/lib/lvleml.c +++ b/lib/lvleml.c @@ -138,7 +138,7 @@ if (rou_vasprintf(&line,fmt,args)>0) { contact->transout=tcp_addline(contact->transout,line); } if (flush==true) { - (void) tcp_Swrite(contact->socptr,contact->transout); + (void) tcp_write(contact->socptr,contact->transout); contact->transout=rou_freestr(contact->transout); } line=rou_freestr(line); -- 2.47.3