[asterisk-commits] seanbright: trunk r170980 - in /trunk: ./ apps/app_page.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jan 25 07:35:49 CST 2009


Author: seanbright
Date: Sun Jan 25 07:35:48 2009
New Revision: 170980

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=170980
Log:
Merged revisions 170979 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170979 | seanbright | 2009-01-25 08:33:20 -0500 (Sun, 25 Jan 2009) | 9 lines
  
  Resolve a logic error that was causing Page() to crash when more than one
  channel was specified.
  
  (closes issue #14308)
  Reported by: bluefox
  Patches:
        20090124__bug14308.diff.txt uploaded by seanbright (license 71)
  Tested by: kc0bvu
........

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

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

Modified: trunk/apps/app_page.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/apps/app_page.c?view=diff&rev=170980&r1=170979&r2=170980
==============================================================================
--- trunk/apps/app_page.c (original)
+++ trunk/apps/app_page.c Sun Jan 25 07:35:48 2009
@@ -170,12 +170,15 @@
 	/* Count number of extensions in list by number of ampersands + 1 */
 	num_dials = 1;
 	tmp = args.devices;
-	while (*tmp && *tmp++ == '&') {
-		num_dials++;
-	}
-
-	if (!(dial_list = ast_calloc(num_dials, sizeof(void *)))) {
-		ast_log(LOG_ERROR, "Can't allocate %ld bytes for dial list\n", (long)(sizeof(void *) * num_dials));
+	while (*tmp) {
+		if (*tmp == '&') {
+			num_dials++;
+		}
+		tmp++;
+	}
+
+	if (!(dial_list = ast_calloc(num_dials, sizeof(struct ast_dial *)))) {
+		ast_log(LOG_ERROR, "Can't allocate %ld bytes for dial list\n", (long)(sizeof(struct ast_dial *) * num_dials));
 		return -1;
 	}
 




More information about the asterisk-commits mailing list