projects
/
my-code
/
ivac.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bugfixes, temp. removed ncurses display funtions, fixed command parser.
[my-code/ivac.git]
/
src
/
network.c
diff --git
a/src/network.c
b/src/network.c
index
5fae09d
..
9ccb2b5
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-101,9
+101,11
@@
int network_manage_connection(t_net *net) {
perror("[network] socket call");
return N_ERROR;
}
perror("[network] socket call");
return N_ERROR;
}
+ net->connection[i].status|=C_SOCKET;
}
}
- if(!net->connection[i].status&C_ESTABL) {
+ if((!net->connection[i].status&C_ESTABL)&&
+ (net->connection[i].status&C_SOCKET)) {
memset(&addr,0,sizeof(struct sockaddr));
addr.sin_family=AF_INET;
memset(&addr,0,sizeof(struct sockaddr));
addr.sin_family=AF_INET;
@@
-121,6
+123,7
@@
int network_manage_connection(t_net *net) {
printf("[network] established connection to %s port %d on channel %d\n",
net->connection[i].ip,net->connection[i].port,i);
printf("[network] established connection to %s port %d on channel %d\n",
net->connection[i].ip,net->connection[i].port,i);
+ net->connection[i].status|=C_ESTABL;
}
}