]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Correctly format cache entries. <sigh>
authorAlan T. DeKok <aland@freeradius.org>
Tue, 16 Jun 2015 15:19:13 +0000 (11:19 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 16 Jun 2015 15:19:13 +0000 (11:19 -0400)
src/main/tls.c

index 260b7e45445f69e0f1b9c59ec9701ddae4fa30e1..b03d5cba62409e1326bea6b75319ae179a542e24 100644 (file)
@@ -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;
                                        }