mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-14 16:06:51 +01:00
Update: Add Client Address to CONNECT reject error message.
Update: comment out the generating CONNACK reply. Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
@@ -101,6 +101,15 @@ SensorNetAddress& SensorNetAddress::operator =(SensorNetAddress& addr)
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
char* SensorNetAddress::sprint(char* buf)
|
||||
{
|
||||
struct in_addr inaddr = { _IpAddr };
|
||||
char* ip = inet_ntoa(inaddr);
|
||||
sprintf( buf, "%s:", ip);
|
||||
sprintf( buf + strlen(buf), "%d", ntohs(_portNo));
|
||||
return buf;
|
||||
}
|
||||
/*===========================================
|
||||
Class SensorNetwork
|
||||
============================================*/
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
uint32_t getIpAddress(void);
|
||||
bool isMatch(SensorNetAddress* addr);
|
||||
SensorNetAddress& operator =(SensorNetAddress& addr);
|
||||
|
||||
char* sprint(char* buf);
|
||||
private:
|
||||
uint16_t _portNo;
|
||||
uint32_t _IpAddr;
|
||||
|
||||
Reference in New Issue
Block a user