diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2010-09-22 22:53:59 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2010-09-22 22:53:59 +0400 |
commit | 3e61cb3f8d58f64c8023e95bf74341e6bc61560e (patch) | |
tree | d73a44bf63044e35e8c3b1088598fc29e95a30b9 /accel-pptpd/ctrl/pptp.c | |
parent | b96fbc3f966b012720d2b74b1dfd2a0ab95086cf (diff) | |
download | accel-ppp-3e61cb3f8d58f64c8023e95bf74341e6bc61560e.tar.gz accel-ppp-3e61cb3f8d58f64c8023e95bf74341e6bc61560e.zip |
log: log_file rewrited to use aio
log: simplified engine
various bug fixes
Diffstat (limited to 'accel-pptpd/ctrl/pptp.c')
-rw-r--r-- | accel-pptpd/ctrl/pptp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/accel-pptpd/ctrl/pptp.c b/accel-pptpd/ctrl/pptp.c index b8bb366..9f76a34 100644 --- a/accel-pptpd/ctrl/pptp.c +++ b/accel-pptpd/ctrl/pptp.c @@ -511,6 +511,8 @@ static int pptp_connect(struct triton_md_handler_t *h) conn->ppp.ctrl = &conn->ctrl; triton_context_register(&conn->ctx, &conn->ppp); + conn->ctx.fname=__FILE__; + conn->ctx.line=__LINE__; triton_md_register_handler(&conn->ctx, &conn->hnd); triton_md_enable_handler(&conn->hnd,MD_MODE_READ); triton_timer_add(&conn->ctx, &conn->timeout_timer, 0); @@ -539,26 +541,26 @@ static void __init pptp_init(void) serv.hnd.fd = socket (PF_INET, SOCK_STREAM, 0); if (serv.hnd.fd < 0) { - log_error("pptp: failed to create server socket: %s\n", strerror(errno)); + log_emerg("pptp: failed to create server socket: %s\n", strerror(errno)); return; } addr.sin_family = AF_INET; addr.sin_port = htons (PPTP_PORT); addr.sin_addr.s_addr = htonl (INADDR_ANY); if (bind (serv.hnd.fd, (struct sockaddr *) &addr, sizeof (addr)) < 0) { - log_error("pptp: failed to bind socket: %s\n", strerror(errno)); + log_emerg("pptp: failed to bind socket: %s\n", strerror(errno)); close(serv.hnd.fd); return; } if (listen (serv.hnd.fd, 100) < 0) { - log_error("pptp: failed to listen socket: %s\n", strerror(errno)); + log_emerg("pptp: failed to listen socket: %s\n", strerror(errno)); close(serv.hnd.fd); return; } if (fcntl(serv.hnd.fd, F_SETFL, O_NONBLOCK)) { - log_error("pptp: failed to set nonblocking mode: %s\n", strerror(errno)); + log_emerg("pptp: failed to set nonblocking mode: %s\n", strerror(errno)); close(serv.hnd.fd); return; } |