[asterisk-commits] murf: branch 1.2 r62737 - in /branches/1.2: cdr.c pbx.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed May 2 13:10:33 MST 2007


Author: murf
Date: Wed May  2 15:10:32 2007
New Revision: 62737

URL: http://svn.digium.com/view/asterisk?view=rev&rev=62737
Log:
Some tweaks to satisfy CDR bug 8796, where being in 'h' extension louses up the dst field

Modified:
    branches/1.2/cdr.c
    branches/1.2/pbx.c

Modified: branches/1.2/cdr.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/cdr.c?view=diff&rev=62737&r1=62736&r2=62737
==============================================================================
--- branches/1.2/cdr.c (original)
+++ branches/1.2/cdr.c Wed May  2 15:10:32 2007
@@ -775,16 +775,18 @@
 
 			/* Copy account code et-al */	
 			ast_copy_string(cdr->accountcode, c->accountcode, sizeof(cdr->accountcode));
-			/* Destination information */
-			ast_copy_string(cdr->dst, (ast_strlen_zero(c->macroexten)) ? c->exten : c->macroexten, sizeof(cdr->dst));
-			ast_copy_string(cdr->dcontext, (ast_strlen_zero(c->macrocontext)) ? c->context : c->macrocontext, sizeof(cdr->dcontext));
+			if (!ast_check_hangup(c)) {
+				/* Destination information */ /* XXX privilege macro* ? */
+				ast_copy_string(cdr->dst, (ast_strlen_zero(c->macroexten)) ? c->exten : c->macroexten, sizeof(cdr->dst));
+				ast_copy_string(cdr->dcontext, (ast_strlen_zero(c->macrocontext)) ? c->context : c->macrocontext, sizeof(cdr->dcontext));
+			}
 		}
 		cdr = cdr->next;
 	}
 
 	return 0;
 }
-
+ 
 int ast_cdr_amaflags2int(const char *flag)
 {
 	if (!strcasecmp(flag, "default"))

Modified: branches/1.2/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/pbx.c?view=diff&rev=62737&r1=62736&r2=62737
==============================================================================
--- branches/1.2/pbx.c (original)
+++ branches/1.2/pbx.c Wed May  2 15:10:32 2007
@@ -562,7 +562,7 @@
 	int (*execute)(struct ast_channel *chan, void *data) = app->execute; 
 
 	if (newstack) {
-		if (c->cdr)
+		if (c->cdr && !ast_check_hangup(c))
 			ast_cdr_setapp(c->cdr, app->name, data);
 
 		/* save channel values */



More information about the asterisk-commits mailing list