Fixed an issue in list.

Cleaned up TCP server a bit.
This commit is contained in:
irungentoo 2014-05-22 17:12:46 -04:00
parent b6cbdefb55
commit ad28acd18e
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98
3 changed files with 4 additions and 6 deletions

View File

@ -990,7 +990,7 @@ static int do_unconfirmed(TCP_Server *TCP_server, uint32_t i)
}
}
static int do_confirmed_recv(TCP_Server *TCP_server, uint32_t i)
static void do_confirmed_recv(TCP_Server *TCP_server, uint32_t i)
{
TCP_Secure_Connection *conn = &TCP_server->accepted_connection_array[i];
@ -1130,8 +1130,6 @@ static void do_TCP_epoll(TCP_Server *TCP_server)
sock_new = accept(sock, (struct sockaddr *)&addr, &addrlen);
struct sockaddr a = *(struct sockaddr *)&addr;
int index_new = TCP_server->incomming_connection_queue_index % MAX_INCOMMING_CONNECTIONS;
if (!accept_connection(TCP_server, sock_new)) {

View File

@ -108,9 +108,9 @@ typedef struct TCP_Secure_Connection {
typedef struct {
Onion *onion;
#ifdef TCP_SERVER_USE_EPOLL
#ifdef TCP_SERVER_USE_EPOLL
int efd;
#endif
#endif
sock_t *socks_listening;
unsigned int num_listening_socks;

View File

@ -124,7 +124,7 @@ int list_find(LIST *list, void *data)
//return only -1 and positive values
if (r < 0) {
r = -1;
return -1;
}
return list->ids[r];