dect
/
asterisk
Archived
13
0
Fork 0

Add an additional sanity check in case an event is passed between

Asterisk boxes with mismatched ie_maps.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@121649 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
mmichelson 2008-06-10 19:52:21 +00:00
parent fa257271e7
commit e3f8a4c03c
1 changed files with 10 additions and 0 deletions

View File

@ -186,6 +186,11 @@ const char *ast_event_get_ie_type_name(enum ast_event_ie_type ie_type)
return "";
}
if (ie_maps[ie_type].ie_type != ie_type) {
ast_log(LOG_ERROR, "The ie type passed in does not match the ie type defined in the ie table.\n");
return "";
}
return ie_maps[ie_type].name;
}
@ -196,6 +201,11 @@ enum ast_event_ie_pltype ast_event_get_ie_pltype(enum ast_event_ie_type ie_type)
return AST_EVENT_IE_PLTYPE_UNKNOWN;
}
if (ie_maps[ie_type].ie_type != ie_type) {
ast_log(LOG_ERROR, "The ie type passed in does not match the ie type defined in the ie table.\n");
return AST_EVENT_IE_PLTYPE_UNKNOWN;
}
return ie_maps[ie_type].ie_pltype;
}