]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Wed, 29 Mar 2006 20:06:56 +0000 (20:06 +0000)
committerAutomerge script <automerge@asterisk.org>
Wed, 29 Mar 2006 20:06:56 +0000 (20:06 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@16233 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_stack.c
include/asterisk/pbx.h
pbx.c

index e3c33d2e5c038d05ee5ab1dd3b39e244907436cd..fb24f27c4a56ac5424f79ddab33f254f05b0987e 100644 (file)
@@ -139,7 +139,7 @@ static int gosubif_exec(struct ast_channel *chan, void *data)
        label1 = strsep(&args, ":");
        label2 = args;
 
-       if (ast_true(condition)) {
+       if (pbx_checkcondition(condition)) {
                if (label1) {
                        res = gosub_exec(chan, label1);
                }
index d2902002c455b612d856215a571d2fbd78fda55d..cd116321fde4807a585dfc25b60179a0f56821e1 100644 (file)
@@ -569,6 +569,9 @@ int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout
    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);
 
+/* Evaluate a condition for non-falseness and return a boolean */
+int pbx_checkcondition(char *condition);
+
 /* Functions for returning values from structures */
 const char *ast_get_context_name(struct ast_context *con);
 const char *ast_get_extension_name(struct ast_exten *exten);
diff --git a/pbx.c b/pbx.c
index d1da3a498e40ea64aa062c603bf1fe9b05c9d9b1..4546881c95027dd3fb55e9d23e420e8a47fa4bfa 100644 (file)
--- a/pbx.c
+++ b/pbx.c
@@ -6107,7 +6107,7 @@ void pbx_builtin_clear_globals(void)
        ast_mutex_unlock(&globalslock);
 }
 
-static int pbx_checkcondition(char *condition) 
+int pbx_checkcondition(char *condition) 
 {
        if (condition) {
                if (*condition == '\0') {