On Thu, 2011-08-04 at 11:57 +0200, Emil Ohlsson wrote:
> I'm having trouble creating a netconn connection. When I run the code
> below
> 
>         struct netconn *srv, *cli;
> 
>         cli = netconn_new(NETCONN_UDP);
>         if ( cli == NULL ) {
>                 // This is where I end up.
>         }
> Netconn_new returns NULL, and I have concluded that this is because
> netconn_alloc returns NULL. My guess is that I have done some bad
> memory configuration, but I have no idea how. I have attached my
> lwipopts.h at the end of this mail. I'm running lwIP 1.3.2 on a TI
> Stellaris Cortex M3 (LM3S9B96). 

Your lwipopts.h doesn't specify a value for MEMP_NUM_NETCONN so it will
be using the default for your port.  The standard default in lwIP for
this value is 4, so I would expect you to be able to establish 4
connections.  If that's not the case, and you're always getting NULL
even if there are no connections already, then there's something else
going wrong and you'll have to dig deeper.

Kieran


_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to