vcl: fix vlsh conversion error
[vpp.git] / src / vcl / ldp.c
index de886ca..5f1eeb9 100644 (file)
@@ -724,10 +724,11 @@ ldp_pselect (int nfds, fd_set * __restrict readfds,
       time_out = (timeout->tv_sec == 0 && timeout->tv_nsec == 0) ?
        (f64) 0 : (f64) timeout->tv_sec + (f64) timeout->tv_nsec / (f64) 1e9;
 
+      time_out += clib_time_now (&ldpw->clib_time);
+
       /* select as fine grained sleep */
       if (!nfds)
        {
-         time_out += clib_time_now (&ldpw->clib_time);
          while (clib_time_now (&ldpw->clib_time) < time_out)
            ;
          return 0;
@@ -966,9 +967,7 @@ assign_cert_key_pair (vls_handle_t vlsh)
     return -1;
 
   ckp_len = sizeof (ldp->ckpair_index);
-  return vppcom_session_attr (vlsh_to_session_index (vlsh),
-                             VPPCOM_ATTR_SET_CKPAIR, &ldp->ckpair_index,
-                             &ckp_len);
+  return vls_attr (vlsh, VPPCOM_ATTR_SET_CKPAIR, &ldp->ckpair_index, &ckp_len);
 }
 
 int