Fix compile error.

This commit is contained in:
Jan Vidar Krey 2010-01-22 16:04:36 +01:00
parent 26a2a384b6
commit 5e253e8442
1 changed files with 1 additions and 7 deletions

View File

@ -75,19 +75,13 @@ static void event_callback(struct net_connection* con, int events, void *arg)
{ {
struct ADC_client* client = (struct ADC_client*) net_con_get_ptr(con); struct ADC_client* client = (struct ADC_client*) net_con_get_ptr(con);
if (events == NET_EVENT_SOCKERROR || events == NET_EVENT_CLOSED)
{
printf("NET_EVENT_SOCKERROR || NET_EVENT_CLOSED\n");
client->callback(client, ADC_CLIENT_DISCONNECTED, 0);
return;
}
if (events == NET_EVENT_TIMEOUT) if (events == NET_EVENT_TIMEOUT)
{ {
if (client->state == ps_conn) if (client->state == ps_conn)
{ {
client->callback(client, ADC_CLIENT_DISCONNECTED, 0); client->callback(client, ADC_CLIENT_DISCONNECTED, 0);
} }
return;
} }
if (events & NET_EVENT_READ) if (events & NET_EVENT_READ)