Commit a6cdc2a4 authored by Håvard Moås's avatar Håvard Moås
Browse files

Update NERD for attempted bugfix on the bitrate calculation, havard.mork@gmail.com

git-svn-id: file:///home/svn/mapi/branches/haavardm-mapi@38 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 146fc4b2
......@@ -153,7 +153,7 @@ install: all
$(INSTALL) mapid $(INSTALL_BINDIR)
sh ./gen-mapi-conf -c $(WITH_COMBO6) -d $(WITH_DAG) -i $(WITH_IPFIX) \
-e $(WITH_ETHEREAL) -l $(INSTALL_LIBDIR) mapi.conf.in mapi.conf
$(INSTALL) mapi.conf /etc
# $(INSTALL) mapi.conf /etc
./$(MKINSTALLDIRS) $(INSTALL_INCDIR)
$(INSTALL) mapi.h $(INSTALL_INCDIR)
$(INSTALL) mapi_errors.h $(INSTALL_INCDIR)
......
PREFIX=/usr/local/mapi
PREFIX=/misc/ica/stud/haavardm/ld/mapi/test
INSTALL_LIBDIR=$(PREFIX)/lib/mapi
INSTALL_INCDIR=$(PREFIX)/include/mapi
INSTALL_BINDIR=$(PREFIX)/bin
......@@ -13,7 +13,7 @@ DEBUG=1
WITH_DAG=0
#COMBO6 cards
WITH_COMBO6=1
WITH_COMBO6=0
#MAPI function statistics
#With this pkt counters for each function is enabled
......
......@@ -418,9 +418,14 @@ static void calculateBitrate(u_int is_min, u_int divisor, unsigned long long sta
}
else if(numSlotsAdvance > 0) {
// Advance a given number of slots
for(i=0; i<(BITRATE_AVERAGER_SLOTS-numSlotsAdvance); i++)
averager[i] = averager[i+numSlotsAdvance];
for(i=(BITRATE_AVERAGER_SLOTS-numSlotsAdvance); i<BITRATE_AVERAGER_SLOTS; i++)
averager[i] = 0;
/*
memmove(averager,averager + numSlotsAdvance, sizeof(u_int32_t)*(BITRATE_AVERAGER_SLOTS-numSlotsAdvance));
memset(averager + (BITRATE_AVERAGER_SLOTS-numSlotsAdvance), '\0', numSlotsAdvance*sizeof(u_int32_t));
averager[lastslot] = 0;
averager[lastslot] = 0;*/
}
averager[lastslot] += len;
}
......
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