summaryrefslogtreecommitdiff
path: root/main/presencestate.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2013-02-15 23:29:28 +0000
committerMatthew Jordan <mjordan@digium.com>2013-02-15 23:29:28 +0000
commitc209e85ad31ac3983a0eb7684055cdd808cbd8fe (patch)
tree4ad998c53caf879cc4c99a867911731e5341bf2f /main/presencestate.c
parent8a7dd2f40880f988ea017294ad8001bf0e1825b5 (diff)
Fix crash in PresenceState AMI action when specifying an invalid provider
This patch fixes a crash in Asterisk that could be caused by using the PresenceState AMI action while providing an invalid provider. This patch also adds some additional warnings when a user attempts to provide the PresenceState action with invalid data, and removes some NOTICE statements that were still lurking in the code from testing. (closes issue AST-1084) Reported by: John Bigelow Tested by: John Bigelow ........ Merged revisions 381594 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/presencestate.c')
-rw-r--r--main/presencestate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/presencestate.c b/main/presencestate.c
index 94d0dc64d..b87b09242 100644
--- a/main/presencestate.c
+++ b/main/presencestate.c
@@ -159,6 +159,9 @@ static enum ast_presence_state ast_presence_state_helper(const char *presence_pr
}
AST_RWLIST_UNLOCK(&presence_state_providers);
+ if (!provider) {
+ ast_log(LOG_WARNING, "No provider found for label %s\n", label);
+ }
return res;
}