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:
Martin Pycko
2003-11-18 18:09:29 +00:00
parent 626d85b1bd
commit a16e5d577c

View File

@@ -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