Am 16.05.2019 um 20:56 schrieb Freddie Chopin:
On Thu, 2019-05-16 at 19:51 +0200, goldsi...@gmx.de wrote:
It's probably not safe as you risk calling back into modules that are
not reentrant. I don't know this for sure, just as a saftey
measurement...

Yes, this is what I was afraid of.

And it shows you're actually asking the correct question :-)


Maybe you could use tcpip_trycallback() from that callback?

I assume you are talking about tcpip_try_callback() right?

Yeah, sorry.

Only thing I could find about tcpip_trycallback() is this:

tcpip_trycallback() was renamed to tcpip_callbackmsg_trycallback() to avoid 
confusion
     with tcpip_try_callback()

It seems that the name was (and still is) very confusing (;

Hrmpf :(


Anyway tcpip_try_callback() does indeed look as what I could use for my
purpose, so thanks for info! I'll try that tomorrow, however I'm not
sure how will I be able to deal with an error when posting the callback
(or allocating the message) will not be possible.

Yeah, well, but what would you do inside that callback when
mqtt_connect() (or whatever) would return such an out-of-resources
error? In such an embedded system, you just have to implement guards to
either set the red lamp or keep retrying... Probably in a
state-machine-like cyclic task... but that's far beyond what lwIP provides.

Regards,
Simon

The other function -
tcpip_callbackmsg_trycallback() -  also looks like I could use it, one
possible failure point less.

Regards,
FCh


_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users



_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to