mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 03:48:02 +00:00
Tilghman's directory fix (bug #1892)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -267,6 +267,9 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
|
|||||||
case '1':
|
case '1':
|
||||||
/* user pressed '1' and extensions exists */
|
/* user pressed '1' and extensions exists */
|
||||||
lastuserchoice = res;
|
lastuserchoice = res;
|
||||||
|
strncpy(chan->context, dialcontext, sizeof(chan->context) - 1);
|
||||||
|
strncpy(chan->exten, v->name, sizeof(chan->exten) - 1);
|
||||||
|
chan->priority = 0;
|
||||||
break;
|
break;
|
||||||
case '*':
|
case '*':
|
||||||
/* user pressed '*' to skip something found */
|
/* user pressed '*' to skip something found */
|
||||||
@@ -289,7 +292,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
|
|||||||
res = 1;
|
res = 1;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -301,7 +304,7 @@ static int directory_exec(struct ast_channel *chan, void *data)
|
|||||||
struct ast_config *cfg;
|
struct ast_config *cfg;
|
||||||
char *context, *dialcontext, *dirintro;
|
char *context, *dialcontext, *dirintro;
|
||||||
if (!data) {
|
if (!data) {
|
||||||
ast_log(LOG_WARNING, "directory requires an argument (context)\n");
|
ast_log(LOG_WARNING, "directory requires an argument (context[,dialcontext])\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
cfg = ast_load(DIRECTORY_CONFIG);
|
cfg = ast_load(DIRECTORY_CONFIG);
|
||||||
|
|||||||
Reference in New Issue
Block a user