mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-25 06:00:36 +00:00
Fix potential seg in queue code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -180,7 +180,7 @@ static int join_queue(char *queuename, struct queue_ent *qe)
|
|||||||
res = 0;
|
res = 0;
|
||||||
manager_event(EVENT_FLAG_CALL, "Join",
|
manager_event(EVENT_FLAG_CALL, "Join",
|
||||||
"Channel: %s\r\nCallerID:%s\r\nQueue: %s\r\nPosition: %d\r\nCount: %d\r\n",
|
"Channel: %s\r\nCallerID:%s\r\nQueue: %s\r\nPosition: %d\r\nCount: %d\r\n",
|
||||||
qe->chan->name, qe->chan->callerid ? qe->chan->callerid : "", q->name, qe->pos, q->count );
|
qe->chan->name, (qe->chan->callerid ? qe->chan->callerid : ""), q->name, qe->pos, q->count );
|
||||||
#if 0
|
#if 0
|
||||||
ast_log(LOG_NOTICE, "Queue '%s' Join, Channel '%s', Position '%d'\n", q->name, qe->chan->name, qe->pos );
|
ast_log(LOG_NOTICE, "Queue '%s' Join, Channel '%s', Position '%d'\n", q->name, qe->chan->name, qe->pos );
|
||||||
#endif
|
#endif
|
||||||
@@ -590,6 +590,14 @@ static int try_calling(struct queue_ent *qe, char *options, char *announceoverri
|
|||||||
/* Ah ha! Someone answered within the desired timeframe. Of course after this
|
/* Ah ha! Someone answered within the desired timeframe. Of course after this
|
||||||
we will always return with -1 so that it is hung up properly after the
|
we will always return with -1 so that it is hung up properly after the
|
||||||
conversation. */
|
conversation. */
|
||||||
|
if (!strcmp(qe->chan->type,"Zap")) {
|
||||||
|
if (tmp->dataquality) zapx = 0;
|
||||||
|
ast_channel_setoption(qe->chan,AST_OPTION_TONE_VERIFY,&zapx,sizeof(char),0);
|
||||||
|
}
|
||||||
|
if (!strcmp(peer->type,"Zap")) {
|
||||||
|
if (tmp->dataquality) zapx = 0;
|
||||||
|
ast_channel_setoption(peer,AST_OPTION_TONE_VERIFY,&zapx,sizeof(char),0);
|
||||||
|
}
|
||||||
hanguptree(outgoing, peer);
|
hanguptree(outgoing, peer);
|
||||||
/* Stop music on hold */
|
/* Stop music on hold */
|
||||||
ast_moh_stop(qe->chan);
|
ast_moh_stop(qe->chan);
|
||||||
@@ -619,14 +627,6 @@ static int try_calling(struct queue_ent *qe, char *options, char *announceoverri
|
|||||||
ast_hangup(peer);
|
ast_hangup(peer);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!strcmp(qe->chan->type,"Zap")) {
|
|
||||||
if (tmp->dataquality) zapx = 0;
|
|
||||||
ast_channel_setoption(qe->chan,AST_OPTION_TONE_VERIFY,&zapx,sizeof(char),0);
|
|
||||||
}
|
|
||||||
if (!strcmp(peer->type,"Zap")) {
|
|
||||||
if (tmp->dataquality) zapx = 0;
|
|
||||||
ast_channel_setoption(peer,AST_OPTION_TONE_VERIFY,&zapx,sizeof(char),0);
|
|
||||||
}
|
|
||||||
/* Drop out of the queue at this point, to prepare for next caller */
|
/* Drop out of the queue at this point, to prepare for next caller */
|
||||||
leave_queue(qe);
|
leave_queue(qe);
|
||||||
/* JDG: sendurl */
|
/* JDG: sendurl */
|
||||||
|
|||||||
Reference in New Issue
Block a user