Fix count of out-of-order frames reported at end of run.
authorMartin Mathieson <martin.r.mathieson@googlemail.com>
Mon, 24 Sep 2012 09:42:22 +0000 (09:42 -0000)
committerMartin Mathieson <martin.r.mathieson@googlemail.com>
Mon, 24 Sep 2012 09:42:22 +0000 (09:42 -0000)
svn path=/trunk/; revision=45089

reordercap.c

index 5873468ba62c89fbc8b7196a997f39784ce8c630..c08349165475cdaf9c1efb9e4b6160eaf2d46532 100644 (file)
@@ -176,14 +176,16 @@ static void ReorderListAdd(gint64 offset, guint32 length,
                 newFrameRecord->prev = tmp->prev;
                 /* Its next points to us */
                 newFrameRecord->prev->next = newFrameRecord;
+
+                /* Inserted after another item */
+                DEBUG_PRINT("*** Inc out out of order count\n");
+                g_OutOfOrder++;
             }
 
             /* Fix up next item */
             newFrameRecord->next = tmp;
             tmp->prev = newFrameRecord;
 
-            g_OutOfOrder++;
-
             return;
         }
 
@@ -197,6 +199,10 @@ static void ReorderListAdd(gint64 offset, guint32 length,
             newFrameRecord->next = NULL;
             g_FrameListTail = newFrameRecord;
 
+            /* There were other items but we were earlier than them */
+            DEBUG_PRINT("*** Inc out out of order count\n");
+            g_OutOfOrder++;
+
             return;
         }
         else {