X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=sources%2FTCP_echod.c;h=f0eab95c2f7c5064b3bb8611eb684eef27629d35;hp=7062c3b8e658ff0ec7a7f524fffd1dd5951313c2;hb=f56df9c083fb4cfcfc410513304be39602001ae7;hpb=8654ce33b450ae7bb34c3907835000a0760c2931 diff --git a/sources/TCP_echod.c b/sources/TCP_echod.c index 7062c3b..f0eab95 100644 --- a/sources/TCP_echod.c +++ b/sources/TCP_echod.c @@ -116,7 +116,7 @@ int main(int argc, char *argv[]) SignalRestart(SIGCHLD, HandSigCHLD); /* restarting handler */ } /* create and bind socket */ - if ( (list_fd = sockbind(argv[optind], "echo", 6, SOCK_STREAM)) < 0) { + if ( (list_fd = sockbind(NULL, "echo", 6, SOCK_STREAM)) < 0) { if (errno) perror("Socket creation error"); return 1; }