projects
/
my-code
/
ivac.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26a86ac
)
close all sockets of connections in shutdown process
author
hackbard
<hackbard>
Thu, 6 May 2004 19:18:54 +0000
(19:18 +0000)
committer
hackbard
<hackbard>
Thu, 6 May 2004 19:18:54 +0000
(19:18 +0000)
src/network.c
patch
|
blob
|
history
diff --git
a/src/network.c
b/src/network.c
index
3e9fe39
..
5fae09d
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-53,6
+53,12
@@
int network_init(t_net *net) {
int network_shutdown(t_net *net) {
+ int channel;
+
+ for(channel=0;channel<MAX_CONNECTIONS;channel++)
+ if(net->connection[channel].status&C_SOCKET)
+ close(net->connection[channel].fd);
+
if(close(net->l_fd)==-1) {
perror("[network] close call");
return N_ERROR;