fix socket send() return size check 15/12815/2
authorqchang <qing.chang1@huawei.com>
Wed, 30 May 2018 18:44:18 +0000 (11:44 -0700)
committerDave Wallace <dwallacelf@gmail.com>
Thu, 31 May 2018 13:27:15 +0000 (13:27 +0000)
Change-Id: I098c671607c75cb34d04f421b4d16b73f7b47392
Signed-off-by: qchang <qing.chang1@huawei.com>
src/vcl/ldp.c

index d31cd2c..ce243df 100644 (file)
@@ -1669,7 +1669,7 @@ send (int fd, const void *buf, size_t n, int flags)
                      getpid (), fd, fd, func_str, sid, sid, buf, n, flags);
 
       size = vppcom_session_sendto (sid, (void *) buf, n, flags, NULL);
-      if (size != VPPCOM_OK)
+      if (size < VPPCOM_OK)
        {
          errno = -size;
          size = -1;