vcl: add read/write udp support
[vpp.git] / src / vcl / ldp.c
index d31cd2c..c26c460 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;
@@ -3171,7 +3171,7 @@ ldp_epoll_pwait (int epfd, struct epoll_event *events,
       return -1;
     }
 
-  time_to_wait = ((timeout >= 0) ? (double) timeout / (double) 1000 : 0);
+  time_to_wait = ((timeout >= 0) ? (double) timeout : 0);
   time_out = clib_time_now (&ldp->clib_time) + time_to_wait;
 
   func_str = "vppcom_session_attr[GET_LIBC_EPFD]";