aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-10 19:52:21 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-10 19:52:21 +0000
commite3f8a4c03c12f5957336ee3c3ffce325d1214bc4 (patch)
tree4dcd280f32f940bc17ea9ade9312e5d2c06a6811 /main
parentfa257271e7768a56a000260573fe22b1d0e3037a (diff)
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
Diffstat (limited to 'main')
-rw-r--r--main/event.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/main/event.c b/main/event.c
index 2ce4464af..d22095547 100644
--- a/main/event.c
+++ b/main/event.c
@@ -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;
}