mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
Check for already registered manager command. Bug #836
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2029 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -820,6 +820,11 @@ int ast_manager_register( char *action, int auth,
|
||||
|
||||
ast_mutex_lock(&actionlock);
|
||||
while(cur) { /* Walk the list of actions */
|
||||
if (!strcasecmp(cur->action, action)) {
|
||||
ast_log(LOG_WARNING, "Manager: Action '%s' already registered\n", action);
|
||||
ast_mutex_unlock(&actionlock);
|
||||
return -1;
|
||||
}
|
||||
prev = cur;
|
||||
cur = cur->next;
|
||||
}
|
||||
|
Reference in New Issue
Block a user