From Alexis La Goutte:
[obnox/wireshark/wip.git] / capture_stop_conditions.c
index 59e44f5d23cb12f44b8dfab8fea34d72c2464024..09ac5b7d4ab94810feb1bd0bd64bb1b0682b74cb 100644 (file)
@@ -119,8 +119,8 @@ static gboolean _cnd_eval_timeout(condition* cnd, va_list ap _U_){
   gint32 elapsed_time;
   /* check timeout here */
   if(data->timeout_s == 0) return FALSE; /* 0 == infinite */
-  elapsed_time = time(NULL) - data->start_time;
-  if(elapsed_time > data->timeout_s) return TRUE;
+  elapsed_time = (gint32) (time(NULL) - data->start_time);
+  if(elapsed_time >= data->timeout_s) return TRUE;
   return FALSE;
 } /* END _cnd_eval_timeout()*/