mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 11:28:25 +00:00
Dialplan functions: Fix some channel autoservice misuse.
* Fix off nominal paths leaving the channel in autoservice. * Remove unnecessary start/stop channel autoservice. * Fix channel locking around a channel datastore search. Change-Id: I7ff2e42388064fe3149034ecae57604040b8b540
This commit is contained in:
@@ -227,6 +227,9 @@ static int function_realtime_read(struct ast_channel *chan, const char *cmd, cha
|
||||
|
||||
if (resultslen > len) {
|
||||
ast_log(LOG_WARNING, "Failed to fetch. Realtime data is too large: need %zu, have %zu.\n", resultslen, len);
|
||||
if (chan) {
|
||||
ast_autoservice_stop(chan);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -460,6 +463,9 @@ static int function_realtime_readdestroy(struct ast_channel *chan, const char *c
|
||||
* someones data without giving him the chance to look
|
||||
* at it. */
|
||||
ast_log(LOG_WARNING, "Failed to fetch/destroy. Realtime data is too large: need %zu, have %zu.\n", resultslen, len);
|
||||
if (chan) {
|
||||
ast_autoservice_stop(chan);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user