summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-04-07 08:00:34 +0000
committerGuy Harris <guy@alum.mit.edu>2000-04-07 08:00:34 +0000
commit5fe1de894e115db707046d4ef1f1accc8197f7cc (patch)
treedb365702de88d9e4a09491938a742b3bdcb4c5e9 /file.c
parent76f0935df955f63fbd0bb13fd47bb7ec55a5ce31 (diff)
downloadwireshark-5fe1de894e115db707046d4ef1f1accc8197f7cc.tar.gz
When searching for a frame that matches a filter expression, we
shouldn't stop the search as soon as we get back to the starting frame, we should stop the search if the filter expression doesn't match and the frame we tried it on was the starting frame - it's OK if we find the starting frame, it's just not OK to continue if we don't find that frame. svn path=/trunk/; revision=1815
Diffstat (limited to 'file.c')
-rw-r--r--file.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/file.c b/file.c
index 9c2e61a4f3..a7cd6f4785 100644
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
/* file.c
* File I/O routines
*
- * $Id: file.c,v 1.180 2000/04/07 07:48:15 guy Exp $
+ * $Id: file.c,v 1.181 2000/04/07 08:00:34 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -1194,12 +1194,6 @@ find_packet(capture_file *cf, dfilter *sfcode)
fd = cf->plist; /* wrap around */
}
- if (fd == start_fd) {
- /* We're back to the frame we were on originally. The search
- failed. */
- break;
- }
-
count++;
/* Is this packet in the display? */
@@ -1215,6 +1209,12 @@ find_packet(capture_file *cf, dfilter *sfcode)
break; /* found it! */
}
}
+
+ if (fd == start_fd) {
+ /* We're back to the frame we were on originally, and that frame
+ doesn't match the search filter. The search failed. */
+ break;
+ }
}
gtk_progress_bar_update(GTK_PROGRESS_BAR(prog_bar), 0);