diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2011-08-29 11:32:09 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2011-08-29 11:38:19 +0400 |
commit | e01fbff3f78b82b69775b127b594de1757db5914 (patch) | |
tree | 0d4ff2a0ab1694d2a5d8c7215ef980db68c7d715 | |
parent | 799db65ebf7aaab83bdac467e1425568b554fb2a (diff) | |
download | accel-ppp-e01fbff3f78b82b69775b127b594de1757db5914.tar.gz accel-ppp-e01fbff3f78b82b69775b127b594de1757db5914.zip |
fix incorrect ppp_terminate calls
-rw-r--r-- | accel-pppd/ctrl/pppoe/pppoe.c | 2 | ||||
-rw-r--r-- | accel-pppd/extra/pppd_compat.c | 2 | ||||
-rw-r--r-- | accel-pppd/ppp/ppp.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c index 031766b0..92934034 100644 --- a/accel-pppd/ctrl/pppoe/pppoe.c +++ b/accel-pppd/ctrl/pppoe/pppoe.c @@ -1161,7 +1161,7 @@ out_err: static void _conn_stop(struct pppoe_conn_t *conn) { - ppp_terminate(&conn->ppp, 0, TERM_ADMIN_RESET); + ppp_terminate(&conn->ppp, TERM_ADMIN_RESET, 0); } static void _server_stop(struct pppoe_serv_t *serv) diff --git a/accel-pppd/extra/pppd_compat.c b/accel-pppd/extra/pppd_compat.c index 32a5def9..36225314 100644 --- a/accel-pppd/extra/pppd_compat.c +++ b/accel-pppd/extra/pppd_compat.c @@ -156,7 +156,7 @@ static void ev_ppp_pre_up(struct ppp_t *ppp) pthread_mutex_lock(&pd->ip_pre_up_hnd.lock); pthread_mutex_unlock(&pd->ip_pre_up_hnd.lock); if (pd->res != 0) { - ppp_terminate(ppp, 0, pd->res < 0 ? TERM_NAS_ERROR : TERM_ADMIN_RESET); + ppp_terminate(ppp, pd->res > 127 ? TERM_NAS_ERROR : TERM_ADMIN_RESET, 0); return; } } else if (pid == 0) { diff --git a/accel-pppd/ppp/ppp.c b/accel-pppd/ppp/ppp.c index e6d97887..2836f7c1 100644 --- a/accel-pppd/ppp/ppp.c +++ b/accel-pppd/ppp/ppp.c @@ -297,7 +297,7 @@ cont: //printf("ppp_chan_read: "); //print_buf(ppp->buf,ppp->buf_size); if (ppp->buf_size == 0) { - ppp_terminate(ppp, 1, TERM_NAS_ERROR); + ppp_terminate(ppp, TERM_NAS_ERROR, 1); return 1; } @@ -343,7 +343,7 @@ cont: //print_buf(ppp->buf,ppp->buf_size); if (ppp->buf_size == 0) { - ppp_terminate(ppp, 1, TERM_NAS_ERROR); + ppp_terminate(ppp, TERM_NAS_ERROR, 1); return 1; } |