session: reorganize dispatch logic

Type:refactor

Change-Id: Id796d0103e61e15c35a586d8cbd3d8916487b84d
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 4e34068..ea1a8c9 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1377,12 +1377,12 @@
     {
       wrk = &smm->wrk[i];
       wrk->new_head = clib_llist_make_head (wrk->event_elts, evt_list);
-      wrk->pending_head = clib_llist_make_head (wrk->event_elts, evt_list);
+      wrk->old_head = clib_llist_make_head (wrk->event_elts, evt_list);
       wrk->postponed_head = clib_llist_make_head (wrk->event_elts, evt_list);
       wrk->disconnects_head = clib_llist_make_head (wrk->event_elts,
 						    evt_list);
+      wrk->vm = vlib_mains[i];
       wrk->last_vlib_time = vlib_time_now (vlib_mains[i]);
-      wrk->dispatch_period = 500e-6;
 
       if (num_threads > 1)
 	clib_rwlock_init (&smm->wrk[i].peekers_rw_locks);