From: Alan T. DeKok Date: Thu, 26 Jan 2017 20:34:44 +0000 (-0500) Subject: more debugging about the data we're reading X-Git-Tag: release_3_0_13~56 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=freeradius.git;a=commitdiff_plain;h=d1ad60160750338ecb827b6e8f268277e5314398 more debugging about the data we're reading --- diff --git a/src/main/detail.c b/src/main/detail.c index ac709db..06fd18f 100644 --- a/src/main/detail.c +++ b/src/main/detail.c @@ -336,7 +336,6 @@ int detail_recv(rad_listen_t *listener) vp_cursor_t cursor; DEBUG2("detail (%s): Read packet from %s", data->name, data->filename_work); - for (vp = fr_cursor_init(&cursor, &packet->vps); vp; vp = fr_cursor_next(&cursor)) { @@ -672,14 +671,17 @@ open_file: * FIXME: print an error for badly formatted attributes? */ if (sscanf(buffer, "%255s %7s %1023s", key, op, value) != 3) { - WARN("detail (%s): Skipping badly formatted line %s", data->name, buffer); + WARN("detail (%s): Skipping badly formatted line - %s", data->name, buffer); continue; } /* * Should be =, :=, +=, ... */ - if (!strchr(op, '=')) continue; + if (!strchr(op, '=')) { + WARN("detail (%s): Skipping line without operator - %s", data->name, buffer); + continue; + } /* * Skip non-protocol attributes. @@ -728,6 +730,8 @@ open_file: continue; } + DEBUG3("detail (%s): Trying to read VP from line - %s", data->name, buffer); + /* * Read one VP. * @@ -738,6 +742,8 @@ open_file: if ((fr_pair_list_afrom_str(data, buffer, &vp) > 0) && (vp != NULL)) { fr_cursor_merge(&cursor, vp); + } else { + WARN("detail (%s): Failed reading VP from line - %s", data->name, buffer); } }