[asterisk-commits] juggie: branch juggie/NoLossCDR r78336 - /team/juggie/NoLossCDR/main/cdr.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 6 23:02:02 CDT 2007


Author: juggie
Date: Mon Aug  6 23:02:01 2007
New Revision: 78336

URL: http://svn.digium.com/view/asterisk?view=rev&rev=78336
Log:
make sure we dont ast_copy_string a null

Modified:
    team/juggie/NoLossCDR/main/cdr.c

Modified: team/juggie/NoLossCDR/main/cdr.c
URL: http://svn.digium.com/view/asterisk/team/juggie/NoLossCDR/main/cdr.c?view=diff&rev=78336&r1=78335&r2=78336
==============================================================================
--- team/juggie/NoLossCDR/main/cdr.c (original)
+++ team/juggie/NoLossCDR/main/cdr.c Mon Aug  6 23:02:01 2007
@@ -119,7 +119,10 @@
 	i->cancel_thread = 0;
 	i->waiting_cdrs = 0;
 	ast_copy_string(i->name, name, sizeof(i->name));
-	ast_copy_string(i->name_detail, name_detail, sizeof(i->name_detail));
+	if (name_detail)
+		ast_copy_string(i->name_detail, name_detail, sizeof(i->name_detail));
+	else
+		ast_copy_string(i->name_detail, "", sizeof(i->name_detail));
 	ast_copy_string(i->desc, desc, sizeof(i->desc));
 	ast_cond_init(&i->cdr_pending_cond, NULL);
 	if (ast_pthread_create_background(&i->cdr_thread, NULL, do_cdr, i) < 0)




More information about the asterisk-commits mailing list