X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=sources%2FSimpleEchoTCPClient.c;h=31adf9fdabc7793ab906b6af25e8658f055cd854;hp=feac7865e6476ff2fe51590d7c402583d358bdd3;hb=dc5d6dd815d1aeac2f42891ec2f0a3f38c816ac1;hpb=8363203066864251f55edeb8e41bcce81fa7da7b diff --git a/sources/SimpleEchoTCPClient.c b/sources/SimpleEchoTCPClient.c index feac786..31adf9f 100644 --- a/sources/SimpleEchoTCPClient.c +++ b/sources/SimpleEchoTCPClient.c @@ -8,7 +8,7 @@ * * Usage: echo -h give all info's * - * $Id: SimpleEchoTCPClient.c,v 1.1 2001/06/12 22:17:22 piccardi Exp $ + * $Id: SimpleEchoTCPClient.c,v 1.3 2001/06/17 21:58:46 piccardi Exp $ * ****************************************************************/ /* @@ -105,10 +105,7 @@ void EchoClient(FILE * filein, int socket) int nread; while (fgets(sendbuff, MAXLINE, filein) != NULL) { SockWrite(socket, sendbuff, strlen(sendbuff)); - if ( (nread = SockRead(socket, recvbuff, MAXLINE)) == 0) { - perror("Sever read error:"); - exit(-1); - } + nread = SockRead(socket, recvbuff, strlen(sendbuff)); recvbuff[nread] = 0; fputs(recvbuff, stdout); }