summaryrefslogtreecommitdiff
path: root/accel-pptpd/logs/log_pgsql.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2010-09-13 01:19:42 +0400
committerDmitry Kozlov <xeb@mail.ru>2010-09-13 01:19:42 +0400
commitf39fda2ddb7a8b80a33f155994f27794dd84a198 (patch)
tree1e13a8f658504a0f0e4f1cd2a0cf26d9f0d1dcec /accel-pptpd/logs/log_pgsql.c
parent65a665f6c655766a6d990e8aba47a811d0c3fecc (diff)
downloadaccel-ppp-f39fda2ddb7a8b80a33f155994f27794dd84a198.tar.gz
accel-ppp-f39fda2ddb7a8b80a33f155994f27794dd84a198.zip
log_pgsql: fixed bug - msg->tpd is uninitialized when general_log is called
radius: upgraded dictionary to support vendor-specific
Diffstat (limited to 'accel-pptpd/logs/log_pgsql.c')
-rw-r--r--accel-pptpd/logs/log_pgsql.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/accel-pptpd/logs/log_pgsql.c b/accel-pptpd/logs/log_pgsql.c
index 81e35cca..cd06881d 100644
--- a/accel-pptpd/logs/log_pgsql.c
+++ b/accel-pptpd/logs/log_pgsql.c
@@ -136,7 +136,7 @@ static void wakeup_log(void)
write_next_msg();
}
-static void general_log(struct log_msg_t *msg)
+static void queue_log(struct log_msg_t *msg)
{
int r = 0;
spin_lock(&queue_lock);
@@ -152,10 +152,17 @@ static void general_log(struct log_msg_t *msg)
triton_context_call(&pgsql_ctx, (void (*)(void*))wakeup_log, NULL);
}
+
+static void general_log(struct log_msg_t *msg)
+{
+ msg->tpd = NULL;
+ queue_log(msg);
+}
+
static void session_log(struct ppp_t *ppp, struct log_msg_t *msg)
{
msg->tpd = ppp;
- general_log(msg);
+ queue_log(msg);
}
static int wait_connect(struct triton_md_handler_t *h)