Altre correzioni alle funzioni, con riscrittura di ip_ntop per usare switch,
[gapil.git] / sources / TCP_echod.c
index 7062c3b8e658ff0ec7a7f524fffd1dd5951313c2..689049265861498279830c4fe0626f8ff22ac9c8 100644 (file)
@@ -116,8 +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 (errno) perror("Socket creation error");
+    if ( (list_fd = sockbind(NULL, "echo", 6, SOCK_STREAM)) < 0) {
        return 1;
     }   
     /* release privileges and go daemon */