projects
/
my-code
/
ivac.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bugfixed !( stuff
[my-code/ivac.git]
/
src
/
network.c
diff --git
a/src/network.c
b/src/network.c
index
9ccb2b5
..
66314f9
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-96,7
+96,7
@@
int network_manage_connection(t_net *net) {
if(net->connection[i].status&C_INFO_A) {
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;
if((net->connection[i].fd=socket(AF_INET,SOCK_STREAM,0))==-1) {
perror("[network] socket call");
return N_ERROR;
@@
-104,7
+104,7
@@
int network_manage_connection(t_net *net) {
net->connection[i].status|=C_SOCKET;
}
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));
(net->connection[i].status&C_SOCKET)) {
memset(&addr,0,sizeof(struct sockaddr));
@@
-143,7
+143,7
@@
int network_manage_incoming(t_net *net) {
int len;
for(channel=0;channel<MAX_CONNECTIONS;channel++) {
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) {
if((net->connection[channel].fd=accept(net->l_fd,
(struct sockaddr *)&addr,
&len))==-1) {