mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-20 12:20:12 +00:00
Merged revisions 16192 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r16192 | tilghman | 2006-03-29 13:11:18 -0600 (Wed, 29 Mar 2006) | 2 lines Bug 6830 - Let GosubIf work with the same conditions as a GotoIf (change in API approved by Russell) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -140,7 +140,7 @@ static int gosubif_exec(struct ast_channel *chan, void *data)
|
|||||||
label1 = strsep(&args, ":");
|
label1 = strsep(&args, ":");
|
||||||
label2 = args;
|
label2 = args;
|
||||||
|
|
||||||
if (ast_true(condition)) {
|
if (pbx_checkcondition(condition)) {
|
||||||
if (label1) {
|
if (label1) {
|
||||||
res = gosub_exec(chan, label1);
|
res = gosub_exec(chan, label1);
|
||||||
}
|
}
|
||||||
|
@@ -720,6 +720,9 @@ int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout
|
|||||||
particular application with given extension */
|
particular application with given extension */
|
||||||
int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel);
|
int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout, const char *app, const char *appdata, int *reason, int sync, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **locked_channel);
|
||||||
|
|
||||||
|
/* Evaluate a condition for non-falseness and return a boolean */
|
||||||
|
int pbx_checkcondition(char *condition);
|
||||||
|
|
||||||
/* Functions for returning values from structures */
|
/* Functions for returning values from structures */
|
||||||
const char *ast_get_context_name(struct ast_context *con);
|
const char *ast_get_context_name(struct ast_context *con);
|
||||||
const char *ast_get_extension_name(struct ast_exten *exten);
|
const char *ast_get_extension_name(struct ast_exten *exten);
|
||||||
|
2
pbx.c
2
pbx.c
@@ -5709,7 +5709,7 @@ void pbx_builtin_clear_globals(void)
|
|||||||
ast_mutex_unlock(&globalslock);
|
ast_mutex_unlock(&globalslock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pbx_checkcondition(char *condition)
|
int pbx_checkcondition(char *condition)
|
||||||
{
|
{
|
||||||
if (condition) {
|
if (condition) {
|
||||||
if (*condition == '\0') {
|
if (*condition == '\0') {
|
||||||
|
Reference in New Issue
Block a user