Merged in masayuki2009/nuttx.nuttx/fix_usrsock (pull request #879)
net/usrsock: Fix debug logs and remove DEBUGASSERT from usrsockdev_do_request() In a client mode, socket() will be the first request for usrsockdev_do_request(). However, in a server mode, the first request to accepted sockets will be recv() or others which depend on applications. So I think we should remove this DEBUGASSERT from usrsockdev_do_request(). Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com> Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
parent
4a211df02e
commit
fd387b6b8c
@ -942,7 +942,7 @@ static int usrsockdev_open(FAR struct file *filep)
|
||||
|
||||
usrsockdev_semtake(&dev->devsem);
|
||||
|
||||
ninfo("opening /usr/usrsock\n");
|
||||
ninfo("opening /dev/usrsock\n");
|
||||
|
||||
/* Increment the count of references to the device. */
|
||||
|
||||
@ -1186,14 +1186,13 @@ int usrsockdev_do_request(FAR struct usrsock_conn_s *conn,
|
||||
{
|
||||
/* Setup conn for new usrsock device. */
|
||||
|
||||
DEBUGASSERT(req_head->reqid == USRSOCK_REQUEST_SOCKET);
|
||||
dev = &g_usrsockdev;
|
||||
conn->dev = dev;
|
||||
}
|
||||
|
||||
if (!usrsockdev_is_opened(dev))
|
||||
{
|
||||
ninfo("usockid=%d; daemon has closed /usr/usrsock.\n", conn->usockid);
|
||||
ninfo("usockid=%d; daemon has closed /dev/usrsock.\n", conn->usockid);
|
||||
|
||||
return -ENETDOWN;
|
||||
}
|
||||
@ -1237,7 +1236,7 @@ int usrsockdev_do_request(FAR struct usrsock_conn_s *conn,
|
||||
}
|
||||
else
|
||||
{
|
||||
ninfo("usockid=%d; daemon abruptly closed /usr/usrsock.\n",
|
||||
ninfo("usockid=%d; daemon abruptly closed /dev/usrsock.\n",
|
||||
conn->usockid);
|
||||
ret = -ESHUTDOWN;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user