Menu

#2 addPolicerEntry

open
5
2006-10-14
2006-10-14
No

n dsPolicy.cc file, on void
PolicyClassifier::addPolicerEntry(int argc, const
char*const* argv) function, near the end i found it:

policerTable[policerTableSize].initialCodePt =
(int)strtod(argv[3], NULL);
//printf("Policer: %s %s \n", argv[2], argv[3]);
if (argc == 5)
policerTable[policerTableSize].downgrade1 =
(int)strtod(argv[4], NULL);
if (argc == 6)
policerTable[policerTableSize].downgrade2 =
(int)strtod(argv[5], NULL);
policerTableSize++;

,i think that it is not entirily correct, if you have
argc == 6 you need also to
do "policerTable[policerTableSize].downgrade1 =
(int)strtod(argv[4], NULL);", or
not???
i think it would be more correct like this:

policerTable[policerTableSize].initialCodePt =
(int)strtod(argv[3], NULL);
//printf("Policer: %s %s \n", argv[2], argv[3]);
if (argc == 5)
policerTable[policerTableSize].downgrade1 =
(int)strtod(argv[4], NULL);
if (argc == 6){
policerTable[policerTableSize].downgrade1 =
(int)strtod(argv[4], NULL);
policerTable[policerTableSize].downgrade2 =
(int)strtod(argv[5], NULL);
}
policerTableSize++;

or i'm wrong???

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.