diff --git a/net/usrsock/usrsock.h b/net/usrsock/usrsock.h index 4cecbc0dc6..9eec052f7f 100644 --- a/net/usrsock/usrsock.h +++ b/net/usrsock/usrsock.h @@ -94,7 +94,6 @@ struct usrsock_conn_s int8_t type; /* Socket type (SOCK_STREAM, etc) */ int16_t usockid; /* Connection number used for kernel<->daemon */ uint16_t flags; /* Socket state flags */ - struct usrsockdev_s *dev; /* Device node used for this conn */ struct { diff --git a/net/usrsock/usrsock_dev.c b/net/usrsock/usrsock_dev.c index 84567de06e..5089ee5a63 100644 --- a/net/usrsock/usrsock_dev.c +++ b/net/usrsock/usrsock_dev.c @@ -1134,17 +1134,9 @@ errout: int usrsockdev_do_request(FAR struct usrsock_conn_s *conn, FAR struct iovec *iov, unsigned int iovcnt) { - FAR struct usrsockdev_s *dev = conn->dev; + FAR struct usrsockdev_s *dev = &g_usrsockdev; FAR struct usrsock_request_common_s *req_head = iov[0].iov_base; - if (!dev) - { - /* Setup conn for new usrsock device. */ - - dev = &g_usrsockdev; - conn->dev = dev; - } - if (!usrsockdev_is_opened(dev)) { ninfo("usockid=%d; daemon has closed /dev/usrsock.\n", conn->usockid);