[svn-commits] kmoore: branch 1.8 r399402 - /branches/1.8/main/abstract_jb.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Sep 18 14:54:37 CDT 2013


Author: kmoore
Date: Wed Sep 18 14:54:36 2013
New Revision: 399402

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399402
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

Modified:
    branches/1.8/main/abstract_jb.c

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




More information about the svn-commits mailing list