File tree Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 50
50
#define USRSOCK_EVENT_INTERNAL_MASK (USRSOCK_EVENT_CONNECT_READY | \
51
51
USRSOCK_EVENT_REQ_COMPLETE)
52
52
53
+ #define USRSOCK_USOCKID_INVALID (-1)
54
+
53
55
/****************************************************************************
54
56
* Public Type Definitions
55
57
****************************************************************************/
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ int usrsock_close(FAR struct usrsock_conn_s *conn)
185
185
186
186
close_out :
187
187
conn -> state = USRSOCK_CONN_STATE_UNINITIALIZED ;
188
- conn -> usockid = -1 ;
188
+ conn -> usockid = USRSOCK_USOCKID_INVALID ;
189
189
190
190
errout :
191
191
net_unlock ();
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ FAR struct usrsock_conn_s *usrsock_alloc(void)
117
117
/* Make sure that the connection is marked as uninitialized */
118
118
119
119
nxsem_init (& conn -> resp .sem , 0 , 1 );
120
- conn -> usockid = -1 ;
120
+ conn -> usockid = USRSOCK_USOCKID_INVALID ;
121
121
conn -> state = USRSOCK_CONN_STATE_UNINITIALIZED ;
122
122
123
123
/* Enqueue the connection into the active list */
@@ -344,7 +344,7 @@ void usrsock_initialize(void)
344
344
345
345
/* Mark the connection closed and move it to the free list */
346
346
347
- conn -> usockid = -1 ;
347
+ conn -> usockid = USRSOCK_USOCKID_INVALID ;
348
348
conn -> state = USRSOCK_CONN_STATE_UNINITIALIZED ;
349
349
dq_addlast (& conn -> sconn .node , & g_free_usrsock_connections );
350
350
}
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ int usrsock_event(FAR struct usrsock_conn_s *conn)
87
87
if (events & USRSOCK_EVENT_ABORT )
88
88
{
89
89
conn -> state = USRSOCK_CONN_STATE_ABORTED ;
90
+ conn -> usockid = USRSOCK_USOCKID_INVALID ;
90
91
}
91
92
92
93
if ((conn -> state == USRSOCK_CONN_STATE_READY ||
You can’t perform that action at this time.
0 commit comments