mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-17 09:26:51 +01:00
upgrade and bugfix for a test
Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
@@ -44,6 +44,7 @@ LPublishManager::LPublishManager()
|
||||
_last = 0;
|
||||
_elmCnt = 0;
|
||||
_publishedFlg = SAVE_TASK_INDEX;
|
||||
_autoConnectFlg = false;
|
||||
}
|
||||
|
||||
LPublishManager::~LPublishManager()
|
||||
@@ -115,7 +116,10 @@ void LPublishManager::sendPublish(PubElement* elm)
|
||||
return;
|
||||
}
|
||||
|
||||
theClient->getGwProxy()->connect();
|
||||
if (_autoConnectFlg)
|
||||
{
|
||||
theClient->getGwProxy()->connect();
|
||||
}
|
||||
|
||||
uint8_t msg[MQTTSN_MAX_MSG_LENGTH + 1];
|
||||
uint8_t org = 0;
|
||||
@@ -310,6 +314,11 @@ void LPublishManager::checkTimeout(void)
|
||||
}
|
||||
}
|
||||
|
||||
void LPublishManager::setAutoConnectMode(bool flg)
|
||||
{
|
||||
_autoConnectFlg = flg;
|
||||
}
|
||||
|
||||
PubElement* LPublishManager::getElement(uint16_t msgId)
|
||||
{
|
||||
PubElement* elm = _first;
|
||||
|
||||
Reference in New Issue
Block a user