lwip-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-commits] lwip/src/api api_msg.c


From: Christiaan Simons
Subject: [lwip-commits] lwip/src/api api_msg.c
Date: Wed, 14 Jun 2006 08:02:35 +0000

CVSROOT:        /sources/lwip
Module name:    lwip
Changes by:     Christiaan Simons <christiaans> 06/06/14 08:02:35

Modified files:
        src/api        : api_msg.c 

Log message:
        Applied patch #5146 to handle allocation failures in accept() by Kevin 
Lawson.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/lwip/src/api/api_msg.c?cvsroot=lwip&r1=1.19&r2=1.20

Patches:
Index: api_msg.c
===================================================================
RCS file: /sources/lwip/lwip/src/api/api_msg.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- api_msg.c   21 Jul 2004 08:55:26 -0000      1.19
+++ api_msg.c   14 Jun 2006 08:02:35 -0000      1.20
@@ -228,9 +228,6 @@
   if (newconn == NULL) {
     return ERR_MEM;
   }
-  newconn->type = NETCONN_TCP;
-  newconn->pcb.tcp = newpcb;
-  setup_tcp(newconn);
   newconn->recvmbox = sys_mbox_new();
   if (newconn->recvmbox == SYS_MBOX_NULL) {
     memp_free(MEMP_NETCONN, newconn);
@@ -249,6 +246,10 @@
     memp_free(MEMP_NETCONN, newconn);
     return ERR_MEM;
   }
+  /* Allocations were OK, setup the PCB etc */
+  newconn->type = NETCONN_TCP;
+  newconn->pcb.tcp = newpcb;
+  setup_tcp(newconn);
   newconn->acceptmbox = SYS_MBOX_NULL;
   newconn->err = err;
   /* Register event with callback */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]