You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/09/15 04:11:42 UTC

[incubator-nuttx] branch master updated: net/local: add FIONSPACE support

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

xiaoxiang 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 b991b75  net/local: add FIONSPACE support
b991b75 is described below

commit b991b75e876f35d148e854b70aa562296bae6c99
Author: chao.an <an...@xiaomi.com>
AuthorDate: Thu Aug 12 14:48:05 2021 +0800

    net/local: add FIONSPACE support
    
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 net/local/local_sockif.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/net/local/local_sockif.c b/net/local/local_sockif.c
index e71c951..5d59e30 100644
--- a/net/local/local_sockif.c
+++ b/net/local/local_sockif.c
@@ -726,6 +726,16 @@ static int local_ioctl(FAR struct socket *psock, int cmd,
             ret = -ENOTCONN;
           }
         break;
+      case FIONSPACE:
+        if (conn->lc_outfile.f_inode != NULL)
+          {
+            ret = file_ioctl(&conn->lc_outfile, cmd, arg);
+          }
+        else
+          {
+            ret = -ENOTCONN;
+          }
+        break;
       default:
         ret = -ENOTTY;
         break;