mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-13 15:36:51 +01:00
BugFix of #86
Fix of warning: comparison between signed and unsigned integer expressions Set a null string to the client ID when it of CONNECT is empty. Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "LMqttsnClientApp.h"
|
||||
#include "LNetworkUdp.h"
|
||||
@@ -92,11 +93,11 @@ private:
|
||||
uint8_t _gwId;
|
||||
uint16_t _tkeepAlive;
|
||||
uint32_t _tAdv;
|
||||
uint32_t _sendUTC;
|
||||
time_t _sendUTC;
|
||||
int _retryCount;
|
||||
int _connectRetry;
|
||||
uint8_t _status;
|
||||
uint32_t _pingSendUTC;
|
||||
time_t _pingSendUTC;
|
||||
uint8_t _pingRetryCount;
|
||||
uint8_t _pingStatus;
|
||||
LRegisterManager _regMgr;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#ifndef PUBLISHMANAGER_H_
|
||||
#define PUBLISHMANAGER_H_
|
||||
|
||||
#include <time.h>
|
||||
#include "LMqttsnClientApp.h"
|
||||
#include "LTimer.h"
|
||||
#include "LTopicTable.h"
|
||||
@@ -42,7 +43,7 @@ typedef struct PubElement{
|
||||
const char* topicName;
|
||||
uint8_t* payload;
|
||||
uint16_t payloadlen;
|
||||
uint32_t sendUTC;
|
||||
time_t sendUTC;
|
||||
int (*callback)(void);
|
||||
int retryCount;
|
||||
int taskIndex;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#ifndef REGISTERQUE_H_
|
||||
#define REGISTERQUE_H_
|
||||
|
||||
#include <time.h>
|
||||
#include "LMqttsnClientApp.h"
|
||||
|
||||
namespace linuxAsyncClient {
|
||||
@@ -27,7 +28,7 @@ typedef struct RegQueElement{
|
||||
const char* topicName;
|
||||
uint16_t msgId;
|
||||
int retryCount;
|
||||
uint32_t sendUTC;
|
||||
time_t sendUTC;
|
||||
RegQueElement* prev;
|
||||
RegQueElement* next;
|
||||
}RegQueElement;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "LMqttsnClientApp.h"
|
||||
#include "LRegisterManager.h"
|
||||
@@ -33,7 +34,7 @@ typedef struct SubElement{
|
||||
TopicCallback callback;
|
||||
const char* topicName;
|
||||
uint16_t msgId;
|
||||
uint32_t sendUTC;
|
||||
time_t sendUTC;
|
||||
uint16_t topicId;
|
||||
uint8_t msgType;
|
||||
uint8_t topicType;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "LMqttsnClientApp.h"
|
||||
#include "LTimer.h"
|
||||
@@ -29,8 +30,8 @@ namespace linuxAsyncClient {
|
||||
|
||||
struct TaskList{
|
||||
void (*callback)(void);
|
||||
uint32_t interval;
|
||||
uint32_t prevTime;
|
||||
time_t interval;
|
||||
time_t prevTime;
|
||||
uint8_t count;
|
||||
};
|
||||
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "LMqttsnClientApp.h"
|
||||
#include "LTimer.h"
|
||||
|
||||
using namespace std;
|
||||
//using namespace std;
|
||||
using namespace linuxAsyncClient;
|
||||
|
||||
/*=====================================
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#ifndef TIMER_H_
|
||||
#define TIMER_H_
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "LMqttsnClientApp.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user