PPP: remove unused ppp_pcb CHAP fields if server mode is disabled

pcb->settings.chap_timeout_time and pcb->settings.chap_max_transmits
are only used if server mode is enabled.
This commit is contained in:
Sylvain Rochet 2020-11-17 00:26:32 +01:00
parent a4514cf416
commit 3013e1fc19
2 changed files with 2 additions and 2 deletions

View File

@ -266,9 +266,9 @@ typedef struct ppp_settings_s {
#endif /* PAP_SUPPPORT */ #endif /* PAP_SUPPPORT */
#if CHAP_SUPPORT #if CHAP_SUPPORT
#if PPP_SERVER
u8_t chap_timeout_time; /* Timeout (seconds) for retransmitting req */ u8_t chap_timeout_time; /* Timeout (seconds) for retransmitting req */
u8_t chap_max_transmits; /* max # times to send challenge */ u8_t chap_max_transmits; /* max # times to send challenge */
#if PPP_SERVER
u8_t chap_rechallenge_time; /* Time to wait for auth-req from peer */ u8_t chap_rechallenge_time; /* Time to wait for auth-req from peer */
#endif /* PPP_SERVER */ #endif /* PPP_SERVER */
#endif /* CHAP_SUPPPORT */ #endif /* CHAP_SUPPPORT */

View File

@ -674,9 +674,9 @@ ppp_pcb *ppp_new(struct netif *pppif, const struct link_callbacks *callbacks, vo
#endif /* PAP_SUPPORT */ #endif /* PAP_SUPPORT */
#if CHAP_SUPPORT #if CHAP_SUPPORT
#if PPP_SERVER
pcb->settings.chap_timeout_time = CHAP_DEFTIMEOUT; pcb->settings.chap_timeout_time = CHAP_DEFTIMEOUT;
pcb->settings.chap_max_transmits = CHAP_DEFTRANSMITS; pcb->settings.chap_max_transmits = CHAP_DEFTRANSMITS;
#if PPP_SERVER
pcb->settings.chap_rechallenge_time = CHAP_DEFRECHALLENGETIME; pcb->settings.chap_rechallenge_time = CHAP_DEFRECHALLENGETIME;
#endif /* PPP_SERVER */ #endif /* PPP_SERVER */
#endif /* CHAP_SUPPPORT */ #endif /* CHAP_SUPPPORT */