From abd171829cfc9f5ec9296f06e0b40b97efbe4e68 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Fri, 2 Jul 2010 16:59:11 +0000 Subject: [PATCH] Merged revisions 273714 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r273714 | tilghman | 2010-07-02 11:57:28 -0500 (Fri, 02 Jul 2010) | 2 lines 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/branches/1.6.2@273716 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_queue.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/app_queue.c b/apps/app_queue.c index 979ae9c86a..ec57584b2a 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -967,22 +967,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;