mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 23:08:32 +00:00
Add an additional sanity check in case an event is passed between
Asterisk boxes with mismatched ie_maps. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
10
main/event.c
10
main/event.c
@@ -186,6 +186,11 @@ const char *ast_event_get_ie_type_name(enum ast_event_ie_type ie_type)
|
|||||||
return "";
|
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;
|
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;
|
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;
|
return ie_maps[ie_type].ie_pltype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user