mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Networking: Correct the value returned by accept() in the case where net_lockingwait() is called. It was returning -1 and losing the errno value. Noted by Rony Xln
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* net/utils/net_lock.c
|
||||
*
|
||||
* Copyright (C) 2011-2012, 2014 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011-2012, 2014-2015 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -178,6 +178,14 @@ void net_unlock(net_lock_t flags)
|
||||
* Description:
|
||||
* Atomically wait for sem while temporarily releasing g_netlock.
|
||||
*
|
||||
* Input Parameters:
|
||||
* sem - A reference to the semaphore to be taken.
|
||||
*
|
||||
* Returned value:
|
||||
* The returned value is the same as sem_wait(): Zero (OK) is returned
|
||||
* on success; -1 (ERROR) is returned on a failure with the errno value
|
||||
* set appropriately.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int net_lockedwait(sem_t *sem)
|
||||
|
||||
Reference in New Issue
Block a user