lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] callback function args in lwip 1.3


From: Hans Jacob Moller
Subject: RE: [lwip-users] callback function args in lwip 1.3
Date: Mon, 18 Feb 2008 14:41:04 -0000

Looked throug my code one more time at discovered that it was the wrong
instance data i passed tcp_arg. Now it works like a charm.

Thanks Kieran for the quick response.

/Hans

-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Kieran Mansley
Sent: 18. februar 2008 15:01
To: Mailing list for lwIP users
Subject: Re: [lwip-users] callback function args in lwip 1.3

On Mon, 2008-02-18 at 13:55 +0000, Hans Jacob Moller wrote:
> Allocate inst pointer and fill ind some values.
> 
> .
> 
> newpcb = tcp_listen(oldpcb);
> 
> tcp_arg(newpcb,inst);
> 
> tcp_accept(newpcb, acceptConnect);
>
> err_t acceptConnect(void *arg, struct tcp_pcb *newpcb, err_t err)
> 
> arg seems to be NULL when it is called from the lwip stack....

Can you check what the values of newpcb are at each stage?  e.g. Does
the newpcb argument supplied when acceptConnect() is called match the
newpcb you gave to tcp_arg() and tcp_accept()?

Kieran 



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users


 To report this email as spam click
https://www.mailcontrol.com/sr/!c+6OHFxCp!gbZN0m0!zoB+BfQkdLf739gI8hBZjU
LuRtfhkXl1TmZiNyD8xzDLmKEcV0yVrqeRIjiZW+I1rM0!9AARmAMUT4x6XHRvpwN!GXm56g
uv!iAEi58u+mOd23gQq!qjhwJzgn+3IiyJwLJxkHEh3!uJxdltUSlgejLuriYNCfPAOQJwmB
7PMMbKC5YAaKnPagaRriIE5QEZhR29h3l8evuIY .




reply via email to

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