[asterisk-commits] tilghman: trunk r273714 - /trunk/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 2 11:57:31 CDT 2010


Author: tilghman
Date: Fri Jul  2 11:57:28 2010
New Revision: 273714

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=273714
Log:
The switch fallthrough could create some errorneous situations, so best to force directly to the default case.

Modified:
    trunk/apps/app_queue.c

Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=273714&r1=273713&r2=273714
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Fri Jul  2 11:57:28 2010
@@ -1188,22 +1188,27 @@
 				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;




More information about the asterisk-commits mailing list