[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Can you connect a MQTT client directly from a PPPoS status
From: |
Freddie Chopin |
Subject: |
[lwip-users] Can you connect a MQTT client directly from a PPPoS status callback? |
Date: |
Thu, 16 May 2019 16:24:44 +0200 |
User-agent: |
Evolution 3.32.1 |
Hi!
I'm working on an open-source demo project in which there is a MQTT
client talking via PPPoS to a GSM modem. The project also has a RTOS,
so I have threads and synchronization objects.
I'm wondering whether I could connect a MQTT client to a broker
directly from a PPPoS status callback? The scenario I have in mind is
that when PPPoS connection is established then I would like to
immediately connect to the MQTT broker. Is that a viable idea, or
should I avoid calling such high-level functions as
mqtt_client_connect() from such low-level places as status callbacks of
netifs? The problem I'm seeing is that mqtt_client_connect() requires
you to hold a TCP/IP core lock, which is already held when the PPPoS
callback is executed. I can make this lock recursive, not a problem (at
least for me, but I doubt lwIP would care about such a change), but
then I'm wondering whether there's a chance for a deadlock or data
corruption in such a scenario...
Thanks in advance for any input!
Regards,
FCh
- [lwip-users] Can you connect a MQTT client directly from a PPPoS status callback?,
Freddie Chopin <=