lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] What is the meaning of got PPPERR_USER in status_callba


From: Axel Lin
Subject: Re: [lwip-users] What is the meaning of got PPPERR_USER in status_callback?
Date: Wed, 8 Mar 2017 22:02:59 +0800

2017-03-08 21:48 GMT+08:00 Sylvain Rochet <address@hidden>:
> Hi Axel,
>
>
> On Wed, Mar 08, 2017 at 09:08:01PM +0800, Axel Lin wrote:
>> Hi,
>> In my test, sometimes ppp_connect() success
>
> ppp_connect() should always succeed because it is just an initiator. If
> it fails it means you are doing things wrong like calling it when
> session is already started or even up…
>
>
>> but status_callback In such case, I cannot connect to internet. What
>> is the meaning of PPPERR_USER?
>
> ppp.h:#define PPPERR_USER         5  /* User interrupt. */
>
> i.e., you called ppp_close(). If you look at the code, you will see that
> only ppp_close() set error code to PPPERR_USER.

Thanks a lot, Sylvain.

I checked the code and you are right.
I was expecting I will get PPPERR_NONE soon after ppp_connect().
So I wait for 20 seconds but don't get PPPERR_NONE and the error path
calls ppp_close.
Further question:
I'm not sure if link_status_cb will be always get called no matter
success or fail,
that is why I wait for 20 seconds and give up.
Should I always wait until I link_status_cb get called?


Axel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]