You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/09/21 13:36:43 UTC

[incubator-nuttx] branch master updated: net/usrsock: fix outputted function name in debug prints

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 366e8af  net/usrsock: fix outputted function name in debug prints
366e8af is described below

commit 366e8afdb1026f454ee9802181c71f97fdd9f757
Author: Juha Niskanen <ju...@haltian.com>
AuthorDate: Mon Sep 21 14:43:39 2020 +0300

    net/usrsock: fix outputted function name in debug prints
    
    Signed-off-by: Juha Niskanen <ju...@haltian.com>
---
 net/usrsock/usrsock_bind.c        | 2 +-
 net/usrsock/usrsock_getpeername.c | 2 +-
 net/usrsock/usrsock_getsockname.c | 2 +-
 net/usrsock/usrsock_getsockopt.c  | 5 +++--
 net/usrsock/usrsock_recvfrom.c    | 2 +-
 net/usrsock/usrsock_sendto.c      | 2 +-
 net/usrsock/usrsock_setsockopt.c  | 9 +++++----
 7 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/net/usrsock/usrsock_bind.c b/net/usrsock/usrsock_bind.c
index e9d508f..93aa7b7 100644
--- a/net/usrsock/usrsock_bind.c
+++ b/net/usrsock/usrsock_bind.c
@@ -182,7 +182,7 @@ int usrsock_bind(FAR struct socket *psock,
     {
       /* Invalid state or closed by daemon. */
 
-      ninfo("usockid=%d; connect() with uninitialized usrsock.\n",
+      ninfo("usockid=%d; bind() with uninitialized usrsock.\n",
             conn->usockid);
 
       ret = (conn->state == USRSOCK_CONN_STATE_ABORTED) ? -EPIPE :
diff --git a/net/usrsock/usrsock_getpeername.c b/net/usrsock/usrsock_getpeername.c
index 54fbedc..54ef03f 100644
--- a/net/usrsock/usrsock_getpeername.c
+++ b/net/usrsock/usrsock_getpeername.c
@@ -172,7 +172,7 @@ int usrsock_getpeername(FAR struct socket *psock,
     {
       /* Invalid state or closed by daemon. */
 
-      ninfo("usockid=%d; usrsock_getpeername() with uninitialized usrsock\n",
+      ninfo("usockid=%d; getpeername() with uninitialized usrsock\n",
             conn->usockid);
 
       ret = (conn->state == USRSOCK_CONN_STATE_ABORTED) ? -EPIPE :
diff --git a/net/usrsock/usrsock_getsockname.c b/net/usrsock/usrsock_getsockname.c
index ce2b44e..bb64823 100644
--- a/net/usrsock/usrsock_getsockname.c
+++ b/net/usrsock/usrsock_getsockname.c
@@ -187,7 +187,7 @@ int usrsock_getsockname(FAR struct socket *psock,
     {
       /* Invalid state or closed by daemon. */
 
-      ninfo("usockid=%d; connect() with uninitialized usrsock.\n",
+      ninfo("usockid=%d; getsockname() with uninitialized usrsock.\n",
             conn->usockid);
 
       ret = (conn->state == USRSOCK_CONN_STATE_ABORTED) ? -EPIPE :
diff --git a/net/usrsock/usrsock_getsockopt.c b/net/usrsock/usrsock_getsockopt.c
index e8b4d9c..7946baa 100644
--- a/net/usrsock/usrsock_getsockopt.c
+++ b/net/usrsock/usrsock_getsockopt.c
@@ -183,7 +183,8 @@ static int do_getsockopt_request(FAR struct usrsock_conn_s *conn, int level,
  *
  ****************************************************************************/
 
-int usrsock_getsockopt(FAR struct usrsock_conn_s *conn, int level, int option,
+int usrsock_getsockopt(FAR struct usrsock_conn_s *conn,
+                       int level, int option,
                        FAR void *value, FAR socklen_t *value_len)
 {
   struct usrsock_data_reqstate_s state =
@@ -200,7 +201,7 @@ int usrsock_getsockopt(FAR struct usrsock_conn_s *conn, int level, int option,
     {
       /* Invalid state or closed by daemon. */
 
-      ninfo("usockid=%d; connect() with uninitialized usrsock.\n",
+      ninfo("usockid=%d; getsockopt() with uninitialized usrsock.\n",
             conn->usockid);
 
       ret = (conn->state == USRSOCK_CONN_STATE_ABORTED) ? -EPIPE :
diff --git a/net/usrsock/usrsock_recvfrom.c b/net/usrsock/usrsock_recvfrom.c
index fd01cc1..5df6de0 100644
--- a/net/usrsock/usrsock_recvfrom.c
+++ b/net/usrsock/usrsock_recvfrom.c
@@ -248,7 +248,7 @@ ssize_t usrsock_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
     {
       /* Invalid state or closed by daemon. */
 
-      ninfo("usockid=%d; connect() with uninitialized usrsock.\n",
+      ninfo("usockid=%d; recvfrom() with uninitialized usrsock.\n",
             conn->usockid);
 
       ret = (conn->state == USRSOCK_CONN_STATE_ABORTED) ? -EPIPE :
diff --git a/net/usrsock/usrsock_sendto.c b/net/usrsock/usrsock_sendto.c
index 400f788..2312232 100644
--- a/net/usrsock/usrsock_sendto.c
+++ b/net/usrsock/usrsock_sendto.c
@@ -229,7 +229,7 @@ ssize_t usrsock_sendto(FAR struct socket *psock, FAR const void *buf,
     {
       /* Invalid state or closed by daemon. */
 
-      ninfo("usockid=%d; connect() with uninitialized usrsock.\n",
+      ninfo("usockid=%d; sendto() with uninitialized usrsock.\n",
             conn->usockid);
 
       ret = (conn->state == USRSOCK_CONN_STATE_ABORTED) ? -EPIPE :
diff --git a/net/usrsock/usrsock_setsockopt.c b/net/usrsock/usrsock_setsockopt.c
index ef36fcb..be46f50 100644
--- a/net/usrsock/usrsock_setsockopt.c
+++ b/net/usrsock/usrsock_setsockopt.c
@@ -107,8 +107,8 @@ static uint16_t setsockopt_event(FAR struct net_driver_s *dev,
  ****************************************************************************/
 
 static int do_setsockopt_request(FAR struct usrsock_conn_s *conn,
-                                 int level, int option, FAR const void *value,
-                                 socklen_t value_len)
+                                 int level, int option,
+                                 FAR const void *value, socklen_t value_len)
 {
   struct usrsock_request_setsockopt_s req =
   {
@@ -174,7 +174,8 @@ static int do_setsockopt_request(FAR struct usrsock_conn_s *conn,
  *
  ****************************************************************************/
 
-int usrsock_setsockopt(FAR struct usrsock_conn_s *conn, int level, int option,
+int usrsock_setsockopt(FAR struct usrsock_conn_s *conn,
+                       int level, int option,
                        FAR const void *value, FAR socklen_t value_len)
 {
   struct usrsock_reqstate_s state =
@@ -192,7 +193,7 @@ int usrsock_setsockopt(FAR struct usrsock_conn_s *conn, int level, int option,
     {
       /* Invalid state or closed by daemon. */
 
-      ninfo("usockid=%d; connect() with uninitialized usrsock.\n",
+      ninfo("usockid=%d; setsockopt() with uninitialized usrsock.\n",
             conn->usockid);
 
       ret = (conn->state == USRSOCK_CONN_STATE_ABORTED) ? -EPIPE :