[Top][All Lists]

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

[lwip-users] Re: lwIP in eCos, PPP over GPRS connection problem

From: Daniel Néri
Subject: [lwip-users] Re: lwIP in eCos, PPP over GPRS connection problem
Date: Wed, 03 Aug 2005 12:50:53 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (berkeley-unix)

Marko Repo <address@hidden> writes:

> The problem is now that for some reason PPP fails to build up
> connection more than once. Connection is built reliably during
> lwip_init( ) every time. However, after I call pppClose( ) -
> function for the first time I'm unable to reconnect anymore,

As you've noticed the PPP implementation has some problems in this
respect. When pppClose is performed, the PPP thread dies (pppMain
returns, i.e. the equivalent of calling cyg_thread_exit), but there is
no clean-up after that. Unless you've bumped the SYS_THREADS define in
sys_arch.c, there won't be enough space left in the memory pool to
allocate thread stack and data for a new thread and the second pppOpen
will block forever in cyg_mempool_var_alloc (via sys_thread_new).

Since the sys_arch interface has no function for thread deletion, I've
changed the PPP code so that the thread never terminates (see diff

Also you're probably right that lwip_init and pppInit are not meant to
be called more than once. You can remove the call to pppOpen from
lwip_init, and instead call that from somewhere else in your
application code.

Best wishes,
Daniel Néri <address@hidden>
Sigicom AB, Stockholm, Sweden

Attachment: txtO_6gXluLfB.txt
Description: Text Data

reply via email to

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