[asterisk-commits] file: branch 1.6.0 r192467 - in /branches/1.6.0: ./ main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 5 13:25:16 CDT 2009


Author: file
Date: Tue May  5 13:25:12 2009
New Revision: 192467

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=192467
Log:
Merged revisions 192462 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r192462 | file | 2009-05-05 15:23:58 -0300 (Tue, 05 May 2009) | 15 lines
  
  Merged revisions 192454 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r192454 | file | 2009-05-05 15:22:27 -0300 (Tue, 05 May 2009) | 8 lines
    
    Fix an incorrect assumption that certain values on the channel will always exist when they may not.
    
    The CDR code involved with bridges wrongly assumed that the currently executing application and data
    values will always exist. It is possible for this to be false when call forwarding is involved.
    
    (closes issue #14984)
    Reported by: gincantalupo
  ........
................

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/features.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/main/features.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.0/main/features.c?view=diff&rev=192467&r1=192466&r2=192467
==============================================================================
--- branches/1.6.0/main/features.c (original)
+++ branches/1.6.0/main/features.c Tue May  5 13:25:12 2009
@@ -2256,16 +2256,16 @@
 			ast_set_flag(chan_cdr, AST_CDR_FLAG_MAIN);
 			ast_cdr_update(chan);
 			bridge_cdr = ast_cdr_dup(chan_cdr);
-			ast_copy_string(bridge_cdr->lastapp, chan->appl, sizeof(bridge_cdr->lastapp));
-			ast_copy_string(bridge_cdr->lastdata, chan->data, sizeof(bridge_cdr->lastdata));
+			ast_copy_string(bridge_cdr->lastapp, S_OR(chan->appl, ""), sizeof(bridge_cdr->lastapp));
+			ast_copy_string(bridge_cdr->lastdata, S_OR(chan->data, ""), sizeof(bridge_cdr->lastdata));
 		} else {
 			/* better yet, in a xfer situation, find out why the chan cdr got zapped (pun unintentional) */
 			bridge_cdr = ast_cdr_alloc(); /* this should be really, really rare/impossible? */
 			ast_copy_string(bridge_cdr->channel, chan->name, sizeof(bridge_cdr->channel));
 			ast_copy_string(bridge_cdr->dstchannel, peer->name, sizeof(bridge_cdr->dstchannel));
 			ast_copy_string(bridge_cdr->uniqueid, chan->uniqueid, sizeof(bridge_cdr->uniqueid));
-			ast_copy_string(bridge_cdr->lastapp, chan->appl, sizeof(bridge_cdr->lastapp));
-			ast_copy_string(bridge_cdr->lastdata, chan->data, sizeof(bridge_cdr->lastdata));
+			ast_copy_string(bridge_cdr->lastapp, S_OR(chan->appl, ""), sizeof(bridge_cdr->lastapp));
+			ast_copy_string(bridge_cdr->lastdata, S_OR(chan->data, ""), sizeof(bridge_cdr->lastdata));
 			ast_cdr_setcid(bridge_cdr, chan);
 			bridge_cdr->disposition = (chan->_state == AST_STATE_UP) ?  AST_CDR_ANSWERED : AST_CDR_NULL;
 			bridge_cdr->amaflags = chan->amaflags ? chan->amaflags :  ast_default_amaflags;




More information about the asterisk-commits mailing list