mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-16 00:46:52 +01:00
Update Aggregatting gateway can now receive PUBLISH from a broker
Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
@@ -81,7 +81,15 @@ void MQTTSNAggregateConnectionHandler::handleConnect(Client* client, MQTTSNPacke
|
||||
/* renew the TopicList */
|
||||
if (topics)
|
||||
{
|
||||
_gateway->getAdapterManager()->removeAggregateTopicList(topics, client);
|
||||
Topic* tp = topics->getFirstTopic();
|
||||
while( tp != nullptr )
|
||||
{
|
||||
if ( tp->getType() == MQTTSN_TOPIC_TYPE_NORMAL )
|
||||
{
|
||||
_gateway->getAdapterManager()->getAggregater()->removeAggregateTopic(tp, client);
|
||||
}
|
||||
tp = topics->getNextTopic(tp);
|
||||
}
|
||||
topics->eraseNormal();
|
||||
}
|
||||
client->setSessionStatus(true);
|
||||
@@ -189,7 +197,6 @@ void MQTTSNAggregateConnectionHandler::sendStoredPublish(Client* client)
|
||||
|
||||
while ( ( msg = client->getClientSleepPacket() ) != nullptr )
|
||||
{
|
||||
// ToDo: This version can't re-send PUBLISH when PUBACK is not returned.
|
||||
client->deleteFirstClientSleepPacket(); // pop the que to delete element.
|
||||
|
||||
Event* ev = new Event();
|
||||
|
||||
Reference in New Issue
Block a user