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: 16.3.0-rc1~34^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=88681ba9bb6c480b490b40afa65a48063a9a0a2f;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 9b1f486711..f441e35c30 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3410,7 +3410,14 @@ static void rt_handle_member_record(struct call_queue *q, char *category, struct const char *wrapuptime_str = ast_variable_retrieve(member_config, category, "wrapuptime"); 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; }