[asterisk-commits] kmoore: trunk r332655 - in /trunk: ./ apps/app_confbridge.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Aug 19 15:00:25 CDT 2011


Author: kmoore
Date: Fri Aug 19 15:00:19 2011
New Revision: 332655

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=332655
Log:
Merged revisions 332654 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/10

........
  r332654 | kmoore | 2011-08-19 14:59:34 -0500 (Fri, 19 Aug 2011) | 8 lines
  
  Make CONFBRIDGE_INFO behave more nicely
  
  CONFBRIDGE_INFO doesn't behave as well in edge cases as MEETME_INFO.  With this
  patch, CONFBRIDGE_INFO should behave in a much more reasonable manner when
  presented with invalid conferences and keywords.
  
  Review: https://reviewboard.asterisk.org/r/1359/
........

Modified:
    trunk/   (props changed)
    trunk/apps/app_confbridge.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_confbridge.c?view=diff&rev=332655&r1=332654&r2=332655
==============================================================================
--- trunk/apps/app_confbridge.c (original)
+++ trunk/apps/app_confbridge.c Fri Aug 19 15:00:19 2011
@@ -2623,14 +2623,14 @@
 		return -1;
 	}
 	if (!ao2_container_count(conference_bridges)) {
-		ast_log(LOG_ERROR, "No active conferences.\n");
-		return -1;
+		snprintf(buf, len, "0");
+		return 0;
 	}
 	ast_copy_string(tmp.name, args.confno, sizeof(tmp.name));
 	bridge = ao2_find(conference_bridges, &tmp, OBJ_POINTER);
 	if (!bridge) {
-		ast_log(LOG_ERROR, "Conference '%s' not found.\n", args.confno);
-		return -1;
+		snprintf(buf, len, "0");
+		return 0;
 	}
 
 	/* get the correct count for the type requested */
@@ -2654,9 +2654,7 @@
 	} else if (!strncasecmp(args.type, "locked", 6)) {
 		count = bridge->locked;
 	} else {
-		ao2_unlock(bridge);
-		ao2_ref(bridge, -1);
-		return -1;
+		ast_log(LOG_ERROR, "Invalid keyword.\n");
 	}
 	snprintf(buf, len, "%d", count);
 	ao2_unlock(bridge);




More information about the asterisk-commits mailing list