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
This commit is contained in:
Matthew Jordan
2013-02-15 23:29:28 +00:00
parent 8a7dd2f408
commit c209e85ad3
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;
}