diff options
author | Kozlov Dmitry <dima@server> | 2011-08-16 13:13:32 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2011-08-16 13:13:32 +0400 |
commit | 780b059378b1a20862eb779b74258b023ad02f6b (patch) | |
tree | 17e35061f92a76683f198498a124067b0f7b2052 /accel-pppd/ppp | |
parent | 2f48232a6f2fcba1707aa772e571aced765aff91 (diff) | |
download | accel-ppp-780b059378b1a20862eb779b74258b023ad02f6b.tar.gz accel-ppp-780b059378b1a20862eb779b74258b023ad02f6b.zip |
ppp:ccp: code cleanup
Diffstat (limited to 'accel-pppd/ppp')
-rw-r--r-- | accel-pppd/ppp/ppp_ccp.c | 12 | ||||
-rw-r--r-- | accel-pppd/ppp/ppp_ccp.h | 1 |
2 files changed, 1 insertions, 12 deletions
diff --git a/accel-pppd/ppp/ppp_ccp.c b/accel-pppd/ppp/ppp_ccp.c index fd5a1f76..c277f9f9 100644 --- a/accel-pppd/ppp/ppp_ccp.c +++ b/accel-pppd/ppp/ppp_ccp.c @@ -243,8 +243,6 @@ static int send_conf_req(struct ppp_fsm_t *fsm) struct ccp_option_t *lopt; int n; - ccp->need_req = 0; - if (ccp->passive) return 0; @@ -381,7 +379,6 @@ static int ccp_recv_conf_req(struct ppp_ccp_t *ccp, uint8_t *data, int size) struct ccp_option_t *lopt; int r, ret = 1, ack = 0; - ccp->need_req = 0; ccp->ropt_len = size; while (size > 0) { @@ -418,8 +415,6 @@ static int ccp_recv_conf_req(struct ppp_ccp_t *ccp, uint8_t *data, int size) lopt->state = CCP_OPT_REJ; ropt->state = CCP_OPT_REJ; } else { - /*if (lopt->state == CCP_OPT_NAK && r == CCP_OPT_ACK) - ccp->need_req = 1;*/ lopt->state = r; ropt->state = r; } @@ -531,8 +526,6 @@ static int ccp_recv_conf_nak(struct ppp_ccp_t *ccp, uint8_t *data, int size) } if (lopt->h->recv_conf_nak && lopt->h->recv_conf_nak(ccp, lopt, data)) res = -1; - //lopt->state = CCP_OPT_NAK; - //ccp->need_req = 1; break; } } @@ -689,11 +682,8 @@ static void ccp_recv(struct ppp_handler_t*h) case CONFACK: if (ccp_recv_conf_ack(ccp, (uint8_t*)(hdr + 1), ntohs(hdr->len) - PPP_HDRLEN)) ppp_terminate(ccp->ppp, TERM_USER_ERROR, 0); - else { + else ppp_fsm_recv_conf_ack(&ccp->fsm); - if (ccp->need_req) - send_conf_req(&ccp->fsm); - } break; case CONFNAK: ccp_recv_conf_nak(ccp, (uint8_t*)(hdr + 1), ntohs(hdr->len) - PPP_HDRLEN); diff --git a/accel-pppd/ppp/ppp_ccp.h b/accel-pppd/ppp/ppp_ccp.h index 11c8a221..3a48816a 100644 --- a/accel-pppd/ppp/ppp_ccp.h +++ b/accel-pppd/ppp/ppp_ccp.h @@ -87,7 +87,6 @@ struct ppp_ccp_t int passive:1; int starting:1; int started:1; - int need_req:1; }; int ccp_option_register(struct ccp_option_handler_t *h); |