Fixed compiling with LWIP_TCP==0

This commit is contained in:
goldsimon
2015-11-16 09:37:56 +01:00
parent ecf9d25ed0
commit 98b9d31f24
6 changed files with 15 additions and 11 deletions

View File

@@ -480,7 +480,7 @@ static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u16_t protoc
}
#endif /* MPPE_SUPPORT */
#if VJ_SUPPORT
#if VJ_SUPPORT && LWIP_TCP
/*
* Attempt Van Jacobson header compression if VJ is configured and
* this is an IP packet.
@@ -505,7 +505,7 @@ static err_t ppp_netif_output(struct netif *netif, struct pbuf *pb, u16_t protoc
return ERR_VAL;
}
}
#endif /* VJ_SUPPORT */
#endif /* VJ_SUPPORT && LWIP_TCP */
#if CCP_SUPPORT
if (pcb->ccp_is_up) {
@@ -665,9 +665,9 @@ void ppp_clear(ppp_pcb *pcb) {
(*protp->init)(pcb);
}
#if VJ_SUPPORT
#if VJ_SUPPORT && LWIP_TCP
vj_compress_init(&pcb->vj_comp);
#endif /* VJ_SUPPORT */
#endif /* VJ_SUPPORT && LWIP_TCP */
new_phase(pcb, PPP_PHASE_INITIALIZE);
}
@@ -822,7 +822,7 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) {
return;
#endif /* PPP_IPV6_SUPPORT */
#if VJ_SUPPORT
#if VJ_SUPPORT && LWIP_TCP
case PPP_VJC_COMP: /* VJ compressed TCP */
/*
* Clip off the VJ header and prepend the rebuilt TCP/IP header and
@@ -850,7 +850,7 @@ void ppp_input(ppp_pcb *pcb, struct pbuf *pb) {
/* Something's wrong so drop it. */
PPPDEBUG(LOG_WARNING, ("ppp_input[%d]: Dropping VJ uncompressed\n", pcb->netif->num));
break;
#endif /* VJ_SUPPORT */
#endif /* VJ_SUPPORT && LWIP_TCP */
default: {
int i;

View File

@@ -808,9 +808,9 @@ pppos_input_drop(pppos_pcb *pppos)
PPPDEBUG(LOG_INFO, ("pppos_input_drop: pbuf len=%d, addr %p\n", pppos->in_head->len, (void*)pppos->in_head));
}
pppos_input_free_current_packet(pppos);
#if VJ_SUPPORT
#if VJ_SUPPORT && LWIP_TCP
vj_uncompress_err(&pppos->ppp->vj_comp);
#endif /* VJ_SUPPORT */
#endif /* VJ_SUPPORT && LWIP_TCP */
LINK_STATS_INC(link.drop);
MIB2_STATS_NETIF_INC(pppos->ppp->netif, ifindiscards);

View File

@@ -29,7 +29,7 @@
*/
#include "lwip/opt.h"
#if PPP_SUPPORT && VJ_SUPPORT /* don't build if not configured for use in lwipopts.h */
#if PPP_SUPPORT && VJ_SUPPORT && LWIP_TCP /* don't build if not configured for use in lwipopts.h */
#include "netif/ppp/ppp_impl.h"
#include "netif/ppp/pppdebug.h"
@@ -654,4 +654,4 @@ bad:
return (-1);
}
#endif /* PPP_SUPPORT && VJ_SUPPORT */
#endif /* PPP_SUPPORT && VJ_SUPPORT && LWIP_TCP */