mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Add conditional compilation to eliminate or limit cloning of descriptors when a new task is created
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1886 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+2
-2
@@ -91,7 +91,7 @@ int net_clone(FAR struct socket *psock1, FAR struct socket *psock2)
|
||||
if (psock2->s_type == SOCK_STREAM)
|
||||
{
|
||||
struct uip_conn *conn = psock2->s_conn;
|
||||
DEBUGASSERT(conn->crefs > 0);
|
||||
DEBUGASSERT(conn->crefs > 0 && conn->crefs < 255);
|
||||
conn->crefs++;
|
||||
}
|
||||
else
|
||||
@@ -100,7 +100,7 @@ int net_clone(FAR struct socket *psock1, FAR struct socket *psock2)
|
||||
if (psock2->s_type == SOCK_DGRAM)
|
||||
{
|
||||
struct uip_udp_conn *conn = psock2->s_conn;
|
||||
DEBUGASSERT(conn->crefs > 0);
|
||||
DEBUGASSERT(conn->crefs > 0 && conn->crefs < 255);
|
||||
conn->crefs++;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user