[asterisk-commits] irroot: branch irroot/distrotech-customers-trunk r337838 - /team/irroot/distr...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Sep 23 02:48:54 CDT 2011
Author: irroot
Date: Fri Sep 23 02:48:51 2011
New Revision: 337838
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=337838
Log:
Final changes to Q cdr update
Modified:
team/irroot/distrotech-customers-trunk/apps/app_queue.c
Modified: team/irroot/distrotech-customers-trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/apps/app_queue.c?view=diff&rev=337838&r1=337837&r2=337838
==============================================================================
--- team/irroot/distrotech-customers-trunk/apps/app_queue.c (original)
+++ team/irroot/distrotech-customers-trunk/apps/app_queue.c Fri Sep 23 02:48:51 2011
@@ -5078,7 +5078,7 @@
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) {
+ if (qe->chan->cdr) {
struct ast_cdr *cdr;
struct ast_cdr *newcdr;
@@ -5088,8 +5088,8 @@
cdr = cdr->next;
}
- /* If there is no CDR add one to the stack*/
- if ((strcasecmp(cdr->uniqueid, qe->chan->uniqueid)) &&
+ /* If this CDR is not related to us add new one*/
+ if ((strcasecmp(cdr->uniqueid, qe->chan->uniqueid)) &&
(strcasecmp(cdr->linkedid, qe->chan->uniqueid)) &&
(newcdr = ast_cdr_dup(cdr))) {
ast_cdr_init(newcdr, qe->chan);
@@ -5099,7 +5099,10 @@
cdr = cdr->next;
ast_channel_unlock(qe->chan);
}
- ast_copy_string(cdr->dstchannel, peer->name, sizeof(cdr->dstchannel));
+
+ if (update_cdr) {
+ ast_copy_string(cdr->dstchannel, member->membername, sizeof(cdr->dstchannel));
+ }
}
if (qe->parent->eventwhencalled)
More information about the asterisk-commits
mailing list