projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4bbe6fd
)
Don't use fr_perror in the verify functions (outputs spurious errors)
author
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Tue, 17 Jun 2014 12:25:55 +0000
(13:25 +0100)
committer
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Tue, 17 Jun 2014 12:27:52 +0000
(13:27 +0100)
src/lib/debug.c
patch
|
blob
|
history
diff --git
a/src/lib/debug.c
b/src/lib/debug.c
index
efe9b18
..
928c2f8
100644
(file)
--- a/
src/lib/debug.c
+++ b/
src/lib/debug.c
@@
-810,13
+810,13
@@
inline void fr_verify_vp(VALUE_PAIR const *vp)
size_t len;
if (!talloc_get_type(vp->data.ptr, uint8_t)) {
size_t len;
if (!talloc_get_type(vp->data.ptr, uint8_t)) {
- f
r_perror(
"Type check failed for attribute \"%s\"", vp->da->name);
+ f
printf(stderr,
"Type check failed for attribute \"%s\"", vp->da->name);
(void) talloc_get_type_abort(vp->data.ptr, uint8_t);
}
len = talloc_array_length(vp->vp_octets);
if (vp->length > len) {
(void) talloc_get_type_abort(vp->data.ptr, uint8_t);
}
len = talloc_array_length(vp->vp_octets);
if (vp->length > len) {
- f
r_perror(
"VALUE_PAIR length %zu does not equal uint8_t buffer length %zu", vp->length, len);
+ f
printf(stderr,
"VALUE_PAIR length %zu does not equal uint8_t buffer length %zu", vp->length, len);
fr_assert(0);
fr_exit_now(1);
}
fr_assert(0);
fr_exit_now(1);
}
@@
-828,19
+828,19
@@
inline void fr_verify_vp(VALUE_PAIR const *vp)
size_t len;
if (!talloc_get_type(vp->data.ptr, char)) {
size_t len;
if (!talloc_get_type(vp->data.ptr, char)) {
- f
r_perror(
"Type check failed for attribute \"%s\"", vp->da->name);
+ f
printf(stderr,
"Type check failed for attribute \"%s\"", vp->da->name);
(void) talloc_get_type_abort(vp->data.ptr, char);
}
len = (talloc_array_length(vp->vp_strvalue) - 1);
if (vp->length > len) {
(void) talloc_get_type_abort(vp->data.ptr, char);
}
len = (talloc_array_length(vp->vp_strvalue) - 1);
if (vp->length > len) {
- f
r_perror(
"VALUE_PAIR %s length %zu is too small for char buffer length %zu",
+ f
printf(stderr,
"VALUE_PAIR %s length %zu is too small for char buffer length %zu",
vp->da->name, vp->length, len);
fr_assert(0);
fr_exit_now(1);
}
if (vp->vp_strvalue[vp->length] != '\0') {
vp->da->name, vp->length, len);
fr_assert(0);
fr_exit_now(1);
}
if (vp->vp_strvalue[vp->length] != '\0') {
- f
r_perror(
"VALUE_PAIR %s buffer not \\0 terminated", vp->da->name);
+ f
printf(stderr,
"VALUE_PAIR %s buffer not \\0 terminated", vp->da->name);
fr_assert(0);
fr_exit_now(1);
}
fr_assert(0);
fr_exit_now(1);
}
@@
-868,11
+868,11
@@
void fr_verify_list(TALLOC_CTX *expected, VALUE_PAIR *vps)
parent = talloc_parent(vp);
if (expected && (parent != expected)) {
parent = talloc_parent(vp);
if (expected && (parent != expected)) {
- f
r_perror(
"Expected VALUE_PAIR (%s) to be parented by %p (%s), "
-
"but parented by %p (%s)",
-
vp->da->name,
-
expected, talloc_get_name(expected),
-
parent, parent ? talloc_get_name(parent) : "NULL");
+ f
printf(stderr,
"Expected VALUE_PAIR (%s) to be parented by %p (%s), "
+ "but parented by %p (%s)",
+ vp->da->name,
+ expected, talloc_get_name(expected),
+ parent, parent ? talloc_get_name(parent) : "NULL");
fr_log_talloc_report(expected);
if (parent) fr_log_talloc_report(parent);
fr_log_talloc_report(expected);
if (parent) fr_log_talloc_report(parent);