diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-10-31 20:24:41 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-10-31 20:24:41 +0000 |
commit | c2d40f72b96cdf99e4f63c505fc9fdc3373024ba (patch) | |
tree | 98676802ba33dc2865890af27a722aa95cd1d4f5 /tethereal.c | |
parent | 231908c8a56919bedea1890cedd2b3c9e86a73be (diff) |
Don't reset the packet count if we longjmp out of the capture loop, as
that causes us to report that no packets were captured if you ^C out of
a capture.
svn path=/trunk/; revision=6523
Diffstat (limited to 'tethereal.c')
-rw-r--r-- | tethereal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tethereal.c b/tethereal.c index 97f9a61be9..4d5bbe0b97 100644 --- a/tethereal.c +++ b/tethereal.c @@ -1,6 +1,6 @@ /* tethereal.c * - * $Id: tethereal.c,v 1.165 2002/10/25 03:13:07 guy Exp $ + * $Id: tethereal.c,v 1.166 2002/10/31 20:24:41 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1144,11 +1144,11 @@ capture(int out_file_type) cnd_stop_timeout = cnd_new((char*)CND_CLASS_TIMEOUT, (gint32)capture_opts.autostop_duration); - if (!setjmp(ld.stopenv)) + if (!setjmp(ld.stopenv)) { ld.go = TRUE; - else + ld.packet_count = 0; + } else ld.go = FALSE; - ld.packet_count = 0; while (ld.go) { /* We need to be careful with automatic variables defined in the outer scope which are changed inside the loop. Most compilers |