[asterisk-commits] kmoore: branch 11 r399403 - in /branches/11: ./ main/abstract_jb.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 18 14:55:48 CDT 2013


Author: kmoore
Date: Wed Sep 18 14:55:46 2013
New Revision: 399403

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399403
Log:
Fix jitter buffer log file creation

This adjusts '/'-to-'#' replacement to replace all instances of '/'
instead of just the first to ensure that the jitter buffer log file
gets the correct name as per Richard Kenner's suggestion.

(closes issue ASTERISK-21036)
Reported by: Richard Kenner
........

Merged revisions 399402 from http://svn.asterisk.org/svn/asterisk/branches/1.8

Modified:
    branches/11/   (props changed)
    branches/11/main/abstract_jb.c

Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: branches/11/main/abstract_jb.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/abstract_jb.c?view=diff&rev=399403&r1=399402&r2=399403
==============================================================================
--- branches/11/main/abstract_jb.c (original)
+++ branches/11/main/abstract_jb.c Wed Sep 18 14:55:46 2013
@@ -443,7 +443,7 @@
 		char safe_logfile[30] = "/tmp/logfile-XXXXXX";
 		int safe_fd;
 		snprintf(name2, sizeof(name2), "%s", ast_channel_name(chan));
-		if ((tmp = strchr(name2, '/'))) {
+		while ((tmp = strchr(name2, '/'))) {
 			*tmp = '#';
 		}
 
@@ -452,7 +452,7 @@
 		ast_assert(bridged != NULL);
 
 		snprintf(name1, sizeof(name1), "%s", ast_channel_name(bridged));
-		if ((tmp = strchr(name1, '/'))) {
+		while ((tmp = strchr(name1, '/'))) {
 			*tmp = '#';
 		}
 




More information about the asterisk-commits mailing list