From bf84f9763ca3b6f018774b2b1664e838e119b028 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Sun, 22 Nov 2015 00:39:20 +0300 Subject: preparation for DPDK intergation --- accel-pppd/ctrl/pptp/pptp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'accel-pppd/ctrl/pptp') diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c index 94cfd7f..4a3090e 100644 --- a/accel-pppd/ctrl/pptp/pptp.c +++ b/accel-pppd/ctrl/pptp/pptp.c @@ -73,6 +73,12 @@ static void pptp_timeout(struct triton_timer_t *); static void ppp_started(struct ap_session *); static void ppp_finished(struct ap_session *); +static void pptp_ctx_switch(struct triton_context_t *ctx, void *arg) +{ + net = &def_net; + pptp_ctx_switch(ctx, arg); +} + static void disconnect(struct pptp_conn_t *conn) { log_ppp_debug("pptp: disconnect\n"); @@ -663,7 +669,7 @@ static int pptp_connect(struct triton_md_handler_t *h) conn->hnd.read = pptp_read; conn->hnd.write = pptp_write; conn->ctx.close = pptp_close; - conn->ctx.before_switch = log_switch; + conn->ctx.before_switch = pptp_ctx_switch; conn->in_buf = _malloc(PPTP_CTRL_SIZE_MAX); conn->out_buf = _malloc(PPTP_CTRL_SIZE_MAX); conn->timeout_timer.expire = pptp_timeout; @@ -714,7 +720,7 @@ static struct pptp_serv_t serv= { .hnd.read = pptp_connect, .ctx.close = pptp_serv_close, - .ctx.before_switch = log_switch, + .ctx.before_switch = pptp_ctx_switch, }; static int show_stat_exec(const char *cmd, char * const *fields, int fields_cnt, void *client) -- cgit v1.2.3