initialize netconn->socket to -1 instead of 0 since 0 is a valid socket!

This commit is contained in:
goldsimon 2007-11-25 16:13:56 +00:00
parent 9343b767f8
commit 4dcfdac2f5

View File

@ -87,7 +87,8 @@ netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto,
conn->recvmbox = SYS_MBOX_NULL;
conn->acceptmbox = SYS_MBOX_NULL;
conn->state = NETCONN_NONE;
conn->socket = 0;
/* initialize socket to -1 since 0 is a valid socket */
conn->socket = -1;
conn->callback = callback;
conn->recv_avail = 0;
#if LWIP_SO_RCVTIMEO