mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 19:28:53 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user