diff -Nru a/apps/app_queue.c b/apps/app_queue.c --- a/apps/app_queue.c 2004-12-18 23:25:11 -07:00 +++ b/apps/app_queue.c 2004-12-18 23:25:11 -07:00 @@ -1292,24 +1292,34 @@ } memset(tmp, 0, sizeof(struct localuser)); tmp->stillgoing = -1; - if (options) { - if (strchr(options, 't')) + for (; options && *options; options++) + switch (*options) { + case 't': ast_set_flag(tmp, QUEUE_FLAG_REDIR_IN); - if (strchr(options, 'T')) + break; + case 'T': ast_set_flag(tmp, QUEUE_FLAG_REDIR_OUT); - if (strchr(options, 'r')) + break; + case 'r': ast_set_flag(tmp, QUEUE_FLAG_RINGBACKONLY); - if (strchr(options, 'm')) + break; + case 'm': ast_set_flag(tmp, QUEUE_FLAG_MUSICONHOLD); - if (strchr(options, 'd')) + break; + case 'd': ast_set_flag(tmp, QUEUE_FLAG_DATAQUALITY); - if (strchr(options, 'h')) + break; + case 'h': ast_set_flag(tmp, QUEUE_FLAG_DISCON_IN); - if (strchr(options, 'H')) + break; + case 'H': ast_set_flag(tmp, QUEUE_FLAG_DISCON_OUT); - if ((strchr(options, 'n')) && (now - qe->start >= qe->parent->timeout)) - *go_on = 1; - } + break; + case 'n': + if ((now - qe->start >= qe->parent->timeout)) + *go_on = 1; + break; + } if (option_debug) { if (url) ast_log(LOG_DEBUG, "Queue with URL=%s_\n", url);