Skip to content

Commit

Permalink
fix for #349 - OS_SocketAccept() fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CDKnightNASA committed Mar 19, 2020
1 parent a1e9dbf commit d4a406f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/os/shared/osapi-sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ int32 OS_SocketAccept(uint32 sock_id, uint32 *connsock_id, OS_SockAddr_t *Addr,
/* Socket must be of the STREAM variety */
return_code = OS_ERR_INCORRECT_OBJ_TYPE;
}
else if (record->refcount != 0 || (OS_stream_table[local_id].stream_state & (OS_STREAM_STATE_BOUND | OS_STREAM_STATE_CONNECTED)) != OS_STREAM_STATE_BOUND)
else if ((OS_stream_table[local_id].stream_state & (OS_STREAM_STATE_BOUND | OS_STREAM_STATE_CONNECTED)) != OS_STREAM_STATE_BOUND)
{
/* Socket must be bound but not connected */
return_code = OS_ERR_INCORRECT_OBJ_STATE;
Expand Down

0 comments on commit d4a406f

Please sign in to comment.