peer->addr, &peer->addrlen);
return len;
}
-next_recv:
+
+ while (1) {
/* FIXME: What about using a loop here and continue instead of goto???? */
/* FWP_EPOINT_RELIABLE */
fdset = epoint->fdset;
if (FD_ISSET(epoint->sockd, &fdset)) { /* is it listen socket? */
if (epoint->nr_connections == epoint->attr.max_connections)
- goto next_recv;
+ continue;
csockd = accept(epoint->sockd, (struct sockaddr*)peer->addr,
&peer->addrlen);
epoint->nr_connections++;
FD_SET(csockd, &epoint->fdset);
-
- goto next_recv;
+ continue;
}
/* Check client TCP sockets */
memcpy(epoint->c_sockd+i, epoint->c_sockd+i+1,
sizeof(int)*(epoint->nr_connections -i-1));
epoint->nr_connections--;
- goto next_recv;
+ continue;
}
}
-
- return -EPERM;
+
+ }
}
/**
#define FWP_MTU 2346
#define BUFFSIZE FWP_MTU
-/* buffer and socket for incomming message */
-static unsigned char buffer[FWP_MTU];
-/* FIXME: This could be moved to local static variable in
- * fwp_mngt_input() */
-
/* Admission control test */
fwp_admctrl_test_t fwp_admctrl_test = &fwp_admctrl_stupid;
*/
int fwp_mngr_input(struct fwp_msgb **pmsgb)
{
+ /* buffer and socket for incomming message */
+ static unsigned char buffer[FWP_MTU];
struct fwp_msgb *msgb;
ssize_t size;