Commit 3ce64ff9 authored by 's avatar
Browse files

Fixed categorizing into category <0, min>.


git-svn-id: file:///home/svn/mapi/trunk@1293 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent b27d4c0f
......@@ -438,17 +438,16 @@ printf("leadmax : %012lu.%012lu (ntp) == %010.0f + %.012f (sec)\n", laglead.l
if(pkt_head->ts < pkt_ts_ull_min || pkt_head->ts > pkt_ts_ull_max) {
// count measurement into results
cat = (((long signed int) internal_data_ptr->burst_length - internal_data_ptr->min ) / internal_data_ptr->step);
if (cat >=0 ) cat++; // +1 extra cetegory for <min bursts, do not ++ for <0, <min-step,min> goes into this special
if(cat < 0) {
if(internal_data_ptr->burst_length < internal_data_ptr->min) {
#ifdef __BURST_VERBOSE
printf("process: I am sed :-( I wish I have [%d] to save this burst into.\n", cat);
printf("process: I am sed :-( I wish I have [0.x] to save this burst into.\n");
#endif
cat = 0;
}
else if(cat > internal_data_ptr->cats) {
else cat = (((long signed int) internal_data_ptr->burst_length - internal_data_ptr->min ) / internal_data_ptr->step) + 1; // +1: category 0 is reserved for <0, min>
if(cat > internal_data_ptr->cats) {
#ifdef __BURST_VERBOSE
printf("process: I am sed :-( I wish I have [%d] to save this burst into.\n", cat);
......@@ -456,6 +455,7 @@ printf("process: I am sed :-( I wish I have [%d] to save this burst into.\n", ca
cat = internal_data_ptr->cats;
}
((unsigned long*)instance->result.data)[cat] += internal_data_ptr->burst_length;
#ifdef __BURST_VERBOSE
......
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