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;
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;
}