[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Can you connect a MQTT client directly from a PPPoS sta
From: |
address@hidden |
Subject: |
Re: [lwip-users] Can you connect a MQTT client directly from a PPPoS status callback? |
Date: |
Thu, 16 May 2019 21:04:46 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
Am 16.05.2019 um 20:56 schrieb Freddie Chopin:
On Thu, 2019-05-16 at 19:51 +0200, address@hidden 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
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users