mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Allow multiple switches in the same context (bug #1171)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
2
pbx.c
2
pbx.c
@@ -3306,7 +3306,7 @@ int ast_context_add_switch2(struct ast_context *con, char *value,
|
||||
/* ... go to last sw and check if context is already swd too... */
|
||||
i = con->alts;
|
||||
while (i) {
|
||||
if (!strcasecmp(i->name, new_sw->name)) {
|
||||
if (!strcasecmp(i->name, new_sw->name) && !strcasecmp(i->data, new_sw->data)) {
|
||||
free(new_sw);
|
||||
ast_mutex_unlock(&con->lock);
|
||||
errno = EEXIST;
|
||||
|
Reference in New Issue
Block a user