From: Tilghman Lesher Date: Fri, 2 Jul 2010 16:57:28 +0000 (+0000) Subject: The switch fallthrough could create some errorneous situations, so best to force... X-Git-Tag: 11.0.0-beta1~2745 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45a4bf35c26217441978304aab3d1acf18776d48;p=thirdparty%2Fasterisk.git The switch fallthrough could create some errorneous situations, so best to force directly to the default case. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273714 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index a7f023bfa1..4c7c42212c 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1188,22 +1188,27 @@ static int get_member_status(struct call_queue *q, int max_penalty, int min_pena ast_debug(4, "%s is unavailable because his device state is 'invalid'\n", member->membername); break; } + goto default_case; case AST_DEVICE_UNAVAILABLE: if (conditions & QUEUE_EMPTY_UNAVAILABLE) { ast_debug(4, "%s is unavailable because his device state is 'unavailable'\n", member->membername); break; } + goto default_case; case AST_DEVICE_INUSE: if (conditions & QUEUE_EMPTY_INUSE) { ast_debug(4, "%s is unavailable because his device state is 'inuse'\n", member->membername); break; } + goto default_case; case AST_DEVICE_UNKNOWN: if (conditions & QUEUE_EMPTY_UNKNOWN) { ast_debug(4, "%s is unavailable because his device state is 'unknown'\n", member->membername); break; } + /* Fall-through */ default: + default_case: if (member->paused && (conditions & QUEUE_EMPTY_PAUSED)) { ast_debug(4, "%s is unavailable because he is paused'\n", member->membername); break;