[2/3] add missing path separator for gsn_restart file

Submitted by Neels Hofmeyr on Sept. 15, 2016, 1:06 p.m.

Details

Message ID 1473944800-6054-2-git-send-email-nhofmeyr@sysmocom.de
State New
Series "Series without cover letter"
Headers show

Commit Message

Neels Hofmeyr Sept. 15, 2016, 1:06 p.m.
Put restart file in dir/gsn_restart instead of ../dirgsn_restart.
---
 gtp/gtp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/gtp/gtp.c b/gtp/gtp.c
index 55a8ce4..cdff238 100644
--- a/gtp/gtp.c
+++ b/gtp/gtp.c
@@ -650,7 +650,7 @@  static void log_restart(struct gsn_t *gsn)
 
 	filename[NAMESIZE - 1] = 0;	/* No null term. guarantee by strncpy */
 	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);