fix interrupt and end position
[lttv.git] / ltt / branches / poly / lttv / modules / gui / lttvwindow / lttvwindow / callbacks.c
index 55ab82b1321dcdc74cf8b41601d8e5a89779b433..e190aad4ae4b01ffe25715396db0fc295bf64ab2 100644 (file)
@@ -633,12 +633,20 @@ gboolean lttvwindow_process_pending_requests(Tab *tab)
           /* Else, the first request in list_in is a position request */
           /* If first req in list_in pos != current pos */
           g_assert(events_request->start_position != NULL);
+          g_debug("SEEK POS time : %lu, %lu", 
+     lttv_traceset_context_position_get_time(events_request->start_position).tv_sec,
+     lttv_traceset_context_position_get_time(events_request->start_position).tv_nsec);
+
+          g_debug("SEEK POS context time : %lu, %lu", 
+        lttv_traceset_context_get_current_tfc(tsc)->timestamp.tv_sec,
+        lttv_traceset_context_get_current_tfc(tsc)->timestamp.tv_nsec);
           if(lttv_traceset_context_ctx_pos_compare(tsc,
                      events_request->start_position) != 0) {
             /* 1.2.2.1 Seek to that position */
             g_debug("SEEK POSITION");
             //lttv_process_traceset_seek_position(tsc, events_request->start_position);
             pos_time = lttv_traceset_context_position_get_time(events_request->start_position);
+            
             lttv_state_traceset_seek_time_closest(LTTV_TRACESET_STATE(tsc),
                                                   pos_time);
 
@@ -919,10 +927,10 @@ gboolean lttvwindow_process_pending_requests(Tab *tab)
                 ltt_time_compare(tfc->timestamp,
                                          events_request->end_time) >= 0
               ||
-                  (events_request->start_position != NULL 
+                  (events_request->end_position != NULL 
                  &&
                   lttv_traceset_context_ctx_pos_compare(tsc,
-                            events_request->start_position) != 0)
+                            events_request->end_position) != 0)
 
               ) {
             g_assert(events_request->servicing == TRUE);
@@ -950,7 +958,7 @@ gboolean lttvwindow_process_pending_requests(Tab *tab)
       }
     }
 
-    //if(gtk_events_pending()) break;
+    if(gtk_events_pending()) break;
   }
 
   /* B. When interrupted between chunks */
This page took 0.02396 seconds and 4 git commands to generate.