summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2015-01-16 16:06:59 +0100
committerLinus Nordberg <linus@nordberg.se>2015-01-16 16:06:59 +0100
commitc2c7de6bf42a8598e9a482a452c1f3edb34d2c94 (patch)
treed5880ddd08420e7cd32f0f1dc1f28a64437041ca /radsecproxy.c
parentedd9079229f9e9ffe496bdec9f3fc449930ce296 (diff)
Fix some issues showing when DEBUG is defined.
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index e12846c..a074ec2 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -1560,7 +1560,7 @@ int radsrv(struct request *rq) {
}
#ifdef DEBUG
- printfchars(NULL, "auth", "%02x ", auth, 16);
+ printfchars(NULL, "auth", "%02x ", msg->auth, 16);
#endif
attr = radmsg_gettype(msg, RAD_Attr_User_Password);
@@ -1625,6 +1625,9 @@ void replyh(struct server *server, unsigned char *buf) {
}
msg = buf2radmsg(buf, (uint8_t *)server->conf->secret, rqout->rq->msg->auth);
+#ifdef DEBUG
+ printfchars(NULL, "origauth/buf+4", "%02x ", buf + 4, 16);
+#endif
free(buf);
buf = NULL;
if (!msg) {
@@ -1731,10 +1734,6 @@ void replyh(struct server *server, unsigned char *buf) {
msg->id = (char)rqout->rq->rqid;
memcpy(msg->auth, rqout->rq->rqauth, 16);
-#ifdef DEBUG
- printfchars(NULL, "origauth/buf+4", "%02x ", buf + 4, 16);
-#endif
-
if (rqout->rq->origusername && (attr = radmsg_gettype(msg, RAD_Attr_User_Name))) {
if (!resizeattr(attr, strlen(rqout->rq->origusername))) {
debug(DBG_WARN, "replyh: malloc failed, ignoring reply");