don't duplicate user and password anymore, anyway, the PPP user will have them already allocated as static strings or from configuration flash/file

This commit is contained in:
Sylvain Rochet
2012-06-19 21:26:52 +02:00
parent 8e9c07df39
commit 2aa9a66c57
6 changed files with 21 additions and 17 deletions

View File

@@ -1465,7 +1465,7 @@ void auth_reset(ppp_pcb *pcb) {
lcp_options *go = &pcb->lcp_gotoptions;
lcp_options *ao = &pcb->lcp_allowoptions;
if( pcb->settings.passwd[0] ) {
if(pcb->settings.passwd) {
#if PAP_SUPPORT
ao->neg_upap = !pcb->settings.refuse_pap;
@@ -1932,7 +1932,7 @@ int get_secret(ppp_pcb *pcb, char *client, char *server, char *secret, int *secr
LWIP_UNUSED_ARG(server);
LWIP_UNUSED_ARG(am_server);
if(!client || !client[0] || strcmp(client, pcb->settings.user)) {
if(!client || !client[0] || !pcb->settings.user || !pcb->settings.passwd || strcmp(client, pcb->settings.user)) {
return 0;
}