if(net->connection[i].status&C_INFO_A) {
- if(!net->connection[i].status&C_SOCKET) {
+ if(!(net->connection[i].status&C_SOCKET)) {
if((net->connection[i].fd=socket(AF_INET,SOCK_STREAM,0))==-1) {
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));
int len;
for(channel=0;channel<MAX_CONNECTIONS;channel++) {
- if(!net->connection[channel].status&C_IN_USE) {
+ if(!(net->connection[channel].status&C_IN_USE)) {
if((net->connection[channel].fd=accept(net->l_fd,
(struct sockaddr *)&addr,
&len))==-1) {