Module: xenomai-forge
Branch: next
Commit: bfb12094e3d8b2647c97529c43128c80ebaf1c3c
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=bfb12094e3d8b2647c97529c43128c80ebaf1c3c

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Aug 13 10:57:21 2014 +0200

drivers/ipc: fix error code for send through non-connected socket

---

 kernel/drivers/ipc/bufp.c |    2 +-
 kernel/drivers/ipc/iddp.c |    2 +-
 kernel/drivers/ipc/xddp.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/drivers/ipc/bufp.c b/kernel/drivers/ipc/bufp.c
index 7b67e11..bc3a407 100644
--- a/kernel/drivers/ipc/bufp.c
+++ b/kernel/drivers/ipc/bufp.c
@@ -632,7 +632,7 @@ static ssize_t bufp_sendmsg(struct rtdm_fd *fd,
                        return -EINVAL;
                daddr = sk->peer;
                if (daddr.sipc_port < 0)
-                       return -ENOTCONN;
+                       return -EDESTADDRREQ;
        }
 
        if (msg->msg_iovlen >= RTIPC_IOV_MAX)
diff --git a/kernel/drivers/ipc/iddp.c b/kernel/drivers/ipc/iddp.c
index 7521fc5..80f2179 100644
--- a/kernel/drivers/ipc/iddp.c
+++ b/kernel/drivers/ipc/iddp.c
@@ -497,7 +497,7 @@ static ssize_t iddp_sendmsg(struct rtdm_fd *fd,
                        return -EINVAL;
                daddr = sk->peer;
                if (daddr.sipc_port < 0)
-                       return -ENOTCONN;
+                       return -EDESTADDRREQ;
        }
 
        if (msg->msg_iovlen >= RTIPC_IOV_MAX)
diff --git a/kernel/drivers/ipc/xddp.c b/kernel/drivers/ipc/xddp.c
index 13b18ce..8b49ad9 100644
--- a/kernel/drivers/ipc/xddp.c
+++ b/kernel/drivers/ipc/xddp.c
@@ -631,7 +631,7 @@ static ssize_t xddp_sendmsg(struct rtdm_fd *fd,
                        return -EINVAL;
                daddr = sk->peer;
                if (daddr.sipc_port < 0)
-                       return -ENOTCONN;
+                       return -EDESTADDRREQ;
        }
 
        if (msg->msg_iovlen >= RTIPC_IOV_MAX)


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to