mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
Fix segfault if more than 32 channels are used because of round_robin[x] = p;
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -5425,6 +5425,7 @@ static struct ast_channel *zt_request(char *type, int format, void *data)
|
||||
int oldformat;
|
||||
int groupmatch = 0;
|
||||
int channelmatch = -1;
|
||||
int roundrobin = 0;
|
||||
int callwait = 0;
|
||||
struct zt_pvt *p;
|
||||
struct ast_channel *tmp = NULL;
|
||||
@@ -5476,6 +5477,7 @@ static struct ast_channel *zt_request(char *type, int format, void *data)
|
||||
if (!p)
|
||||
p = iflist;
|
||||
}
|
||||
roundrobin = 1;
|
||||
}
|
||||
} else {
|
||||
char *stringp=NULL;
|
||||
@@ -5498,7 +5500,8 @@ static struct ast_channel *zt_request(char *type, int format, void *data)
|
||||
}
|
||||
exit = p;
|
||||
while(p && !tmp) {
|
||||
round_robin[x] = p;
|
||||
if (roundrobin)
|
||||
round_robin[x] = p;
|
||||
#if 0
|
||||
ast_verbose("name = %s, %d\n",p->owner->name,p->channel);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user