aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-07-08 13:32:13 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-07-08 13:32:13 +0000
commitf80476046d375daf4a009b70a2a753a4662cafa3 (patch)
tree3a36e7ba484ba8fbb985b79ba63b1641bd0c8f37 /apps
parent2ceec210100c1982ac1489c409e4af24ae056e0b (diff)
Fix potential seg in queue code
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1165 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_queue.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 8a7e1726f..5a0f5b71e 100755
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -180,7 +180,7 @@ static int join_queue(char *queuename, struct queue_ent *qe)
res = 0;
manager_event(EVENT_FLAG_CALL, "Join",
"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
ast_log(LOG_NOTICE, "Queue '%s' Join, Channel '%s', Position '%d'\n", q->name, qe->chan->name, qe->pos );
#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
we will always return with -1 so that it is hung up properly after the
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);
/* Stop music on hold */
ast_moh_stop(qe->chan);
@@ -619,14 +627,6 @@ static int try_calling(struct queue_ent *qe, char *options, char *announceoverri
ast_hangup(peer);
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 */
leave_queue(qe);
/* JDG: sendurl */