added check for full al_parser_table

remotes/origin/master-1.0.x
William Metcalf 16 years ago committed by Victor Julien
parent f3e3d3873f
commit 5fc3005103

@ -356,6 +356,11 @@ int AppLayerRegisterParser(char *name, uint16_t proto, uint16_t parser_id, int (
al_max_parsers++;
if(al_max_parsers >= MAX_PARSERS){
SCLogInfo("Failed to register %s al_parser_table array full",name);
exit(EXIT_FAILURE);
}
al_parser_table[al_max_parsers].name = name;
al_parser_table[al_max_parsers].proto = proto;
al_parser_table[al_max_parsers].parser_local_id = parser_id;
@ -379,6 +384,11 @@ int AppLayerRegisterProto(char *name, uint8_t proto, uint8_t flags, int (*AppLay
al_max_parsers++;
if(al_max_parsers >= MAX_PARSERS){
SCLogInfo("Failed to register %s al_parser_table array full",name);
exit(EXIT_FAILURE);
}
al_parser_table[al_max_parsers].name = name;
al_parser_table[al_max_parsers].AppLayerParser = AppLayerParser;

Loading…
Cancel
Save