[asterisk-commits] irroot: branch irroot/distrotech-customers-1.8 r337829 - /team/irroot/distrot...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Sep 23 00:36:07 CDT 2011
Author: irroot
Date: Fri Sep 23 00:36:03 2011
New Revision: 337829
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=337829
Log:
Make update_cdr set the dst and dstchannel correctly
Modified:
team/irroot/distrotech-customers-1.8/apps/app_queue.c
Modified: team/irroot/distrotech-customers-1.8/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-1.8/apps/app_queue.c?view=diff&rev=337829&r1=337828&r2=337829
==============================================================================
--- team/irroot/distrotech-customers-1.8/apps/app_queue.c (original)
+++ team/irroot/distrotech-customers-1.8/apps/app_queue.c Fri Sep 23 00:36:03 2011
@@ -5082,21 +5082,25 @@
struct ast_cdr *cdr;
struct ast_cdr *newcdr;
+ /* Only work with the last CDR in the stack*/
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);
- ast_channel_lock(qe->chan);
- cdr = ast_cdr_append(cdr, newcdr);
- cdr = cdr->next;
- ast_channel_unlock(qe->chan);
- }
- }
- ast_copy_string(cdr->dstchannel, member->membername, sizeof(cdr->dstchannel));
+
+ /* If there is no CDR add one to the stack*/
+ if ((strcasecmp(cdr->uniqueid, qe->chan->uniqueid)) &&
+ (strcasecmp(cdr->linkedid, qe->chan->uniqueid)) &&
+ (newcdr = ast_cdr_dup(cdr))) {
+ ast_cdr_init(newcdr, qe->chan);
+ ast_cdr_reset(newcdr, 0);
+ ast_channel_lock(qe->chan);
+ cdr = ast_cdr_append(cdr, newcdr);
+ cdr = cdr->next;
+ ast_channel_unlock(qe->chan);
+ }
+ ast_copy_string(cdr->dstchannel, member->interface, sizeof(cdr->dstchannel));
+ ast_copy_string(cdr->dst, member->membername, sizeof(cdr->dst));
}
if (qe->parent->eventwhencalled)
More information about the asterisk-commits
mailing list