net/socket: Don't skip return -ENETDOWN in usrsock case

Fix the below error in usrsocktest:
Testing group "WakeWithSignal" =>
	[TEST ASSERT FAILED!]
		In function "do_usrsock_blocking_socket_thread":
		line 122: Assertion `(ssize_t)((*get_errno_ptr())) == (ssize_t)((115))' failed.
			got value: 123
			should be: 115
	[TEST ASSERT FAILED!]
		In function "do_wake_test":
		line 567: Assertion `(bool)((usrsocktest_test_failed)) == (bool)(false)' failed.
			got value: 1
			should be: 0
	Group "WakeWithSignal": [FAILED]
This commit is contained in:
Xiang Xiao 2020-02-22 18:23:55 +08:00 committed by Gregory Nutt
parent 54be203107
commit 8c8771a29d
1 changed files with 2 additions and 17 deletions

View File

@ -113,23 +113,8 @@ int psock_socket(int domain, int type, int protocol, FAR struct socket *psock)
*/
ret = g_usrsock_sockif.si_setup(psock, protocol);
if (ret == -ENETDOWN)
{
/* -ENETDOWN means that USRSOCK daemon is not running. Attempt to
* open socket with kernel networking stack.
*/
}
else
{
psock->s_sockif = &g_usrsock_sockif;
if (ret < 0)
{
return ret;
}
return ret;
}
psock->s_sockif = &g_usrsock_sockif;
return ret;
}
#endif /* CONFIG_NET_USRSOCK */