[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] netconn->acceptmbox is NULL
From: |
Kieran Mansley |
Subject: |
Re: [lwip-users] netconn->acceptmbox is NULL |
Date: |
Fri, 05 Aug 2011 15:03:15 +0100 |
On Fri, 2011-08-05 at 15:10 +0200, Emil Ohlsson wrote:
> >On Fri, 2011-08-05 at 11:46 +0200, Emil Ohlsson wrote:
> >> res = netconn_listen(cli);
> >> if ( res != ERR_OK ) {/* Error handling */ }
> >
> >You should get an error here if it couldn't allocate the acceptmbox. I
> >would debug the do_listen() function in >src/api/api_msg.c to see if that
> >allocation is failing, and if so why.
> >
> >Kieran
>
> As far as I can see in do_listen it doesn't do anything to UDP
> connections. Is it netconn_listen that allocates the acceptmbox?
I must confess I didn't notice you were using a UDP connection, and
assumed that, because you were calling netconn_listen, it was TCP. You
don't need to call netconn_listen for a UDP connection. But that won't
solve your problem as there is still nothing setting acceptmbox to a
valid state. I think this must be a bug, as I can't see the lwIP socket
API doing anything special for accept on a UDP socket, and I'd expect
that to work.
Kieran