mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-07 10:28:32 +00:00
Merged revisions 170980 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r170980 | seanbright | 2009-01-25 08:35:48 -0500 (Sun, 25 Jan 2009) | 16 lines 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 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@170982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -111,12 +111,15 @@ static int page_exec(struct ast_channel *chan, void *data)
|
|||||||
/* Count number of extensions in list by number of ampersands + 1 */
|
/* Count number of extensions in list by number of ampersands + 1 */
|
||||||
num_dials = 1;
|
num_dials = 1;
|
||||||
tmp2 = tmp;
|
tmp2 = tmp;
|
||||||
while (*tmp2 && *tmp2++ == '&') {
|
while (*tmp2) {
|
||||||
num_dials++;
|
if (*tmp2 == '&') {
|
||||||
|
num_dials++;
|
||||||
|
}
|
||||||
|
tmp2++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(dial_list = ast_calloc(num_dials, sizeof(void *)))) {
|
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(void *) * num_dials));
|
ast_log(LOG_ERROR, "Can't allocate %ld bytes for dial list\n", (long)(sizeof(struct ast_dial *) * num_dials));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user