]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
log: Fix marker indentation in fr_log_hex_marker
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 1 Apr 2020 01:34:14 +0000 (19:34 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 1 Apr 2020 01:34:14 +0000 (19:34 -0600)
src/lib/util/log.c

index 4fadb2b16a9b48f4a84674eb5d6a781269ee7c52..760064dd4ea6f84e8846f0140f1b046dd2d96245 100644 (file)
@@ -670,7 +670,12 @@ void fr_log_hex_marker(fr_log_t const *log, fr_log_type_t type, char const *file
                 *      Marker is on this line
                 */
                if (((size_t)slen >= i) && ((size_t)slen < (i + 0x10))) {
-                       fr_log(log, type, file, line, "%.*s^ %s", (int)((slen - i) * 3), spaces, error);
+                       if (fmt) {
+                               fr_log(log, type, file, line, "%pV      %.*s^ %s", fr_box_strvalue_buffer(prefix),
+                                      (int)((slen - i) * 3), spaces, error);
+                       } else {
+                               fr_log(log, type, file, line, "      %.*s^ %s", (int)((slen - i) * 3), spaces, error);
+                       }
                }
        }