mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
Merged revisions 87262 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r87262 | tilghman | 2007-10-28 08:46:55 -0500 (Sun, 28 Oct 2007) | 7 lines Add autoservice to several more functions which might delay in their responses. Also, make sure that func_odbc functions have a channel on which to set variables. Reported by russell Fixed by tilghman Closes issue #11099 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@87263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -71,9 +71,14 @@ static int function_realtime_read(struct ast_channel *chan, const char *cmd, cha
|
||||
if (!args.delim2)
|
||||
args.delim2 = "=";
|
||||
|
||||
if (chan)
|
||||
ast_autoservice_start(chan);
|
||||
|
||||
head = ast_load_realtime_all(args.family, args.fieldmatch, args.value, NULL);
|
||||
|
||||
if (!head)
|
||||
if (chan)
|
||||
ast_autoservice_stop(chan);
|
||||
return -1;
|
||||
|
||||
resultslen = 0;
|
||||
@@ -88,6 +93,9 @@ static int function_realtime_read(struct ast_channel *chan, const char *cmd, cha
|
||||
ast_str_append(&out, 0, "%s%s%s%s", var->name, args.delim2, var->value, args.delim1);
|
||||
ast_copy_string(buf, out->str, len);
|
||||
|
||||
if (chan)
|
||||
ast_autoservice_stop(chan);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -106,6 +114,9 @@ static int function_realtime_write(struct ast_channel *chan, const char *cmd, ch
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (chan)
|
||||
ast_autoservice_start(chan);
|
||||
|
||||
AST_STANDARD_APP_ARGS(args, data);
|
||||
|
||||
res = ast_update_realtime(args.family, args.fieldmatch, args.value, args.field, (char *)value, NULL);
|
||||
@@ -114,6 +125,9 @@ static int function_realtime_write(struct ast_channel *chan, const char *cmd, ch
|
||||
ast_log(LOG_WARNING, "Failed to update. Check the debug log for possible data repository related entries.\n");
|
||||
}
|
||||
|
||||
if (chan)
|
||||
ast_autoservice_stop(chan);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user