Commit 92faf4cf authored by Arne Øslebø's avatar Arne Øslebø
Browse files

bugfix

git-svn-id: file:///home/svn/mapi/trunk@216 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 2bca8daa
......@@ -12,6 +12,7 @@
typedef struct startstop {
unsigned long long first;
unsigned long long first_processed;
unsigned long long last;
} startstop_t;
......@@ -50,6 +51,7 @@ static int startstop_init(mapidflib_function_instance_t *instance,
ss->first=0;
ss->last=0;
ss->first_processed=0;
return 0;
}
......@@ -61,15 +63,19 @@ static int startstop_process(mapidflib_function_instance_t *instance,
{
startstop_internal_t *ssi=instance->internal_data;
startstop_t *ss=instance->result.data;
if(ss->first==0)
ss->first=pkt_head->ts;
if(ssi->start>0 && ssi->start>pkt_head->ts)
if(ssi->start>0 && ssi->start+ss->first>pkt_head->ts)
return 0;
if(ssi->stop>0 && ssi->stop<pkt_head->ts)
if(ssi->stop>0 && ssi->stop+ss->first<pkt_head->ts)
return 0;
if(ss->first==0)
ss->first=pkt_head->ts;
if(ss->first_processed==0)
ss->first_processed=pkt_head->ts;
ss->last=pkt_head->ts;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment