diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2011-01-17 18:08:11 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2011-01-17 18:08:11 +0300 |
commit | c783f297faa2453daca7189182a17f913e003ccc (patch) | |
tree | 0527171103dbe568658ea21262e1027b7023bf9a /accel-pppd/ppp/ppp_ccp.c | |
parent | 56762d9574d05bff9709c856f9f466c51156f549 (diff) | |
download | accel-ppp-c783f297faa2453daca7189182a17f913e003ccc.tar.gz accel-ppp-c783f297faa2453daca7189182a17f913e003ccc.zip |
memory usage optimization
Diffstat (limited to 'accel-pppd/ppp/ppp_ccp.c')
-rw-r--r-- | accel-pppd/ppp/ppp_ccp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/accel-pppd/ppp/ppp_ccp.c b/accel-pppd/ppp/ppp_ccp.c index 721dd9b6..d4732fa3 100644 --- a/accel-pppd/ppp/ppp_ccp.c +++ b/accel-pppd/ppp/ppp_ccp.c @@ -271,7 +271,7 @@ static int send_conf_req(struct ppp_fsm_t *fsm) static void send_conf_ack(struct ppp_fsm_t *fsm) { struct ppp_ccp_t *ccp = container_of(fsm, typeof(*ccp), fsm); - struct ccp_hdr_t *hdr = (struct ccp_hdr_t*)ccp->ppp->unit_buf; + struct ccp_hdr_t *hdr = (struct ccp_hdr_t*)ccp->ppp->buf; hdr->code = CONFACK; @@ -619,12 +619,12 @@ static void ccp_recv(struct ppp_handler_t*h) return; } - if (ccp->ppp->unit_buf_size < PPP_HEADERLEN + 2) { + if (ccp->ppp->buf_size < PPP_HEADERLEN + 2) { log_ppp_warn("CCP: short packet received\n"); return; } - hdr = (struct ccp_hdr_t *)ccp->ppp->unit_buf; + hdr = (struct ccp_hdr_t *)ccp->ppp->buf; if (ntohs(hdr->len) < PPP_HEADERLEN) { log_ppp_warn("CCP: short packet received\n"); return; |