From: Alan T. DeKok Date: Tue, 16 Jun 2015 15:19:13 +0000 (-0400) Subject: Correctly format cache entries. X-Git-Tag: release_3_0_9~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=363dfd9c19b932985654a9e0f58310d9c13b7688;p=thirdparty%2Ffreeradius-server.git Correctly format cache entries. --- diff --git a/src/main/tls.c b/src/main/tls.c index 260b7e45445..b03d5cba624 100644 --- a/src/main/tls.c +++ b/src/main/tls.c @@ -2910,20 +2910,21 @@ int tls_success(tls_session_t *ssn, REQUEST *request) vp_cursor_t cursor; /* generate a dummy user-style entry which is easy to read back */ fprintf(vp_file, "# SSL cached session\n"); - fprintf(vp_file, "%s\n", buffer); + fprintf(vp_file, "%s\n\t", buffer); + for (vp = fr_cursor_init(&cursor, &vps); vp; vp = fr_cursor_next(&cursor)) { /* * Terminate the previous line. */ - if (prev) fprintf(vp_file, ",\n"); + if (prev) fprintf(vp_file, ",\n\t"); /* * Write this one. */ vp_prints(buf, sizeof(buf), vp); - fprintf(vp_file, "\t%s,\n", buf); + fputs(buf, vp_file); prev = vp; }