reass frag_n should to be inited to 0
[vpp.git] / src / vppinfra / tw_timer_template.c
index aba0014..a6d26d7 100644 (file)
@@ -572,7 +572,8 @@ static inline
                {
                  vec_add1 (callback_vector, t->user_handle);
 #if TW_START_STOP_TRACE_SIZE > 0
-                 TW (tw_timer_trace) (tw, 0xfe, ~0, t - tw->timers);
+                 TW (tw_timer_trace) (tw, 0xfe, t->user_handle,
+                                      t - tw->timers);
 #endif
                  pool_put (tw->timers, t);
                }
@@ -635,7 +636,8 @@ static inline
                {
                  vec_add1 (callback_vector, t->user_handle);
 #if TW_START_STOP_TRACE_SIZE > 0
-                 TW (tw_timer_trace) (tw, 0xfe, ~0, t - tw->timers);
+                 TW (tw_timer_trace) (tw, 0xfe, t->user_handle,
+                                      t - tw->timers);
 #endif
                  pool_put (tw->timers, t);
                }
@@ -689,7 +691,8 @@ static inline
                {
                  vec_add1 (callback_vector, t->user_handle);
 #if TW_START_STOP_TRACE_SIZE > 0
-                 TW (tw_timer_trace) (tw, 0xfe, ~0, t - tw->timers);
+                 TW (tw_timer_trace) (tw, 0xfe, t->user_handle,
+                                      t - tw->timers);
 #endif
                  pool_put (tw->timers, t);
                }
@@ -725,7 +728,7 @@ static inline
          next_index = t->next;
          vec_add1 (callback_vector, t->user_handle);
 #if TW_START_STOP_TRACE_SIZE > 0
-         TW (tw_timer_trace) (tw, 0xfe, ~0, t - tw->timers);
+         TW (tw_timer_trace) (tw, 0xfe, t->user_handle, t - tw->timers);
 #endif
          pool_put (tw->timers, t);
        }
@@ -735,7 +738,10 @@ static inline
        {
          /* The callback is optional. We return the u32 * handle vector */
          if (tw->expired_timer_callback)
-           tw->expired_timer_callback (callback_vector);
+           {
+             tw->expired_timer_callback (callback_vector);
+             vec_reset_length (callback_vector);
+           }
          tw->expired_timer_handles = callback_vector;
        }