From 203589e52632d7c603c816ef73575e193b77fff8 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 29 Jan 2016 17:11:06 -0600 Subject: [PATCH] Additional, trivial changes from review --- netutils/pppd/Kconfig | 2 +- netutils/pppd/ppp.h | 8 ++++---- netutils/pppd/pppd.c | 16 +++------------- 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/netutils/pppd/Kconfig b/netutils/pppd/Kconfig index 61ec20985..8533ae304 100755 --- a/netutils/pppd/Kconfig +++ b/netutils/pppd/Kconfig @@ -6,7 +6,7 @@ config NETUTILS_PPPD bool "PPP daemon" default n - select NETUTILS_CHAT + select NETUTILS_CHAT select NET_TUN depends on NET && NET_UDP ---help--- diff --git a/netutils/pppd/ppp.h b/netutils/pppd/ppp.h index c902e3cdd..5b4772f74 100644 --- a/netutils/pppd/ppp.h +++ b/netutils/pppd/ppp.h @@ -56,7 +56,7 @@ #include "ppp_arch.h" #ifdef CONFIG_NETUTILS_PPPD_PAP -#include "pap.h" +# include "pap.h" #endif /* CONFIG_NETUTILS_PPPD_PAP */ /**************************************************************************** @@ -170,9 +170,9 @@ struct ppp_context_s /* AHDLC */ u8_t ahdlc_rx_buffer[PPP_RX_BUFFER_SIZE]; - u16_t ahdlc_tx_crc; /* running tx CRC */ - u16_t ahdlc_rx_crc; /* running rx CRC */ - u16_t ahdlc_rx_count; /* number of rx bytes processed, cur frame */ + u16_t ahdlc_tx_crc; /* Running tx CRC */ + u16_t ahdlc_rx_crc; /* Running rx CRC */ + u16_t ahdlc_rx_count; /* Number of rx bytes processed, cur frame */ u8_t ahdlc_flags; /* ahdlc state flags, see above */ u8_t ahdlc_tx_offline; diff --git a/netutils/pppd/pppd.c b/netutils/pppd/pppd.c index 4124dc733..32b4429f4 100644 --- a/netutils/pppd/pppd.c +++ b/netutils/pppd/pppd.c @@ -66,18 +66,6 @@ extern void ppp_arch_modem_reset(const char *tty); #endif -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -286,6 +274,7 @@ time_t ppp_arch_clock_seconds(void) int ppp_arch_getchar(struct ppp_context_s *ctx, u8_t *c) { int ret; + ret = read(ctx->ctl.fd, c, 1); return ret == 1 ? ret : 0; } @@ -345,7 +334,8 @@ int pppd(struct pppd_settings_s *pppd_settings) free(ctx); return 2; } - ctx->ctl.echo = true; + + ctx->ctl.echo = true; ctx->ctl.verbose = true; ctx->ctl.timeout = 30;