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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matthew Jordan
2013-02-15 23:23:49 +00:00
parent a70075ce10
commit 31d1bd4cd8
3 changed files with 17 additions and 7 deletions

View File

@@ -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;
}