From 9cf1d897325887aa2bda7f0e1621c077f29d717d Mon Sep 17 00:00:00 2001 From: Sake Blok Date: Tue, 16 Nov 2010 20:22:20 +0000 Subject: Make editcap -B work like expected: output no packets after the stop time. Old behavior was to include a packet with a timestamp of 12:00:00.934 if -B "YYYY-MM-DD 12:00:00" was used. svn path=/trunk/; revision=34913 --- editcap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'editcap.c') diff --git a/editcap.c b/editcap.c index 7c027490a9..de8af75211 100644 --- a/editcap.c +++ b/editcap.c @@ -294,7 +294,7 @@ check_timestamp(wtap *wth) { struct wtap_pkthdr* pkthdr = wtap_phdr(wth); - return ( pkthdr->ts.secs >= starttime ) && ( pkthdr->ts.secs <= stoptime ); + return ( pkthdr->ts.secs >= starttime ) && ( pkthdr->ts.secs < stoptime ); } static void @@ -674,9 +674,9 @@ usage(gboolean is_error) fprintf(output, "\n"); fprintf(output, "Packet selection:\n"); fprintf(output, " -r keep the selected packets; default is to delete them.\n"); - fprintf(output, " -A don't output packets whose timestamp is before the\n"); - fprintf(output, " given time (format as YYYY-MM-DD hh:mm:ss).\n"); - fprintf(output, " -B don't output packets whose timestamp is after the\n"); + fprintf(output, " -A only output packets whose timestamp is after (or equal\n"); + fprintf(output, " to) the given time (format as YYYY-MM-DD hh:mm:ss).\n"); + fprintf(output, " -B only output packets whose timestamp is before the\n"); fprintf(output, " given time (format as YYYY-MM-DD hh:mm:ss).\n"); fprintf(output, "\n"); fprintf(output, "Duplicate packet removal:\n"); -- cgit v1.2.1