From: Sean Bright Date: Mon, 4 Mar 2019 22:05:30 +0000 (-0500) Subject: app_queue: Handle empty 'interface' in queue member config X-Git-Tag: 13.26.0-rc1~31^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb6a97665671400b92e1c2da5944d59773521176;p=thirdparty%2Fasterisk.git 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 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 718831191b..4c339cb606 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3273,7 +3273,14 @@ static void rt_handle_member_record(struct call_queue *q, char *category, struct 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; }