summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accel-pptpd/cli/tcp.c1
-rw-r--r--accel-pptpd/cli/telnet.c1
-rw-r--r--accel-pptpd/ctrl/l2tp/l2tp.c5
-rw-r--r--accel-pptpd/ctrl/pppoe/pppoe.c1
-rw-r--r--accel-pptpd/ctrl/pptp/pptp.c5
-rw-r--r--accel-pptpd/logs/log_pgsql.c1
-rw-r--r--accel-pptpd/logs/log_tcp.c1
7 files changed, 11 insertions, 4 deletions
diff --git a/accel-pptpd/cli/tcp.c b/accel-pptpd/cli/tcp.c
index 405c389c..435752aa 100644
--- a/accel-pptpd/cli/tcp.c
+++ b/accel-pptpd/cli/tcp.c
@@ -284,6 +284,7 @@ static void serv_close(struct triton_context_t *ctx)
static struct triton_context_t serv_ctx = {
.close = serv_close,
+ .before_switch = log_switch,
};
static struct triton_md_handler_t serv_hnd = {
diff --git a/accel-pptpd/cli/telnet.c b/accel-pptpd/cli/telnet.c
index 4a2b93fb..e46630fa 100644
--- a/accel-pptpd/cli/telnet.c
+++ b/accel-pptpd/cli/telnet.c
@@ -572,6 +572,7 @@ static void serv_close(struct triton_context_t *ctx)
static struct triton_context_t serv_ctx = {
.close = serv_close,
+ .before_switch = log_switch,
};
static struct triton_md_handler_t serv_hnd = {
diff --git a/accel-pptpd/ctrl/l2tp/l2tp.c b/accel-pptpd/ctrl/l2tp/l2tp.c
index 2314748a..cb891b6e 100644
--- a/accel-pptpd/ctrl/l2tp/l2tp.c
+++ b/accel-pptpd/ctrl/l2tp/l2tp.c
@@ -1043,8 +1043,9 @@ static void l2tp_udp_close(struct triton_context_t *ctx)
static struct l2tp_serv_t udp_serv =
{
- .hnd.read=l2tp_udp_read,
- .ctx.close=l2tp_udp_close,
+ .hnd.read = l2tp_udp_read,
+ .ctx.close = l2tp_udp_close,
+ .ctx.before_switch = log_switch,
};
/*static struct l2tp_serv_t ip_serv =
diff --git a/accel-pptpd/ctrl/pppoe/pppoe.c b/accel-pptpd/ctrl/pppoe/pppoe.c
index 839c7169..b5a91895 100644
--- a/accel-pptpd/ctrl/pppoe/pppoe.c
+++ b/accel-pptpd/ctrl/pppoe/pppoe.c
@@ -1051,6 +1051,7 @@ void pppoe_server_start(const char *ifname, void *cli)
}
serv->ctx.close = pppoe_serv_close;
+ serv->ctx.before_switch = log_switch;
serv->hnd.fd = sock;
serv->hnd.read = pppoe_serv_read;
serv->ifname = _strdup(ifname);
diff --git a/accel-pptpd/ctrl/pptp/pptp.c b/accel-pptpd/ctrl/pptp/pptp.c
index 8a1cbbeb..f7ffee00 100644
--- a/accel-pptpd/ctrl/pptp/pptp.c
+++ b/accel-pptpd/ctrl/pptp/pptp.c
@@ -680,8 +680,9 @@ static void pptp_serv_close(struct triton_context_t *ctx)
static struct pptp_serv_t serv=
{
- .hnd.read=pptp_connect,
- .ctx.close=pptp_serv_close,
+ .hnd.read = pptp_connect,
+ .ctx.close = pptp_serv_close,
+ .ctx.before_switch = log_switch,
};
static int show_stat_exec(const char *cmd, char * const *fields, int fields_cnt, void *client)
diff --git a/accel-pptpd/logs/log_pgsql.c b/accel-pptpd/logs/log_pgsql.c
index 99a0e82c..fcaa193c 100644
--- a/accel-pptpd/logs/log_pgsql.c
+++ b/accel-pptpd/logs/log_pgsql.c
@@ -23,6 +23,7 @@ static void pgsql_close(struct triton_context_t *ctx);
static struct triton_context_t pgsql_ctx = {
.close = pgsql_close,
+ .before_switch = log_switch,
};
static struct triton_md_handler_t pgsql_hnd;
static struct triton_timer_t connect_timer = {
diff --git a/accel-pptpd/logs/log_tcp.c b/accel-pptpd/logs/log_tcp.c
index 41f4bf4e..306c450f 100644
--- a/accel-pptpd/logs/log_tcp.c
+++ b/accel-pptpd/logs/log_tcp.c
@@ -298,6 +298,7 @@ err:
static struct triton_context_t tcp_ctx ={
.close = log_tcp_close,
+ .before_switch = log_switch,
};
static void __init init(void)