lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] exception in the second call to netconn_bind


From: Jonathan Larmour
Subject: Re: [lwip-users] exception in the second call to netconn_bind
Date: Fri, 30 Jan 2009 01:36:44 +0000
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc3.4.legacy (X11/20060515)

David Shmelzer wrote:
Hi,
I'm getting a processor exception in the second call to netconn_bind.
Here is the simplified version of the code that reproduces the problem:

  conn=netconn_new( NETCONN_TCP );
  netconn_bind(conn, NULL, portnum);
  netconn_listen( conn );
  netconn_delete(conn);
  conn=netconn_new( NETCONN_TCP );
  netconn_bind(conn, NULL, portnum);
What is the correct way of deleting a listening connection?

That looks right. It might be worth checking for any error returns from the above. In particular if conn is non-NULL second time round. I assume all this gets called from a single thread.

Is there an example somewhere? The BasicWeb.c examples never close the
listening connection.

There's an example in http://www.sics.se/~adam/lwip/doc/lwip.pdf section 16.0.22 (just after the documentation of netconn_bind).

Jifl
--
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------      Opinions==mine




reply via email to

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