[asterisk-commits] irroot: branch irroot/distrotech-customers-10 r333485 - /team/irroot/distrote...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Aug 27 03:55:10 CDT 2011
Author: irroot
Date: Sat Aug 27 03:55:07 2011
New Revision: 333485
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=333485
Log:
app_queue.c updatecdr appendcdr if needed only update last cdr on stack RB1266
Modified:
team/irroot/distrotech-customers-10/apps/app_queue.c
Modified: team/irroot/distrotech-customers-10/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-10/apps/app_queue.c?view=diff&rev=333485&r1=333484&r2=333485
==============================================================================
--- team/irroot/distrotech-customers-10/apps/app_queue.c (original)
+++ team/irroot/distrotech-customers-10/apps/app_queue.c Sat Aug 27 03:55:07 2011
@@ -5082,8 +5082,26 @@
qe->handled++;
ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "CONNECT", "%ld|%s|%ld", (long) time(NULL) - qe->start, peer->uniqueid,
(long)(orig - to > 0 ? (orig - to) / 1000 : 0));
- if (update_cdr && qe->chan->cdr)
- ast_copy_string(qe->chan->cdr->dstchannel, member->membername, sizeof(qe->chan->cdr->dstchannel));
+
+ if (update_cdr && qe->chan->cdr) {
+ struct ast_cdr *cdr;
+ struct ast_cdr *newcdr;
+
+ cdr = qe->chan->cdr;
+ while (cdr->next) {
+ cdr = cdr->next;
+ }
+ if ((strcasecmp(cdr->uniqueid, qe->chan->uniqueid)) && (strcasecmp(cdr->linkedid, qe->chan->uniqueid))) {
+ if ((newcdr = ast_cdr_dup(cdr))) {
+ ast_cdr_init(newcdr, qe->chan);
+ ast_cdr_reset(newcdr, 0);
+ cdr->next = newcdr;
+ cdr = cdr->next;
+ }
+ }
+ ast_copy_string(cdr->dstchannel, member->membername, sizeof(cdr->dstchannel));
+ }
+
if (qe->parent->eventwhencalled)
manager_event(EVENT_FLAG_AGENT, "AgentConnect",
"Queue: %s\r\n"
More information about the asterisk-commits
mailing list