mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-21 20:56:39 +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 oldformat;
|
||||||
int groupmatch = 0;
|
int groupmatch = 0;
|
||||||
int channelmatch = -1;
|
int channelmatch = -1;
|
||||||
|
int roundrobin = 0;
|
||||||
int callwait = 0;
|
int callwait = 0;
|
||||||
struct zt_pvt *p;
|
struct zt_pvt *p;
|
||||||
struct ast_channel *tmp = NULL;
|
struct ast_channel *tmp = NULL;
|
||||||
@@ -5476,6 +5477,7 @@ static struct ast_channel *zt_request(char *type, int format, void *data)
|
|||||||
if (!p)
|
if (!p)
|
||||||
p = iflist;
|
p = iflist;
|
||||||
}
|
}
|
||||||
|
roundrobin = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
char *stringp=NULL;
|
char *stringp=NULL;
|
||||||
@@ -5498,7 +5500,8 @@ static struct ast_channel *zt_request(char *type, int format, void *data)
|
|||||||
}
|
}
|
||||||
exit = p;
|
exit = p;
|
||||||
while(p && !tmp) {
|
while(p && !tmp) {
|
||||||
round_robin[x] = p;
|
if (roundrobin)
|
||||||
|
round_robin[x] = p;
|
||||||
#if 0
|
#if 0
|
||||||
ast_verbose("name = %s, %d\n",p->owner->name,p->channel);
|
ast_verbose("name = %s, %d\n",p->owner->name,p->channel);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user