mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 16:33:34 +00:00
app_meetme: Don't erroneously set global variables.
The admin_exec function in app_meetme is used by the SLA applications for internal bridging. However, in these cases, chan is NULL. Currently, this function will set some status variables that are intended for a channel, but since channel is NULL, this is erroneously creating meaningless global variables, which shouldn't be happening. This sets these variables only if chan is not NULL. ASTERISK-30002 #close Change-Id: I817df6c26f5bda131678e56791b0b61ba64fc6f7
This commit is contained in:
committed by
Joshua Colp
parent
ce00f8758d
commit
ff70b2aac6
@@ -5239,7 +5239,9 @@ static int admin_exec(struct ast_channel *chan, const char *data) {
|
|||||||
|
|
||||||
if (ast_strlen_zero(data)) {
|
if (ast_strlen_zero(data)) {
|
||||||
ast_log(LOG_WARNING, "MeetMeAdmin requires an argument!\n");
|
ast_log(LOG_WARNING, "MeetMeAdmin requires an argument!\n");
|
||||||
|
if (chan) {
|
||||||
pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", "NOPARSE");
|
pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", "NOPARSE");
|
||||||
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5248,7 +5250,9 @@ static int admin_exec(struct ast_channel *chan, const char *data) {
|
|||||||
|
|
||||||
if (!args.command) {
|
if (!args.command) {
|
||||||
ast_log(LOG_WARNING, "MeetmeAdmin requires a command!\n");
|
ast_log(LOG_WARNING, "MeetmeAdmin requires a command!\n");
|
||||||
|
if (chan) {
|
||||||
pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", "NOPARSE");
|
pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", "NOPARSE");
|
||||||
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5261,7 +5265,9 @@ static int admin_exec(struct ast_channel *chan, const char *data) {
|
|||||||
if (!cnf) {
|
if (!cnf) {
|
||||||
ast_log(LOG_WARNING, "Conference number '%s' not found!\n", args.confno);
|
ast_log(LOG_WARNING, "Conference number '%s' not found!\n", args.confno);
|
||||||
AST_LIST_UNLOCK(&confs);
|
AST_LIST_UNLOCK(&confs);
|
||||||
|
if (chan) {
|
||||||
pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", "NOTFOUND");
|
pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", "NOTFOUND");
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5384,7 +5390,9 @@ usernotfound:
|
|||||||
AST_LIST_UNLOCK(&confs);
|
AST_LIST_UNLOCK(&confs);
|
||||||
|
|
||||||
dispose_conf(cnf);
|
dispose_conf(cnf);
|
||||||
|
if (chan) {
|
||||||
pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", res == -2 ? "NOTFOUND" : res ? "FAILED" : "OK");
|
pbx_builtin_setvar_helper(chan, "MEETMEADMINSTATUS", res == -2 ? "NOTFOUND" : res ? "FAILED" : "OK");
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user