projects
/
gapil.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Completata sezione sulla risoluzione di nomi ed indirizzi, iniziato a
[gapil.git]
/
sources
/
TCP_echod.c
diff --git
a/sources/TCP_echod.c
b/sources/TCP_echod.c
index 689049265861498279830c4fe0626f8ff22ac9c8..cca49332ade78b32be343a7d57dea39f64cc4f67 100644
(file)
--- a/
sources/TCP_echod.c
+++ b/
sources/TCP_echod.c
@@
-64,7
+64,7
@@
int main(int argc, char *argv[])
int waiting = 0;
int compat = 0;
pid_t pid;
int waiting = 0;
int compat = 0;
pid_t pid;
- struct sockaddr_in
serv_add,
cli_add;
+ struct sockaddr_in cli_add;
socklen_t len;
char debug[MAXLINE], ipaddr[20];
/*
socklen_t len;
char debug[MAXLINE], ipaddr[20];
/*
@@
-116,7
+116,7
@@
int main(int argc, char *argv[])
SignalRestart(SIGCHLD, HandSigCHLD); /* restarting handler */
}
/* create and bind socket */
SignalRestart(SIGCHLD, HandSigCHLD); /* restarting handler */
}
/* create and bind socket */
- if ( (list_fd = sockbind(
NULL
, "echo", 6, SOCK_STREAM)) < 0) {
+ if ( (list_fd = sockbind(
argv[optind]
, "echo", 6, SOCK_STREAM)) < 0) {
return 1;
}
/* release privileges and go daemon */
return 1;
}
/* release privileges and go daemon */