[Asterisk-code-review] app_queue: Handle empty 'interface' in queue member config (...asterisk[13])
Friendly Automation
asteriskteam at digium.com
Tue Mar 5 08:51:07 CST 2019
Friendly Automation has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/11094 )
Change subject: app_queue: Handle empty 'interface' in queue member config
......................................................................
app_queue: Handle empty 'interface' in queue member config
While the 'interface' column is a NOT NULL, the empty string is still
allowed. res_config_odbc treats the empty string as a NULL and we crash
when trying to dereference.
Also cleaned up an adjacent error message for consistency.
ASTERISK-28168 #close
Change-Id: I55e012b540fbcda99bb40bede3099b7ae5db8202
---
M apps/app_queue.c
1 file changed, 8 insertions(+), 1 deletion(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Benjamin Keith Ford: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 7188311..4c339cb 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3273,7 +3273,14 @@
const char *paused_str = ast_variable_retrieve(member_config, category, "paused");
if (ast_strlen_zero(rt_uniqueid)) {
- ast_log(LOG_WARNING, "Realtime field uniqueid is empty for member %s\n", S_OR(membername, "NULL"));
+ ast_log(LOG_WARNING, "Realtime field 'uniqueid' is empty for member %s\n",
+ S_OR(membername, "NULL"));
+ return;
+ }
+
+ if (ast_strlen_zero(interface)) {
+ ast_log(LOG_WARNING, "Realtime field 'interface' is empty for member %s\n",
+ S_OR(membername, "NULL"));
return;
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11094
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I55e012b540fbcda99bb40bede3099b7ae5db8202
Gerrit-Change-Number: 11094
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190305/3b618b87/attachment.html>
More information about the asterisk-code-review
mailing list