misc: move to new pool_foreach macros
[vpp.git] / src / vcl / vppcom.c
index da7693f..abad979 100644 (file)
@@ -1175,7 +1175,7 @@ vppcom_session_unbind (u32 session_handle)
       vcl_session_table_del_vpp_handle (wrk, accepted_msg->handle);
       vcl_send_session_accepted_reply (session->vpp_evt_q,
                                       accepted_msg->context,
-                                      session->vpp_handle, -1);
+                                      accepted_msg->handle, -1);
     }
   clib_fifo_free (session->accept_evts_fifo);
 
@@ -1284,10 +1284,10 @@ vppcom_app_destroy (void)
   current_wrk = vcl_worker_get_current ();
 
   /* *INDENT-OFF* */
-  pool_foreach (wrk, vcm->workers, ({
+  pool_foreach (wrk, vcm->workers)  {
     if (current_wrk != wrk)
       vcl_worker_cleanup (wrk, 0 /* notify vpp */ );
-  }));
+  }
   /* *INDENT-ON* */
 
   vcl_api_detach (current_wrk);
@@ -1909,10 +1909,10 @@ read_again:
          e->session_index = s->session_index;
        }
     }
-  else if (PREDICT_FALSE (rv < n))
+  else if (PREDICT_FALSE (rv < n && !s->is_dgram))
     {
       /* More data enqueued while reading. Try to drain it
-       * or fill the buffer */
+       * or fill the buffer. Avoid doing that for dgrams */
       buf += rv;
       n -= rv;
       goto read_again;