From 91356d2d032e439d1938048dec991eb3a782a076 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Wed, 24 Dec 2014 19:05:19 +0100 Subject: [PATCH] PPPAPI, added const modifier on auth strings --- src/api/pppapi.c | 2 +- src/include/lwip/pppapi.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/pppapi.c b/src/api/pppapi.c index af64e319..10e4b828 100644 --- a/src/api/pppapi.c +++ b/src/api/pppapi.c @@ -102,7 +102,7 @@ pppapi_do_ppp_set_auth(struct pppapi_msg_msg *msg) * tcpip_thread context. */ void -pppapi_set_auth(ppp_pcb *pcb, u8_t authtype, char *user, char *passwd) +pppapi_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd) { struct pppapi_msg msg; msg.function = pppapi_do_ppp_set_auth; diff --git a/src/include/lwip/pppapi.h b/src/include/lwip/pppapi.h index afadb16b..dd24af51 100644 --- a/src/include/lwip/pppapi.h +++ b/src/include/lwip/pppapi.h @@ -48,8 +48,8 @@ struct pppapi_msg_msg { union { struct { u8_t authtype; - char *user; - char *passwd; + const char *user; + const char *passwd; } setauth; #if PPP_NOTIFY_PHASE struct { @@ -113,7 +113,7 @@ struct pppapi_msg { /* API for application */ ppp_pcb *pppapi_new(void); void pppapi_set_default(ppp_pcb *pcb); -void pppapi_set_auth(ppp_pcb *pcb, u8_t authtype, char *user, char *passwd); +void pppapi_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd); #if PPP_NOTIFY_PHASE void pppapi_set_notify_phase_callback(ppp_pcb *pcb, ppp_notify_phase_cb_fn notify_phase_cb); #endif /* PPP_NOTIFY_PHASE */