X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=sources%2FTCP_echod_second.c;h=617eaf14dcee91572b4c66a940b9bfc59846f27c;hp=4519b29e3d3e3e63e3e18dd60448ff095dc0e119;hb=99ef4679f4d9d22707075c7e05a4dbd3900edcd1;hpb=5ae4c5191a8b2d6f9112c56d9e65dca942986fcf diff --git a/sources/TCP_echod_second.c b/sources/TCP_echod_second.c index 4519b29..617eaf1 100644 --- a/sources/TCP_echod_second.c +++ b/sources/TCP_echod_second.c @@ -26,7 +26,7 @@ * * Usage: echod -h give all info * - * $Id: TCP_echod_second.c,v 1.1 2003/08/03 18:12:47 piccardi Exp $ + * $Id: TCP_echod_second.c,v 1.2 2003/12/25 17:31:09 piccardi Exp $ * ****************************************************************/ /* @@ -42,6 +42,8 @@ #include /* signal functions */ #include /* error code */ #include /* error strings */ +#include + #include "Gapil.h" #define BACKLOG 10 @@ -153,6 +155,7 @@ int main(int argc, char *argv[]) /* handle echo to client */ while (1) { /* accept connection */ + len = sizeof(cli_add); while (((conn_fd = accept(list_fd, (struct sockaddr *)&cli_add, &len)) < 0) && (errno == EINTR)); if ( conn_fd < 0) {