[openggsn] [PATCH 2/2] add missing path separator for gsn_restart file

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Thu Aug 18 02:06:15 UTC 2016


Put restart file in dir/gsn_restart instead of ../dirgsn_restart.
---
 gtp/gtp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtp/gtp.c b/gtp/gtp.c
index 34e1dc6..702e502 100644
--- a/gtp/gtp.c
+++ b/gtp/gtp.c
@@ -651,7 +651,7 @@ static void log_restart(struct gsn_t *gsn)
 	/* guarantee nul term, strncpy might omit if too long */
 	filename[NAMESIZE - 1] = 0;
 	strncpy(filename, gsn->statedir, NAMESIZE - 1);
-	strncat(filename, RESTART_FILE, NAMESIZE - 1 - strlen(filename));
+	strncat(filename, "/" RESTART_FILE, NAMESIZE - 1 - strlen(filename));
 
 	i = umask(022);
 
-- 
2.1.4




More information about the OpenBSC mailing list