From e040132d9210b995463651ac1697119aa20609a9 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 21 Oct 2016 23:12:17 +0800 Subject: [PATCH] PPP, documentation: Fix example code Fix the example code in status_cb() because dns_getserver() returns const ip_addr_t *. Signed-off-by: Axel Lin --- doc/ppp.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/ppp.txt b/doc/ppp.txt index e40c0126..8b88b3a6 100644 --- a/doc/ppp.txt +++ b/doc/ppp.txt @@ -79,7 +79,7 @@ static void status_cb(ppp_pcb *pcb, int err_code, void *ctx) { switch(err_code) { case PPPERR_NONE: { #if LWIP_DNS - ip_addr_t ns; + const ip_addr_t *ns; #endif /* LWIP_DNS */ printf("status_cb: Connected\n"); #if PPP_IPV4_SUPPORT @@ -88,9 +88,9 @@ static void status_cb(ppp_pcb *pcb, int err_code, void *ctx) { printf(" netmask = %s\n", ipaddr_ntoa(&pppif->netmask)); #if LWIP_DNS ns = dns_getserver(0); - printf(" dns1 = %s\n", ipaddr_ntoa(&ns)); + printf(" dns1 = %s\n", ipaddr_ntoa(ns)); ns = dns_getserver(1); - printf(" dns2 = %s\n", ipaddr_ntoa(&ns)); + printf(" dns2 = %s\n", ipaddr_ntoa(ns)); #endif /* LWIP_DNS */ #endif /* PPP_IPV4_SUPPORT */ #if PPP_IPV6_SUPPORT