[Pkg-voip-commits] [bctoolbox] 07/60: Fix compilation issue

Bernhard Schmidt berni at moszumanska.debian.org
Sun Oct 15 22:42:23 UTC 2017


This is an automated email from the git hooks/post-receive script.

berni pushed a commit to branch debian/sid
in repository bctoolbox.

commit 900544471d0241a1833bbb1d3e8da8917686bf57
Author: Benjamin Reis <benjamin.reis at belledonne-communications.com>
Date:   Thu Mar 30 16:05:18 2017 +0200

    Fix compilation issue
---
 tester/bctoolbox_tester.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tester/bctoolbox_tester.c b/tester/bctoolbox_tester.c
index c80f49f..f1550f3 100644
--- a/tester/bctoolbox_tester.c
+++ b/tester/bctoolbox_tester.c
@@ -58,8 +58,8 @@ void bctoolbox_tester_before_each() {
 
 int bctoolbox_tester_set_log_file(const char *filename) {
 	BctoolboxLogHandler* filehandler;
-	char dirbuffer[512];
-	char basebuffer[512];
+	char* dir;
+	char* base;
 	if (log_file) {
 		fclose(log_file);
 	}
@@ -68,9 +68,13 @@ int bctoolbox_tester_set_log_file(const char *filename) {
 		bctbx_error("Cannot open file [%s] for writing logs because [%s]", filename, strerror(errno));
 		return -1;
 	}
+	dir = bctbx_strdup(filename);
+	base = bctbx_strdup(filename);
 	bctbx_message("Redirecting traces to file [%s]", filename);
-	filehandler = bctbx_create_file_log_handler(0, dirname_r(filename, dirbuffer), basename_r(filename, basebuffer), log_file);
+	filehandler = bctbx_create_file_log_handler(0, dirname(dir), basename(base), log_file);
 	bctbx_add_log_handler(filehandler);
+	bctbx_unref(dir);
+	bctbx_unref(name);
 	return 0;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/bctoolbox.git



More information about the Pkg-voip-commits mailing list