From ebff229c7c0c967fa8518bb153e0213193b4353e Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Sat, 2 Dec 2023 11:50:14 -0700 Subject: [PATCH 001/262] Include net_util.h to rti_remote.h --- core/federated/RTI/rti_remote.c | 2 +- core/federated/RTI/rti_remote.h | 4 ++++ include/core/federated/network/net_util.h | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 2fce8b1bf..8a4a2af4e 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -27,7 +27,7 @@ */ #include "rti_remote.h" -#include "net_util.h" +// #include "net_util.h" #include diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index b3249ec30..c76bf3c4e 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -22,6 +22,7 @@ #include // Defines read(), write(), and close() #include // Defines bzero(). +#include "net_util.h" #include "rti_common.h" #ifdef __RTI_AUTH__ @@ -119,6 +120,9 @@ typedef struct rti_remote_t { */ const char* federation_id; + net_driver + + /************* TCP server information *************/ /** The desired port specified by the user on the command line. */ uint16_t user_specified_port; diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 5c6bcb966..ed55b614a 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -62,6 +62,12 @@ int host_is_big_endian(void); #ifdef FEDERATED +typedef struct net_drv_t { + int ( *init)(struct net_drv_t *drv); + void (*close)(struct net_drv_t *drv); + int ( *read)(struct net_drv_t *drv, void * buffer, int size); + int (*write)(struct net_drv_t *drv, void * buffer, int size); +} net_drv_t; /** * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled From 153bc6d432240f57e398c959adfdfa62bd5c70c1 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Sat, 2 Dec 2023 12:41:26 -0700 Subject: [PATCH 002/262] Add lf_socket_support.c with CMakelists changes & add net_drv functions --- core/federated/RTI/CMakeLists.txt | 1 + core/federated/RTI/rti_remote.h | 3 ++- core/federated/network/CMakeLists.txt | 2 +- core/federated/network/lf_socket_support.c | 0 core/federated/network/net_util.c | 27 +++++++++++++++++++ .../federated/network/lf_socket_support.h | 7 +++++ include/core/federated/network/net_util.h | 13 ++++++--- 7 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 core/federated/network/lf_socket_support.c create mode 100644 include/core/federated/network/lf_socket_support.h diff --git a/core/federated/RTI/CMakeLists.txt b/core/federated/RTI/CMakeLists.txt index 75d812ab7..306003d3d 100644 --- a/core/federated/RTI/CMakeLists.txt +++ b/core/federated/RTI/CMakeLists.txt @@ -70,6 +70,7 @@ add_executable( ${CoreLib}/utils/util.c ${CoreLib}/tag.c ${CoreLib}/federated/network/net_util.c + ${CoreLib}/federated/network/lf_socket_support.c ${CoreLib}/utils/pqueue_base.c ${CoreLib}/utils/pqueue_tag.c ${CoreLib}/utils/pqueue.c diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index c76bf3c4e..ac0ddd16c 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -120,7 +120,8 @@ typedef struct rti_remote_t { */ const char* federation_id; - net_driver + net_drv_t *rti_net_drv; + net_drv_t *clock_net_drv; /************* TCP server information *************/ diff --git a/core/federated/network/CMakeLists.txt b/core/federated/network/CMakeLists.txt index 82795b7bb..2475c1b6f 100644 --- a/core/federated/network/CMakeLists.txt +++ b/core/federated/network/CMakeLists.txt @@ -1,4 +1,4 @@ -set(LF_NETWORK_FILES net_util.c) +set(LF_NETWORK_FILES net_util.c lf_socket_support.c) list(APPEND INFO_SOURCES ${LF_NETWORK_FILES}) list(TRANSFORM LF_NETWORK_FILES PREPEND federated/network/) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c new file mode 100644 index 000000000..e69de29bb diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index 99c6e6cf8..b11696799 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -56,6 +56,33 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** Number of nanoseconds to sleep before retrying a socket read. */ #define SOCKET_READ_RETRY_INTERVAL 1000000 +int netapi_init(net_drv_t *drv) +{ + if (!drv) + return -1; + return drv->init(drv); +} +void netapi_close(net_drv_t *drv) +{ + if (drv) + drv->close(drv); +} + +int netapi_read(net_drv_t *drv, void * buffer, int size) +{ + if (!drv) + return -1; + return drv->read(drv, buffer, size); +} + +int netapi_write(net_drv_t *drv, void * buffer, int size) +{ + if (!drv) + return -1; + return drv->write(drv, buffer, size); +} + + int create_real_time_tcp_socket_errexit() { int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sock < 0) { diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h new file mode 100644 index 000000000..cf34b3cd7 --- /dev/null +++ b/include/core/federated/network/lf_socket_support.h @@ -0,0 +1,7 @@ +#ifndef LF_SOCKET_SUPPORT_H +#define LF_SOCKET_SUPPORT_H + + + + +#endif // LF_SOCKET_SUPPORT_H diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index ed55b614a..45809e483 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -63,12 +63,17 @@ int host_is_big_endian(void); #ifdef FEDERATED typedef struct net_drv_t { - int ( *init)(struct net_drv_t *drv); - void (*close)(struct net_drv_t *drv); - int ( *read)(struct net_drv_t *drv, void * buffer, int size); - int (*write)(struct net_drv_t *drv, void * buffer, int size); + int ( *init)(net_drv_t *drv); + void (*close)(net_drv_t *drv); + int ( *read)(net_drv_t *drv, void * buffer, int size); + int (*write)(net_drv_t *drv, void * buffer, int size); } net_drv_t; +int netapi_init(net_drv_t *drv); +void netapi_close(net_drv_t *drv); +int netapi_read(net_drv_t *drv, void * buffer, int size); +int netapi_write(net_drv_t *drv, void * buffer, int size); + /** * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application From 49cafb532c644de9a72ad974e9f12f78eae7329b Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Sat, 2 Dec 2023 14:58:01 -0700 Subject: [PATCH 003/262] Add socket_support.c & Add a net_drv to the RTI. --- core/federated/RTI/rti_remote.c | 4 + core/federated/RTI/rti_remote.h | 4 + core/federated/network/lf_socket_support.c | 99 +++++++++++++++++++ .../federated/network/lf_socket_support.h | 6 ++ include/core/federated/network/net_util.h | 8 +- 5 files changed, 117 insertions(+), 4 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 8a4a2af4e..4e334cde0 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1632,6 +1632,10 @@ void initialize_RTI(rti_remote_t *rti){ initialize_rti_common(&rti_remote->base); rti_remote->base.mutex = &rti_mutex; + // TODO: How to make this compile dependent? When should the options be determined? + rti_remote->rti_net_drv = socket_create(TCP); + rti_remote->clock_net_drv = socket_create(UDP); + // federation_rti related initializations rti_remote->max_start_time = 0LL; rti_remote->num_feds_proposed_start = 0; diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index ac0ddd16c..b2e68eb8a 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -33,6 +33,9 @@ #include "lf_types.h" #include "message_record/message_record.h" +//TODO: Need to be fixed later. +#include "lf_socket_support.h" + ///////////////////////////////////////////// //// Data structures @@ -120,6 +123,7 @@ typedef struct rti_remote_t { */ const char* federation_id; + //TODO: Does it have to be a pointer? net_drv_t *rti_net_drv; net_drv_t *clock_net_drv; diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index e69de29bb..5ea292de0 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -0,0 +1,99 @@ + +#include +#include /* IFNAMSIZ */ +#include /* htons */ +#include +#include +#include +#include +#include +#include + +#include "util.h" +#include "lf_socket_support.h" +// #include "net_util.h" + +static socket_priv_t *get_priv(net_drv_t *drv) +{ + if (!drv) + return NULL; + return (socket_priv_t *)(drv+1); +} + +// static int socket_init(net_drv_t *drv) +// { +// socket_priv_t *priv = get_priv(drv); +// priv->sock = socket(AF_PACKET, SOCK_RAW, htons(priv->proto)); +// if (priv->sock < 0) +// return -1; + +// /* If Rx, timeout is a good thing */ +// if (priv->timeout_us > 0) { +// struct timeval tv = { +// .tv_sec = priv->timeout_us / 1e6, +// .tv_usec = priv->timeout_us % 1000000, +// }; +// if (setsockopt(priv->sock, SOL_SOCKET, SO_RCVTIMEO, (const char*)&tv, sizeof tv) == -1) { +// printf("%s(): Could not set timeout on socket (%d): %s\n", +// __func__, priv->sock, strerror(errno)); +// close(priv->sock); +// return -1; +// } +// } +// /* bind to device, ... */ + +// printf("Socket created\n"); +// return 0; +// } + +// static void socket_close(net_drv_t *drv) +// { +// if (!drv) +// return; +// socket_priv_t *priv = get_priv(drv); +// if (priv->sock > 0) { +// close(priv->sock); +// priv->sock = -1; +// } +// } + +// static int socket_recv(net_drv_t *drv, void * buffer, int size) +// { +// if (!drv) +// return -1; +// socket_priv_t *priv = get_priv(drv); +// if (priv->timeout_us > 0) { +// int res = -1; +// do { +// res = recv(priv->sock, buffer, size, MSG_TRUNC); +// } while (res > 0); +// return res; +// } +// return recv(priv->sock, buffer, size, MSG_TRUNC); +// } + +// static int socket_send(net_drv_t *drv, void * buffer, int size) +// { +// if (!drv) +// return -1; +// socket_priv_t *priv = get_priv(drv); +// return send(priv->sock, buffer, size, MSG_DONTWAIT); +// } + +net_drv_t * socket_create(int protocol) { + //TODO: Should it be malloc? To support different network stacks operate simulatneously? + net_drv_t *drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); //Don't need to call malloc() twice. + if (!drv) {// check if malloc worked. + lf_print_error_and_exit("Falied to malloc net_drv_t."); + } + memset(drv, 0, sizeof(*drv)); + + socket_priv_t *priv = get_priv(drv); //drv+1 return. + priv->proto = protocol; + + // drv->init = socket_init; + // drv->close = socket_close; + // drv->read = socket_recv; + // drv->write = socket_send; + return drv; +} diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index cf34b3cd7..6f192a572 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -1,7 +1,13 @@ #ifndef LF_SOCKET_SUPPORT_H #define LF_SOCKET_SUPPORT_H +#include "net_util.h" +typedef struct socket_priv_t { + int sock; + int proto; +} socket_priv_t; +net_drv_t * socket_create(int protocol); #endif // LF_SOCKET_SUPPORT_H diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 45809e483..e2adcb67e 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -63,10 +63,10 @@ int host_is_big_endian(void); #ifdef FEDERATED typedef struct net_drv_t { - int ( *init)(net_drv_t *drv); - void (*close)(net_drv_t *drv); - int ( *read)(net_drv_t *drv, void * buffer, int size); - int (*write)(net_drv_t *drv, void * buffer, int size); + int ( *init)(struct net_drv_t *drv); + void (*close)(struct net_drv_t *drv); + int ( *read)(struct net_drv_t *drv, void * buffer, int size); + int (*write)(struct net_drv_t *drv, void * buffer, int size); } net_drv_t; int netapi_init(net_drv_t *drv); From 9386664c563224a32bc987d88b79e2a1c7cfd2dd Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Sat, 2 Dec 2023 15:18:34 -0700 Subject: [PATCH 004/262] Change naming. net_drv -> netdrv, create->init, init->open --- core/federated/RTI/main.c | 3 ++- core/federated/RTI/rti_remote.c | 5 ++--- core/federated/RTI/rti_remote.h | 4 ++-- core/federated/network/lf_socket_support.c | 18 +++++++-------- core/federated/network/net_util.c | 10 ++++----- .../federated/network/lf_socket_support.h | 4 +++- include/core/federated/network/net_util.h | 22 +++++++++---------- 7 files changed, 34 insertions(+), 32 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index fdc234ced..1f9470c59 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -281,7 +281,8 @@ int main(int argc, const char* argv[]) { initialize_federate(fed_info, i); rti.base.scheduling_nodes[i] = (scheduling_node_t *) fed_info; } - + _lf_initialize_clock(); + int socket_descriptor = start_rti_server(rti.user_specified_port); wait_for_federates(socket_descriptor); free_scheduling_nodes(rti.base.scheduling_nodes, rti.base.number_of_scheduling_nodes); diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 4e334cde0..69760ec23 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1561,7 +1561,6 @@ int32_t start_rti_server(uint16_t port) { // Use the default starting port. port = STARTING_PORT; } - _lf_initialize_clock(); // Create the TCP socket server rti_remote->socket_descriptor_TCP = create_server(specified_port, port, TCP); lf_print("RTI: Listening for federates."); @@ -1633,8 +1632,8 @@ void initialize_RTI(rti_remote_t *rti){ rti_remote->base.mutex = &rti_mutex; // TODO: How to make this compile dependent? When should the options be determined? - rti_remote->rti_net_drv = socket_create(TCP); - rti_remote->clock_net_drv = socket_create(UDP); + rti_remote->rti_net_drv = socket_init(TCP); + rti_remote->clock_net_drv = socket_init(UDP); // federation_rti related initializations rti_remote->max_start_time = 0LL; diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index b2e68eb8a..e29a24c8e 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -124,8 +124,8 @@ typedef struct rti_remote_t { const char* federation_id; //TODO: Does it have to be a pointer? - net_drv_t *rti_net_drv; - net_drv_t *clock_net_drv; + netdrv_t *rti_net_drv; + netdrv_t *clock_net_drv; /************* TCP server information *************/ diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 5ea292de0..cceb5590d 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -13,14 +13,14 @@ #include "lf_socket_support.h" // #include "net_util.h" -static socket_priv_t *get_priv(net_drv_t *drv) +static socket_priv_t *get_priv(netdrv_t *drv) { if (!drv) return NULL; return (socket_priv_t *)(drv+1); } -// static int socket_init(net_drv_t *drv) +// static int socket_open(netdrv_t *drv) // { // socket_priv_t *priv = get_priv(drv); // priv->sock = socket(AF_PACKET, SOCK_RAW, htons(priv->proto)); @@ -46,7 +46,7 @@ static socket_priv_t *get_priv(net_drv_t *drv) // return 0; // } -// static void socket_close(net_drv_t *drv) +// static void socket_close(netdrv_t *drv) // { // if (!drv) // return; @@ -57,7 +57,7 @@ static socket_priv_t *get_priv(net_drv_t *drv) // } // } -// static int socket_recv(net_drv_t *drv, void * buffer, int size) +// static int socket_recv(netdrv_t *drv, void * buffer, int size) // { // if (!drv) // return -1; @@ -72,7 +72,7 @@ static socket_priv_t *get_priv(net_drv_t *drv) // return recv(priv->sock, buffer, size, MSG_TRUNC); // } -// static int socket_send(net_drv_t *drv, void * buffer, int size) +// static int socket_send(netdrv_t *drv, void * buffer, int size) // { // if (!drv) // return -1; @@ -80,18 +80,18 @@ static socket_priv_t *get_priv(net_drv_t *drv) // return send(priv->sock, buffer, size, MSG_DONTWAIT); // } -net_drv_t * socket_create(int protocol) { +netdrv_t * socket_init(int protocol) { //TODO: Should it be malloc? To support different network stacks operate simulatneously? - net_drv_t *drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); //Don't need to call malloc() twice. + netdrv_t *drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); //Don't need to call malloc() twice. if (!drv) {// check if malloc worked. - lf_print_error_and_exit("Falied to malloc net_drv_t."); + lf_print_error_and_exit("Falied to malloc netdrv_t."); } memset(drv, 0, sizeof(*drv)); socket_priv_t *priv = get_priv(drv); //drv+1 return. priv->proto = protocol; - // drv->init = socket_init; + // drv->init = socket_open; // drv->close = socket_close; // drv->read = socket_recv; // drv->write = socket_send; diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index b11696799..99a745396 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -56,26 +56,26 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** Number of nanoseconds to sleep before retrying a socket read. */ #define SOCKET_READ_RETRY_INTERVAL 1000000 -int netapi_init(net_drv_t *drv) +int netdrv_init(netdrv_t *drv) { if (!drv) return -1; - return drv->init(drv); + return drv->open(drv); } -void netapi_close(net_drv_t *drv) +void netdrv_close(netdrv_t *drv) { if (drv) drv->close(drv); } -int netapi_read(net_drv_t *drv, void * buffer, int size) +int netdrv_read(netdrv_t *drv, void * buffer, int size) { if (!drv) return -1; return drv->read(drv, buffer, size); } -int netapi_write(net_drv_t *drv, void * buffer, int size) +int netdrv_write(netdrv_t *drv, void * buffer, int size) { if (!drv) return -1; diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index 6f192a572..0f8f77f07 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -6,8 +6,10 @@ typedef struct socket_priv_t { int sock; int proto; + int port; + int user_specified_port; } socket_priv_t; -net_drv_t * socket_create(int protocol); +netdrv_t * socket_init(int protocol); #endif // LF_SOCKET_SUPPORT_H diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index e2adcb67e..be298c2e0 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -62,17 +62,17 @@ int host_is_big_endian(void); #ifdef FEDERATED -typedef struct net_drv_t { - int ( *init)(struct net_drv_t *drv); - void (*close)(struct net_drv_t *drv); - int ( *read)(struct net_drv_t *drv, void * buffer, int size); - int (*write)(struct net_drv_t *drv, void * buffer, int size); -} net_drv_t; - -int netapi_init(net_drv_t *drv); -void netapi_close(net_drv_t *drv); -int netapi_read(net_drv_t *drv, void * buffer, int size); -int netapi_write(net_drv_t *drv, void * buffer, int size); +typedef struct netdrv_t { + int ( *init)(struct netdrv_t *drv); + void (*close)(struct netdrv_t *drv); + int ( *read)(struct netdrv_t *drv, void * buffer, int size); + int (*write)(struct netdrv_t *drv, void * buffer, int size); +} netdrv_t; + +int netdrv_open(netdrv_t *drv); +void netdrv_close(netdrv_t *drv); +int netdrv_read(netdrv_t *drv, void * buffer, int size); +int netdrv_write(netdrv_t *drv, void * buffer, int size); /** * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled From 85013bce0585f69aa23387f209fc964c6469fc82 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Sat, 2 Dec 2023 15:20:31 -0700 Subject: [PATCH 005/262] Minor fix --- core/federated/network/net_util.c | 2 +- include/core/federated/network/net_util.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index 99a745396..129f1048c 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -56,7 +56,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** Number of nanoseconds to sleep before retrying a socket read. */ #define SOCKET_READ_RETRY_INTERVAL 1000000 -int netdrv_init(netdrv_t *drv) +int netdrv_open(netdrv_t *drv) { if (!drv) return -1; diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index be298c2e0..28b4842be 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -63,7 +63,7 @@ int host_is_big_endian(void); #ifdef FEDERATED typedef struct netdrv_t { - int ( *init)(struct netdrv_t *drv); + int ( *open)(struct netdrv_t *drv); void (*close)(struct netdrv_t *drv); int ( *read)(struct netdrv_t *drv, void * buffer, int size); int (*write)(struct netdrv_t *drv, void * buffer, int size); From 0030daeb1c7037e5578f4a727e9482b0608cce8c Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Sun, 3 Dec 2023 18:01:19 -0700 Subject: [PATCH 006/262] Fix naming --- core/federated/RTI/rti_remote.c | 4 ++-- core/federated/RTI/rti_remote.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 69760ec23..25bf2fbd2 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1632,8 +1632,8 @@ void initialize_RTI(rti_remote_t *rti){ rti_remote->base.mutex = &rti_mutex; // TODO: How to make this compile dependent? When should the options be determined? - rti_remote->rti_net_drv = socket_init(TCP); - rti_remote->clock_net_drv = socket_init(UDP); + rti_remote->rti_netdrv = socket_init(TCP); + rti_remote->clock_netdrv = socket_init(UDP); // federation_rti related initializations rti_remote->max_start_time = 0LL; diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index e29a24c8e..59fa3869e 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -124,8 +124,8 @@ typedef struct rti_remote_t { const char* federation_id; //TODO: Does it have to be a pointer? - netdrv_t *rti_net_drv; - netdrv_t *clock_net_drv; + netdrv_t *rti_netdrv; + netdrv_t *clock_netdrv; /************* TCP server information *************/ From 72ec3d52a32203102a21e93f8b8a639415203bca Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Sun, 3 Dec 2023 19:18:06 -0700 Subject: [PATCH 007/262] Comment out malloc checks --- core/federated/network/lf_socket_support.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index cceb5590d..71fd7221c 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -83,10 +83,10 @@ static socket_priv_t *get_priv(netdrv_t *drv) netdrv_t * socket_init(int protocol) { //TODO: Should it be malloc? To support different network stacks operate simulatneously? netdrv_t *drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); //Don't need to call malloc() twice. - if (!drv) {// check if malloc worked. - lf_print_error_and_exit("Falied to malloc netdrv_t."); - } - memset(drv, 0, sizeof(*drv)); + // if (!drv) {// check if malloc worked. + // lf_print_error_and_exit("Falied to malloc netdrv_t."); + // } + // memset(drv, 0, sizeof(*drv)); socket_priv_t *priv = get_priv(drv); //drv+1 return. priv->proto = protocol; From 67da72fff12a5e5dafbe04ec4559f612241e7fa6 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Tue, 16 Jan 2024 09:26:05 -0700 Subject: [PATCH 008/262] Fix socket open --- core/federated/network/lf_socket_support.c | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 71fd7221c..e5d25baff 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -15,13 +15,17 @@ static socket_priv_t *get_priv(netdrv_t *drv) { - if (!drv) + if (!drv) { + lf_print_error_and_exit("Falied to malloc netdrv_t."); return NULL; - return (socket_priv_t *)(drv+1); + } + socket_priv_t *aa = (socket_priv_t *)(drv+1); + return aa; + // return (socket_priv_t *)(drv+1); } -// static int socket_open(netdrv_t *drv) -// { +static int socket_open(netdrv_t *drv) +{ // socket_priv_t *priv = get_priv(drv); // priv->sock = socket(AF_PACKET, SOCK_RAW, htons(priv->proto)); // if (priv->sock < 0) @@ -44,7 +48,7 @@ static socket_priv_t *get_priv(netdrv_t *drv) // printf("Socket created\n"); // return 0; -// } +} // static void socket_close(netdrv_t *drv) // { @@ -83,15 +87,15 @@ static socket_priv_t *get_priv(netdrv_t *drv) netdrv_t * socket_init(int protocol) { //TODO: Should it be malloc? To support different network stacks operate simulatneously? netdrv_t *drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); //Don't need to call malloc() twice. - // if (!drv) {// check if malloc worked. - // lf_print_error_and_exit("Falied to malloc netdrv_t."); - // } - // memset(drv, 0, sizeof(*drv)); + if (!drv) {// check if malloc worked. + lf_print_error_and_exit("Falied to malloc netdrv_t."); + } + memset(drv, 0, sizeof(netdrv_t)); socket_priv_t *priv = get_priv(drv); //drv+1 return. priv->proto = protocol; - // drv->init = socket_open; + drv->open = socket_open; // drv->close = socket_close; // drv->read = socket_recv; // drv->write = socket_send; From 6870b978a25ba97d085e75ba36119287ad7e5d3c Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Tue, 16 Jan 2024 09:27:31 -0700 Subject: [PATCH 009/262] Fix formatting --- core/federated/network/lf_socket_support.c | 101 ++++++++++----------- 1 file changed, 50 insertions(+), 51 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index e5d25baff..ac677b231 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -1,53 +1,52 @@ +#include "lf_socket_support.h" + +#include /* htons */ +#include +#include /* IFNAMSIZ */ #include -#include /* IFNAMSIZ */ -#include /* htons */ -#include -#include -#include #include #include -#include +#include +#include +#include #include "util.h" -#include "lf_socket_support.h" // #include "net_util.h" -static socket_priv_t *get_priv(netdrv_t *drv) -{ - if (!drv) { - lf_print_error_and_exit("Falied to malloc netdrv_t."); - return NULL; - } - socket_priv_t *aa = (socket_priv_t *)(drv+1); - return aa; - // return (socket_priv_t *)(drv+1); +static socket_priv_t *get_priv(netdrv_t *drv) { + if (!drv) { + lf_print_error_and_exit("Falied to malloc netdrv_t."); + return NULL; + } + socket_priv_t *aa = (socket_priv_t *)(drv + 1); + return aa; + // return (socket_priv_t *)(drv+1); } -static int socket_open(netdrv_t *drv) -{ -// socket_priv_t *priv = get_priv(drv); -// priv->sock = socket(AF_PACKET, SOCK_RAW, htons(priv->proto)); -// if (priv->sock < 0) -// return -1; +static int socket_open(netdrv_t *drv) { + // socket_priv_t *priv = get_priv(drv); + // priv->sock = socket(AF_PACKET, SOCK_RAW, htons(priv->proto)); + // if (priv->sock < 0) + // return -1; -// /* If Rx, timeout is a good thing */ -// if (priv->timeout_us > 0) { -// struct timeval tv = { -// .tv_sec = priv->timeout_us / 1e6, -// .tv_usec = priv->timeout_us % 1000000, -// }; -// if (setsockopt(priv->sock, SOL_SOCKET, SO_RCVTIMEO, (const char*)&tv, sizeof tv) == -1) { -// printf("%s(): Could not set timeout on socket (%d): %s\n", -// __func__, priv->sock, strerror(errno)); -// close(priv->sock); -// return -1; -// } -// } -// /* bind to device, ... */ + // /* If Rx, timeout is a good thing */ + // if (priv->timeout_us > 0) { + // struct timeval tv = { + // .tv_sec = priv->timeout_us / 1e6, + // .tv_usec = priv->timeout_us % 1000000, + // }; + // if (setsockopt(priv->sock, SOL_SOCKET, SO_RCVTIMEO, (const char*)&tv, sizeof tv) == -1) { + // printf("%s(): Could not set timeout on socket (%d): %s\n", + // __func__, priv->sock, strerror(errno)); + // close(priv->sock); + // return -1; + // } + // } + // /* bind to device, ... */ -// printf("Socket created\n"); -// return 0; + // printf("Socket created\n"); + // return 0; } // static void socket_close(netdrv_t *drv) @@ -84,20 +83,20 @@ static int socket_open(netdrv_t *drv) // return send(priv->sock, buffer, size, MSG_DONTWAIT); // } -netdrv_t * socket_init(int protocol) { - //TODO: Should it be malloc? To support different network stacks operate simulatneously? - netdrv_t *drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); //Don't need to call malloc() twice. - if (!drv) {// check if malloc worked. - lf_print_error_and_exit("Falied to malloc netdrv_t."); +netdrv_t *socket_init(int protocol) { + // TODO: Should it be malloc? To support different network stacks operate simulatneously? + netdrv_t *drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); // Don't need to call malloc() twice. + if (!drv) { // check if malloc worked. + lf_print_error_and_exit("Falied to malloc netdrv_t."); } - memset(drv, 0, sizeof(netdrv_t)); + memset(drv, 0, sizeof(netdrv_t)); - socket_priv_t *priv = get_priv(drv); //drv+1 return. - priv->proto = protocol; + socket_priv_t *priv = get_priv(drv); // drv+1 return. + priv->proto = protocol; - drv->open = socket_open; - // drv->close = socket_close; - // drv->read = socket_recv; - // drv->write = socket_send; - return drv; + drv->open = socket_open; + // drv->close = socket_close; + // drv->read = socket_recv; + // drv->write = socket_send; + return drv; } From 0a3d739d64a9a808bebb886405298fad5fc823c4 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Tue, 16 Jan 2024 11:24:31 -0700 Subject: [PATCH 010/262] Fix formatting --- core/federated/network/net_util.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index 129f1048c..3112e9b3f 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -56,32 +56,35 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** Number of nanoseconds to sleep before retrying a socket read. */ #define SOCKET_READ_RETRY_INTERVAL 1000000 -int netdrv_open(netdrv_t *drv) -{ - if (!drv) +int netdrv_open(netdrv_t *drv) { + if (!drv) { return -1; + } return drv->open(drv); } -void netdrv_close(netdrv_t *drv) -{ - if (drv) +void netdrv_close(netdrv_t *drv) { + if (!drv) { + return -1; + } drv->close(drv); } -int netdrv_read(netdrv_t *drv, void * buffer, int size) -{ - if (!drv) +int netdrv_read(netdrv_t *drv, void * buffer, int size) { + if (!drv) { return -1; + } return drv->read(drv, buffer, size); } -int netdrv_write(netdrv_t *drv, void * buffer, int size) -{ - if (!drv) +int netdrv_write(netdrv_t *drv, void * buffer, int size) { + if (!drv) { return -1; + } return drv->write(drv, buffer, size); } +int create_net_server(netdrv_t *drv); + int create_real_time_tcp_socket_errexit() { int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); From f5fe168fa14855eddceae1dbd349c308aa664eaa Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Tue, 16 Jan 2024 12:35:48 -0700 Subject: [PATCH 011/262] Add some headers and definitions --- core/federated/RTI/main.c | 4 + core/federated/RTI/rti_remote.c | 9 + core/federated/network/lf_socket_support.c | 217 +++++++++++++----- core/federated/network/net_util.c | 2 - .../federated/network/lf_socket_support.h | 12 + 5 files changed, 189 insertions(+), 55 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index 1f9470c59..b0ed12f4f 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -215,6 +215,7 @@ int process_args(int argc, const char* argv[]) { return 0; } rti.user_specified_port = (uint16_t)RTI_port; + //TODO: Need to fix. } else if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--clock_sync") == 0) { if (argc < i + 2) { lf_print_error("--clock-sync needs off|init|on."); @@ -283,6 +284,9 @@ int main(int argc, const char* argv[]) { } _lf_initialize_clock(); + start_net_rti_server(); + +//TODO: Let's leave this user_specified_port yet. int socket_descriptor = start_rti_server(rti.user_specified_port); wait_for_federates(socket_descriptor); free_scheduling_nodes(rti.base.scheduling_nodes, rti.base.number_of_scheduling_nodes); diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 25bf2fbd2..c588d362e 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1555,6 +1555,15 @@ void initialize_federate(federate_info_t* fed, uint16_t id) { fed->server_port = -1; } +void start_net_rti_server() { + // Create the RTI's netdriver. + create_net_server(rti_remote->rti_netdrv); + // Create the clocksync's netdriver. + if (rti_remote->clock_sync_global_status >= clock_sync_on) { + create_net_server(rti_remote->clock_netdrv); + } +} + int32_t start_rti_server(uint16_t port) { int32_t specified_port = port; if (port == 0) { diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index ac677b231..a14e04bcb 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -11,6 +11,7 @@ #include #include + #include "util.h" // #include "net_util.h" @@ -19,68 +20,63 @@ static socket_priv_t *get_priv(netdrv_t *drv) { lf_print_error_and_exit("Falied to malloc netdrv_t."); return NULL; } - socket_priv_t *aa = (socket_priv_t *)(drv + 1); - return aa; - // return (socket_priv_t *)(drv+1); + return (socket_priv_t *)(drv + 1); } static int socket_open(netdrv_t *drv) { - // socket_priv_t *priv = get_priv(drv); - // priv->sock = socket(AF_PACKET, SOCK_RAW, htons(priv->proto)); - // if (priv->sock < 0) - // return -1; - - // /* If Rx, timeout is a good thing */ - // if (priv->timeout_us > 0) { - // struct timeval tv = { - // .tv_sec = priv->timeout_us / 1e6, - // .tv_usec = priv->timeout_us % 1000000, - // }; - // if (setsockopt(priv->sock, SOL_SOCKET, SO_RCVTIMEO, (const char*)&tv, sizeof tv) == -1) { - // printf("%s(): Could not set timeout on socket (%d): %s\n", - // __func__, priv->sock, strerror(errno)); - // close(priv->sock); - // return -1; - // } - // } - // /* bind to device, ... */ - - // printf("Socket created\n"); - // return 0; + // socket_priv_t *priv = get_priv(drv); + // priv->sock = socket(AF_PACKET, SOCK_RAW, htons(priv->proto)); + // if (priv->sock < 0) + // return -1; + + // /* If Rx, timeout is a good thing */ + // if (priv->timeout_us > 0) { + // struct timeval tv = { + // .tv_sec = priv->timeout_us / 1e6, + // .tv_usec = priv->timeout_us % 1000000, + // }; + // if (setsockopt(priv->sock, SOL_SOCKET, SO_RCVTIMEO, (const char *)&tv, sizeof tv) == -1) { + // printf("%s(): Could not set timeout on socket (%d): %s\n", + // __func__, priv->sock, strerror(errno)); + // close(priv->sock); + // return -1; + // } + // } + // /* bind to device, ... */ + + // printf("Socket created\n"); + // return 0; } -// static void socket_close(netdrv_t *drv) -// { -// if (!drv) -// return; -// socket_priv_t *priv = get_priv(drv); -// if (priv->sock > 0) { -// close(priv->sock); -// priv->sock = -1; -// } +// static void socket_close(netdrv_t *drv) { +// if (!drv) +// return; +// socket_priv_t *priv = get_priv(drv); +// if (priv->sock > 0) { +// close(priv->sock); +// priv->sock = -1; +// } // } -// static int socket_recv(netdrv_t *drv, void * buffer, int size) -// { -// if (!drv) -// return -1; -// socket_priv_t *priv = get_priv(drv); -// if (priv->timeout_us > 0) { -// int res = -1; -// do { -// res = recv(priv->sock, buffer, size, MSG_TRUNC); -// } while (res > 0); -// return res; -// } -// return recv(priv->sock, buffer, size, MSG_TRUNC); +// static int socket_recv(netdrv_t *drv, void *buffer, int size) { +// if (!drv) +// return -1; +// socket_priv_t *priv = get_priv(drv); +// if (priv->timeout_us > 0) { +// int res = -1; +// do { +// res = recv(priv->sock, buffer, size, MSG_TRUNC); +// } while (res > 0); +// return res; +// } +// return recv(priv->sock, buffer, size, MSG_TRUNC); // } -// static int socket_send(netdrv_t *drv, void * buffer, int size) -// { -// if (!drv) -// return -1; -// socket_priv_t *priv = get_priv(drv); -// return send(priv->sock, buffer, size, MSG_DONTWAIT); +// static int socket_send(netdrv_t *drv, void *buffer, int size) { +// if (!drv) +// return -1; +// socket_priv_t *priv = get_priv(drv); +// return send(priv->sock, buffer, size, MSG_DONTWAIT); // } netdrv_t *socket_init(int protocol) { @@ -100,3 +96,118 @@ netdrv_t *socket_init(int protocol) { // drv->write = socket_send; return drv; } + +void create_net_server(netdrv_t *drv){ + // Timeout time for the communications of the server + struct timeval timeout_time = {.tv_sec = TCP_TIMEOUT_TIME / BILLION, .tv_usec = (TCP_TIMEOUT_TIME % BILLION) / 1000}; + // Create an IPv4 socket for TCP (not UDP) communication over IP (0). + int socket_descriptor = -1; + if (socket_type == TCP) { + socket_descriptor = create_real_time_tcp_socket_errexit(); + } else if (socket_type == UDP) { + socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + // Set the appropriate timeout time + timeout_time = (struct timeval){.tv_sec = UDP_TIMEOUT_TIME / BILLION, .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000}; + } + if (socket_descriptor < 0) { + lf_print_error_and_exit("Failed to create RTI socket."); + } + + // Set the option for this socket to reuse the same address + int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option + if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEADDR, &true_variable, sizeof(int32_t)) < 0) { + lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno)); + } + // Set the timeout on the socket so that read and write operations don't block for too long + if (setsockopt(socket_descriptor, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { + lf_print_error("RTI failed to set SO_RCVTIMEO option on the socket: %s.", strerror(errno)); + } + if (setsockopt(socket_descriptor, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { + lf_print_error("RTI failed to set SO_SNDTIMEO option on the socket: %s.", strerror(errno)); + } + + /* + * The following used to permit reuse of a port that an RTI has previously + * used that has not been released. We no longer do this, but instead + * increment the port number until an available port is found. + + // SO_REUSEPORT (since Linux 3.9) + // Permits multiple AF_INET or AF_INET6 sockets to be bound to an + // identical socket address. This option must be set on each + // socket (including the first socket) prior to calling bind(2) + // on the socket. To prevent port hijacking, all of the + // processes binding to the same address must have the same + // effective UID. This option can be employed with both TCP and + // UDP sockets. + + int reuse = 1; + if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEADDR, + (const char*)&reuse, sizeof(reuse)) < 0) { + perror("setsockopt(SO_REUSEADDR) failed"); + } + + #ifdef SO_REUSEPORT + if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEPORT, + (const char*)&reuse, sizeof(reuse)) < 0) { + perror("setsockopt(SO_REUSEPORT) failed"); + } + #endif + */ + + // Server file descriptor. + struct sockaddr_in server_fd; + // Zero out the server address structure. + bzero((char *) &server_fd, sizeof(server_fd)); + + server_fd.sin_family = AF_INET; // IPv4 + server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. + // Convert the port number from host byte order to network byte order. + server_fd.sin_port = htons(port); + + int result = bind( + socket_descriptor, + (struct sockaddr *) &server_fd, + sizeof(server_fd)); + + // If the binding fails with this port and no particular port was specified + // in the LF program, then try the next few ports in sequence. + while (result != 0 + && specified_port == 0 + && port >= STARTING_PORT + && port <= STARTING_PORT + PORT_RANGE_LIMIT) { + lf_print("RTI failed to get port %d. Trying %d.", port, port + 1); + port++; + server_fd.sin_port = htons(port); + result = bind( + socket_descriptor, + (struct sockaddr *) &server_fd, + sizeof(server_fd)); + } + if (result != 0) { + if (specified_port == 0) { + lf_print_error_and_exit("Failed to bind the RTI socket. Cannot find a usable port. " + "Consider increasing PORT_RANGE_LIMIT in net_common.h."); + } else { + lf_print_error_and_exit("Failed to bind the RTI socket. Specified port is not available. " + "Consider leaving the port unspecified"); + } + } + char* type = "TCP"; + if (socket_type == UDP) { + type = "UDP"; + } + lf_print("RTI using %s port %d for federation %s.", type, port, rti_remote->federation_id); + + if (socket_type == TCP) { + rti_remote->final_port_TCP = port; + // Enable listening for socket connections. + // The second argument is the maximum number of queued socket requests, + // which according to the Mac man page is limited to 128. + listen(socket_descriptor, 128); + } else if (socket_type == UDP) { + rti_remote->final_port_UDP = port; + // No need to listen on the UDP socket + } + + return socket_descriptor; +} diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index 3112e9b3f..48efd70c1 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -83,8 +83,6 @@ int netdrv_write(netdrv_t *drv, void * buffer, int size) { return drv->write(drv, buffer, size); } -int create_net_server(netdrv_t *drv); - int create_real_time_tcp_socket_errexit() { int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index 0f8f77f07..750e7bcab 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -3,6 +3,18 @@ #include "net_util.h" +/** + * The timeout time in ns for TCP operations. + * Default value is 10 secs. + */ +#define TCP_TIMEOUT_TIME SEC(10) + +/** + * The timeout time in ns for UDP operations. + * Default value is 1 sec. + */ +#define UDP_TIMEOUT_TIME SEC(1) + typedef struct socket_priv_t { int sock; int proto; From b85618f1534fa1fee3185eedd962b0d6eaee44a2 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Tue, 16 Jan 2024 15:29:41 -0700 Subject: [PATCH 012/262] Finished start rti server --- core/federated/RTI/main.c | 6 ++ core/federated/RTI/rti_remote.c | 8 +- core/federated/RTI/rti_remote.h | 5 ++ core/federated/network/lf_socket_support.c | 87 ++++++++++--------- core/federated/network/net_util.c | 8 +- .../federated/network/lf_socket_support.h | 32 ++++++- include/core/federated/network/net_common.h | 5 ++ include/core/federated/network/net_util.h | 7 ++ 8 files changed, 108 insertions(+), 50 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index b0ed12f4f..724c53a5f 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -215,6 +215,11 @@ int process_args(int argc, const char* argv[]) { return 0; } rti.user_specified_port = (uint16_t)RTI_port; + // (socket_priv_t *)(rti.rti_netdrv + 1)->user_specified_port= (uint16_t)RTI_port; + // netdrv_get_privdrv(rti.rti_netdrv)->user_specified_port = (uint16_t)RTI_port; + // netdrv_get_privdrv(rti.rti_netdrv).user_specified_port = (uint16_t)RTI_port; + // void * a = netdrv_get_privdrv(rti.rti_netdrv); + // // get_prvi(rti.rti_netdrv).user_specified_port = (uint16_t)RTI_port; //TODO: Need to fix. } else if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--clock_sync") == 0) { if (argc < i + 2) { @@ -286,6 +291,7 @@ int main(int argc, const char* argv[]) { start_net_rti_server(); + //TODO: Let's leave this user_specified_port yet. int socket_descriptor = start_rti_server(rti.user_specified_port); wait_for_federates(socket_descriptor); diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index c588d362e..df09c21d7 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1557,10 +1557,10 @@ void initialize_federate(federate_info_t* fed, uint16_t id) { void start_net_rti_server() { // Create the RTI's netdriver. - create_net_server(rti_remote->rti_netdrv); + create_net_server(rti_remote->rti_netdrv, RTI); // Create the clocksync's netdriver. if (rti_remote->clock_sync_global_status >= clock_sync_on) { - create_net_server(rti_remote->clock_netdrv); + create_net_server(rti_remote->clock_netdrv, CLOCKSYNC); } } @@ -1641,8 +1641,8 @@ void initialize_RTI(rti_remote_t *rti){ rti_remote->base.mutex = &rti_mutex; // TODO: How to make this compile dependent? When should the options be determined? - rti_remote->rti_netdrv = socket_init(TCP); - rti_remote->clock_netdrv = socket_init(UDP); + rti_remote->rti_netdrv = netdrv_init(); + rti_remote->clock_netdrv = netdrv_init(); // federation_rti related initializations rti_remote->max_start_time = 0LL; diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 59fa3869e..426247d17 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -193,6 +193,8 @@ extern int lf_critical_section_enter(environment_t* env); */ extern int lf_critical_section_exit(environment_t* env); +void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type); + /** * Create a server and enable listening for socket connections. * @@ -473,6 +475,9 @@ void* respond_to_erroneous_connections(void* nothing); */ void initialize_federate(federate_info_t* fed, uint16_t id); +//TODO: Need to add descriptions. +void start_net_rti_server(); + /** * Start the socket server for the runtime infrastructure (RTI) and * return the socket descriptor. diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index a14e04bcb..dfb6d5c34 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -11,7 +11,6 @@ #include #include - #include "util.h" // #include "net_util.h" @@ -79,7 +78,7 @@ static int socket_open(netdrv_t *drv) { // return send(priv->sock, buffer, size, MSG_DONTWAIT); // } -netdrv_t *socket_init(int protocol) { +netdrv_t *netdrv_init() { // TODO: Should it be malloc? To support different network stacks operate simulatneously? netdrv_t *drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); // Don't need to call malloc() twice. if (!drv) { // check if malloc worked. @@ -88,41 +87,49 @@ netdrv_t *socket_init(int protocol) { memset(drv, 0, sizeof(netdrv_t)); socket_priv_t *priv = get_priv(drv); // drv+1 return. - priv->proto = protocol; drv->open = socket_open; // drv->close = socket_close; // drv->read = socket_recv; // drv->write = socket_send; + // drv->get_priv = get_priv; return drv; } -void create_net_server(netdrv_t *drv){ +void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type) { + socket_priv_t *priv = get_priv(drv); + int port = 0; // TODO: Need to bring specified port. + priv->user_specified_port = port; // This is the user specified port. + int32_t specified_port = port; + if (port == 0) { + // Use the default starting port. + port = STARTING_PORT; + } // Timeout time for the communications of the server struct timeval timeout_time = {.tv_sec = TCP_TIMEOUT_TIME / BILLION, .tv_usec = (TCP_TIMEOUT_TIME % BILLION) / 1000}; // Create an IPv4 socket for TCP (not UDP) communication over IP (0). - int socket_descriptor = -1; - if (socket_type == TCP) { - socket_descriptor = create_real_time_tcp_socket_errexit(); - } else if (socket_type == UDP) { - socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + priv->socket_descriptor = -1; + if (netdrv_type == RTI) { + priv->socket_descriptor = create_real_time_tcp_socket_errexit(); + } else if (netdrv_type == CLOCKSYNC) { + priv->socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); // Set the appropriate timeout time timeout_time = (struct timeval){.tv_sec = UDP_TIMEOUT_TIME / BILLION, .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000}; } - if (socket_descriptor < 0) { + if (priv->socket_descriptor < 0) { lf_print_error_and_exit("Failed to create RTI socket."); } // Set the option for this socket to reuse the same address - int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option - if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEADDR, &true_variable, sizeof(int32_t)) < 0) { + int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option + if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_REUSEADDR, &true_variable, sizeof(int32_t)) < 0) { lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno)); } // Set the timeout on the socket so that read and write operations don't block for too long - if (setsockopt(socket_descriptor, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { + if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_RCVTIMEO, (const char *)&timeout_time, sizeof(timeout_time)) < 0) { lf_print_error("RTI failed to set SO_RCVTIMEO option on the socket: %s.", strerror(errno)); } - if (setsockopt(socket_descriptor, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { + if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_SNDTIMEO, (const char *)&timeout_time, sizeof(timeout_time)) < 0) { lf_print_error("RTI failed to set SO_SNDTIMEO option on the socket: %s.", strerror(errno)); } @@ -157,57 +164,55 @@ void create_net_server(netdrv_t *drv){ // Server file descriptor. struct sockaddr_in server_fd; // Zero out the server address structure. - bzero((char *) &server_fd, sizeof(server_fd)); + bzero((char *)&server_fd, sizeof(server_fd)); - server_fd.sin_family = AF_INET; // IPv4 - server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. + server_fd.sin_family = AF_INET; // IPv4 + server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. // Convert the port number from host byte order to network byte order. server_fd.sin_port = htons(port); int result = bind( - socket_descriptor, - (struct sockaddr *) &server_fd, - sizeof(server_fd)); + priv->socket_descriptor, + (struct sockaddr *)&server_fd, + sizeof(server_fd)); // If the binding fails with this port and no particular port was specified // in the LF program, then try the next few ports in sequence. - while (result != 0 - && specified_port == 0 - && port >= STARTING_PORT - && port <= STARTING_PORT + PORT_RANGE_LIMIT) { + while (result != 0 && specified_port == 0 && port >= STARTING_PORT && port <= STARTING_PORT + PORT_RANGE_LIMIT) { lf_print("RTI failed to get port %d. Trying %d.", port, port + 1); port++; server_fd.sin_port = htons(port); result = bind( - socket_descriptor, - (struct sockaddr *) &server_fd, - sizeof(server_fd)); + priv->socket_descriptor, + (struct sockaddr *)&server_fd, + sizeof(server_fd)); } if (result != 0) { if (specified_port == 0) { - lf_print_error_and_exit("Failed to bind the RTI socket. Cannot find a usable port. " - "Consider increasing PORT_RANGE_LIMIT in net_common.h."); + lf_print_error_and_exit( + "Failed to bind the RTI socket. Cannot find a usable port. " + "Consider increasing PORT_RANGE_LIMIT in net_common.h."); } else { - lf_print_error_and_exit("Failed to bind the RTI socket. Specified port is not available. " - "Consider leaving the port unspecified"); + lf_print_error_and_exit( + "Failed to bind the RTI socket. Specified port is not available. " + "Consider leaving the port unspecified"); } } - char* type = "TCP"; - if (socket_type == UDP) { + char *type = "TCP"; + if (netdrv_type == CLOCKSYNC) { type = "UDP"; } - lf_print("RTI using %s port %d for federation %s.", type, port, rti_remote->federation_id); + // lf_print("RTI using %s port %d for federation %s.", type, port, rti_remote->federation_id); //TODO: How to bring federation_id? + + if (netdrv_type == RTI) { + priv->port = port; - if (socket_type == TCP) { - rti_remote->final_port_TCP = port; // Enable listening for socket connections. // The second argument is the maximum number of queued socket requests, // which according to the Mac man page is limited to 128. - listen(socket_descriptor, 128); - } else if (socket_type == UDP) { - rti_remote->final_port_UDP = port; + listen(priv->socket_descriptor, 128); + } else if (netdrv_type == CLOCKSYNC) { + priv->port = port; // No need to listen on the UDP socket } - - return socket_descriptor; } diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index 48efd70c1..b09f14fbe 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -56,7 +56,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** Number of nanoseconds to sleep before retrying a socket read. */ #define SOCKET_READ_RETRY_INTERVAL 1000000 -int netdrv_open(netdrv_t *drv) { +int netdrv_open(netdrv_t *drv) { if (!drv) { return -1; } @@ -83,6 +83,12 @@ int netdrv_write(netdrv_t *drv, void * buffer, int size) { return drv->write(drv, buffer, size); } +// void *netdrv_get_privdrv(netdrv_t *drv) { +// if (!drv) { +// return -1; +// } +// return drv->get_priv(drv); +// } int create_real_time_tcp_socket_errexit() { int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index 750e7bcab..8f60945f2 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -15,13 +15,37 @@ */ #define UDP_TIMEOUT_TIME SEC(1) +/** + * Default starting port number for the RTI and federates' socket server. + * Unless a specific port has been specified by the LF program in the "at" + * for the RTI, when the federates start up, they will attempt + * to open a socket server + * on this port, and, if this fails, increment the port number and + * try again. The number of increments is limited by PORT_RANGE_LIMIT. + * FIXME: Clarify what happens if a specific port has been given in "at". + */ +#define STARTING_PORT 15045u + +/** + * Number of ports to try to connect to. Unless the LF program specifies + * a specific port number to use, the RTI or federates will attempt to start + * a socket server on port STARTING_PORT. If that port is not available (e.g., + * another RTI is running or has recently exited), then it will try the + * next port, STARTING_PORT+1, and keep incrementing the port number up to this + * limit. If no port between STARTING_PORT and STARTING_PORT + PORT_RANGE_LIMIT + * is available, then the RTI or the federate will fail to start. This number, therefore, + * limits the number of RTIs and federates that can be simultaneously + * running on any given machine without assigning specific port numbers. + */ +#define PORT_RANGE_LIMIT 1024 + typedef struct socket_priv_t { - int sock; - int proto; int port; - int user_specified_port; + int socket_descriptor; + int proto; + uint16_t user_specified_port; } socket_priv_t; -netdrv_t * socket_init(int protocol); +netdrv_t * netdrv_init(); #endif // LF_SOCKET_SUPPORT_H diff --git a/include/core/federated/network/net_common.h b/include/core/federated/network/net_common.h index 38001cc0b..c9b860bda 100644 --- a/include/core/federated/network/net_common.h +++ b/include/core/federated/network/net_common.h @@ -196,12 +196,14 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef NET_COMMON_H #define NET_COMMON_H +//TODO: Copied at lf_socket_support.h. Erase after finished. /** * The timeout time in ns for TCP operations. * Default value is 10 secs. */ #define TCP_TIMEOUT_TIME SEC(10) +//TODO: Copied at lf_socket_support.h. Erase after finished. /** * The timeout time in ns for UDP operations. * Default value is 1 sec. @@ -246,6 +248,8 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define PORT_KNOCKING_RETRY_INTERVAL 10000LL + +//TODO: Copied at lf_socket_support.h. Erase after finished. /** * Default starting port number for the RTI and federates' socket server. * Unless a specific port has been specified by the LF program in the "at" @@ -257,6 +261,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define STARTING_PORT 15045u +//TODO: Copied at lf_socket_support.h. Erase after finished. /** * Number of ports to try to connect to. Unless the LF program specifies * a specific port number to use, the RTI or federates will attempt to start diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 28b4842be..0599b776c 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -62,17 +62,24 @@ int host_is_big_endian(void); #ifdef FEDERATED +typedef enum netdrv_type_t { + RTI, + CLOCKSYNC +} netdrv_type_t; + typedef struct netdrv_t { int ( *open)(struct netdrv_t *drv); void (*close)(struct netdrv_t *drv); int ( *read)(struct netdrv_t *drv, void * buffer, int size); int (*write)(struct netdrv_t *drv, void * buffer, int size); + // void * (*get_priv)(struct netdrv_t *drv); } netdrv_t; int netdrv_open(netdrv_t *drv); void netdrv_close(netdrv_t *drv); int netdrv_read(netdrv_t *drv, void * buffer, int size); int netdrv_write(netdrv_t *drv, void * buffer, int size); +// void * netdrv_get_privdrv(netdrv_t *drv); /** * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled From c86df278da8cf9a885dbb8464820353d39d6f324 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Tue, 16 Jan 2024 16:05:27 -0700 Subject: [PATCH 013/262] Add backbone of wait_for federates --- core/federated/RTI/main.c | 1 + core/federated/RTI/rti_remote.c | 32 ++++++++++++ core/federated/RTI/rti_remote.h | 3 ++ core/federated/network/lf_socket_support.c | 59 +++++++++++++++++++++- core/federated/network/net_util.c | 47 ++++++++--------- 5 files changed, 118 insertions(+), 24 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index 724c53a5f..2ce3d255c 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -290,6 +290,7 @@ int main(int argc, const char* argv[]) { _lf_initialize_clock(); start_net_rti_server(); + net_wait_for_federates(rti.rti_netdrv); //TODO: Let's leave this user_specified_port yet. diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index df09c21d7..63f4c1ce7 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1581,6 +1581,38 @@ int32_t start_rti_server(uint16_t port) { return rti_remote->socket_descriptor_TCP; } +void net_connect_to_federates(netdrv_t *netdrv) { +} + +void net_wait_for_federates(netdrv_t *netdrv) { + // Wait for connections from federates and create a thread for each. + net_connect_to_federates(netdrv); + + // All federates have connected. + lf_print("RTI: All expected federates have connected. Starting execution."); + + // The socket server will not continue to accept connections after all the federates + // have joined. + // In case some other federation's federates are trying to join the wrong + // federation, need to respond. Start a separate thread to do that. + lf_thread_t responder_thread; + lf_thread_create(&responder_thread, respond_to_erroneous_connections, NULL); + + // Wait for federate threads to exit. + void* thread_exit_status; + for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { + federate_info_t* fed = GET_FED_INFO(i); + lf_print("RTI: Waiting for thread handling federate %d.", fed->enclave.id); + lf_thread_join(fed->thread_id, &thread_exit_status); + free_in_transit_message_q(fed->in_transit_message_tags); + lf_print("RTI: Federate %d thread exited.", fed->enclave.id); + } + + rti_remote->all_federates_exited = true; + + close_netdrvs(netdrv, rti_remote->clock_netdrv); +} + void wait_for_federates(int socket_descriptor) { // Wait for connections from federates and create a thread for each. connect_to_federates(socket_descriptor); diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 426247d17..3577b0b31 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -487,6 +487,9 @@ void start_net_rti_server(); */ int32_t start_rti_server(uint16_t port); +//TODO: Add documentation. +void net_wait_for_federates(netdrv_t *netdrv); + /** * Start the runtime infrastructure (RTI) interaction with the federates * and wait for the federates to exit. diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index dfb6d5c34..efccbd80b 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -10,6 +10,8 @@ #include #include #include +#include // IPPROTO_TCP, IPPROTO_UDP +#include // TCP_NODELAY #include "util.h" // #include "net_util.h" @@ -86,7 +88,10 @@ netdrv_t *netdrv_init() { } memset(drv, 0, sizeof(netdrv_t)); - socket_priv_t *priv = get_priv(drv); // drv+1 return. + socket_priv_t *priv = get_priv(drv); + priv->port = 0; + priv->socket_descriptor = 0; + priv->user_specified_port = 0; drv->open = socket_open; // drv->close = socket_close; @@ -216,3 +221,55 @@ void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type) { // No need to listen on the UDP socket } } + +int create_real_time_tcp_socket_errexit() { + int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (sock < 0) { + lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); + } + // Disable Nagle's algorithm which bundles together small TCP messages to + // reduce network traffic + // TODO: Re-consider if we should do this, and whether disabling delayed ACKs + // is enough. + int flag = 1; + int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } + + // Disable delayed ACKs. Only possible on Linux + #if defined(PLATFORM_Linux) + result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } + #endif + + return sock; +} + +void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { + socket_priv_t *rti_priv = get_priv(rti_netdrv); + socket_priv_t *clock_priv = get_priv(clock_netdrv); + // Shutdown and close the socket so that the accept() call in + // respond_to_erroneous_connections returns. That thread should then + // check rti->all_federates_exited and it should exit. + if (shutdown(rti_priv->socket_descriptor, SHUT_RDWR)) { + LF_PRINT_LOG("On shut down TCP socket, received reply: %s", strerror(errno)); + } + // NOTE: In all common TCP/IP stacks, there is a time period, + // typically between 30 and 120 seconds, called the TIME_WAIT period, + // before the port is released after this close. This is because + // the OS is preventing another program from accidentally receiving + // duplicated packets intended for this program. + close(rti_priv->socket_descriptor); + + if (clock_priv->socket_descriptor > 0) { + if (shutdown(clock_priv->socket_descriptor, SHUT_RDWR)) { + LF_PRINT_LOG("On shut down UDP socket, received reply: %s", strerror(errno)); + } + close(clock_priv->socket_descriptor); + } +} \ No newline at end of file diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index b09f14fbe..b7fed08b4 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -90,33 +90,34 @@ int netdrv_write(netdrv_t *drv, void * buffer, int size) { // return drv->get_priv(drv); // } -int create_real_time_tcp_socket_errexit() { - int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (sock < 0) { - lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); - } - // Disable Nagle's algorithm which bundles together small TCP messages to - // reduce network traffic - // TODO: Re-consider if we should do this, and whether disabling delayed ACKs - // is enough. - int flag = 1; - int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); +// // TODO: Need to erase. Moved to lf_socket_support.c +// int create_real_time_tcp_socket_errexit() { +// int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); +// if (sock < 0) { +// lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); +// } +// // Disable Nagle's algorithm which bundles together small TCP messages to +// // reduce network traffic +// // TODO: Re-consider if we should do this, and whether disabling delayed ACKs +// // is enough. +// int flag = 1; +// int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } +// if (result < 0) { +// lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); +// } - // Disable delayed ACKs. Only possible on Linux - #if defined(PLATFORM_Linux) - result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); +// // Disable delayed ACKs. Only possible on Linux +// #if defined(PLATFORM_Linux) +// result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } - #endif +// if (result < 0) { +// lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); +// } +// #endif - return sock; -} +// return sock; +// } ssize_t read_from_socket_errexit( int socket, From 6ae241ed361b447485604ea4077cc4eb7bfd1692 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Tue, 16 Jan 2024 16:32:42 -0700 Subject: [PATCH 014/262] Add federate netdrivers --- core/federated/RTI/rti_remote.c | 79 +++++++++++++++++++++++++++++++-- core/federated/RTI/rti_remote.h | 3 ++ 2 files changed, 79 insertions(+), 3 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 63f4c1ce7..0ad758bc9 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1445,6 +1445,80 @@ bool authenticate_federate(int socket) { } #endif + +void net_connect_to_federates(netdrv_t *netdrv) { + for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { + // Wait for an incoming connection request. + struct sockaddr client_fd; + uint32_t client_length = sizeof(client_fd); + // The following blocks until a federate connects. + int socket_id = -1; + while(1) { + socket_id = accept(rti_remote->socket_descriptor_TCP, &client_fd, &client_length); + if (socket_id >= 0) { + // Got a socket + break; + } else if (socket_id < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { + lf_print_error_and_exit("RTI failed to accept the socket. %s.", strerror(errno)); + } else { + // Try again + lf_print_warning("RTI failed to accept the socket. %s. Trying again.", strerror(errno)); + continue; + } + } + + // Wait for the first message from the federate when RTI -a option is on. + #ifdef __RTI_AUTH__ + if (rti_remote->authentication_enabled) { + if (!authenticate_federate(socket_id)) { + lf_print_warning("RTI failed to authenticate the incoming federate."); + // Ignore the federate that failed authentication. + i--; + continue; + } + } + #endif + + // The first message from the federate should contain its ID and the federation ID. + int32_t fed_id = receive_and_check_fed_id_message(socket_id, (struct sockaddr_in*)&client_fd); + if (fed_id >= 0 + && receive_connection_information(socket_id, (uint16_t)fed_id) + && receive_udp_message_and_set_up_clock_sync(socket_id, (uint16_t)fed_id)) { + + // Create a thread to communicate with the federate. + // This has to be done after clock synchronization is finished + // or that thread may end up attempting to handle incoming clock + // synchronization messages. + federate_info_t *fed = GET_FED_INFO(fed_id); + lf_thread_create(&(fed->thread_id), federate_info_thread_TCP, fed); + + } else { + // Received message was rejected. Try again. + i--; + } + } + // All federates have connected. + LF_PRINT_DEBUG("All federates have connected to RTI."); + + if (rti_remote->clock_sync_global_status >= clock_sync_on) { + // Create the thread that performs periodic PTP clock synchronization sessions + // over the UDP channel, but only if the UDP channel is open and at least one + // federate is performing runtime clock synchronization. + bool clock_sync_enabled = false; + for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { + federate_info_t* fed_info = GET_FED_INFO(i); + if (fed_info->clock_synchronization_enabled) { + clock_sync_enabled = true; + break; + } + } + if (rti_remote->final_port_UDP != UINT16_MAX && clock_sync_enabled) { + lf_thread_create(&rti_remote->clock_thread, clock_synchronization_thread, NULL); + } + } +} + + void connect_to_federates(int socket_descriptor) { for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { // Wait for an incoming connection request. @@ -1553,6 +1627,8 @@ void initialize_federate(federate_info_t* fed, uint16_t id) { strncpy(fed->server_hostname ,"localhost", INET_ADDRSTRLEN); fed->server_ip_addr.s_addr = 0; fed->server_port = -1; + fed->fed_netdrv = netdrv_init(); + fed->clock_netdrv = netdrv_init(); } void start_net_rti_server() { @@ -1581,9 +1657,6 @@ int32_t start_rti_server(uint16_t port) { return rti_remote->socket_descriptor_TCP; } -void net_connect_to_federates(netdrv_t *netdrv) { -} - void net_wait_for_federates(netdrv_t *netdrv) { // Wait for connections from federates and create a thread for each. net_connect_to_federates(netdrv); diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 3577b0b31..1df14f43b 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -72,6 +72,9 @@ typedef struct federate_info_t { // RTI has not been informed of the port number. struct in_addr server_ip_addr; // Information about the IP address of the socket // server of the federate. + + netdrv_t *fed_netdrv; + netdrv_t *clock_netdrv; } federate_info_t; From 9a5d0820baa401b9d5f46b74ae2fef3b6bb66afd Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Wed, 17 Jan 2024 15:14:20 -0700 Subject: [PATCH 015/262] Fixing reads --- core/federated/RTI/rti_remote.c | 151 +++++++++++++++--- core/federated/RTI/rti_remote.h | 1 + core/federated/network/lf_socket_support.c | 135 ++++++++++++---- .../federated/network/lf_socket_support.h | 15 ++ include/core/federated/network/net_util.h | 8 +- 5 files changed, 251 insertions(+), 59 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 0ad758bc9..e58263d70 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1109,6 +1109,131 @@ void send_reject(int socket_id, unsigned char error_code) { close(socket_id); } + +int32_t net_receive_and_check_fed_id_message(netdrv_t *fed_netdrv) { + // Buffer for message ID, federate ID, and federation ID length. + size_t length = 1 + sizeof(uint16_t) + 1; // Message ID, federate ID, length of fedration ID. + unsigned char buffer[length]; + + // Read bytes from the socket. We need 4 bytes. + // FIXME: This should not exit with error but rather should just reject the connection. + netdrv_read(fed_netdrv, length, buffer, "RTI failed to read from accepted socket."); + read_from_socket_errexit(socket_id, length, buffer, "RTI failed to read from accepted socket."); + + uint16_t fed_id = rti_remote->base.number_of_scheduling_nodes; // Initialize to an invalid value. + + // First byte received is the message type. + if (buffer[0] != MSG_TYPE_FED_IDS) { + if(buffer[0] == MSG_TYPE_P2P_SENDING_FED_ID || buffer[0] == MSG_TYPE_P2P_TAGGED_MESSAGE) { + // The federate is trying to connect to a peer, not to the RTI. + // It has connected to the RTI instead. + // FIXME: This should not happen, but apparently has been observed. + // It should not happen because the peers get the port and IP address + // of the peer they want to connect to from the RTI. + // If the connection is a peer-to-peer connection between two + // federates, reject the connection with the WRONG_SERVER error. + send_reject(socket_id, WRONG_SERVER); + } else { + send_reject(socket_id, UNEXPECTED_MESSAGE); + } + if (rti_remote->base.tracing_enabled){ + tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); + } + lf_print_error("RTI expected a MSG_TYPE_FED_IDS message. Got %u (see net_common.h).", buffer[0]); + return -1; + } else { + // Received federate ID. + fed_id = extract_uint16(buffer + 1); + LF_PRINT_DEBUG("RTI received federate ID: %d.", fed_id); + + // Read the federation ID. First read the length, which is one byte. + size_t federation_id_length = (size_t)buffer[sizeof(uint16_t) + 1]; + char federation_id_received[federation_id_length + 1]; // One extra for null terminator. + // Next read the actual federation ID. + // FIXME: This should not exit on error, but rather just reject the connection. + read_from_socket_errexit(socket_id, federation_id_length, + (unsigned char*)federation_id_received, + "RTI failed to read federation id from federate %d.", fed_id); + + // Terminate the string with a null. + federation_id_received[federation_id_length] = 0; + + LF_PRINT_DEBUG("RTI received federation ID: %s.", federation_id_received); + + if (rti_remote->base.tracing_enabled) { + tracepoint_rti_from_federate(rti_remote->base.trace, receive_FED_ID, fed_id, NULL); + } + // Compare the received federation ID to mine. + if (strncmp(rti_remote->federation_id, federation_id_received, federation_id_length) != 0) { + // Federation IDs do not match. Send back a MSG_TYPE_REJECT message. + lf_print_error("WARNING: Federate from another federation %s attempted to connect to RTI in federation %s.\n", + federation_id_received, + rti_remote->federation_id); + if (rti_remote->base.tracing_enabled) { + tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); + } + send_reject(socket_id, FEDERATION_ID_DOES_NOT_MATCH); + return -1; + } else { + if (fed_id >= rti_remote->base.number_of_scheduling_nodes) { + // Federate ID is out of range. + lf_print_error("RTI received federate ID %d, which is out of range.", fed_id); + if (rti_remote->base.tracing_enabled){ + tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); + } + send_reject(socket_id, FEDERATE_ID_OUT_OF_RANGE); + return -1; + } else { + if ((rti_remote->base.scheduling_nodes[fed_id])->state != NOT_CONNECTED) { + + lf_print_error("RTI received duplicate federate ID: %d.", fed_id); + if (rti_remote->base.tracing_enabled) { + tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); + } + send_reject(socket_id, FEDERATE_ID_IN_USE); + return -1; + } + } + } + } + federate_info_t* fed = GET_FED_INFO(fed_id); + // The MSG_TYPE_FED_IDS message has the right federation ID. + // Assign the address information for federate. + // The IP address is stored here as an in_addr struct (in .server_ip_addr) that can be useful + // to create sockets and can be efficiently sent over the network. + // First, convert the sockaddr structure into a sockaddr_in that contains an internet address. + struct sockaddr_in* pV4_addr = client_fd; + // Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server + fed->server_ip_addr = pV4_addr->sin_addr; + +#if LOG_LEVEL >= LOG_LEVEL_DEBUG + // Create the human readable format and copy that into + // the .server_hostname field of the federate. + char str[INET_ADDRSTRLEN]; + inet_ntop( AF_INET, &fed->server_ip_addr, str, INET_ADDRSTRLEN ); + strncpy (fed->server_hostname, str, INET_ADDRSTRLEN); + + LF_PRINT_DEBUG("RTI got address %s from federate %d.", fed->server_hostname, fed_id); +#endif + fed->socket = socket_id; + + // Set the federate's state as pending + // because it is waiting for the start time to be + // sent by the RTI before beginning its execution. + fed->enclave.state = PENDING; + + LF_PRINT_DEBUG("RTI responding with MSG_TYPE_ACK to federate %d.", fed_id); + // Send an MSG_TYPE_ACK message. + unsigned char ack_message = MSG_TYPE_ACK; + if (rti_remote->base.tracing_enabled) { + tracepoint_rti_to_federate(rti_remote->base.trace, send_ACK, fed_id, NULL); + } + write_to_socket_errexit(socket_id, 1, &ack_message, + "RTI failed to write MSG_TYPE_ACK message to federate %d.", fed_id); + + return (int32_t)fed_id; +} + int32_t receive_and_check_fed_id_message(int socket_id, struct sockaddr_in* client_fd) { // Buffer for message ID, federate ID, and federation ID length. size_t length = 1 + sizeof(uint16_t) + 1; // Message ID, federate ID, length of fedration ID. @@ -1446,27 +1571,11 @@ bool authenticate_federate(int socket) { #endif -void net_connect_to_federates(netdrv_t *netdrv) { +void net_connect_to_federates(netdrv_t *rti_netdrv) { for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { - // Wait for an incoming connection request. - struct sockaddr client_fd; - uint32_t client_length = sizeof(client_fd); - // The following blocks until a federate connects. - int socket_id = -1; - while(1) { - socket_id = accept(rti_remote->socket_descriptor_TCP, &client_fd, &client_length); - if (socket_id >= 0) { - // Got a socket - break; - } else if (socket_id < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { - lf_print_error_and_exit("RTI failed to accept the socket. %s.", strerror(errno)); - } else { - // Try again - lf_print_warning("RTI failed to accept the socket. %s. Trying again.", strerror(errno)); - continue; - } - } + netdrv_t *fed_netdrv = accept_connection(rti_netdrv); + int socket_id = -1; // Wait for the first message from the federate when RTI -a option is on. #ifdef __RTI_AUTH__ if (rti_remote->authentication_enabled) { @@ -1478,7 +1587,7 @@ void net_connect_to_federates(netdrv_t *netdrv) { } } #endif - + struct sockaddr_in client_fd; // The first message from the federate should contain its ID and the federation ID. int32_t fed_id = receive_and_check_fed_id_message(socket_id, (struct sockaddr_in*)&client_fd); if (fed_id >= 0 @@ -1627,7 +1736,7 @@ void initialize_federate(federate_info_t* fed, uint16_t id) { strncpy(fed->server_hostname ,"localhost", INET_ADDRSTRLEN); fed->server_ip_addr.s_addr = 0; fed->server_port = -1; - fed->fed_netdrv = netdrv_init(); + // fed->fed_netdrv = netdrv_init(); fed->clock_netdrv = netdrv_init(); } diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 1df14f43b..d52751ca2 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -415,6 +415,7 @@ void* federate_info_thread_TCP(void* fed); */ void send_reject(int socket_id, unsigned char error_code); +int32_t net_receive_and_check_fed_id_message(netdrv_t *fed_netdrv); /** * Listen for a MSG_TYPE_FED_IDS message, which includes as a payload * a federate ID and a federation ID. If the federation ID diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index efccbd80b..444f3b9b6 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -5,13 +5,13 @@ #include #include /* IFNAMSIZ */ #include +#include // IPPROTO_TCP, IPPROTO_UDP +#include // TCP_NODELAY #include #include #include #include #include -#include // IPPROTO_TCP, IPPROTO_UDP -#include // TCP_NODELAY #include "util.h" // #include "net_util.h" @@ -59,26 +59,61 @@ static int socket_open(netdrv_t *drv) { // } // } -// static int socket_recv(netdrv_t *drv, void *buffer, int size) { -// if (!drv) -// return -1; -// socket_priv_t *priv = get_priv(drv); -// if (priv->timeout_us > 0) { -// int res = -1; -// do { -// res = recv(priv->sock, buffer, size, MSG_TRUNC); -// } while (res > 0); -// return res; -// } -// return recv(priv->sock, buffer, size, MSG_TRUNC); -// } +static ssize_t socket_recv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer, char* format, ...) { + va_list args; + // Error checking first + if (socket < 0 && format != NULL) { + lf_print_error("Socket is no longer open."); + lf_print_error_and_exit(format, args); + } + ssize_t bytes_read = 0; + while (bytes_read < (ssize_t)num_bytes) { + ssize_t more = read(socket, buffer + bytes_read, num_bytes - (size_t)bytes_read); + if(more <= 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) { + // The error code set by the socket indicates + // that we should try again (@see man errno). + LF_PRINT_DEBUG("Reading from socket was blocked. Will try again."); + continue; + } else if (more <= 0) { + if (format != NULL) { + shutdown(socket, SHUT_RDWR); + close(socket); + lf_print_error("Read %ld bytes, but expected %zu. errno=%d", + more + bytes_read, num_bytes, errno); + lf_print_error_and_exit(format, args); + } else if (more == 0) { + // According to this: https://stackoverflow.com/questions/4160347/close-vs-shutdown-socket, + // upon receiving a zero length packet or an error, we can close the socket. + // If there are any pending outgoing messages, this will attempt to send those + // followed by an EOF. + close(socket); + } + return more; + } + bytes_read += more; + } + return bytes_read; + // if (!drv) { + // return -1; + // } + // socket_priv_t *priv = get_priv(drv); + // if (priv->timeout_us > 0) { + // int res = -1; + // do { + // res = recv(priv->sock, buffer, size, MSG_TRUNC); + // } while (res > 0); + // return res; + // } + // return recv(priv->sock, buffer, size, MSG_TRUNC); +} -// static int socket_send(netdrv_t *drv, void *buffer, int size) { -// if (!drv) -// return -1; -// socket_priv_t *priv = get_priv(drv); -// return send(priv->sock, buffer, size, MSG_DONTWAIT); -// } +static ssize_t socket_send(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { + if (!drv) { + return -1; + } + socket_priv_t *priv = get_priv(drv); + return send(priv->sock, buffer, size, MSG_DONTWAIT); +} netdrv_t *netdrv_init() { // TODO: Should it be malloc? To support different network stacks operate simulatneously? @@ -95,8 +130,8 @@ netdrv_t *netdrv_init() { drv->open = socket_open; // drv->close = socket_close; - // drv->read = socket_recv; - // drv->write = socket_send; + drv->read = socket_recv; + drv->write = socket_send; // drv->get_priv = get_priv; return drv; } @@ -233,20 +268,20 @@ int create_real_time_tcp_socket_errexit() { // is enough. int flag = 1; int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); - + if (result < 0) { lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); } - - // Disable delayed ACKs. Only possible on Linux - #if defined(PLATFORM_Linux) - result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } - #endif - + +// Disable delayed ACKs. Only possible on Linux +#if defined(PLATFORM_Linux) + result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } +#endif + return sock; } @@ -272,4 +307,36 @@ void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { } close(clock_priv->socket_descriptor); } +} + +netdrv_t *accept_connection(netdrv_t *rti_netdrv) { + netdrv_t *fed_netdrv = netdrv_init(); + socket_priv_t *rti_priv = get_priv(rti_netdrv); + socket_priv_t *fed_priv = get_priv(fed_netdrv); + // Wait for an incoming connection request. + struct sockaddr client_fd; + uint32_t client_length = sizeof(client_fd); + // The following blocks until a federate connects. + while (1) { + fed_priv->socket_descriptor = accept(rti_priv->socket_descriptor, &client_fd, &client_length); + if (fed_priv->socket_descriptor >= 0) { + // Got a socket + break; + } else if (fed_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { + lf_print_error_and_exit("RTI failed to accept the socket. %s.", strerror(errno)); + } else { + // Try again + lf_print_warning("RTI failed to accept the socket. %s. Trying again.", strerror(errno)); + continue; + } + } + // The MSG_TYPE_FED_IDS message has the right federation ID. + // Assign the address information for federate. + // The IP address is stored here as an in_addr struct (in .server_ip_addr) that can be useful + // to create sockets and can be efficiently sent over the network. + // First, convert the sockaddr structure into a sockaddr_in that contains an internet address. + struct sockaddr_in *pV4_addr = (struct sockaddr_in *)&client_fd; + // Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server + fed_priv->server_ip_addr = pV4_addr->sin_addr; + return fed_netdrv; } \ No newline at end of file diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index 8f60945f2..8db3ef459 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -1,6 +1,9 @@ #ifndef LF_SOCKET_SUPPORT_H #define LF_SOCKET_SUPPORT_H +#include // IPPROTO_TCP, IPPROTO_UDP +#include // TCP_NODELAY + #include "net_util.h" /** @@ -44,8 +47,20 @@ typedef struct socket_priv_t { int socket_descriptor; int proto; uint16_t user_specified_port; + + char server_hostname[INET_ADDRSTRLEN]; // Human-readable IP address and + int32_t server_port; // port number of the socket server of the federate + // if it has any incoming direct connections from other federates. + // The port number will be -1 if there is no server or if the + // RTI has not been informed of the port number. + struct in_addr server_ip_addr; // Information about the IP address of the socket + // server of the federate. } socket_priv_t; netdrv_t * netdrv_init(); +void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type); +int create_real_time_tcp_socket_errexit(); +void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv); +netdrv_t *accept_connection(netdrv_t * rti_netdrv); #endif // LF_SOCKET_SUPPORT_H diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 0599b776c..fd05075c6 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -70,15 +70,15 @@ typedef enum netdrv_type_t { typedef struct netdrv_t { int ( *open)(struct netdrv_t *drv); void (*close)(struct netdrv_t *drv); - int ( *read)(struct netdrv_t *drv, void * buffer, int size); - int (*write)(struct netdrv_t *drv, void * buffer, int size); + int ( *read)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); + int (*write)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); // void * (*get_priv)(struct netdrv_t *drv); } netdrv_t; int netdrv_open(netdrv_t *drv); void netdrv_close(netdrv_t *drv); -int netdrv_read(netdrv_t *drv, void * buffer, int size); -int netdrv_write(netdrv_t *drv, void * buffer, int size); +int netdrv_read(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); +int netdrv_write(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); // void * netdrv_get_privdrv(netdrv_t *drv); /** From c5abe68a6ebfd59bfed3c339fc41146b8aae9944 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 18 Jan 2024 11:42:16 -0700 Subject: [PATCH 016/262] Finish merge --- core/federated/RTI/main.c | 1 - core/federated/RTI/rti_remote.c | 98 ++++++++++++------- core/federated/network/lf_socket_support.c | 78 +++++++++------ .../federated/network/lf_socket_support.h | 57 +++++++---- include/core/federated/network/net_common.h | 2 + 5 files changed, 150 insertions(+), 86 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index c68a7f100..a8af21781 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -332,7 +332,6 @@ int main(int argc, const char* argv[]) { initialize_federate(fed_info, i); rti.base.scheduling_nodes[i] = (scheduling_node_t *) fed_info; } - _lf_initialize_clock(); start_net_rti_server(); net_wait_for_federates(rti.rti_netdrv); diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 0938ec3d2..d72f3ebad 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1228,23 +1228,32 @@ void send_reject(int *socket_id, unsigned char error_code) { *socket_id = -1; LF_MUTEX_UNLOCK(rti_mutex); } - - -int32_t net_receive_and_check_fed_id_message(netdrv_t *fed_netdrv) { + +/** + * Listen for a MSG_TYPE_FED_IDS message, which includes as a payload + * a federate ID and a federation ID. If the federation ID + * matches this federation, send an MSG_TYPE_ACK and otherwise send + * a MSG_TYPE_REJECT message. + * @param socket_id Pointer to the socket on which to listen. + * @param client_fd The socket address. + * @return The federate ID for success or -1 for failure. + */ +static int32_t net_receive_and_check_fed_id_message(netdrv_t *fed_netdrv) { // Buffer for message ID, federate ID, and federation ID length. size_t length = 1 + sizeof(uint16_t) + 1; // Message ID, federate ID, length of fedration ID. unsigned char buffer[length]; - +netdrv_read(fed_netdrv, length, buffer, "RTI failed to read from accepted socket."); // Read bytes from the socket. We need 4 bytes. - // FIXME: This should not exit with error but rather should just reject the connection. - netdrv_read(fed_netdrv, length, buffer, "RTI failed to read from accepted socket."); - read_from_socket_errexit(socket_id, length, buffer, "RTI failed to read from accepted socket."); + if (read_from_socket_close_on_error(socket_id, length, buffer)) { + lf_print_error("RTI failed to read from accepted socket."); + return -1; + } uint16_t fed_id = rti_remote->base.number_of_scheduling_nodes; // Initialize to an invalid value. // First byte received is the message type. if (buffer[0] != MSG_TYPE_FED_IDS) { - if(buffer[0] == MSG_TYPE_P2P_SENDING_FED_ID || buffer[0] == MSG_TYPE_P2P_TAGGED_MESSAGE) { + if (buffer[0] == MSG_TYPE_P2P_SENDING_FED_ID || buffer[0] == MSG_TYPE_P2P_TAGGED_MESSAGE) { // The federate is trying to connect to a peer, not to the RTI. // It has connected to the RTI instead. // FIXME: This should not happen, but apparently has been observed. @@ -1256,7 +1265,7 @@ int32_t net_receive_and_check_fed_id_message(netdrv_t *fed_netdrv) { } else { send_reject(socket_id, UNEXPECTED_MESSAGE); } - if (rti_remote->base.tracing_enabled){ + if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); } lf_print_error("RTI expected a MSG_TYPE_FED_IDS message. Got %u (see net_common.h).", buffer[0]); @@ -1270,10 +1279,11 @@ int32_t net_receive_and_check_fed_id_message(netdrv_t *fed_netdrv) { size_t federation_id_length = (size_t)buffer[sizeof(uint16_t) + 1]; char federation_id_received[federation_id_length + 1]; // One extra for null terminator. // Next read the actual federation ID. - // FIXME: This should not exit on error, but rather just reject the connection. - read_from_socket_errexit(socket_id, federation_id_length, - (unsigned char*)federation_id_received, - "RTI failed to read federation id from federate %d.", fed_id); + if (read_from_socket_close_on_error(socket_id, federation_id_length, + (unsigned char *)federation_id_received)) { + lf_print_error("RTI failed to read federation id from federate %d.", fed_id); + return -1; + } // Terminate the string with a null. federation_id_received[federation_id_length] = 0; @@ -1286,11 +1296,11 @@ int32_t net_receive_and_check_fed_id_message(netdrv_t *fed_netdrv) { // Compare the received federation ID to mine. if (strncmp(rti_remote->federation_id, federation_id_received, federation_id_length) != 0) { // Federation IDs do not match. Send back a MSG_TYPE_REJECT message. - lf_print_error("WARNING: Federate from another federation %s attempted to connect to RTI in federation %s.\n", + lf_print_warning("Federate from another federation %s attempted to connect to RTI in federation %s.", federation_id_received, rti_remote->federation_id); if (rti_remote->base.tracing_enabled) { - tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); + tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); } send_reject(socket_id, FEDERATION_ID_DOES_NOT_MATCH); return -1; @@ -1298,14 +1308,13 @@ int32_t net_receive_and_check_fed_id_message(netdrv_t *fed_netdrv) { if (fed_id >= rti_remote->base.number_of_scheduling_nodes) { // Federate ID is out of range. lf_print_error("RTI received federate ID %d, which is out of range.", fed_id); - if (rti_remote->base.tracing_enabled){ + if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); } send_reject(socket_id, FEDERATE_ID_OUT_OF_RANGE); return -1; } else { if ((rti_remote->base.scheduling_nodes[fed_id])->state != NOT_CONNECTED) { - lf_print_error("RTI received duplicate federate ID: %d.", fed_id); if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); @@ -1316,26 +1325,26 @@ int32_t net_receive_and_check_fed_id_message(netdrv_t *fed_netdrv) { } } } - federate_info_t* fed = GET_FED_INFO(fed_id); + federate_info_t *fed = GET_FED_INFO(fed_id); // The MSG_TYPE_FED_IDS message has the right federation ID. // Assign the address information for federate. // The IP address is stored here as an in_addr struct (in .server_ip_addr) that can be useful // to create sockets and can be efficiently sent over the network. // First, convert the sockaddr structure into a sockaddr_in that contains an internet address. - struct sockaddr_in* pV4_addr = client_fd; + struct sockaddr_in *pV4_addr = client_fd; // Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server fed->server_ip_addr = pV4_addr->sin_addr; #if LOG_LEVEL >= LOG_LEVEL_DEBUG // Create the human readable format and copy that into // the .server_hostname field of the federate. - char str[INET_ADDRSTRLEN]; - inet_ntop( AF_INET, &fed->server_ip_addr, str, INET_ADDRSTRLEN ); - strncpy (fed->server_hostname, str, INET_ADDRSTRLEN); + char str[INET_ADDRSTRLEN + 1]; + inet_ntop(AF_INET, &fed->server_ip_addr, str, INET_ADDRSTRLEN); + strncpy(fed->server_hostname, str, INET_ADDRSTRLEN); LF_PRINT_DEBUG("RTI got address %s from federate %d.", fed->server_hostname, fed_id); #endif - fed->socket = socket_id; + fed->socket = *socket_id; // Set the federate's state as pending // because it is waiting for the start time to be @@ -1348,8 +1357,15 @@ int32_t net_receive_and_check_fed_id_message(netdrv_t *fed_netdrv) { if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_ACK, fed_id, NULL); } - write_to_socket_errexit(socket_id, 1, &ack_message, - "RTI failed to write MSG_TYPE_ACK message to federate %d.", fed_id); + LF_MUTEX_LOCK(rti_mutex); + if (write_to_socket_close_on_error(&fed->socket, 1, &ack_message)) { + LF_MUTEX_UNLOCK(rti_mutex); + lf_print_error("RTI failed to write MSG_TYPE_ACK message to federate %d.", fed_id); + return -1; + } + LF_MUTEX_UNLOCK(rti_mutex); + + LF_PRINT_DEBUG("RTI sent MSG_TYPE_ACK to federate %d.", fed_id); return (int32_t)fed_id; } @@ -1749,24 +1765,29 @@ void net_lf_connect_to_federates(netdrv_t *rti_netdrv) { for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { netdrv_t *fed_netdrv = accept_connection(rti_netdrv); - int socket_id = -1; - // Wait for the first message from the federate when RTI -a option is on. - #ifdef __RTI_AUTH__ + int *socket_id; //TODO: erase + +// Wait for the first message from the federate when RTI -a option is on. +#ifdef __RTI_AUTH__ if (rti_remote->authentication_enabled) { - if (!authenticate_federate(socket_id)) { + if (!authenticate_federate(&socket_id)) { lf_print_warning("RTI failed to authenticate the incoming federate."); + // Close the socket. + shutdown(socket_id, SHUT_RDWR); + close(socket_id); + socket_id = -1; // Ignore the federate that failed authentication. i--; continue; } } - #endif - struct sockaddr_in client_fd; +#endif + // The first message from the federate should contain its ID and the federation ID. - int32_t fed_id = receive_and_check_fed_id_message(socket_id, (struct sockaddr_in*)&client_fd); - if (fed_id >= 0 - && receive_connection_information(socket_id, (uint16_t)fed_id) - && receive_udp_message_and_set_up_clock_sync(socket_id, (uint16_t)fed_id)) { + int32_t fed_id = receive_and_check_fed_id_message(&socket_id, (struct sockaddr_in *)&client_fd); + if (fed_id >= 0 && socket_id >= 0 + && receive_connection_information(&socket_id, (uint16_t)fed_id) + && receive_udp_message_and_set_up_clock_sync(&socket_id, (uint16_t)fed_id)) { // Create a thread to communicate with the federate. // This has to be done after clock synchronization is finished @@ -1774,7 +1795,6 @@ void net_lf_connect_to_federates(netdrv_t *rti_netdrv) { // synchronization messages. federate_info_t *fed = GET_FED_INFO(fed_id); lf_thread_create(&(fed->thread_id), federate_info_thread_TCP, fed); - } else { // Received message was rejected. Try again. i--; @@ -1789,7 +1809,7 @@ void net_lf_connect_to_federates(netdrv_t *rti_netdrv) { // federate is performing runtime clock synchronization. bool clock_sync_enabled = false; for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { - federate_info_t* fed_info = GET_FED_INFO(i); + federate_info_t *fed_info = GET_FED_INFO(i); if (fed_info->clock_synchronization_enabled) { clock_sync_enabled = true; break; @@ -1919,8 +1939,10 @@ void initialize_federate(federate_info_t *fed, uint16_t id) { } void start_net_rti_server() { + _lf_initialize_clock(); // Create the RTI's netdriver. create_net_server(rti_remote->rti_netdrv, RTI); + lf_print("RTI: Listening for federates."); // Create the clocksync's netdriver. if (rti_remote->clock_sync_global_status >= clock_sync_on) { create_net_server(rti_remote->clock_netdrv, CLOCKSYNC); @@ -1942,7 +1964,7 @@ int32_t start_rti_server(uint16_t port) { void net_wait_for_federates(netdrv_t *netdrv) { // Wait for connections from federates and create a thread for each. - net_connect_to_federates(netdrv); + net_lf_connect_to_federates(netdrv); // All federates have connected. lf_print("RTI: All expected federates have connected. Starting execution."); diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 444f3b9b6..e5a1b564d 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -138,15 +138,12 @@ netdrv_t *netdrv_init() { void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type) { socket_priv_t *priv = get_priv(drv); - int port = 0; // TODO: Need to bring specified port. - priv->user_specified_port = port; // This is the user specified port. - int32_t specified_port = port; - if (port == 0) { - // Use the default starting port. - port = STARTING_PORT; - } + // Timeout time for the communications of the server - struct timeval timeout_time = {.tv_sec = TCP_TIMEOUT_TIME / BILLION, .tv_usec = (TCP_TIMEOUT_TIME % BILLION) / 1000}; + struct timeval timeout_time = { + .tv_sec = TCP_TIMEOUT_TIME / BILLION, + .tv_usec = (TCP_TIMEOUT_TIME % BILLION) / 1000 + }; // Create an IPv4 socket for TCP (not UDP) communication over IP (0). priv->socket_descriptor = -1; if (netdrv_type == RTI) { @@ -154,22 +151,40 @@ void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type) { } else if (netdrv_type == CLOCKSYNC) { priv->socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); // Set the appropriate timeout time - timeout_time = (struct timeval){.tv_sec = UDP_TIMEOUT_TIME / BILLION, .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000}; + timeout_time = (struct timeval){ + .tv_sec = UDP_TIMEOUT_TIME / BILLION, + .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000 + }; } if (priv->socket_descriptor < 0) { lf_print_error_and_exit("Failed to create RTI socket."); } // Set the option for this socket to reuse the same address - int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option - if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_REUSEADDR, &true_variable, sizeof(int32_t)) < 0) { + int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option + if (setsockopt( + priv->socket_descriptor, + SOL_SOCKET, + SO_REUSEADDR, + &true_variable, + sizeof(int32_t)) < 0) { lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno)); } // Set the timeout on the socket so that read and write operations don't block for too long - if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_RCVTIMEO, (const char *)&timeout_time, sizeof(timeout_time)) < 0) { + if (setsockopt( + priv->socket_descriptor, + SOL_SOCKET, + SO_RCVTIMEO, + (const char *)&timeout_time, + sizeof(timeout_time)) < 0) { lf_print_error("RTI failed to set SO_RCVTIMEO option on the socket: %s.", strerror(errno)); } - if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_SNDTIMEO, (const char *)&timeout_time, sizeof(timeout_time)) < 0) { + if (setsockopt( + priv->socket_descriptor, + SOL_SOCKET, + SO_SNDTIMEO, + (const char *)&timeout_time, + sizeof(timeout_time)) < 0) { lf_print_error("RTI failed to set SO_SNDTIMEO option on the socket: %s.", strerror(errno)); } @@ -206,6 +221,10 @@ void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type) { // Zero out the server address structure. bzero((char *)&server_fd, sizeof(server_fd)); + uint16_t port = 0; //TODO: Need to bring specified port. Not working currently. + uint16_t specified_port = port; + if (specified_port == 0) port = DEFAULT_PORT; + server_fd.sin_family = AF_INET; // IPv4 server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. // Convert the port number from host byte order to network byte order. @@ -216,27 +235,29 @@ void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type) { (struct sockaddr *)&server_fd, sizeof(server_fd)); - // If the binding fails with this port and no particular port was specified - // in the LF program, then try the next few ports in sequence. - while (result != 0 && specified_port == 0 && port >= STARTING_PORT && port <= STARTING_PORT + PORT_RANGE_LIMIT) { - lf_print("RTI failed to get port %d. Trying %d.", port, port + 1); - port++; - server_fd.sin_port = htons(port); + // Try repeatedly to bind to a port. If no specific port is specified, then + // increment the port number each time. + + int count = 1; + while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { + if (specified_port == 0) { + lf_print_warning("RTI failed to get port %d.", port); + port++; + if (port >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) port = DEFAULT_PORT; + lf_print_warning("RTI will try again with port %d.", port); + server_fd.sin_port = htons(port); + // Do not sleep. + } else { + lf_print("RTI failed to get port %d. Will try again.", port); + lf_sleep(PORT_BIND_RETRY_INTERVAL); + } result = bind( priv->socket_descriptor, (struct sockaddr *)&server_fd, sizeof(server_fd)); } if (result != 0) { - if (specified_port == 0) { - lf_print_error_and_exit( - "Failed to bind the RTI socket. Cannot find a usable port. " - "Consider increasing PORT_RANGE_LIMIT in net_common.h."); - } else { - lf_print_error_and_exit( - "Failed to bind the RTI socket. Specified port is not available. " - "Consider leaving the port unspecified"); - } + lf_print_error_and_exit("Failed to bind the RTI socket. Port %d is not available. ", port); } char *type = "TCP"; if (netdrv_type == CLOCKSYNC) { @@ -330,7 +351,6 @@ netdrv_t *accept_connection(netdrv_t *rti_netdrv) { continue; } } - // The MSG_TYPE_FED_IDS message has the right federation ID. // Assign the address information for federate. // The IP address is stored here as an in_addr struct (in .server_ip_addr) that can be useful // to create sockets and can be efficiently sent over the network. diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index 8db3ef459..dd9f8f6c4 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -19,28 +19,33 @@ #define UDP_TIMEOUT_TIME SEC(1) /** - * Default starting port number for the RTI and federates' socket server. - * Unless a specific port has been specified by the LF program in the "at" - * for the RTI, when the federates start up, they will attempt - * to open a socket server - * on this port, and, if this fails, increment the port number and - * try again. The number of increments is limited by PORT_RANGE_LIMIT. - * FIXME: Clarify what happens if a specific port has been given in "at". + * Maximum number of port addresses that a federate will try to connect to the RTI on. + * If you are using automatic ports begining at DEFAULT_PORT, this puts an upper bound + * on the number of RTIs that can be running on the same host. + */ +#define MAX_NUM_PORT_ADDRESSES 16 + +/** + * Time to wait before re-attempting to bind to a port. + * When a process closes, the network stack typically waits between 30 and 120 + * seconds before releasing the port. This is to allow for delayed packets so + * that a new process does not receive packets from a previous process. + * Here, we limit the retries to 60 seconds. */ -#define STARTING_PORT 15045u +#define PORT_BIND_RETRY_INTERVAL SEC(1) /** - * Number of ports to try to connect to. Unless the LF program specifies - * a specific port number to use, the RTI or federates will attempt to start - * a socket server on port STARTING_PORT. If that port is not available (e.g., - * another RTI is running or has recently exited), then it will try the - * next port, STARTING_PORT+1, and keep incrementing the port number up to this - * limit. If no port between STARTING_PORT and STARTING_PORT + PORT_RANGE_LIMIT - * is available, then the RTI or the federate will fail to start. This number, therefore, - * limits the number of RTIs and federates that can be simultaneously - * running on any given machine without assigning specific port numbers. + * Number of attempts to bind to a port before giving up. */ -#define PORT_RANGE_LIMIT 1024 +#define PORT_BIND_RETRY_LIMIT 60 + +/** + * Default port number for the RTI. + * Unless a specific port has been specified by the LF program in the "at" + * for the RTI or on the command line, when the RTI starts up, it will attempt + * to open a socket server on this port. + */ +#define DEFAULT_PORT 15045u typedef struct socket_priv_t { int port; @@ -58,6 +63,22 @@ typedef struct socket_priv_t { } socket_priv_t; netdrv_t * netdrv_init(); + +/** + * Create a server and enable listening for socket connections. + * If the specified port if it is non-zero, it will attempt to acquire that port. + * If it fails, it will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times with + * a delay of PORT_BIND_RETRY_INTERVAL in between. If the specified port is + * zero, then it will attempt to acquire DEFAULT_PORT first. If this fails, then it + * will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times, incrementing the port + * number between attempts, with no delay between attempts. Once it has incremented + * the port number MAX_NUM_PORT_ADDRESSES times, it will cycle around and begin again + * with DEFAULT_PORT. + * + * @param port The port number to use or 0 to start trying at DEFAULT_PORT. + * @param socket_type The type of the socket for the server (TCP or UDP). + * @return The socket descriptor on which to accept connections. + */ void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type); int create_real_time_tcp_socket_errexit(); void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv); diff --git a/include/core/federated/network/net_common.h b/include/core/federated/network/net_common.h index 86c276395..85663ed80 100644 --- a/include/core/federated/network/net_common.h +++ b/include/core/federated/network/net_common.h @@ -212,6 +212,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define CONNECT_MAX_RETRIES 100 +//TODO: Copied at lf_socket_support.h. Erase after finished. /** * Maximum number of port addresses that a federate will try to connect to the RTI on. * If you are using automatic ports begining at DEFAULT_PORT, this puts an upper bound @@ -227,6 +228,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define ADDRESS_QUERY_RETRY_INTERVAL MSEC(250) +//TODO: Copied at lf_socket_support.h. Erase after finished. /** * Time to wait before re-attempting to bind to a port. * When a process closes, the network stack typically waits between 30 and 120 From 9ceb81783b9a8d967dcdb29eafc28f1112f2ede7 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 18 Jan 2024 15:56:51 -0700 Subject: [PATCH 017/262] Fix read/write/send_reject functions & receive_and_check_fed_id_message() --- core/federated/RTI/rti_remote.c | 70 +++-- core/federated/network/lf_socket_support.c | 246 +++++++++++++----- .../federated/network/lf_socket_support.h | 111 +++++++- include/core/federated/network/net_util.h | 40 ++- 4 files changed, 365 insertions(+), 102 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index d72f3ebad..2b8cf6b71 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1212,6 +1212,21 @@ void *federate_info_thread_TCP(void *fed) { return NULL; } +void net_send_reject(netdrv_t *netdrv, unsigned char error_code) { + LF_PRINT_DEBUG("RTI sending MSG_TYPE_REJECT."); + unsigned char response[2]; + response[0] = MSG_TYPE_REJECT; + response[1] = error_code; + LF_MUTEX_LOCK(rti_mutex); + // NOTE: Ignore errors on this response. + if (write_to_netdrv(netdrv, 2, response)) { + lf_print_warning("RTI failed to write MSG_TYPE_REJECT message on the socket."); + } + // Close the netdrv. + netdrv->close(netdrv); + LF_MUTEX_UNLOCK(rti_mutex); +} + void send_reject(int *socket_id, unsigned char error_code) { LF_PRINT_DEBUG("RTI sending MSG_TYPE_REJECT."); unsigned char response[2]; @@ -1228,7 +1243,7 @@ void send_reject(int *socket_id, unsigned char error_code) { *socket_id = -1; LF_MUTEX_UNLOCK(rti_mutex); } - + /** * Listen for a MSG_TYPE_FED_IDS message, which includes as a payload * a federate ID and a federation ID. If the federation ID @@ -1238,13 +1253,13 @@ void send_reject(int *socket_id, unsigned char error_code) { * @param client_fd The socket address. * @return The federate ID for success or -1 for failure. */ -static int32_t net_receive_and_check_fed_id_message(netdrv_t *fed_netdrv) { +static int32_t net_receive_and_check_fed_id_message(netdrv_t *netdrv) { // Buffer for message ID, federate ID, and federation ID length. size_t length = 1 + sizeof(uint16_t) + 1; // Message ID, federate ID, length of fedration ID. unsigned char buffer[length]; -netdrv_read(fed_netdrv, length, buffer, "RTI failed to read from accepted socket."); // Read bytes from the socket. We need 4 bytes. - if (read_from_socket_close_on_error(socket_id, length, buffer)) { + + if (read_from_netdrv_close_on_error(netdrv, length, buffer)) { lf_print_error("RTI failed to read from accepted socket."); return -1; } @@ -1261,9 +1276,9 @@ netdrv_read(fed_netdrv, length, buffer, "RTI failed to read from accepted socket // of the peer they want to connect to from the RTI. // If the connection is a peer-to-peer connection between two // federates, reject the connection with the WRONG_SERVER error. - send_reject(socket_id, WRONG_SERVER); + net_send_reject(netdrv, WRONG_SERVER); } else { - send_reject(socket_id, UNEXPECTED_MESSAGE); + net_send_reject(netdrv, UNEXPECTED_MESSAGE); } if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); @@ -1279,8 +1294,8 @@ netdrv_read(fed_netdrv, length, buffer, "RTI failed to read from accepted socket size_t federation_id_length = (size_t)buffer[sizeof(uint16_t) + 1]; char federation_id_received[federation_id_length + 1]; // One extra for null terminator. // Next read the actual federation ID. - if (read_from_socket_close_on_error(socket_id, federation_id_length, - (unsigned char *)federation_id_received)) { + if (read_from_netdrv_close_on_error(netdrv, federation_id_length, + (unsigned char *)federation_id_received)) { lf_print_error("RTI failed to read federation id from federate %d.", fed_id); return -1; } @@ -1297,12 +1312,12 @@ netdrv_read(fed_netdrv, length, buffer, "RTI failed to read from accepted socket if (strncmp(rti_remote->federation_id, federation_id_received, federation_id_length) != 0) { // Federation IDs do not match. Send back a MSG_TYPE_REJECT message. lf_print_warning("Federate from another federation %s attempted to connect to RTI in federation %s.", - federation_id_received, - rti_remote->federation_id); + federation_id_received, + rti_remote->federation_id); if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); } - send_reject(socket_id, FEDERATION_ID_DOES_NOT_MATCH); + net_send_reject(netdrv, FEDERATION_ID_DOES_NOT_MATCH); return -1; } else { if (fed_id >= rti_remote->base.number_of_scheduling_nodes) { @@ -1311,7 +1326,7 @@ netdrv_read(fed_netdrv, length, buffer, "RTI failed to read from accepted socket if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); } - send_reject(socket_id, FEDERATE_ID_OUT_OF_RANGE); + net_send_reject(netdrv, FEDERATE_ID_OUT_OF_RANGE); return -1; } else { if ((rti_remote->base.scheduling_nodes[fed_id])->state != NOT_CONNECTED) { @@ -1319,32 +1334,35 @@ netdrv_read(fed_netdrv, length, buffer, "RTI failed to read from accepted socket if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); } - send_reject(socket_id, FEDERATE_ID_IN_USE); + net_send_reject(netdrv, FEDERATE_ID_IN_USE); return -1; } } } } federate_info_t *fed = GET_FED_INFO(fed_id); - // The MSG_TYPE_FED_IDS message has the right federation ID. - // Assign the address information for federate. - // The IP address is stored here as an in_addr struct (in .server_ip_addr) that can be useful - // to create sockets and can be efficiently sent over the network. - // First, convert the sockaddr structure into a sockaddr_in that contains an internet address. - struct sockaddr_in *pV4_addr = client_fd; - // Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server - fed->server_ip_addr = pV4_addr->sin_addr; + fed->fed_netdrv = netdrv; + //TODO: Done the process below in accept_connection(); Erase after fixing the TODO in #if below. + // // The MSG_TYPE_FED_IDS message has the right federation ID. + // // Assign the address information for federate. + // // The IP address is stored here as an in_addr struct (in .server_ip_addr) that can be useful + // // to create sockets and can be efficiently sent over the network. + // // First, convert the sockaddr structure into a sockaddr_in that contains an internet address. + // struct sockaddr_in *pV4_addr = client_fd; + // // Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server + // fed->server_ip_addr = pV4_addr->sin_addr; #if LOG_LEVEL >= LOG_LEVEL_DEBUG // Create the human readable format and copy that into // the .server_hostname field of the federate. char str[INET_ADDRSTRLEN + 1]; - inet_ntop(AF_INET, &fed->server_ip_addr, str, INET_ADDRSTRLEN); - strncpy(fed->server_hostname, str, INET_ADDRSTRLEN); - LF_PRINT_DEBUG("RTI got address %s from federate %d.", fed->server_hostname, fed_id); + //TODO: NEED TO FIX HERE! + // inet_ntop(AF_INET, &fed->server_ip_addr, str, INET_ADDRSTRLEN); + // strncpy(fed->server_hostname, str, INET_ADDRSTRLEN); + + // LF_PRINT_DEBUG("RTI got address %s from federate %d.", fed->server_hostname, fed_id); #endif - fed->socket = *socket_id; // Set the federate's state as pending // because it is waiting for the start time to be @@ -1358,7 +1376,7 @@ netdrv_read(fed_netdrv, length, buffer, "RTI failed to read from accepted socket tracepoint_rti_to_federate(rti_remote->base.trace, send_ACK, fed_id, NULL); } LF_MUTEX_LOCK(rti_mutex); - if (write_to_socket_close_on_error(&fed->socket, 1, &ack_message)) { + if (write_to_netdrv_close_on_error(netdrv, 1, &ack_message)) { LF_MUTEX_UNLOCK(rti_mutex); lf_print_error("RTI failed to write MSG_TYPE_ACK message to federate %d.", fed_id); return -1; diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index e5a1b564d..f1c6d0bff 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -18,7 +18,7 @@ static socket_priv_t *get_priv(netdrv_t *drv) { if (!drv) { - lf_print_error_and_exit("Falied to malloc netdrv_t."); + lf_print_error_and_exit("Falied get socket_priv_t."); return NULL; } return (socket_priv_t *)(drv + 1); @@ -49,72 +49,41 @@ static int socket_open(netdrv_t *drv) { // return 0; } -// static void socket_close(netdrv_t *drv) { -// if (!drv) -// return; -// socket_priv_t *priv = get_priv(drv); -// if (priv->sock > 0) { -// close(priv->sock); -// priv->sock = -1; -// } -// } - -static ssize_t socket_recv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer, char* format, ...) { - va_list args; - // Error checking first - if (socket < 0 && format != NULL) { - lf_print_error("Socket is no longer open."); - lf_print_error_and_exit(format, args); - } - ssize_t bytes_read = 0; - while (bytes_read < (ssize_t)num_bytes) { - ssize_t more = read(socket, buffer + bytes_read, num_bytes - (size_t)bytes_read); - if(more <= 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) { - // The error code set by the socket indicates - // that we should try again (@see man errno). - LF_PRINT_DEBUG("Reading from socket was blocked. Will try again."); - continue; - } else if (more <= 0) { - if (format != NULL) { - shutdown(socket, SHUT_RDWR); - close(socket); - lf_print_error("Read %ld bytes, but expected %zu. errno=%d", - more + bytes_read, num_bytes, errno); - lf_print_error_and_exit(format, args); - } else if (more == 0) { - // According to this: https://stackoverflow.com/questions/4160347/close-vs-shutdown-socket, - // upon receiving a zero length packet or an error, we can close the socket. - // If there are any pending outgoing messages, this will attempt to send those - // followed by an EOF. - close(socket); - } - return more; - } - bytes_read += more; - } - return bytes_read; - // if (!drv) { - // return -1; - // } - // socket_priv_t *priv = get_priv(drv); - // if (priv->timeout_us > 0) { - // int res = -1; - // do { - // res = recv(priv->sock, buffer, size, MSG_TRUNC); - // } while (res > 0); - // return res; - // } - // return recv(priv->sock, buffer, size, MSG_TRUNC); -} - -static ssize_t socket_send(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { - if (!drv) { - return -1; +static void socket_close(netdrv_t *drv) { + if (!drv){ + return; } socket_priv_t *priv = get_priv(drv); - return send(priv->sock, buffer, size, MSG_DONTWAIT); + if (priv->socket_descriptor > 0) { + shutdown(priv->socket_descriptor, SHUT_RDWR); + close(priv->socket_descriptor); + priv->socket_descriptor = -1; + } } +// static ssize_t socket_read(netdrv_t *drv, size_t num_bytes, unsigned char* buffer, char* format, ...) { +// // if (!drv) { +// // return -1; +// // } +// // socket_priv_t *priv = get_priv(drv); +// // if (priv->timeout_us > 0) { +// // int res = -1; +// // do { +// // res = recv(priv->sock, buffer, size, MSG_TRUNC); +// // } while (res > 0); +// // return res; +// // } +// // return recv(priv->sock, buffer, size, MSG_TRUNC); +// } + +// static ssize_t socket_write(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { +// if (!drv) { +// return -1; +// } +// socket_priv_t *priv = get_priv(drv); +// return send(priv->sock, buffer, size, MSG_DONTWAIT); +// } + netdrv_t *netdrv_init() { // TODO: Should it be malloc? To support different network stacks operate simulatneously? netdrv_t *drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); // Don't need to call malloc() twice. @@ -130,8 +99,8 @@ netdrv_t *netdrv_init() { drv->open = socket_open; // drv->close = socket_close; - drv->read = socket_recv; - drv->write = socket_send; + drv->read = socket_read; + drv->write = socket_write; // drv->get_priv = get_priv; return drv; } @@ -278,7 +247,14 @@ void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type) { } } -int create_real_time_tcp_socket_errexit() { +/** + * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled + * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application + * on any error. + * + * @return The socket ID (a file descriptor). + */ +static int create_real_time_tcp_socket_errexit() { int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sock < 0) { lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); @@ -359,4 +335,142 @@ netdrv_t *accept_connection(netdrv_t *rti_netdrv) { // Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server fed_priv->server_ip_addr = pV4_addr->sin_addr; return fed_netdrv; +} + +int read_from_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { + socket_priv_t *priv = get_priv(drv); + if (priv->socket_descriptor < 0) { + // Socket is not open. + errno = EBADF; + return -1; + } + ssize_t bytes_read = 0; + int retry_count = 0; + while (bytes_read < (ssize_t)num_bytes) { + ssize_t more = read(priv->socket_descriptor, buffer + bytes_read, num_bytes - (size_t)bytes_read); + if(more < 0 && retry_count++ < NUM_SOCKET_RETRIES + && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { + // Those error codes set by the socket indicates + // that we should try again (@see man errno). + lf_print_warning("Reading from socket failed. Will try again."); + lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); + continue; + } else if (more < 0) { + // A more serious error occurred. + return -1; + } else if (more == 0) { + // EOF received. + return 1; + } + bytes_read += more; + } + return 0; +} +int read_from_netdrv_close_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { + socket_priv_t *priv = get_priv(drv); + assert(&priv->socket_descriptor); + int read_failed = read_from_netdrv(drv, num_bytes, buffer); + if (read_failed) { + // Read failed. + // Socket has probably been closed from the other side. + // Shut down and close the socket from this side. + shutdown(priv->socket_descriptor, SHUT_RDWR); + close(priv->socket_descriptor); + // Mark the socket closed. + priv->socket_descriptor = -1; + return -1; + } + return 0; +} +void read_from_netdrv_fail_on_error( + netdrv_t *drv, + size_t num_bytes, + unsigned char* buffer, + lf_mutex_t* mutex, + char* format, ...) { + socket_priv_t *priv = get_priv(drv); + va_list args; + assert(&priv->socket_descriptor); + int read_failed = read_from_netdrv_close_on_error(drv, num_bytes, buffer); + if (read_failed) { + // Read failed. + if (mutex != NULL) { + lf_mutex_unlock(mutex); + } + if (format != NULL) { + lf_print_error_system_failure(format, args); + } else { + lf_print_error_system_failure("Failed to read from socket."); + } + } +} + +ssize_t peek_from_netdrv(netdrv_t *drv, unsigned char* result) { + socket_priv_t *priv = get_priv(drv); + ssize_t bytes_read = recv(priv->socket_descriptor, result, 1, MSG_DONTWAIT | MSG_PEEK); + if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) return 0; + else return bytes_read; +} + +int write_to_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { + socket_priv_t *priv = get_priv(drv); + if (priv->socket_descriptor < 0) { + // Socket is not open. + errno = EBADF; + return -1; + } + ssize_t bytes_written = 0; + va_list args; + while (bytes_written < (ssize_t)num_bytes) { + ssize_t more = write(priv->socket_descriptor, buffer + bytes_written, num_bytes - (size_t)bytes_written); + if (more <= 0 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { + // The error codes EAGAIN or EWOULDBLOCK indicate + // that we should try again (@see man errno). + // The error code EINTR means the system call was interrupted before completing. + LF_PRINT_DEBUG("Writing to socket was blocked. Will try again."); + lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); + continue; + } else if (more < 0) { + // A more serious error occurred. + return -1; + } + bytes_written += more; + } + return 0; +} + +int write_to_netdrv_close_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { + socket_priv_t *priv = get_priv(drv); + assert(&priv->socket_descriptor); + int result = write_to_socket(drv, num_bytes, buffer); + if (result) { + // Write failed. + // Netdrv has probably been closed from the other side. + // Shut down and close the netdrv from this side. + drv.close(drv); + } + return result; +} + +void write_to_netdrv_fail_on_error( + netdrv_t *drv, + size_t num_bytes, + unsigned char* buffer, + lf_mutex_t* mutex, + char* format, ...) { + va_list args; + socket_priv_t *priv = get_priv(drv); + assert(&priv->socket_descriptor); + int result = write_to_socket_close_on_error(drv, num_bytes, buffer); + if (result) { + // Write failed. + if (mutex != NULL) { + lf_mutex_unlock(mutex); + } + if (format != NULL) { + lf_print_error_system_failure(format, args); + } else { + lf_print_error("Failed to write to socket. Closing it."); + } + } } \ No newline at end of file diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index dd9f8f6c4..d0b289705 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -47,6 +47,8 @@ */ #define DEFAULT_PORT 15045u +#define DELAY_BETWEEN_SOCKET_RETRIES MSEC(100) + typedef struct socket_priv_t { int port; int socket_descriptor; @@ -80,8 +82,115 @@ netdrv_t * netdrv_init(); * @return The socket descriptor on which to accept connections. */ void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type); -int create_real_time_tcp_socket_errexit(); + + +// int create_real_time_tcp_socket_errexit(); void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv); netdrv_t *accept_connection(netdrv_t * rti_netdrv); + +/** + * Read the specified number of bytes from the specified socket into the specified buffer. + * If an error occurs during this reading, return -1 and set errno to indicate + * the cause of the error. If the read succeeds in reading the specified number of bytes, + * return 0. If an EOF occurs before reading the specified number of bytes, return 1. + * This function repeats the read attempt until the specified number of bytes + * have been read, an EOF is read, or an error occurs. Specifically, errors EAGAIN, + * EWOULDBLOCK, and EINTR are not considered errors and instead trigger + * another attempt. A delay between attempts is given by DELAY_BETWEEN_SOCKET_RETRIES. + * @param socket The socket ID. + * @param num_bytes The number of bytes to read. + * @param buffer The buffer into which to put the bytes. + * @return 0 for success, 1 for EOF, and -1 for an error. + */ +int read_from_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); + +/** + * Read the specified number of bytes to the specified socket using read_from_socket + * and close the socket if an error occurs. If an error occurs, this will change the + * socket ID pointed to by the first argument to -1 and will return -1. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. + */ +int read_from_netdrv_close_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); + +/** + * Read the specified number of bytes from the specified socket into the + * specified buffer. If a disconnect or an EOF occurs during this + * reading, then if format is non-null, report an error and exit. + * If the mutex argument is non-NULL, release the mutex before exiting. + * If format is null, then report the error, but do not exit. + * This function takes a formatted string and additional optional arguments + * similar to printf(format, ...) that is appended to the error messages. + * @param socket The socket ID. + * @param num_bytes The number of bytes to read. + * @param buffer The buffer into which to put the bytes. + * @param format A printf-style format string, followed by arguments to + * fill the string, or NULL to not exit with an error message. + * @return The number of bytes read, or 0 if an EOF is received, or + * a negative number for an error. + */ +void read_from_netdrv_fail_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...); + +/** + * Without blocking, peek at the specified socket and, if there is + * anything on the queue, put its first byte at the specified address and return 1. + * If there is nothing on the queue, return 0, and if an error occurs, + * return -1. + * @param socket The socket ID. + * @param result Pointer to where to put the first byte available on the socket. + */ +ssize_t peek_from_netdrv(netdrv_t *drv, unsigned char* result); + +/** + * Write the specified number of bytes to the specified socket from the + * specified buffer. If an error occurs, return -1 and set errno to indicate + * the cause of the error. If the write succeeds, return 0. + * This function repeats the attempt until the specified number of bytes + * have been written or an error occurs. Specifically, errors EAGAIN, + * EWOULDBLOCK, and EINTR are not considered errors and instead trigger + * another attempt. A delay between attempts is given by + * DELAY_BETWEEN_SOCKET_RETRIES. + * @param socket The socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. + */ +int write_to_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); + +/** + * Write the specified number of bytes to the specified socket using write_to_socket + * and close the socket if an error occurs. If an error occurs, this will change the + * socket ID pointed to by the first argument to -1 and will return -1. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. + */ +int write_to_netdrv_close_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); + +/** + * Write the specified number of bytes to the specified socket using + * write_to_socket_close_on_error and exit with an error code if an error occurs. + * If the mutex argument is non-NULL, release the mutex before exiting. If the + * format argument is non-null, then use it an any additional arguments to form + * the error message using printf conventions. Otherwise, print a generic error + * message. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @param mutex If non-NULL, the mutex to unlock before exiting. + * @param format A format string for error messages, followed by any number of + * fields that will be used to fill the format string as in printf, or NULL + * to print a generic error message. + */ +void write_to_netdrv_fail_on_error( + netdrv_t *drv, + size_t num_bytes, + unsigned char* buffer, + lf_mutex_t* mutex, + char* format, ...); + #endif // LF_SOCKET_SUPPORT_H diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 80ea18b5d..52b240037 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -52,6 +52,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "../../tag.h" #define NUM_SOCKET_RETRIES 10 +//TODO: Copied at lf_socket_support.h. Erase after finished. #define DELAY_BETWEEN_SOCKET_RETRIES MSEC(100) #define HOST_LITTLE_ENDIAN 1 @@ -71,23 +72,37 @@ typedef enum netdrv_type_t { } netdrv_type_t; typedef struct netdrv_t { - int ( *open)(struct netdrv_t *drv); - void (*close)(struct netdrv_t *drv); - int ( *read)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); - int (*write)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); - // void * (*get_priv)(struct netdrv_t *drv); + int ( *open)(struct netdrv_t *drv); + int (*close)(struct netdrv_t *drv); + int ( *read)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); + int (*write)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); } netdrv_t; + // void * (*get_priv)(struct netdrv_t *drv); + + +// typedef struct netdrv_t { +// ... +// int ( *read)(size_t num_bytes, unsigned char* buffer); +// int ( *read_close_on_error)(size_t num_bytes, unsigned char* buffer); +// int ( *read_fail_on_error)(size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...); +// ... +// } netdrv_t; + +// netdrv.read(num_bytes, read_buffer); +// netdrv.read_close_on_error(num_bytes, write_buffer); +// netdrv.read_fail_on_error(num_bytes, write_buffer, mutex, format, ...); -int netdrv_open(netdrv_t *drv); -void netdrv_close(netdrv_t *drv); -int netdrv_read(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); -int netdrv_write(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); +int netdrv_open(netdrv_t *drv); +int netdrv_close(netdrv_t *drv); +int netdrv_read(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); +int netdrv_write(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); // void * netdrv_get_privdrv(netdrv_t *drv); /** * Mutex protecting socket close operations. */ extern lf_mutex_t socket_mutex; +//TODO: Copied at lf_socket_support.c. Erase after finished. /** * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application @@ -97,6 +112,7 @@ extern lf_mutex_t socket_mutex; */ int create_real_time_tcp_socket_errexit(); +//TODO: Copied at lf_socket_support.c. Erase after finished. /** * Read the specified number of bytes from the specified socket into the specified buffer. * If an error occurs during this reading, return -1 and set errno to indicate @@ -113,6 +129,7 @@ int create_real_time_tcp_socket_errexit(); */ int read_from_socket(int socket, size_t num_bytes, unsigned char* buffer); +//TODO: Copied at lf_socket_support.c. Erase after finished. /** * Read the specified number of bytes to the specified socket using read_from_socket * and close the socket if an error occurs. If an error occurs, this will change the @@ -124,6 +141,7 @@ int read_from_socket(int socket, size_t num_bytes, unsigned char* buffer); */ int read_from_socket_close_on_error(int* socket, size_t num_bytes, unsigned char* buffer); +//TODO: Copied at lf_socket_support.c. Erase after finished. /** * Read the specified number of bytes from the specified socket into the * specified buffer. If a disconnect or an EOF occurs during this @@ -147,6 +165,7 @@ void read_from_socket_fail_on_error( lf_mutex_t* mutex, char* format, ...); +//TODO: Copied at lf_socket_support.c. Erase after finished. /** * Without blocking, peek at the specified socket and, if there is * anything on the queue, put its first byte at the specified address and return 1. @@ -157,6 +176,7 @@ void read_from_socket_fail_on_error( */ ssize_t peek_from_socket(int socket, unsigned char* result); +//TODO: Copied at lf_socket_support.c. Erase after finished. /** * Write the specified number of bytes to the specified socket from the * specified buffer. If an error occurs, return -1 and set errno to indicate @@ -173,6 +193,7 @@ ssize_t peek_from_socket(int socket, unsigned char* result); */ int write_to_socket(int socket, size_t num_bytes, unsigned char* buffer); +//TODO: Copied at lf_socket_support.c. Erase after finished. /** * Write the specified number of bytes to the specified socket using write_to_socket * and close the socket if an error occurs. If an error occurs, this will change the @@ -184,6 +205,7 @@ int write_to_socket(int socket, size_t num_bytes, unsigned char* buffer); */ int write_to_socket_close_on_error(int* socket, size_t num_bytes, unsigned char* buffer); +//TODO: Copied at lf_socket_support.c. Erase after finished. /** * Write the specified number of bytes to the specified socket using * write_to_socket_close_on_error and exit with an error code if an error occurs. From 66775e4433caf6d1d70046ea14f3916df1717349 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 18 Jan 2024 16:17:28 -0700 Subject: [PATCH 018/262] Finished receive_connection_information. Starting receive_udp_message_and_set_up_clock_sync() --- core/federated/RTI/rti_remote.c | 216 +++++++++++++++++++++++++++++++- 1 file changed, 213 insertions(+), 3 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 2b8cf6b71..0a331281f 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -890,6 +890,43 @@ void handle_timestamp(federate_info_t *my_fed) { LF_PRINT_LOG("RTI sent start time " PRINTF_TIME " to federate %d.", start_time, my_fed->enclave.id); LF_MUTEX_UNLOCK(rti_mutex); } +void net_send_physical_clock(unsigned char message_type, federate_info_t *fed, socket_type_t socket_type) { + if (fed->enclave.state == NOT_CONNECTED) { + lf_print_warning("Clock sync: RTI failed to send physical time to federate %d. Socket not connected.\n", + fed->enclave.id); + return; + } + unsigned char buffer[sizeof(int64_t) + 1]; + buffer[0] = message_type; + int64_t current_physical_time = lf_time_physical(); + encode_int64(current_physical_time, &(buffer[1])); + + // Send the message + if (socket_type == UDP) { + // FIXME: UDP_addr is never initialized. + LF_PRINT_DEBUG("Clock sync: RTI sending UDP message type %u.", buffer[0]); + ssize_t bytes_written = sendto(rti_remote->socket_descriptor_UDP, buffer, 1 + sizeof(int64_t), 0, + (struct sockaddr *)&fed->UDP_addr, sizeof(fed->UDP_addr)); + if (bytes_written < (ssize_t)sizeof(int64_t) + 1) { + lf_print_warning("Clock sync: RTI failed to send physical time to federate %d: %s\n", + fed->enclave.id, + strerror(errno)); + return; + } + } + else if (socket_type == TCP) { + LF_PRINT_DEBUG("Clock sync: RTI sending TCP message type %u.", buffer[0]); + LF_MUTEX_LOCK(rti_mutex); + write_to_socket_fail_on_error(&fed->socket, 1 + sizeof(int64_t), buffer, &rti_mutex, + "Clock sync: RTI failed to send physical time to federate %d.", + fed->enclave.id); + LF_MUTEX_UNLOCK(rti_mutex); + } + LF_PRINT_DEBUG("Clock sync: RTI sent PHYSICAL_TIME_SYNC_MESSAGE with timestamp " PRINTF_TIME + " to federate %d.", + current_physical_time, + fed->enclave.id); +} void send_physical_clock(unsigned char message_type, federate_info_t *fed, socket_type_t socket_type) { if (fed->enclave.state == NOT_CONNECTED) { @@ -1529,6 +1566,92 @@ static int32_t receive_and_check_fed_id_message(int *socket_id, struct sockaddr_ return (int32_t)fed_id; } +/** + * Listen for a MSG_TYPE_NEIGHBOR_STRUCTURE message, and upon receiving it, fill + * out the relevant information in the federate's struct. + * @return 1 on success and 0 on failure. + */ +static int net_receive_connection_information(netdrv_t *netdrv, uint16_t fed_id) { + LF_PRINT_DEBUG("RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate %d.", fed_id); + unsigned char connection_info_header[MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE]; + read_from_netdrv_fail_on_error( + netdrv, + MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE, + connection_info_header, + NULL, + "RTI failed to read MSG_TYPE_NEIGHBOR_STRUCTURE message header from federate %d.", + fed_id); + + if (connection_info_header[0] != MSG_TYPE_NEIGHBOR_STRUCTURE) { + lf_print_error( + "RTI was expecting a MSG_TYPE_UDP_PORT message from federate %d. Got %u instead. " + "Rejecting federate.", + fed_id, connection_info_header[0]); + net_send_reject(netdrv, UNEXPECTED_MESSAGE); + return 0; + } else { + federate_info_t *fed = GET_FED_INFO(fed_id); + // Read the number of upstream and downstream connections + fed->enclave.num_upstream = extract_int32(&(connection_info_header[1])); + fed->enclave.num_downstream = extract_int32(&(connection_info_header[1 + sizeof(int32_t)])); + LF_PRINT_DEBUG( + "RTI got %d upstreams and %d downstreams from federate %d.", + fed->enclave.num_upstream, + fed->enclave.num_downstream, + fed_id); + + // Allocate memory for the upstream and downstream pointers + if (fed->enclave.num_upstream > 0) { + fed->enclave.upstream = (int *)malloc(sizeof(uint16_t) * fed->enclave.num_upstream); + // Allocate memory for the upstream delay pointers + fed->enclave.upstream_delay = (interval_t *)malloc( + sizeof(interval_t) * fed->enclave.num_upstream); + } else { + fed->enclave.upstream = (int *)NULL; + fed->enclave.upstream_delay = (interval_t *)NULL; + } + if (fed->enclave.num_downstream > 0) { + fed->enclave.downstream = (int *)malloc(sizeof(uint16_t) * fed->enclave.num_downstream); + } else { + fed->enclave.downstream = (int *)NULL; + } + + size_t connections_info_body_size = ( + (sizeof(uint16_t) + sizeof(int64_t)) * fed->enclave.num_upstream) + + (sizeof(uint16_t) * fed->enclave.num_downstream); + unsigned char *connections_info_body = NULL; + if (connections_info_body_size > 0) { + connections_info_body = (unsigned char *)malloc(connections_info_body_size); + read_from_netdrv_fail_on_error( + netdrv, + connections_info_body_size, + connections_info_body, + NULL, + "RTI failed to read MSG_TYPE_NEIGHBOR_STRUCTURE message body from federate %d.", + fed_id); + // Keep track of where we are in the buffer + size_t message_head = 0; + // First, read the info about upstream federates + for (int i = 0; i < fed->enclave.num_upstream; i++) { + fed->enclave.upstream[i] = extract_uint16(&(connections_info_body[message_head])); + message_head += sizeof(uint16_t); + fed->enclave.upstream_delay[i] = extract_int64(&(connections_info_body[message_head])); + message_head += sizeof(int64_t); + } + + // Next, read the info about downstream federates + for (int i = 0; i < fed->enclave.num_downstream; i++) { + fed->enclave.downstream[i] = extract_uint16(&(connections_info_body[message_head])); + message_head += sizeof(uint16_t); + } + + free(connections_info_body); + } + } + LF_PRINT_DEBUG("RTI received neighbor structure from federate %d.", fed_id); + return 1; +} + /** * Listen for a MSG_TYPE_NEIGHBOR_STRUCTURE message, and upon receiving it, fill * out the relevant information in the federate's struct. @@ -1615,6 +1738,93 @@ static int receive_connection_information(int *socket_id, uint16_t fed_id) { return 1; } +/** + * Listen for a MSG_TYPE_UDP_PORT message, and upon receiving it, set up + * clock synchronization and perform the initial clock synchronization. + * Initial clock synchronization is performed only if the MSG_TYPE_UDP_PORT message + * payload is not UINT16_MAX. If it is also not 0, then this function sets + * up to perform runtime clock synchronization using the UDP port number + * specified in the payload to communicate with the federate's clock + * synchronization logic. + * @param socket_id The socket on which to listen. + * @param fed_id The federate ID. + * @return 1 for success, 0 for failure. + */ +static int net_receive_udp_message_and_set_up_clock_sync(int *netdrv_t *netdrv, uint16_t fed_id) { + // Read the MSG_TYPE_UDP_PORT message from the federate regardless of the status of + // clock synchronization. This message will tell the RTI whether the federate + // is doing clock synchronization, and if it is, what port to use for UDP. + LF_PRINT_DEBUG("RTI waiting for MSG_TYPE_UDP_PORT from federate %d.", fed_id); + unsigned char response[1 + sizeof(uint16_t)]; + read_from_netdrv_fail_on_error(socket_id, 1 + sizeof(uint16_t), response, NULL, + "RTI failed to read MSG_TYPE_UDP_PORT message from federate %d.", fed_id); + if (response[0] != MSG_TYPE_UDP_PORT) { + lf_print_error( + "RTI was expecting a MSG_TYPE_UDP_PORT message from federate %d. Got %u instead. " + "Rejecting federate.", + fed_id, response[0]); + net_send_reject(netdrv, UNEXPECTED_MESSAGE); + return 0; + } else { + federate_info_t *fed = GET_FED_INFO(fed_id); + if (rti_remote->clock_sync_global_status >= clock_sync_init) { + // If no initial clock sync, no need perform initial clock sync. + uint16_t federate_UDP_port_number = extract_uint16(&(response[1])); + + LF_PRINT_DEBUG("RTI got MSG_TYPE_UDP_PORT %u from federate %d.", federate_UDP_port_number, fed_id); + + // A port number of UINT16_MAX means initial clock sync should not be performed. + if (federate_UDP_port_number != UINT16_MAX) { + // Perform the initialization clock synchronization with the federate. + // Send the required number of messages for clock synchronization + for (int i = 0; i < rti_remote->clock_sync_exchanges_per_interval; i++) { + // Send the RTI's current physical time T1 to the federate. + send_physical_clock(MSG_TYPE_CLOCK_SYNC_T1, fed, TCP); + + // Listen for reply message, which should be T3. + size_t message_size = 1 + sizeof(int32_t); + unsigned char buffer[message_size]; + read_from_netdrv_fail_on_error(netdrv, message_size, buffer, NULL, + "Socket to federate %d unexpectedly closed.", fed_id); + if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T3) { + int32_t fed_id = extract_int32(&(buffer[1])); + assert(fed_id > -1); + assert(fed_id < 65536); + LF_PRINT_DEBUG("RTI received T3 clock sync message from federate %d.", fed_id); + handle_physical_clock_sync_message(fed, TCP); + } else { + lf_print_error("Unexpected message %u from federate %d.", buffer[0], fed_id); + net_send_reject(socket_id, UNEXPECTED_MESSAGE); + return 0; + } + } + LF_PRINT_DEBUG("RTI finished initial clock synchronization with federate %d.", fed_id); + } + if (rti_remote->clock_sync_global_status >= clock_sync_on) { + // If no runtime clock sync, no need to set up the UDP port. + if (federate_UDP_port_number > 0) { + // Initialize the UDP_addr field of the federate struct + fed->UDP_addr.sin_family = AF_INET; + fed->UDP_addr.sin_port = htons(federate_UDP_port_number); + fed->UDP_addr.sin_addr = fed->server_ip_addr; + } + } else { + // Disable clock sync after initial round. + fed->clock_synchronization_enabled = false; + } + } else { + // No clock synchronization at all. + LF_PRINT_DEBUG("RTI: No clock synchronization for federate %d.", fed_id); + // Clock synchronization is universally disabled via the clock-sync command-line parameter + // (-c off was passed to the RTI). + // Note that the federates are still going to send a + // MSG_TYPE_UDP_PORT message but with a payload (port) of -1. + fed->clock_synchronization_enabled = false; + } + } + return 1; +} + /** * Listen for a MSG_TYPE_UDP_PORT message, and upon receiving it, set up * clock synchronization and perform the initial clock synchronization. @@ -1802,9 +2012,9 @@ void net_lf_connect_to_federates(netdrv_t *rti_netdrv) { #endif // The first message from the federate should contain its ID and the federation ID. - int32_t fed_id = receive_and_check_fed_id_message(&socket_id, (struct sockaddr_in *)&client_fd); - if (fed_id >= 0 && socket_id >= 0 - && receive_connection_information(&socket_id, (uint16_t)fed_id) + int32_t fed_id = net_receive_and_check_fed_id_message(fed_netdrv); + if (fed_id >= 0 + && net_receive_connection_information(fed_netdrv, (uint16_t)fed_id) && receive_udp_message_and_set_up_clock_sync(&socket_id, (uint16_t)fed_id)) { // Create a thread to communicate with the federate. From 7d77b373b0376175b806ae03f7402a34aa3c250e Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 18 Jan 2024 16:47:39 -0700 Subject: [PATCH 019/262] Minor bug fix --- core/federated/RTI/rti_remote.c | 50 ++++++++----- core/federated/network/lf_socket_support.c | 86 +++++++++++----------- core/federated/network/net_util.c | 10 +-- include/core/federated/network/net_util.h | 4 +- 4 files changed, 83 insertions(+), 67 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 0a331281f..d10f167f4 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -903,21 +903,22 @@ void net_send_physical_clock(unsigned char message_type, federate_info_t *fed, s // Send the message if (socket_type == UDP) { - // FIXME: UDP_addr is never initialized. - LF_PRINT_DEBUG("Clock sync: RTI sending UDP message type %u.", buffer[0]); - ssize_t bytes_written = sendto(rti_remote->socket_descriptor_UDP, buffer, 1 + sizeof(int64_t), 0, - (struct sockaddr *)&fed->UDP_addr, sizeof(fed->UDP_addr)); - if (bytes_written < (ssize_t)sizeof(int64_t) + 1) { - lf_print_warning("Clock sync: RTI failed to send physical time to federate %d: %s\n", - fed->enclave.id, - strerror(errno)); - return; - } + //TODO: NEED TO FIX! + // // FIXME: UDP_addr is never initialized. + // LF_PRINT_DEBUG("Clock sync: RTI sending UDP message type %u.", buffer[0]); + // ssize_t bytes_written = sendto(rti_remote->socket_descriptor_UDP, buffer, 1 + sizeof(int64_t), 0, + // (struct sockaddr *)&fed->UDP_addr, sizeof(fed->UDP_addr)); + // if (bytes_written < (ssize_t)sizeof(int64_t) + 1) { + // lf_print_warning("Clock sync: RTI failed to send physical time to federate %d: %s\n", + // fed->enclave.id, + // strerror(errno)); + // return; + // } } else if (socket_type == TCP) { LF_PRINT_DEBUG("Clock sync: RTI sending TCP message type %u.", buffer[0]); LF_MUTEX_LOCK(rti_mutex); - write_to_socket_fail_on_error(&fed->socket, 1 + sizeof(int64_t), buffer, &rti_mutex, + write_to_netdrv_fail_on_error(fed->fed_netdrv, 1 + sizeof(int64_t), buffer, &rti_mutex, "Clock sync: RTI failed to send physical time to federate %d.", fed->enclave.id); LF_MUTEX_UNLOCK(rti_mutex); @@ -966,6 +967,20 @@ void send_physical_clock(unsigned char message_type, federate_info_t *fed, socke fed->enclave.id); } +void net_handle_physical_clock_sync_message(federate_info_t *my_fed, socket_type_t socket_type) { + // Lock the mutex to prevent interference between sending the two + // coded probe messages. + LF_MUTEX_LOCK(rti_mutex); + // Reply with a T4 type message + net_send_physical_clock(MSG_TYPE_CLOCK_SYNC_T4, my_fed, socket_type); + // Send the corresponding coded probe immediately after, + // but only if this is a UDP channel. + if (socket_type == UDP) { + net_send_physical_clock(MSG_TYPE_CLOCK_SYNC_CODED_PROBE, my_fed, socket_type); + } + LF_MUTEX_UNLOCK(rti_mutex); +} + void handle_physical_clock_sync_message(federate_info_t *my_fed, socket_type_t socket_type) { // Lock the mutex to prevent interference between sending the two // coded probe messages. @@ -1738,6 +1753,7 @@ static int receive_connection_information(int *socket_id, uint16_t fed_id) { return 1; } +//TODO: NEEDS TO BE FIXED!! /** * Listen for a MSG_TYPE_UDP_PORT message, and upon receiving it, set up * clock synchronization and perform the initial clock synchronization. @@ -1750,13 +1766,13 @@ static int receive_connection_information(int *socket_id, uint16_t fed_id) { * @param fed_id The federate ID. * @return 1 for success, 0 for failure. */ -static int net_receive_udp_message_and_set_up_clock_sync(int *netdrv_t *netdrv, uint16_t fed_id) { +static int net_receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t fed_id) { // Read the MSG_TYPE_UDP_PORT message from the federate regardless of the status of // clock synchronization. This message will tell the RTI whether the federate // is doing clock synchronization, and if it is, what port to use for UDP. LF_PRINT_DEBUG("RTI waiting for MSG_TYPE_UDP_PORT from federate %d.", fed_id); unsigned char response[1 + sizeof(uint16_t)]; - read_from_netdrv_fail_on_error(socket_id, 1 + sizeof(uint16_t), response, NULL, + read_from_netdrv_fail_on_error(netdrv, 1 + sizeof(uint16_t), response, NULL, "RTI failed to read MSG_TYPE_UDP_PORT message from federate %d.", fed_id); if (response[0] != MSG_TYPE_UDP_PORT) { lf_print_error( @@ -1779,7 +1795,7 @@ static int net_receive_udp_message_and_set_up_clock_sync(int *netdrv_t *netdrv, // Send the required number of messages for clock synchronization for (int i = 0; i < rti_remote->clock_sync_exchanges_per_interval; i++) { // Send the RTI's current physical time T1 to the federate. - send_physical_clock(MSG_TYPE_CLOCK_SYNC_T1, fed, TCP); + net_send_physical_clock(MSG_TYPE_CLOCK_SYNC_T1, fed, TCP); // Listen for reply message, which should be T3. size_t message_size = 1 + sizeof(int32_t); @@ -1791,10 +1807,10 @@ static int net_receive_udp_message_and_set_up_clock_sync(int *netdrv_t *netdrv, assert(fed_id > -1); assert(fed_id < 65536); LF_PRINT_DEBUG("RTI received T3 clock sync message from federate %d.", fed_id); - handle_physical_clock_sync_message(fed, TCP); + net_handle_physical_clock_sync_message(fed, TCP); } else { lf_print_error("Unexpected message %u from federate %d.", buffer[0], fed_id); - net_send_reject(socket_id, UNEXPECTED_MESSAGE); + net_send_reject(netdrv, UNEXPECTED_MESSAGE); return 0; } } @@ -2015,7 +2031,7 @@ void net_lf_connect_to_federates(netdrv_t *rti_netdrv) { int32_t fed_id = net_receive_and_check_fed_id_message(fed_netdrv); if (fed_id >= 0 && net_receive_connection_information(fed_netdrv, (uint16_t)fed_id) - && receive_udp_message_and_set_up_clock_sync(&socket_id, (uint16_t)fed_id)) { + && net_receive_udp_message_and_set_up_clock_sync(fed_netdrv, (uint16_t)fed_id)) { // Create a thread to communicate with the federate. // This has to be done after clock synchronization is finished diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index f1c6d0bff..623f14fc2 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -97,14 +97,49 @@ netdrv_t *netdrv_init() { priv->socket_descriptor = 0; priv->user_specified_port = 0; - drv->open = socket_open; - // drv->close = socket_close; - drv->read = socket_read; - drv->write = socket_write; + // drv->open = socket_open; + drv->close = socket_close; + // drv->read = socket_read; + // drv->write = socket_write; // drv->get_priv = get_priv; return drv; } +/** + * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled + * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application + * on any error. + * + * @return The socket ID (a file descriptor). + */ +static int net_create_real_time_tcp_socket_errexit() { + int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (sock < 0) { + lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); + } + // Disable Nagle's algorithm which bundles together small TCP messages to + // reduce network traffic + // TODO: Re-consider if we should do this, and whether disabling delayed ACKs + // is enough. + int flag = 1; + int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } + +// Disable delayed ACKs. Only possible on Linux +#if defined(PLATFORM_Linux) + result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } +#endif + + return sock; +} + void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type) { socket_priv_t *priv = get_priv(drv); @@ -116,7 +151,7 @@ void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type) { // Create an IPv4 socket for TCP (not UDP) communication over IP (0). priv->socket_descriptor = -1; if (netdrv_type == RTI) { - priv->socket_descriptor = create_real_time_tcp_socket_errexit(); + priv->socket_descriptor = net_create_real_time_tcp_socket_errexit(); } else if (netdrv_type == CLOCKSYNC) { priv->socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); // Set the appropriate timeout time @@ -247,41 +282,6 @@ void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type) { } } -/** - * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled - * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application - * on any error. - * - * @return The socket ID (a file descriptor). - */ -static int create_real_time_tcp_socket_errexit() { - int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (sock < 0) { - lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); - } - // Disable Nagle's algorithm which bundles together small TCP messages to - // reduce network traffic - // TODO: Re-consider if we should do this, and whether disabling delayed ACKs - // is enough. - int flag = 1; - int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } - -// Disable delayed ACKs. Only possible on Linux -#if defined(PLATFORM_Linux) - result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } -#endif - - return sock; -} - void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { socket_priv_t *rti_priv = get_priv(rti_netdrv); socket_priv_t *clock_priv = get_priv(clock_netdrv); @@ -442,12 +442,12 @@ int write_to_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { int write_to_netdrv_close_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { socket_priv_t *priv = get_priv(drv); assert(&priv->socket_descriptor); - int result = write_to_socket(drv, num_bytes, buffer); + int result = write_to_netdrv(drv, num_bytes, buffer); if (result) { // Write failed. // Netdrv has probably been closed from the other side. // Shut down and close the netdrv from this side. - drv.close(drv); + drv->close(drv); } return result; } @@ -461,7 +461,7 @@ void write_to_netdrv_fail_on_error( va_list args; socket_priv_t *priv = get_priv(drv); assert(&priv->socket_descriptor); - int result = write_to_socket_close_on_error(drv, num_bytes, buffer); + int result = write_to_netdrv_close_on_error(drv, num_bytes, buffer); if (result) { // Write failed. if (mutex != NULL) { diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index a49e7e2a2..9f24f45e0 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -68,23 +68,23 @@ int netdrv_open(netdrv_t *drv) { } void netdrv_close(netdrv_t *drv) { if (!drv) { - return -1; + return; } drv->close(drv); } -int netdrv_read(netdrv_t *drv, void * buffer, int size) { +int netdrv_read(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { if (!drv) { return -1; } - return drv->read(drv, buffer, size); + return drv->read(drv, num_bytes, buffer); } -int netdrv_write(netdrv_t *drv, void * buffer, int size) { +int netdrv_write(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { if (!drv) { return -1; } - return drv->write(drv, buffer, size); + return drv->write(drv, num_bytes, buffer); } // void *netdrv_get_privdrv(netdrv_t *drv) { diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 52b240037..e784fcc0b 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -73,7 +73,7 @@ typedef enum netdrv_type_t { typedef struct netdrv_t { int ( *open)(struct netdrv_t *drv); - int (*close)(struct netdrv_t *drv); + void (*close)(struct netdrv_t *drv); int ( *read)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); int (*write)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); } netdrv_t; @@ -93,7 +93,7 @@ typedef struct netdrv_t { // netdrv.read_fail_on_error(num_bytes, write_buffer, mutex, format, ...); int netdrv_open(netdrv_t *drv); -int netdrv_close(netdrv_t *drv); +void netdrv_close(netdrv_t *drv); int netdrv_read(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); int netdrv_write(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); // void * netdrv_get_privdrv(netdrv_t *drv); From 676636296692cb49f0ec0391a5a891bd882a4984 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Sat, 20 Jan 2024 12:47:19 -0700 Subject: [PATCH 020/262] Minor fix --- core/federated/RTI/rti_remote.c | 6 +++--- core/federated/network/lf_socket_support.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index d10f167f4..8647fc9e0 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -2221,12 +2221,12 @@ void net_wait_for_federates(netdrv_t *netdrv) { lf_thread_create(&responder_thread, respond_to_erroneous_connections, NULL); // Wait for federate threads to exit. - void* thread_exit_status; + void *thread_exit_status; for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { - federate_info_t* fed = GET_FED_INFO(i); + federate_info_t *fed = GET_FED_INFO(i); lf_print("RTI: Waiting for thread handling federate %d.", fed->enclave.id); lf_thread_join(fed->thread_id, &thread_exit_status); - free_in_transit_message_q(fed->in_transit_message_tags); + pqueue_tag_free(fed->in_transit_message_tags); lf_print("RTI: Federate %d thread exited.", fed->enclave.id); } diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 623f14fc2..bca5b6ace 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -285,9 +285,9 @@ void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type) { void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { socket_priv_t *rti_priv = get_priv(rti_netdrv); socket_priv_t *clock_priv = get_priv(clock_netdrv); - // Shutdown and close the socket so that the accept() call in - // respond_to_erroneous_connections returns. That thread should then - // check rti->all_federates_exited and it should exit. + // Shutdown and close the socket that is listening for incoming connections + // so that the accept() call in respond_to_erroneous_connections returns. + // That thread should then check rti->all_federates_exited and it should exit. if (shutdown(rti_priv->socket_descriptor, SHUT_RDWR)) { LF_PRINT_LOG("On shut down TCP socket, received reply: %s", strerror(errno)); } From e58221f5fb254ffd0042696b7fed69b72ce5386e Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Fri, 26 Jan 2024 14:52:37 -0700 Subject: [PATCH 021/262] Finished until handle timstamp --- core/federated/RTI/main.c | 31 ++- core/federated/RTI/rti_remote.c | 95 +++---- core/federated/RTI/rti_remote.h | 2 +- core/federated/federate.c | 20 +- core/federated/network/lf_socket_support.c | 250 +++++++++++++----- .../federated/network/lf_socket_support.h | 88 +++--- include/core/federated/network/net_common.h | 3 + 7 files changed, 292 insertions(+), 197 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index abbcbc7ac..f8d043225 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -332,23 +332,28 @@ int main(int argc, const char* argv[]) { initialize_federate(fed_info, i); rti.base.scheduling_nodes[i] = (scheduling_node_t *) fed_info; } - + // TODO: Need to add user_specified_port start_net_rti_server(); net_wait_for_federates(rti.rti_netdrv); - - -//TODO: Let's leave this user_specified_port yet. - int socket_descriptor = start_rti_server(rti.user_specified_port); - if (socket_descriptor >= 0) { - wait_for_federates(socket_descriptor); - normal_termination = true; - if (rti.base.tracing_enabled) { - // No need for a mutex lock because all threads have exited. - stop_trace_locked(rti.base.trace); - lf_print("RTI trace file saved."); - } + normal_termination = true; + if (rti.base.tracing_enabled) { + // No need for a mutex lock because all threads have exited. + stop_trace_locked(rti.base.trace); + lf_print("RTI trace file saved."); } + +// int socket_descriptor = start_rti_server(rti.user_specified_port); +// if (socket_descriptor >= 0) { +// wait_for_federates(socket_descriptor); +// normal_termination = true; +// if (rti.base.tracing_enabled) { +// // No need for a mutex lock because all threads have exited. +// stop_trace_locked(rti.base.trace); +// lf_print("RTI trace file saved."); +// } +// } + lf_print("RTI is exiting."); // Do this before freeing scheduling nodes. free_scheduling_nodes(rti.base.scheduling_nodes, rti.base.number_of_scheduling_nodes); diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 6e09a151f..505a3d4f1 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -833,13 +833,8 @@ void handle_address_ad(uint16_t federate_id) { } } -void handle_timestamp(federate_info_t *my_fed) { - unsigned char buffer[sizeof(int64_t)]; - // Read bytes from the socket. We need 8 bytes. - read_from_socket_fail_on_error(&my_fed->socket, sizeof(int64_t), (unsigned char *)&buffer, NULL, - "ERROR reading timestamp from federate %d.\n", my_fed->enclave.id); - - int64_t timestamp = swap_bytes_if_big_endian_int64(*((int64_t *)(&buffer))); +void handle_timestamp(federate_info_t *my_fed, unsigned char *buffer) { + int64_t timestamp = swap_bytes_if_big_endian_int64(*((int64_t *)(buffer))); if (rti_remote->base.tracing_enabled) { tag_t tag = {.time = timestamp, .microstep = 0}; tracepoint_rti_from_federate(rti_remote->base.trace, receive_TIMESTAMP, my_fed->enclave.id, &tag); @@ -877,7 +872,7 @@ void handle_timestamp(federate_info_t *my_fed) { tag_t tag = {.time = start_time, .microstep = 0}; tracepoint_rti_to_federate(rti_remote->base.trace, send_TIMESTAMP, my_fed->enclave.id, &tag); } - if (write_to_socket(my_fed->socket, MSG_TYPE_TIMESTAMP_LENGTH, start_time_buffer)) { + if (write_to_netdrv(my_fed->fed_netdrv, MSG_TYPE_TIMESTAMP_LENGTH, start_time_buffer)) { lf_print_error("Failed to send the starting time to federate %d.", my_fed->enclave.id); } @@ -1195,12 +1190,12 @@ void *federate_info_thread_TCP(void *fed) { // Buffer for incoming messages. // This does not constrain the message size because messages // are forwarded piece by piece. - unsigned char buffer[FED_COM_BUFFER_SIZE]; + unsigned char buffer[FED_COM_BUFFER_SIZE]; //TODO: NEED TO CHECK SIZE. // Listen for messages from the federate. while (my_fed->enclave.state != NOT_CONNECTED) { // Read no more than one byte to get the message type. - int read_failed = read_from_socket(my_fed->socket, 1, buffer); + int read_failed = read_from_netdrv(my_fed->fed_netdrv, buffer); if (read_failed) { // Socket is closed lf_print_warning("RTI: Socket to federate %d is closed. Exiting the thread.", my_fed->enclave.id); @@ -1212,7 +1207,7 @@ void *federate_info_thread_TCP(void *fed) { LF_PRINT_DEBUG("RTI: Received message type %u from federate %d.", buffer[0], my_fed->enclave.id); switch (buffer[0]) { case MSG_TYPE_TIMESTAMP: - handle_timestamp(my_fed); + handle_timestamp(my_fed, buffer + 1); break; case MSG_TYPE_ADDRESS_QUERY: handle_address_query(my_fed->enclave.id); @@ -1305,12 +1300,11 @@ void send_reject(int *socket_id, unsigned char error_code) { * @return The federate ID for success or -1 for failure. */ static int32_t net_receive_and_check_fed_id_message(netdrv_t *netdrv) { - // Buffer for message ID, federate ID, and federation ID length. - size_t length = 1 + sizeof(uint16_t) + 1; // Message ID, federate ID, length of fedration ID. - unsigned char buffer[length]; + // Buffer for message ID, federate ID, federation ID length, and federation ID. + unsigned char buffer[256]; //TODO: NEED TO CHECK. // Read bytes from the socket. We need 4 bytes. - if (read_from_netdrv_close_on_error(netdrv, length, buffer)) { + if (read_from_netdrv_close_on_error(netdrv, buffer)) { lf_print_error("RTI failed to read from accepted socket."); return -1; } @@ -1343,27 +1337,20 @@ static int32_t net_receive_and_check_fed_id_message(netdrv_t *netdrv) { // Read the federation ID. First read the length, which is one byte. size_t federation_id_length = (size_t)buffer[sizeof(uint16_t) + 1]; - char federation_id_received[federation_id_length + 1]; // One extra for null terminator. - // Next read the actual federation ID. - if (read_from_netdrv_close_on_error(netdrv, federation_id_length, - (unsigned char *)federation_id_received)) { - lf_print_error("RTI failed to read federation id from federate %d.", fed_id); - return -1; - } // Terminate the string with a null. - federation_id_received[federation_id_length] = 0; + buffer[2 + sizeof(uint16_t) + federation_id_length] = 0; - LF_PRINT_DEBUG("RTI received federation ID: %s.", federation_id_received); + LF_PRINT_DEBUG("RTI received federation ID: %s.", buffer + 2 + sizeof(uint16_t)); if (rti_remote->base.tracing_enabled) { tracepoint_rti_from_federate(rti_remote->base.trace, receive_FED_ID, fed_id, NULL); } // Compare the received federation ID to mine. - if (strncmp(rti_remote->federation_id, federation_id_received, federation_id_length) != 0) { + if (strncmp(rti_remote->federation_id, buffer + 2 + sizeof(uint16_t), federation_id_length) != 0) { // Federation IDs do not match. Send back a MSG_TYPE_REJECT message. lf_print_warning("Federate from another federation %s attempted to connect to RTI in federation %s.", - federation_id_received, + buffer + 2 + sizeof(uint16_t), rti_remote->federation_id); if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); @@ -1586,28 +1573,27 @@ static int32_t receive_and_check_fed_id_message(int *socket_id, struct sockaddr_ * @return 1 on success and 0 on failure. */ static int net_receive_connection_information(netdrv_t *netdrv, uint16_t fed_id) { + unsigned char connection_info_buffer[1024]; LF_PRINT_DEBUG("RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate %d.", fed_id); - unsigned char connection_info_header[MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE]; read_from_netdrv_fail_on_error( netdrv, - MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE, - connection_info_header, + connection_info_buffer, NULL, "RTI failed to read MSG_TYPE_NEIGHBOR_STRUCTURE message header from federate %d.", fed_id); - if (connection_info_header[0] != MSG_TYPE_NEIGHBOR_STRUCTURE) { + if (connection_info_buffer[0] != MSG_TYPE_NEIGHBOR_STRUCTURE) { lf_print_error( "RTI was expecting a MSG_TYPE_UDP_PORT message from federate %d. Got %u instead. " "Rejecting federate.", - fed_id, connection_info_header[0]); + fed_id, connection_info_buffer[0]); net_send_reject(netdrv, UNEXPECTED_MESSAGE); return 0; } else { federate_info_t *fed = GET_FED_INFO(fed_id); // Read the number of upstream and downstream connections - fed->enclave.num_upstream = extract_int32(&(connection_info_header[1])); - fed->enclave.num_downstream = extract_int32(&(connection_info_header[1 + sizeof(int32_t)])); + fed->enclave.num_upstream = extract_int32(&(connection_info_buffer[1])); + fed->enclave.num_downstream = extract_int32(&(connection_info_buffer[1 + sizeof(int32_t)])); LF_PRINT_DEBUG( "RTI got %d upstreams and %d downstreams from federate %d.", fed->enclave.num_upstream, @@ -1633,33 +1619,22 @@ static int net_receive_connection_information(netdrv_t *netdrv, uint16_t fed_id) size_t connections_info_body_size = ( (sizeof(uint16_t) + sizeof(int64_t)) * fed->enclave.num_upstream) + (sizeof(uint16_t) * fed->enclave.num_downstream); - unsigned char *connections_info_body = NULL; if (connections_info_body_size > 0) { - connections_info_body = (unsigned char *)malloc(connections_info_body_size); - read_from_netdrv_fail_on_error( - netdrv, - connections_info_body_size, - connections_info_body, - NULL, - "RTI failed to read MSG_TYPE_NEIGHBOR_STRUCTURE message body from federate %d.", - fed_id); // Keep track of where we are in the buffer - size_t message_head = 0; + size_t message_head = MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE; // First, read the info about upstream federates for (int i = 0; i < fed->enclave.num_upstream; i++) { - fed->enclave.upstream[i] = extract_uint16(&(connections_info_body[message_head])); + fed->enclave.upstream[i] = extract_uint16(&(connection_info_buffer[message_head])); message_head += sizeof(uint16_t); - fed->enclave.upstream_delay[i] = extract_int64(&(connections_info_body[message_head])); + fed->enclave.upstream_delay[i] = extract_int64(&(connection_info_buffer[message_head])); message_head += sizeof(int64_t); } // Next, read the info about downstream federates for (int i = 0; i < fed->enclave.num_downstream; i++) { - fed->enclave.downstream[i] = extract_uint16(&(connections_info_body[message_head])); + fed->enclave.downstream[i] = extract_uint16(&(connection_info_buffer[message_head])); message_head += sizeof(uint16_t); } - - free(connections_info_body); } } LF_PRINT_DEBUG("RTI received neighbor structure from federate %d.", fed_id); @@ -1771,7 +1746,7 @@ static int net_receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint1 // is doing clock synchronization, and if it is, what port to use for UDP. LF_PRINT_DEBUG("RTI waiting for MSG_TYPE_UDP_PORT from federate %d.", fed_id); unsigned char response[1 + sizeof(uint16_t)]; - read_from_netdrv_fail_on_error(netdrv, 1 + sizeof(uint16_t), response, NULL, + read_from_netdrv_fail_on_error(netdrv, response, NULL, "RTI failed to read MSG_TYPE_UDP_PORT message from federate %d.", fed_id); if (response[0] != MSG_TYPE_UDP_PORT) { lf_print_error( @@ -1799,7 +1774,7 @@ static int net_receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint1 // Listen for reply message, which should be T3. size_t message_size = 1 + sizeof(int32_t); unsigned char buffer[message_size]; - read_from_netdrv_fail_on_error(netdrv, message_size, buffer, NULL, + read_from_netdrv_fail_on_error(netdrv, buffer, NULL, "Socket to federate %d unexpectedly closed.", fed_id); if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T3) { int32_t fed_id = extract_int32(&(buffer[1])); @@ -1934,12 +1909,12 @@ static int receive_udp_message_and_set_up_clock_sync(int *socket_id, uint16_t fe * @param socket Socket for the incoming federate tryting to authenticate. * @return True if authentication is successful and false otherwise. */ -static bool authenticate_federate(int *socket) { +static bool authenticate_federate(netdrv_t *rti_netdrv) { // Wait for MSG_TYPE_FED_NONCE from federate. size_t fed_id_length = sizeof(uint16_t); unsigned char buffer[1 + fed_id_length + NONCE_LENGTH]; - read_from_socket_fail_on_error(socket, 1 + fed_id_length + NONCE_LENGTH, buffer, NULL, - "Failed to read MSG_TYPE_FED_NONCE"); + read_from_netdrv_fail_on_error(rti_netdrv, buffer, NULL, + "Failed to read MSG_TYPE_FED_NONCE."); if (buffer[0] != MSG_TYPE_FED_NONCE) { lf_print_error_and_exit( "Received unexpected response %u from the FED (see net_common.h).", @@ -1966,13 +1941,13 @@ static bool authenticate_federate(int *socket) { RAND_bytes(rti_nonce, NONCE_LENGTH); memcpy(&sender[1], rti_nonce, NONCE_LENGTH); memcpy(&sender[1 + NONCE_LENGTH], hmac_tag, hmac_length); - if (write_to_socket(*socket, 1 + NONCE_LENGTH + hmac_length, sender)) { + if (write_to_netdrv(rti_netdrv, 1 + NONCE_LENGTH + hmac_length, sender)) { lf_print_error("Failed to send nonce to federate."); } // Wait for MSG_TYPE_FED_RESPONSE unsigned char received[1 + hmac_length]; - read_from_socket_fail_on_error(socket, 1 + hmac_length, received, NULL, + read_from_netdrv_fail_on_error(rti_netdrv, 1 + hmac_length, received, NULL, "Failed to read federate response."); if (received[0] != MSG_TYPE_FED_RESPONSE) { lf_print_error_and_exit( @@ -1994,7 +1969,7 @@ static bool authenticate_federate(int *socket) { if (memcmp(&received[1], rti_tag, hmac_length) != 0) { // Federation IDs do not match. Send back a HMAC_DOES_NOT_MATCH message. lf_print_warning("HMAC authentication failed. Rejecting the federate."); - send_reject(socket, HMAC_DOES_NOT_MATCH); + net_send_reject(rti_netdrv, HMAC_DOES_NOT_MATCH); return false; } else { LF_PRINT_LOG("Federate's HMAC verified."); @@ -2013,12 +1988,10 @@ void net_lf_connect_to_federates(netdrv_t *rti_netdrv) { // Wait for the first message from the federate when RTI -a option is on. #ifdef __RTI_AUTH__ if (rti_remote->authentication_enabled) { - if (!authenticate_federate(&socket_id)) { + if (!authenticate_federate(rti_netdrv)) { lf_print_warning("RTI failed to authenticate the incoming federate."); - // Close the socket. - shutdown(socket_id, SHUT_RDWR); - close(socket_id); - socket_id = -1; + + rti_netdrv->close(rti_netdrv); // Ignore the federate that failed authentication. i--; continue; diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index bd8c6e2bc..95866273d 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -314,7 +314,7 @@ void handle_address_ad(uint16_t federate_id); * A function to handle timestamp messages. * This function assumes the caller does not hold the mutex. */ -void handle_timestamp(federate_info_t *my_fed); +void handle_timestamp(federate_info_t *my_fed, unsigned char *buffer); /** * Take a snapshot of the physical clock time and send diff --git a/core/federated/federate.c b/core/federated/federate.c index cd9149e9e..ae605b457 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1973,9 +1973,10 @@ void lf_connect_to_rti(const char* hostname, int port) { #else LF_PRINT_LOG("Connected to an RTI. Sending federation ID for authentication."); #endif - - // Send the message type first. - unsigned char buffer[4]; + // Send message_type + federate_ID + federation_id_length + federation_id + size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); + lf_print("federation_id_length: %d", federation_id_length); + unsigned char *buffer = (unsigned char*) malloc(1 + sizeof(uint16_t) + 1 + federation_id_length); buffer[0] = MSG_TYPE_FED_IDS; // Next send the federate ID. if (_lf_my_fed_id > UINT16_MAX) { @@ -1984,25 +1985,16 @@ void lf_connect_to_rti(const char* hostname, int port) { encode_uint16((uint16_t)_lf_my_fed_id, &buffer[1]); // Next send the federation ID length. // The federation ID is limited to 255 bytes. - size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); buffer[1 + sizeof(uint16_t)] = (unsigned char)(federation_id_length & 0xff); - + memcpy(buffer + 2 + sizeof(uint16_t), (unsigned char*)federation_metadata.federation_id, federation_id_length); // Trace the event when tracing is enabled tracepoint_federate_to_rti(_fed.trace, send_FED_ID, _lf_my_fed_id, NULL); // No need for a mutex here because no other threads are writing to this socket. - if (write_to_socket(_fed.socket_TCP_RTI, 2 + sizeof(uint16_t), buffer)) { + if (write_to_socket(_fed.socket_TCP_RTI, 2 + sizeof(uint16_t) + federation_id_length, buffer)) { continue; // Try again, possibly on a new port. } - // Next send the federation ID itself. - if (write_to_socket( - _fed.socket_TCP_RTI, - federation_id_length, - (unsigned char*)federation_metadata.federation_id)) { - continue; // Try again. - } - // Wait for a response. // The response will be MSG_TYPE_REJECT if the federation ID doesn't match. // Otherwise, it will be either MSG_TYPE_ACK or MSG_TYPE_UDP_PORT, where the latter diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index bca5b6ace..6d1dc1707 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -14,7 +14,7 @@ #include #include "util.h" -// #include "net_util.h" +#include "net_common.h" static socket_priv_t *get_priv(netdrv_t *drv) { if (!drv) { @@ -337,140 +337,260 @@ netdrv_t *accept_connection(netdrv_t *rti_netdrv) { return fed_netdrv; } -int read_from_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { +ssize_t peek_from_netdrv(netdrv_t *drv, unsigned char* result) { + socket_priv_t *priv = get_priv(drv); + ssize_t bytes_read = recv(priv->socket_descriptor, result, 1, MSG_DONTWAIT | MSG_PEEK); + if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) return 0; + else return bytes_read; +} + +int write_to_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { socket_priv_t *priv = get_priv(drv); if (priv->socket_descriptor < 0) { // Socket is not open. errno = EBADF; return -1; } - ssize_t bytes_read = 0; - int retry_count = 0; - while (bytes_read < (ssize_t)num_bytes) { - ssize_t more = read(priv->socket_descriptor, buffer + bytes_read, num_bytes - (size_t)bytes_read); - if(more < 0 && retry_count++ < NUM_SOCKET_RETRIES - && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { - // Those error codes set by the socket indicates + ssize_t bytes_written = 0; + va_list args; + while (bytes_written < (ssize_t)num_bytes) { + ssize_t more = write(priv->socket_descriptor, buffer + bytes_written, num_bytes - (size_t)bytes_written); + if (more <= 0 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { + // The error codes EAGAIN or EWOULDBLOCK indicate // that we should try again (@see man errno). - lf_print_warning("Reading from socket failed. Will try again."); + // The error code EINTR means the system call was interrupted before completing. + LF_PRINT_DEBUG("Writing to socket was blocked. Will try again."); lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); continue; } else if (more < 0) { // A more serious error occurred. return -1; - } else if (more == 0) { - // EOF received. - return 1; } - bytes_read += more; + bytes_written += more; } - return 0; + return 0; } -int read_from_netdrv_close_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { + +int write_to_netdrv_close_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { socket_priv_t *priv = get_priv(drv); assert(&priv->socket_descriptor); - int read_failed = read_from_netdrv(drv, num_bytes, buffer); - if (read_failed) { - // Read failed. - // Socket has probably been closed from the other side. - // Shut down and close the socket from this side. - shutdown(priv->socket_descriptor, SHUT_RDWR); - close(priv->socket_descriptor); - // Mark the socket closed. - priv->socket_descriptor = -1; - return -1; + int result = write_to_netdrv(drv, num_bytes, buffer); + if (result) { + // Write failed. + // Netdrv has probably been closed from the other side. + // Shut down and close the netdrv from this side. + drv->close(drv); } - return 0; + return result; } -void read_from_netdrv_fail_on_error( + +void write_to_netdrv_fail_on_error( netdrv_t *drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...) { - socket_priv_t *priv = get_priv(drv); va_list args; + socket_priv_t *priv = get_priv(drv); assert(&priv->socket_descriptor); - int read_failed = read_from_netdrv_close_on_error(drv, num_bytes, buffer); - if (read_failed) { - // Read failed. + int result = write_to_netdrv_close_on_error(drv, num_bytes, buffer); + if (result) { + // Write failed. if (mutex != NULL) { lf_mutex_unlock(mutex); } if (format != NULL) { lf_print_error_system_failure(format, args); } else { - lf_print_error_system_failure("Failed to read from socket."); + lf_print_error("Failed to write to socket. Closing it."); } } } -ssize_t peek_from_netdrv(netdrv_t *drv, unsigned char* result) { - socket_priv_t *priv = get_priv(drv); - ssize_t bytes_read = recv(priv->socket_descriptor, result, 1, MSG_DONTWAIT | MSG_PEEK); - if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) return 0; - else return bytes_read; -} - -int write_to_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { - socket_priv_t *priv = get_priv(drv); - if (priv->socket_descriptor < 0) { +static int net_read_from_socket(int socket, size_t num_bytes, unsigned char* buffer) { + if (socket < 0) { // Socket is not open. errno = EBADF; return -1; } - ssize_t bytes_written = 0; - va_list args; - while (bytes_written < (ssize_t)num_bytes) { - ssize_t more = write(priv->socket_descriptor, buffer + bytes_written, num_bytes - (size_t)bytes_written); - if (more <= 0 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { - // The error codes EAGAIN or EWOULDBLOCK indicate + ssize_t bytes_read = 0; + int retry_count = 0; + while (bytes_read < (ssize_t)num_bytes) { + ssize_t more = read(socket, buffer + bytes_read, num_bytes - (size_t)bytes_read); + if(more < 0 && retry_count++ < NUM_SOCKET_RETRIES + && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { + // Those error codes set by the socket indicates // that we should try again (@see man errno). - // The error code EINTR means the system call was interrupted before completing. - LF_PRINT_DEBUG("Writing to socket was blocked. Will try again."); + lf_print_warning("Reading from socket failed. Will try again."); lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); continue; } else if (more < 0) { // A more serious error occurred. return -1; + } else if (more == 0) { + // EOF received. + return 1; } - bytes_written += more; + bytes_read += more; } return 0; } -int write_to_netdrv_close_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { +int read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer) { socket_priv_t *priv = get_priv(drv); assert(&priv->socket_descriptor); - int result = write_to_netdrv(drv, num_bytes, buffer); - if (result) { - // Write failed. - // Netdrv has probably been closed from the other side. - // Shut down and close the netdrv from this side. + int read_failed = read_from_netdrv(drv, buffer); + if (read_failed) { drv->close(drv); + return -1; } - return result; + return 0; } -void write_to_netdrv_fail_on_error( +void read_from_netdrv_fail_on_error( netdrv_t *drv, - size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...) { va_list args; socket_priv_t *priv = get_priv(drv); assert(&priv->socket_descriptor); - int result = write_to_netdrv_close_on_error(drv, num_bytes, buffer); - if (result) { - // Write failed. + int read_failed = read_from_netdrv_close_on_error(drv, buffer); + if (read_failed) { + // Read failed. if (mutex != NULL) { lf_mutex_unlock(mutex); } if (format != NULL) { lf_print_error_system_failure(format, args); } else { - lf_print_error("Failed to write to socket. Closing it."); + lf_print_error_system_failure("Failed to read from netdrv."); } } +} + + + +int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { + socket_priv_t *priv = get_priv(netdrv); + net_read_from_socket(priv->socket_descriptor, 1, buffer); + int msg_type = buffer[0]; + buffer += 1; + switch (msg_type) { + + // case MSG_TYPE_REJECT: // 1 +1 + // break; + // case MSG_TYPE_ACK: // 1 + // break; + case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 + return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t), buffer); + case MSG_TYPE_FED_IDS: // 1 + sizeof(uint16_t) + 1 + federation_id + net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t) + 1, buffer); + size_t federation_id_length = (size_t)buffer[sizeof(uint16_t)]; + return net_read_from_socket(priv->socket_descriptor, federation_id_length, buffer + 1 + sizeof(uint16_t)); + + case MSG_TYPE_FED_NONCE: //1 + sizeof(uint16_t) + NONCE_LENGTH(8) + return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t) + NONCE_LENGTH, buffer); + + + // case MSG_TYPE_RTI_RESPONSE: //1 + sizeof(uint16_t) + NONCE_LENGTH(8) + // break; + + // case MSG_TYPE_FED_RESPONSE: //1 + NONCE_LENGTH(8) + // break; + + case MSG_TYPE_TIMESTAMP: // 1+sizeof(int64_t) + return net_read_from_socket(priv->socket_descriptor, sizeof(int64_t), buffer); + + // case MSG_TYPE_RESIGN: + // handle_federate_resign(my_fed); + // return NULL; + // case MSG_TYPE_TAGGED_MESSAGE: + // handle_timed_message(my_fed, buffer); + // break; + + + + + + // case MSG_TYPE_NEXT_EVENT_TAG: + // handle_next_event_tag(my_fed); + // break; + // case MSG_TYPE_TAG_ADVANCE_GRANT: + // handle_tag_advance_grant(); + // break; + // case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: + // handle_provisional_tag_advance_grant(); + // break; + + // case MSG_TYPE_LATEST_TAG_COMPLETE: + // handle_latest_tag_complete(my_fed); + // break; + // case MSG_TYPE_STOP_REQUEST: + // handle_stop_request_message(my_fed); + // case MSG_TYPE_STOP_REQUEST_REPLY: + // handle_stop_request_reply(my_fed); + // break; + // case MSG_TYPE_STOP_GRANTED: + // handle_stop_granted_message(); + // break; + + // case MSG_TYPE_ADDRESS_QUERY: + // handle_address_query(my_fed->enclave.id); + // break; + // case MSG_TYPE_ADDRESS_ADVERTISEMENT: + // handle_address_ad(my_fed->enclave.id); + // break; + + // case MSG_TYPE_P2P_SENDING_FED_ID: //1 /////////TODO: CHECK!!!!!!! + // break; + + // case MSG_TYPE_P2P_MESSAGE: + // LF_PRINT_LOG("Received untimed message from federate %d.", fed_id); + // if (handle_message(socket_id, fed_id)) { + // // Failed to complete the reading of a message on a physical connection. + // lf_print_warning("Failed to complete reading of message on physical connection."); + // socket_closed = true; + // } + // break; + // case MSG_TYPE_P2P_TAGGED_MESSAGE: + // LF_PRINT_LOG("Received tagged message from federate %d.", fed_id); + // if (handle_tagged_message(socket_id, fed_id)) { + // // P2P tagged messages are only used in decentralized coordination, and + // // it is not a fatal error if the socket is closed before the whole message is read. + // // But this thread should exit. + // lf_print_warning("Failed to complete reading of tagged message."); + // socket_closed = true; + // } + // break; + // case MSG_TYPE_CLOCK_SYNC_T1: + // break; + + case MSG_TYPE_CLOCK_SYNC_T3: + return net_read_from_socket(priv->socket_descriptor, sizeof(int32_t), buffer); + // case MSG_TYPE_CLOCK_SYNC_T4: + // break; + // case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: + // break; + // case MSG_TYPE_PORT_ABSENT: + // handle_port_absent_message(my_fed, buffer); + // break; + + case MSG_TYPE_NEIGHBOR_STRUCTURE: + net_read_from_socket(priv->socket_descriptor, MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1, buffer); + int num_upstream = extract_int32(buffer); + int num_downstream = extract_int32(buffer+sizeof(int32_t)); + size_t connections_info_body_size = ((sizeof(uint16_t) + sizeof(int64_t)) * num_upstream)+ (sizeof(uint16_t) * num_downstream); + return net_read_from_socket(priv->socket_descriptor, connections_info_body_size, buffer + MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1); + + + + + // case MSG_TYPE_FAILED: + // handle_federate_failed(my_fed); + // return NULL; + default: + return -1; + + } } \ No newline at end of file diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index d0b289705..81d9c59d6 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -89,50 +89,7 @@ void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv); netdrv_t *accept_connection(netdrv_t * rti_netdrv); -/** - * Read the specified number of bytes from the specified socket into the specified buffer. - * If an error occurs during this reading, return -1 and set errno to indicate - * the cause of the error. If the read succeeds in reading the specified number of bytes, - * return 0. If an EOF occurs before reading the specified number of bytes, return 1. - * This function repeats the read attempt until the specified number of bytes - * have been read, an EOF is read, or an error occurs. Specifically, errors EAGAIN, - * EWOULDBLOCK, and EINTR are not considered errors and instead trigger - * another attempt. A delay between attempts is given by DELAY_BETWEEN_SOCKET_RETRIES. - * @param socket The socket ID. - * @param num_bytes The number of bytes to read. - * @param buffer The buffer into which to put the bytes. - * @return 0 for success, 1 for EOF, and -1 for an error. - */ -int read_from_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); -/** - * Read the specified number of bytes to the specified socket using read_from_socket - * and close the socket if an error occurs. If an error occurs, this will change the - * socket ID pointed to by the first argument to -1 and will return -1. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. - */ -int read_from_netdrv_close_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); - -/** - * Read the specified number of bytes from the specified socket into the - * specified buffer. If a disconnect or an EOF occurs during this - * reading, then if format is non-null, report an error and exit. - * If the mutex argument is non-NULL, release the mutex before exiting. - * If format is null, then report the error, but do not exit. - * This function takes a formatted string and additional optional arguments - * similar to printf(format, ...) that is appended to the error messages. - * @param socket The socket ID. - * @param num_bytes The number of bytes to read. - * @param buffer The buffer into which to put the bytes. - * @param format A printf-style format string, followed by arguments to - * fill the string, or NULL to not exit with an error message. - * @return The number of bytes read, or 0 if an EOF is received, or - * a negative number for an error. - */ -void read_from_netdrv_fail_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...); /** * Without blocking, peek at the specified socket and, if there is @@ -193,4 +150,49 @@ void write_to_netdrv_fail_on_error( lf_mutex_t* mutex, char* format, ...); +/** + * Read the specified number of bytes from the specified socket into the specified buffer. + * If an error occurs during this reading, return -1 and set errno to indicate + * the cause of the error. If the read succeeds in reading the specified number of bytes, + * return 0. If an EOF occurs before reading the specified number of bytes, return 1. + * This function repeats the read attempt until the specified number of bytes + * have been read, an EOF is read, or an error occurs. Specifically, errors EAGAIN, + * EWOULDBLOCK, and EINTR are not considered errors and instead trigger + * another attempt. A delay between attempts is given by DELAY_BETWEEN_SOCKET_RETRIES. + * @param socket The socket ID. + * @param num_bytes The number of bytes to read. + * @param buffer The buffer into which to put the bytes. + * @return 0 for success, 1 for EOF, and -1 for an error. + */ +int read_from_netdrv(netdrv_t *drv, unsigned char* buffer); + +/** + * Read the specified number of bytes to the specified socket using read_from_socket + * and close the socket if an error occurs. If an error occurs, this will change the + * socket ID pointed to by the first argument to -1 and will return -1. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. + */ +int read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer); + +/** + * Read the specified number of bytes from the specified socket into the + * specified buffer. If a disconnect or an EOF occurs during this + * reading, then if format is non-null, report an error and exit. + * If the mutex argument is non-NULL, release the mutex before exiting. + * If format is null, then report the error, but do not exit. + * This function takes a formatted string and additional optional arguments + * similar to printf(format, ...) that is appended to the error messages. + * @param socket The socket ID. + * @param num_bytes The number of bytes to read. + * @param buffer The buffer into which to put the bytes. + * @param format A printf-style format string, followed by arguments to + * fill the string, or NULL to not exit with an error message. + * @return The number of bytes read, or 0 if an EOF is received, or + * a negative number for an error. + */ +void read_from_netdrv_fail_on_error(netdrv_t *drv, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...); + #endif // LF_SOCKET_SUPPORT_H diff --git a/include/core/federated/network/net_common.h b/include/core/federated/network/net_common.h index 85663ed80..b91e74d1b 100644 --- a/include/core/federated/network/net_common.h +++ b/include/core/federated/network/net_common.h @@ -354,6 +354,8 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define MSG_TYPE_FED_RESPONSE 102 + +// TODO: Need to be moved. /** * The randomly created nonce size will be 8 bytes. */ @@ -373,6 +375,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define MSG_TYPE_TIMESTAMP 2 #define MSG_TYPE_TIMESTAMP_LENGTH (1 + sizeof(int64_t)) +//TODO: Deprecated. /** Byte identifying a message to forward to another federate. * The next two bytes will be the ID of the destination port. * The next two bytes are the destination federate ID. From 232e34a7c3131d741900c708a44c5b9be908942c Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Fri, 26 Jan 2024 15:57:49 -0700 Subject: [PATCH 022/262] Handle address query fixed. --- core/federated/RTI/rti_remote.c | 40 +++++++--------------- core/federated/RTI/rti_remote.h | 2 +- core/federated/network/lf_socket_support.c | 6 ++-- 3 files changed, 16 insertions(+), 32 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 505a3d4f1..4eca45a9d 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -767,13 +767,11 @@ void handle_stop_request_reply(federate_info_t *fed) { ////////////////////////////////////////////////// -void handle_address_query(uint16_t fed_id) { +//TODO: The whole message needs to be changed. It should not be port and IP specific. +void handle_address_query(uint16_t fed_id, unsigned char *buffer) { federate_info_t *fed = GET_FED_INFO(fed_id); // Use buffer both for reading and constructing the reply. // The length is what is needed for the reply. - unsigned char buffer[1 + sizeof(int32_t)]; - read_from_socket_fail_on_error(&fed->socket, sizeof(uint16_t), (unsigned char *)buffer, NULL, - "Failed to read address query."); uint16_t remote_fed_id = extract_uint16(buffer); if (rti_remote->base.tracing_enabled) { @@ -785,25 +783,20 @@ void handle_address_query(uint16_t fed_id) { // NOTE: server_port initializes to -1, which means the RTI does not know // the port number because it has not yet received an MSG_TYPE_ADDRESS_ADVERTISEMENT message // from this federate. In that case, it will respond by sending -1. - - // Response message is also of type MSG_TYPE_ADDRESS_QUERY. - buffer[0] = MSG_TYPE_ADDRESS_QUERY; - - // Encode the port number. + federate_info_t *remote_fed = GET_FED_INFO(remote_fed_id); + unsigned char buf[1 + sizeof(int32_t) + sizeof(remote_fed->server_ip_addr)]; + // Response message is also of type MSG_TYPE_ADDRESS_QUERY. + buf[0] = MSG_TYPE_ADDRESS_QUERY; - // Send the port number (which could be -1). + // Send the port number (which could be -1) and server IP address to federate. LF_MUTEX_LOCK(rti_mutex); - encode_int32(remote_fed->server_port, (unsigned char *)&buffer[1]); - write_to_socket_fail_on_error( - &fed->socket, sizeof(int32_t) + 1, (unsigned char *)buffer, &rti_mutex, + encode_int32(remote_fed->server_port, (unsigned char *)&buf[1]); + memcpy(buf + 1 + sizeof(int32_t), (unsigned char *)&remote_fed->server_ip_addr, sizeof(remote_fed->server_ip_addr)); + write_to_netdrv_fail_on_error( + fed->fed_netdrv, sizeof(int32_t) + 1, (unsigned char *)buf, &rti_mutex, "Failed to write port number to socket of federate %d.", fed_id); - // Send the server IP address to federate. - write_to_socket_fail_on_error( - &fed->socket, sizeof(remote_fed->server_ip_addr), - (unsigned char *)&remote_fed->server_ip_addr, &rti_mutex, - "Failed to write ip address to socket of federate %d.", fed_id); LF_MUTEX_UNLOCK(rti_mutex); LF_PRINT_DEBUG("Replied to address query from federate %d with address %s:%d.", @@ -1210,7 +1203,7 @@ void *federate_info_thread_TCP(void *fed) { handle_timestamp(my_fed, buffer + 1); break; case MSG_TYPE_ADDRESS_QUERY: - handle_address_query(my_fed->enclave.id); + handle_address_query(my_fed->enclave.id, buffer + 1); break; case MSG_TYPE_ADDRESS_ADVERTISEMENT: handle_address_ad(my_fed->enclave.id); @@ -1380,15 +1373,6 @@ static int32_t net_receive_and_check_fed_id_message(netdrv_t *netdrv) { } federate_info_t *fed = GET_FED_INFO(fed_id); fed->fed_netdrv = netdrv; - //TODO: Done the process below in accept_connection(); Erase after fixing the TODO in #if below. - // // The MSG_TYPE_FED_IDS message has the right federation ID. - // // Assign the address information for federate. - // // The IP address is stored here as an in_addr struct (in .server_ip_addr) that can be useful - // // to create sockets and can be efficiently sent over the network. - // // First, convert the sockaddr structure into a sockaddr_in that contains an internet address. - // struct sockaddr_in *pV4_addr = client_fd; - // // Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server - // fed->server_ip_addr = pV4_addr->sin_addr; #if LOG_LEVEL >= LOG_LEVEL_DEBUG // Create the human readable format and copy that into diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 95866273d..cb28d867e 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -291,7 +291,7 @@ void handle_stop_request_reply(federate_info_t* fed); * period of time. * @param fed_id The federate sending a MSG_TYPE_ADDRESS_QUERY message. */ -void handle_address_query(uint16_t fed_id); +void handle_address_query(uint16_t fed_id, unsigned char *buffer); /** * Handle address advertisement messages (@see MSG_TYPE_ADDRESS_ADVERTISEMENT in net_common.h). diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 6d1dc1707..dee4bc692 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -535,9 +535,9 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { // handle_stop_granted_message(); // break; - // case MSG_TYPE_ADDRESS_QUERY: - // handle_address_query(my_fed->enclave.id); - // break; + case MSG_TYPE_ADDRESS_QUERY: + return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t), buffer); + break; // case MSG_TYPE_ADDRESS_ADVERTISEMENT: // handle_address_ad(my_fed->enclave.id); // break; From c4e6fb0787fbc67f3b5a0b3a13c15a2650f0decd Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 09:16:22 -0700 Subject: [PATCH 023/262] Fixed handle_address ad --- core/federated/RTI/rti_remote.c | 10 ++++------ core/federated/RTI/rti_remote.h | 2 +- core/federated/network/lf_socket_support.c | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 4eca45a9d..b34c0077f 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -803,21 +803,19 @@ void handle_address_query(uint16_t fed_id, unsigned char *buffer) { fed_id, remote_fed->server_hostname, remote_fed->server_port); } -void handle_address_ad(uint16_t federate_id) { +//TODO: NEED to be fixed. +void handle_address_ad(uint16_t federate_id, unsigned char *buffer) { federate_info_t *fed = GET_FED_INFO(federate_id); // Read the port number of the federate that can be used for physical // connections to other federates int32_t server_port = -1; - unsigned char buffer[sizeof(int32_t)]; - read_from_socket_fail_on_error(&fed->socket, sizeof(int32_t), (unsigned char *)buffer, NULL, - "Error reading port data from federate %d.", federate_id); server_port = extract_int32(buffer); assert(server_port < 65536); LF_MUTEX_LOCK(rti_mutex); - fed->server_port = server_port; + fed->server_port = server_port; //TODO: NEED to be fixed. LF_MUTEX_UNLOCK(rti_mutex); LF_PRINT_LOG("Received address advertisement with port %d from federate %d.", server_port, federate_id); @@ -1206,7 +1204,7 @@ void *federate_info_thread_TCP(void *fed) { handle_address_query(my_fed->enclave.id, buffer + 1); break; case MSG_TYPE_ADDRESS_ADVERTISEMENT: - handle_address_ad(my_fed->enclave.id); + handle_address_ad(my_fed->enclave.id, buffer + 1); break; case MSG_TYPE_TAGGED_MESSAGE: handle_timed_message(my_fed, buffer); diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index cb28d867e..a7ce9b0d9 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -308,7 +308,7 @@ void handle_address_query(uint16_t fed_id, unsigned char *buffer); * @param federate_id The id of the remote federate that is * sending the address advertisement. */ -void handle_address_ad(uint16_t federate_id); +void handle_address_ad(uint16_t federate_id, unsigned char *buffer) /** * A function to handle timestamp messages. diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index dee4bc692..cb2ea2467 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -538,9 +538,9 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { case MSG_TYPE_ADDRESS_QUERY: return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t), buffer); break; - // case MSG_TYPE_ADDRESS_ADVERTISEMENT: - // handle_address_ad(my_fed->enclave.id); - // break; + case MSG_TYPE_ADDRESS_ADVERTISEMENT: + return net_read_from_socket(priv->socket_descriptor, sizeof(int32_t), buffer); + break; // case MSG_TYPE_P2P_SENDING_FED_ID: //1 /////////TODO: CHECK!!!!!!! // break; From b4aca11d7a08388afac91a900c87ef56476ce2e3 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 10:00:54 -0700 Subject: [PATCH 024/262] Fix minor error on handle address ad --- core/federated/RTI/rti_remote.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index a7ce9b0d9..882e6cab3 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -308,7 +308,7 @@ void handle_address_query(uint16_t fed_id, unsigned char *buffer); * @param federate_id The id of the remote federate that is * sending the address advertisement. */ -void handle_address_ad(uint16_t federate_id, unsigned char *buffer) +void handle_address_ad(uint16_t federate_id, unsigned char *buffer); /** * A function to handle timestamp messages. From 9fb84b497224fc6023624709300fd361820ce90e Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 10:01:42 -0700 Subject: [PATCH 025/262] Add original read functions with close and fail --- core/federated/network/lf_socket_support.c | 41 +++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index cb2ea2467..0cf79851f 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -436,6 +436,44 @@ static int net_read_from_socket(int socket, size_t num_bytes, unsigned char* buf return 0; } +static int net_read_from_socket_close_on_error(int* socket, size_t num_bytes, unsigned char* buffer) { + assert(socket); + int read_failed = read_from_socket(*socket, num_bytes, buffer); + if (read_failed) { + // Read failed. + // Socket has probably been closed from the other side. + // Shut down and close the socket from this side. + shutdown(*socket, SHUT_RDWR); + close(*socket); + // Mark the socket closed. + *socket = -1; + return -1; + } + return 0; +} + +static void net_read_from_socket_fail_on_error( + int* socket, + size_t num_bytes, + unsigned char* buffer, + lf_mutex_t* mutex, + char* format, ...) { + va_list args; + assert(socket); + int read_failed = read_from_socket_close_on_error(socket, num_bytes, buffer); + if (read_failed) { + // Read failed. + if (mutex != NULL) { + lf_mutex_unlock(mutex); + } + if (format != NULL) { + lf_print_error_system_failure(format, args); + } else { + lf_print_error_system_failure("Failed to read from socket."); + } + } +} + int read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer) { socket_priv_t *priv = get_priv(drv); assert(&priv->socket_descriptor); @@ -539,7 +577,8 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t), buffer); break; case MSG_TYPE_ADDRESS_ADVERTISEMENT: - return net_read_from_socket(priv->socket_descriptor, sizeof(int32_t), buffer); + net_read_from_socket_fail_on_error(priv->socket_descriptor, sizeof(int32_t), (unsigned char *)buffer, NULL, + "Error reading port data."); break; // case MSG_TYPE_P2P_SENDING_FED_ID: //1 /////////TODO: CHECK!!!!!!! From 29cf5d8d43db57ae6227f60362c01c2130f7763a Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 10:02:22 -0700 Subject: [PATCH 026/262] Fix notify TAG's write functions --- core/federated/RTI/rti_remote.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index b34c0077f..5399bbe58 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -230,7 +230,7 @@ void notify_tag_advance_grant(scheduling_node_t *e, tag_t tag) { // This function is called in notify_advance_grant_if_safe(), which is a long // function. During this call, the socket might close, causing the following write_to_socket // to fail. Consider a failure here a soft failure and update the federate's status. - if (write_to_socket(((federate_info_t *)e)->socket, message_length, buffer)) { + if (write_to_netdrv(((federate_info_t *)e)->fed_netdrv, message_length, buffer)) { lf_print_error("RTI failed to send tag advance grant to federate %d.", e->id); e->state = NOT_CONNECTED; } else { @@ -264,7 +264,7 @@ void notify_provisional_tag_advance_grant(scheduling_node_t *e, tag_t tag) { // This function is called in notify_advance_grant_if_safe(), which is a long // function. During this call, the socket might close, causing the following write_to_socket // to fail. Consider a failure here a soft failure and update the federate's status. - if (write_to_socket(((federate_info_t *)e)->socket, message_length, buffer)) { + if (write_to_netdrv(((federate_info_t *)e)->fed_netdrv, message_length, buffer)) { lf_print_error("RTI failed to send tag advance grant to federate %d.", e->id); e->state = NOT_CONNECTED; } else { From 3c6b5ab0e35fda92d91121eb16bab50f046e9700 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 10:17:23 -0700 Subject: [PATCH 027/262] Pass handle_federate_resign --- core/federated/RTI/rti_remote.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 5399bbe58..1ef6814c4 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1135,6 +1135,7 @@ static void handle_federate_failed(federate_info_t *my_fed) { * * @param my_fed The federate sending a MSG_TYPE_RESIGN message. */ +//TODO: NEEDS TO BE CHANGED. static void handle_federate_resign(federate_info_t *my_fed) { // Nothing more to do. Close the socket and exit. LF_MUTEX_LOCK(rti_mutex); From a029c66e5b62faf790ddd1257495ddb5e360a4a2 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 10:24:16 -0700 Subject: [PATCH 028/262] Fixed handle_next_event_tag --- core/federated/RTI/rti_remote.c | 9 ++------- core/federated/RTI/rti_remote.h | 2 +- core/federated/network/lf_socket_support.c | 8 ++++---- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 1ef6814c4..c5552a3cc 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -540,12 +540,7 @@ void handle_latest_tag_complete(federate_info_t *fed) { LF_MUTEX_UNLOCK(rti_mutex); } -void handle_next_event_tag(federate_info_t *fed) { - unsigned char buffer[sizeof(int64_t) + sizeof(uint32_t)]; - read_from_socket_fail_on_error(&fed->socket, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, - "RTI failed to read the content of the next event tag from federate %d.", - fed->enclave.id); - +void handle_next_event_tag(federate_info_t *fed, unsigned char *buffer) { // Acquire a mutex lock to ensure that this state does not change while a // message is in transport or being used to determine a TAG. LF_MUTEX_LOCK(rti_mutex); // FIXME: Instead of using a mutex, it might be more efficient to use a @@ -1214,7 +1209,7 @@ void *federate_info_thread_TCP(void *fed) { handle_federate_resign(my_fed); return NULL; case MSG_TYPE_NEXT_EVENT_TAG: - handle_next_event_tag(my_fed); + handle_next_event_tag(my_fed, buffer + 1); break; case MSG_TYPE_LATEST_TAG_COMPLETE: handle_latest_tag_complete(my_fed); diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 882e6cab3..627267362 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -256,7 +256,7 @@ void handle_latest_tag_complete(federate_info_t* fed); * * @param fed The federate sending a NET message. */ -void handle_next_event_tag(federate_info_t* fed); +void handle_next_event_tag(federate_info_t *fed, unsigned char *buffer); /////////////////// STOP functions //////////////////// diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 0cf79851f..9c118ac18 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -551,9 +551,9 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { - // case MSG_TYPE_NEXT_EVENT_TAG: - // handle_next_event_tag(my_fed); - // break; + case MSG_TYPE_NEXT_EVENT_TAG: + net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, + "RTI failed to read the content of the next event tag"); // case MSG_TYPE_TAG_ADVANCE_GRANT: // handle_tag_advance_grant(); // break; @@ -577,7 +577,7 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t), buffer); break; case MSG_TYPE_ADDRESS_ADVERTISEMENT: - net_read_from_socket_fail_on_error(priv->socket_descriptor, sizeof(int32_t), (unsigned char *)buffer, NULL, + net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int32_t), (unsigned char *)buffer, NULL, "Error reading port data."); break; From 9f2ea2a4e4bff13f945bc52fb36db3cad554a9f7 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 10:29:09 -0700 Subject: [PATCH 029/262] Fix handle_latest_tag_complete --- core/federated/RTI/rti_remote.c | 8 ++------ core/federated/RTI/rti_remote.h | 2 +- core/federated/network/lf_socket_support.c | 8 ++++---- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index c5552a3cc..ebcbbbc86 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -522,11 +522,7 @@ void handle_timed_message(federate_info_t *sending_federate, unsigned char *buff LF_MUTEX_UNLOCK(rti_mutex); } -void handle_latest_tag_complete(federate_info_t *fed) { - unsigned char buffer[sizeof(int64_t) + sizeof(uint32_t)]; - read_from_socket_fail_on_error(&fed->socket, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, - "RTI failed to read the content of the logical tag complete from federate %d.", - fed->enclave.id); +void handle_latest_tag_complete(federate_info_t *fed, unsigned char *buffer) { tag_t completed = extract_tag(buffer); if (rti_remote->base.tracing_enabled) { tracepoint_rti_from_federate(rti_remote->base.trace, receive_LTC, fed->enclave.id, &completed); @@ -1212,7 +1208,7 @@ void *federate_info_thread_TCP(void *fed) { handle_next_event_tag(my_fed, buffer + 1); break; case MSG_TYPE_LATEST_TAG_COMPLETE: - handle_latest_tag_complete(my_fed); + handle_latest_tag_complete(my_fed, buffer + 1); break; case MSG_TYPE_STOP_REQUEST: handle_stop_request_message(my_fed); // FIXME: Reviewed until here. diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 627267362..2a325be02 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -247,7 +247,7 @@ void handle_timed_message(federate_info_t* sending_federate, unsigned char* buff * * @param fed The federate that has completed a logical tag. */ -void handle_latest_tag_complete(federate_info_t* fed); +void handle_latest_tag_complete(federate_info_t* fed, unsigned char *buffer); /** * Handle a next event tag (NET) message. @see MSG_TYPE_NEXT_EVENT_TAG in rti.h. diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 9c118ac18..41f012a91 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -553,7 +553,7 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { case MSG_TYPE_NEXT_EVENT_TAG: net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, - "RTI failed to read the content of the next event tag"); + "RTI failed to read the content of the next event tag"); // case MSG_TYPE_TAG_ADVANCE_GRANT: // handle_tag_advance_grant(); // break; @@ -561,9 +561,9 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { // handle_provisional_tag_advance_grant(); // break; - // case MSG_TYPE_LATEST_TAG_COMPLETE: - // handle_latest_tag_complete(my_fed); - // break; + case MSG_TYPE_LATEST_TAG_COMPLETE: + net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, + "RTI failed to read the content of the logical tag complete"); // case MSG_TYPE_STOP_REQUEST: // handle_stop_request_message(my_fed); // case MSG_TYPE_STOP_REQUEST_REPLY: From 29dec4e6d40211956a6477b2b49bfcf34af9b6ad Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 10:46:50 -0700 Subject: [PATCH 030/262] Fixed handle_stop_request_message --- core/federated/RTI/rti_remote.c | 20 +++++--------------- core/federated/RTI/rti_remote.h | 2 +- core/federated/network/lf_socket_support.c | 11 ++++++----- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index ebcbbbc86..4c2f8056a 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -594,8 +594,8 @@ static void broadcast_stop_time_to_federates_locked() { if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_STOP_GRN, fed->enclave.id, &rti_remote->base.max_stop_tag); } - write_to_socket_fail_on_error( - &fed->socket, MSG_TYPE_STOP_GRANTED_LENGTH, outgoing_buffer, &rti_mutex, + write_to_netdrv_fail_on_error( + fed->fed_netdrv, MSG_TYPE_STOP_GRANTED_LENGTH, outgoing_buffer, &rti_mutex, "RTI failed to send MSG_TYPE_STOP_GRANTED message to federate %d.", fed->enclave.id); } @@ -646,15 +646,9 @@ static void* wait_for_stop_request_reply(void* args) { return NULL; } -void handle_stop_request_message(federate_info_t *fed) { +void handle_stop_request_message(federate_info_t *fed, unsigned char *buffer) { LF_PRINT_DEBUG("RTI handling stop_request from federate %d.", fed->enclave.id); - size_t bytes_to_read = MSG_TYPE_STOP_REQUEST_LENGTH - 1; - unsigned char buffer[bytes_to_read]; - read_from_socket_fail_on_error(&fed->socket, bytes_to_read, buffer, NULL, - "RTI failed to read the MSG_TYPE_STOP_REQUEST payload from federate %d.", - fed->enclave.id); - // Extract the proposed stop tag for the federate tag_t proposed_stop_tag = extract_tag(buffer); @@ -719,7 +713,7 @@ void handle_stop_request_message(federate_info_t *fed) { if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_STOP_REQ, f->enclave.id, &rti_remote->base.max_stop_tag); } - write_to_socket_fail_on_error(&f->socket, MSG_TYPE_STOP_REQUEST_LENGTH, stop_request_buffer, &rti_mutex, + write_to_netdrv_fail_on_error(f->fed_netdrv, MSG_TYPE_STOP_REQUEST_LENGTH, stop_request_buffer, &rti_mutex, "RTI failed to forward MSG_TYPE_STOP_REQUEST message to federate %d.", f->enclave.id); } } @@ -1211,11 +1205,7 @@ void *federate_info_thread_TCP(void *fed) { handle_latest_tag_complete(my_fed, buffer + 1); break; case MSG_TYPE_STOP_REQUEST: - handle_stop_request_message(my_fed); // FIXME: Reviewed until here. - // Need to also look at - // notify_advance_grant_if_safe() - // and notify_downstream_advance_grant_if_safe() - break; + handle_stop_request_message(my_fed, buffer + 1); case MSG_TYPE_STOP_REQUEST_REPLY: handle_stop_request_reply(my_fed); break; diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 2a325be02..324b65de0 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -267,7 +267,7 @@ void handle_next_event_tag(federate_info_t *fed, unsigned char *buffer); * * @param fed The federate sending a MSG_TYPE_STOP_REQUEST message. */ -void handle_stop_request_message(federate_info_t* fed); +void handle_stop_request_message(federate_info_t *fed, unsigned char *buffer); /** * Handle a MSG_TYPE_STOP_REQUEST_REPLY message. diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 41f012a91..64c9c9264 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -553,7 +553,7 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { case MSG_TYPE_NEXT_EVENT_TAG: net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, - "RTI failed to read the content of the next event tag"); + "RTI failed to read the content of the next event tag."); // case MSG_TYPE_TAG_ADVANCE_GRANT: // handle_tag_advance_grant(); // break; @@ -563,9 +563,10 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { case MSG_TYPE_LATEST_TAG_COMPLETE: net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, - "RTI failed to read the content of the logical tag complete"); - // case MSG_TYPE_STOP_REQUEST: - // handle_stop_request_message(my_fed); + "RTI failed to read the content of the logical tag complete."); + case MSG_TYPE_STOP_REQUEST: + net_read_from_socket_fail_on_error(&priv->socket_descriptor, MSG_TYPE_STOP_REQUEST_LENGTH - 1, buffer, NULL, + "RTI failed to read the MSG_TYPE_STOP_REQUEST payload."); // case MSG_TYPE_STOP_REQUEST_REPLY: // handle_stop_request_reply(my_fed); // break; @@ -578,7 +579,7 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { break; case MSG_TYPE_ADDRESS_ADVERTISEMENT: net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int32_t), (unsigned char *)buffer, NULL, - "Error reading port data."); + "Error reading port data."); break; // case MSG_TYPE_P2P_SENDING_FED_ID: //1 /////////TODO: CHECK!!!!!!! From c89de1ebe9e85e3b2d96e48eb6f9c376e6705306 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 10:49:24 -0700 Subject: [PATCH 031/262] Fixed handle_stop_request_reply --- core/federated/RTI/rti_remote.c | 12 +++--------- core/federated/RTI/rti_remote.h | 2 +- core/federated/network/lf_socket_support.c | 6 +++--- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 4c2f8056a..72a49ba37 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -723,14 +723,8 @@ void handle_stop_request_message(federate_info_t *fed, unsigned char *buffer) { LF_MUTEX_UNLOCK(rti_mutex); } -void handle_stop_request_reply(federate_info_t *fed) { - size_t bytes_to_read = MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1; - unsigned char buffer_stop_time[bytes_to_read]; - read_from_socket_fail_on_error(&fed->socket, bytes_to_read, buffer_stop_time, NULL, - "RTI failed to read the reply to MSG_TYPE_STOP_REQUEST message from federate %d.", - fed->enclave.id); - - tag_t federate_stop_tag = extract_tag(buffer_stop_time); +void handle_stop_request_reply(federate_info_t *fed, unsigned char *buffer) { + tag_t federate_stop_tag = extract_tag(buffer); if (rti_remote->base.tracing_enabled) { tracepoint_rti_from_federate(rti_remote->base.trace, receive_STOP_REQ_REP, fed->enclave.id, &federate_stop_tag); @@ -1207,7 +1201,7 @@ void *federate_info_thread_TCP(void *fed) { case MSG_TYPE_STOP_REQUEST: handle_stop_request_message(my_fed, buffer + 1); case MSG_TYPE_STOP_REQUEST_REPLY: - handle_stop_request_reply(my_fed); + handle_stop_request_reply(my_fed, buffer + 1); break; case MSG_TYPE_PORT_ABSENT: handle_port_absent_message(my_fed, buffer); diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 324b65de0..e58056ca5 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -276,7 +276,7 @@ void handle_stop_request_message(federate_info_t *fed, unsigned char *buffer); * * @param fed The federate replying the MSG_TYPE_STOP_REQUEST */ -void handle_stop_request_reply(federate_info_t* fed); +void handle_stop_request_reply(federate_info_t* fed, unsigned char *buffer); ////////////////////////////////////////////////// diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 64c9c9264..f254a8da7 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -567,9 +567,9 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { case MSG_TYPE_STOP_REQUEST: net_read_from_socket_fail_on_error(&priv->socket_descriptor, MSG_TYPE_STOP_REQUEST_LENGTH - 1, buffer, NULL, "RTI failed to read the MSG_TYPE_STOP_REQUEST payload."); - // case MSG_TYPE_STOP_REQUEST_REPLY: - // handle_stop_request_reply(my_fed); - // break; + case MSG_TYPE_STOP_REQUEST_REPLY: + net_read_from_socket_fail_on_error(&priv->socket_descriptor, MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1, buffer, NULL, + "RTI failed to read the reply to MSG_TYPE_STOP_REQUEST message."); // case MSG_TYPE_STOP_GRANTED: // handle_stop_granted_message(); // break; From baa879369413bb07c28ab9f302584bba392ce273 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 11:03:21 -0700 Subject: [PATCH 032/262] Fixed handle_port_absent_message. --- core/federated/RTI/rti_remote.c | 16 +++++----------- core/federated/network/lf_socket_support.c | 8 ++++---- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 72a49ba37..ffcceb0d9 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -312,16 +312,9 @@ void update_federate_next_event_tag_locked(uint16_t federate_id, tag_t next_even } void handle_port_absent_message(federate_info_t *sending_federate, unsigned char *buffer) { - size_t message_size = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); - - read_from_socket_fail_on_error( - &sending_federate->socket, message_size, &(buffer[1]), NULL, - " RTI failed to read port absent message from federate %u.", - sending_federate->enclave.id); - - uint16_t reactor_port_id = extract_uint16(&(buffer[1])); - uint16_t federate_id = extract_uint16(&(buffer[1 + sizeof(uint16_t)])); - tag_t tag = extract_tag(&(buffer[1 + 2 * sizeof(uint16_t)])); + uint16_t reactor_port_id = extract_uint16(buffer + 1); + uint16_t federate_id = extract_uint16(buffer + 1 + sizeof(uint16_t)); + tag_t tag = extract_tag(buffer + 1 + 2 * sizeof(uint16_t)); if (rti_remote->base.tracing_enabled) { tracepoint_rti_from_federate(rti_remote->base.trace, receive_PORT_ABS, sending_federate->enclave.id, &tag); @@ -370,7 +363,8 @@ void handle_port_absent_message(federate_info_t *sending_federate, unsigned char } // Forward the message. - write_to_socket_fail_on_error(&fed->socket, message_size + 1, buffer, &rti_mutex, + size_t message_size = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); + write_to_netdrv_fail_on_error(&fed->socket, message_size + 1, buffer, &rti_mutex, "RTI failed to forward message to federate %d.", federate_id); LF_MUTEX_UNLOCK(rti_mutex); diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index f254a8da7..37affa35e 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -578,7 +578,7 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t), buffer); break; case MSG_TYPE_ADDRESS_ADVERTISEMENT: - net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int32_t), (unsigned char *)buffer, NULL, + net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int32_t), buffer, NULL, "Error reading port data."); break; @@ -612,9 +612,9 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { // break; // case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: // break; - // case MSG_TYPE_PORT_ABSENT: - // handle_port_absent_message(my_fed, buffer); - // break; + case MSG_TYPE_PORT_ABSENT: + net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, + "RTI failed to read port absent message."); case MSG_TYPE_NEIGHBOR_STRUCTURE: net_read_from_socket(priv->socket_descriptor, MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1, buffer); From 13feaab9eae2474a269c72a2d8ecf105daaf152b Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 11:08:34 -0700 Subject: [PATCH 033/262] Fixed handle_federate_failed. --- core/federated/RTI/rti_remote.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index ffcceb0d9..9fa284b54 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -364,7 +364,7 @@ void handle_port_absent_message(federate_info_t *sending_federate, unsigned char // Forward the message. size_t message_size = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); - write_to_netdrv_fail_on_error(&fed->socket, message_size + 1, buffer, &rti_mutex, + write_to_netdrv_fail_on_error(fed->fed_netdrv, message_size + 1, buffer, &rti_mutex, "RTI failed to forward message to federate %d.", federate_id); LF_MUTEX_UNLOCK(rti_mutex); @@ -1077,14 +1077,8 @@ static void handle_federate_failed(federate_info_t *my_fed) { // Indicate that there will no further events from this federate. my_fed->enclave.next_event = FOREVER_TAG; - // According to this: https://stackoverflow.com/questions/4160347/close-vs-shutdown-socket, - // the close should happen when receiving a 0 length message from the other end. - // Here, we just signal the other side that no further writes to the socket are - // forthcoming, which should result in the other end getting a zero-length reception. - shutdown(my_fed->socket, SHUT_RDWR); - - // We can now safely close the socket. - close(my_fed->socket); // from unistd.h + // Shutdown and close netdriver. + my_fed->fed_netdrv->close(my_fed->fed_netdrv); // Check downstream federates to see whether they should now be granted a TAG. // To handle cycles, need to create a boolean array to keep @@ -1229,7 +1223,7 @@ void net_send_reject(netdrv_t *netdrv, unsigned char error_code) { if (write_to_netdrv(netdrv, 2, response)) { lf_print_warning("RTI failed to write MSG_TYPE_REJECT message on the socket."); } - // Close the netdrv. + // Shutdown and close the netdrv. netdrv->close(netdrv); LF_MUTEX_UNLOCK(rti_mutex); } From 219b0cf8e9f28d60f07244aedd0c0190b5503369 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 11:16:17 -0700 Subject: [PATCH 034/262] Fix main function --- core/federated/RTI/main.c | 16 +++++++++------- core/federated/RTI/rti_remote.c | 5 +++-- core/federated/RTI/rti_remote.h | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index f8d043225..317daf319 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -333,16 +333,18 @@ int main(int argc, const char* argv[]) { rti.base.scheduling_nodes[i] = (scheduling_node_t *) fed_info; } // TODO: Need to add user_specified_port - start_net_rti_server(); - net_wait_for_federates(rti.rti_netdrv); - normal_termination = true; - if (rti.base.tracing_enabled) { - // No need for a mutex lock because all threads have exited. - stop_trace_locked(rti.base.trace); - lf_print("RTI trace file saved."); + if (start_net_rti_server()){ + net_wait_for_federates(rti.rti_netdrv); + normal_termination = true; + if (rti.base.tracing_enabled) { + // No need for a mutex lock because all threads have exited. + stop_trace_locked(rti.base.trace); + lf_print("RTI trace file saved."); + } } + // int socket_descriptor = start_rti_server(rti.user_specified_port); // if (socket_descriptor >= 0) { // wait_for_federates(socket_descriptor); diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 9fa284b54..a83f28e86 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -2100,15 +2100,16 @@ void initialize_federate(federate_info_t *fed, uint16_t id) { fed->clock_netdrv = netdrv_init(); } -void start_net_rti_server() { +int32_t start_net_rti_server() { _lf_initialize_clock(); // Create the RTI's netdriver. - create_net_server(rti_remote->rti_netdrv, RTI); + int success = create_net_server(rti_remote->rti_netdrv, RTI); lf_print("RTI: Listening for federates."); // Create the clocksync's netdriver. if (rti_remote->clock_sync_global_status >= clock_sync_on) { create_net_server(rti_remote->clock_netdrv, CLOCKSYNC); } + return success; } int32_t start_rti_server(uint16_t port) { diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index e58056ca5..da05015d4 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -392,7 +392,7 @@ void* respond_to_erroneous_connections(void* nothing); void initialize_federate(federate_info_t* fed, uint16_t id); //TODO: Need to add descriptions. -void start_net_rti_server(); +int32_t start_net_rti_server(); /** * Start the socket server for the runtime infrastructure (RTI) and From 878715ede67aae4f8e58ce15ca17f5191d8b3b15 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 11:22:54 -0700 Subject: [PATCH 035/262] Try fixing net function for git history --- core/federated/RTI/rti_remote.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index a83f28e86..63313f482 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -2100,31 +2100,18 @@ void initialize_federate(federate_info_t *fed, uint16_t id) { fed->clock_netdrv = netdrv_init(); } -int32_t start_net_rti_server() { +int32_t start_rti_server() { _lf_initialize_clock(); // Create the RTI's netdriver. - int success = create_net_server(rti_remote->rti_netdrv, RTI); + int success = create_rti_server(rti_remote->rti_netdrv, RTI); lf_print("RTI: Listening for federates."); // Create the clocksync's netdriver. if (rti_remote->clock_sync_global_status >= clock_sync_on) { - create_net_server(rti_remote->clock_netdrv, CLOCKSYNC); + create_rti_server(rti_remote->clock_netdrv, CLOCKSYNC); } return success; } -int32_t start_rti_server(uint16_t port) { - _lf_initialize_clock(); - // Create the TCP socket server - rti_remote->socket_descriptor_TCP = create_rti_server(port, TCP); - lf_print("RTI: Listening for federates."); - // Create the UDP socket server - // Try to get the rti_remote->final_port_TCP + 1 port - if (rti_remote->clock_sync_global_status >= clock_sync_on) { - rti_remote->socket_descriptor_UDP = create_rti_server(rti_remote->final_port_TCP + 1, UDP); - } - return rti_remote->socket_descriptor_TCP; -} - void net_wait_for_federates(netdrv_t *netdrv) { // Wait for connections from federates and create a thread for each. net_lf_connect_to_federates(netdrv); From e16f8a02c69b9f593fe0b126f0d50d923ae3ff9b Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 11:33:25 -0700 Subject: [PATCH 036/262] Remove net_wait_for_federates for history --- core/federated/RTI/main.c | 15 +--------- core/federated/RTI/rti_remote.c | 53 +++------------------------------ core/federated/RTI/rti_remote.h | 32 ++++++++++---------- 3 files changed, 21 insertions(+), 79 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index 317daf319..c3b3bb9af 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -334,7 +334,7 @@ int main(int argc, const char* argv[]) { } // TODO: Need to add user_specified_port if (start_net_rti_server()){ - net_wait_for_federates(rti.rti_netdrv); + wait_for_federates(rti.rti_netdrv); normal_termination = true; if (rti.base.tracing_enabled) { // No need for a mutex lock because all threads have exited. @@ -343,19 +343,6 @@ int main(int argc, const char* argv[]) { } } - - -// int socket_descriptor = start_rti_server(rti.user_specified_port); -// if (socket_descriptor >= 0) { -// wait_for_federates(socket_descriptor); -// normal_termination = true; -// if (rti.base.tracing_enabled) { -// // No need for a mutex lock because all threads have exited. -// stop_trace_locked(rti.base.trace); -// lf_print("RTI trace file saved."); -// } -// } - lf_print("RTI is exiting."); // Do this before freeing scheduling nodes. free_scheduling_nodes(rti.base.scheduling_nodes, rti.base.number_of_scheduling_nodes); diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 63313f482..19492db7a 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -2112,7 +2112,7 @@ int32_t start_rti_server() { return success; } -void net_wait_for_federates(netdrv_t *netdrv) { +void wait_for_federates(netdrv_t *netdrv) { // Wait for connections from federates and create a thread for each. net_lf_connect_to_federates(netdrv); @@ -2138,54 +2138,9 @@ void net_wait_for_federates(netdrv_t *netdrv) { rti_remote->all_federates_exited = true; - close_netdrvs(netdrv, rti_remote->clock_netdrv); -} - -void wait_for_federates(int socket_descriptor) { - // Wait for connections from federates and create a thread for each. - lf_connect_to_federates(socket_descriptor); - - // All federates have connected. - lf_print("RTI: All expected federates have connected. Starting execution."); - - // The socket server will not continue to accept connections after all the federates - // have joined. - // In case some other federation's federates are trying to join the wrong - // federation, need to respond. Start a separate thread to do that. - lf_thread_t responder_thread; - lf_thread_create(&responder_thread, respond_to_erroneous_connections, NULL); - - // Wait for federate threads to exit. - void *thread_exit_status; - for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { - federate_info_t *fed = GET_FED_INFO(i); - lf_print("RTI: Waiting for thread handling federate %d.", fed->enclave.id); - lf_thread_join(fed->thread_id, &thread_exit_status); - pqueue_tag_free(fed->in_transit_message_tags); - lf_print("RTI: Federate %d thread exited.", fed->enclave.id); - } - - rti_remote->all_federates_exited = true; - - // Shutdown and close the socket that is listening for incoming connections - // so that the accept() call in respond_to_erroneous_connections returns. - // That thread should then check rti->all_federates_exited and it should exit. - if (shutdown(socket_descriptor, SHUT_RDWR)) { - LF_PRINT_LOG("On shut down TCP socket, received reply: %s", strerror(errno)); - } - // NOTE: In all common TCP/IP stacks, there is a time period, - // typically between 30 and 120 seconds, called the TIME_WAIT period, - // before the port is released after this close. This is because - // the OS is preventing another program from accidentally receiving - // duplicated packets intended for this program. - close(socket_descriptor); - - if (rti_remote->socket_descriptor_UDP > 0) { - if (shutdown(rti_remote->socket_descriptor_UDP, SHUT_RDWR)) { - LF_PRINT_LOG("On shut down UDP socket, received reply: %s", strerror(errno)); - } - close(rti_remote->socket_descriptor_UDP); - } + netdrv->close(netdrv); + rti_remote->clock_netdrv->close(rti_remote->clock_netdrv); + // close_netdrvs(netdrv, rti_remote->clock_netdrv); } void initialize_RTI(rti_remote_t *rti) { diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index da05015d4..afddbc4fd 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -394,24 +394,24 @@ void initialize_federate(federate_info_t* fed, uint16_t id); //TODO: Need to add descriptions. int32_t start_net_rti_server(); -/** - * Start the socket server for the runtime infrastructure (RTI) and - * return the socket descriptor. - * @param num_feds Number of federates. - * @param port The port on which to listen for socket connections, or - * 0 to use the default port range. - */ -int32_t start_rti_server(uint16_t port); +// /** +// * Start the socket server for the runtime infrastructure (RTI) and +// * return the socket descriptor. +// * @param num_feds Number of federates. +// * @param port The port on which to listen for socket connections, or +// * 0 to use the default port range. +// */ +// int32_t start_rti_server(uint16_t port); //TODO: Add documentation. -void net_wait_for_federates(netdrv_t *netdrv); - -/** - * Start the runtime infrastructure (RTI) interaction with the federates - * and wait for the federates to exit. - * @param socket_descriptor The socket descriptor returned by start_rti_server(). - */ -void wait_for_federates(int socket_descriptor); +void wait_for_federates(netdrv_t *netdrv); + +// /** +// * Start the runtime infrastructure (RTI) interaction with the federates +// * and wait for the federates to exit. +// * @param socket_descriptor The socket descriptor returned by start_rti_server(). +// */ +// void wait_for_federates(int socket_descriptor); /** * Print a usage message. From 2daa206fc3cd7b51b1339647022567d1b5617960 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 11:48:50 -0700 Subject: [PATCH 037/262] Fix function names to original names --- core/federated/RTI/main.c | 2 +- core/federated/RTI/rti_remote.c | 556 +----------------- core/federated/RTI/rti_remote.h | 9 +- core/federated/network/lf_socket_support.c | 19 +- .../federated/network/lf_socket_support.h | 3 +- 5 files changed, 34 insertions(+), 555 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index c3b3bb9af..c88f5c20e 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -333,7 +333,7 @@ int main(int argc, const char* argv[]) { rti.base.scheduling_nodes[i] = (scheduling_node_t *) fed_info; } // TODO: Need to add user_specified_port - if (start_net_rti_server()){ + if (start_rti_server()){ wait_for_federates(rti.rti_netdrv); normal_termination = true; if (rti.base.tracing_enabled) { diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 19492db7a..d5c3c02e0 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -56,156 +56,6 @@ extern int lf_critical_section_exit(environment_t *env) { return lf_mutex_unlock(&rti_mutex); } -/** - * Create a server and enable listening for socket connections. - * If the specified port if it is non-zero, it will attempt to acquire that port. - * If it fails, it will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times with - * a delay of PORT_BIND_RETRY_INTERVAL in between. If the specified port is - * zero, then it will attempt to acquire DEFAULT_PORT first. If this fails, then it - * will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times, incrementing the port - * number between attempts, with no delay between attempts. Once it has incremented - * the port number MAX_NUM_PORT_ADDRESSES times, it will cycle around and begin again - * with DEFAULT_PORT. - * - * @param port The port number to use or 0 to start trying at DEFAULT_PORT. - * @param socket_type The type of the socket for the server (TCP or UDP). - * @return The socket descriptor on which to accept connections. - */ -static int create_rti_server(uint16_t port, socket_type_t socket_type) { - // Timeout time for the communications of the server - struct timeval timeout_time = { - .tv_sec = TCP_TIMEOUT_TIME / BILLION, - .tv_usec = (TCP_TIMEOUT_TIME % BILLION) / 1000 - }; - // Create an IPv4 socket for TCP (not UDP) communication over IP (0). - int socket_descriptor = -1; - if (socket_type == TCP) { - socket_descriptor = create_real_time_tcp_socket_errexit(); - } else if (socket_type == UDP) { - socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - // Set the appropriate timeout time - timeout_time = (struct timeval){ - .tv_sec = UDP_TIMEOUT_TIME / BILLION, - .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000 - }; - } - if (socket_descriptor < 0) { - lf_print_error_system_failure("Failed to create RTI socket."); - } - - // Set the option for this socket to reuse the same address - int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option - if (setsockopt( - socket_descriptor, - SOL_SOCKET, - SO_REUSEADDR, - &true_variable, - sizeof(int32_t)) < 0) { - lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno)); - } - // Set the timeout on the socket so that read and write operations don't block for too long - if (setsockopt( - socket_descriptor, - SOL_SOCKET, - SO_RCVTIMEO, - (const char *)&timeout_time, - sizeof(timeout_time)) < 0) { - lf_print_error("RTI failed to set SO_RCVTIMEO option on the socket: %s.", strerror(errno)); - } - if (setsockopt( - socket_descriptor, - SOL_SOCKET, - SO_SNDTIMEO, - (const char *)&timeout_time, - sizeof(timeout_time)) < 0) { - lf_print_error("RTI failed to set SO_SNDTIMEO option on the socket: %s.", strerror(errno)); - } - - /* - * The following used to permit reuse of a port that an RTI has previously - * used that has not been released. We no longer do this, and instead retry - * some number of times after waiting. - - // SO_REUSEPORT (since Linux 3.9) - // Permits multiple AF_INET or AF_INET6 sockets to be bound to an - // identical socket address. This option must be set on each - // socket (including the first socket) prior to calling bind(2) - // on the socket. To prevent port hijacking, all of the - // processes binding to the same address must have the same - // effective UID. This option can be employed with both TCP and - // UDP sockets. - - int reuse = 1; - #ifdef SO_REUSEPORT - if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEPORT, - (const char*)&reuse, sizeof(reuse)) < 0) { - perror("setsockopt(SO_REUSEPORT) failed"); - } - #endif - */ - - // Server file descriptor. - struct sockaddr_in server_fd; - // Zero out the server address structure. - bzero((char *)&server_fd, sizeof(server_fd)); - - uint16_t specified_port = port; - if (specified_port == 0) port = DEFAULT_PORT; - - server_fd.sin_family = AF_INET; // IPv4 - server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. - // Convert the port number from host byte order to network byte order. - server_fd.sin_port = htons(port); - - int result = bind( - socket_descriptor, - (struct sockaddr *)&server_fd, - sizeof(server_fd)); - - // Try repeatedly to bind to a port. If no specific port is specified, then - // increment the port number each time. - - int count = 1; - while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { - if (specified_port == 0) { - lf_print_warning("RTI failed to get port %d.", port); - port++; - if (port >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) port = DEFAULT_PORT; - lf_print_warning("RTI will try again with port %d.", port); - server_fd.sin_port = htons(port); - // Do not sleep. - } else { - lf_print("RTI failed to get port %d. Will try again.", port); - lf_sleep(PORT_BIND_RETRY_INTERVAL); - } - result = bind( - socket_descriptor, - (struct sockaddr *)&server_fd, - sizeof(server_fd)); - } - if (result != 0) { - lf_print_error_and_exit("Failed to bind the RTI socket. Port %d is not available. ", port); - } - char *type = "TCP"; - if (socket_type == UDP) { - type = "UDP"; - } - lf_print("RTI using %s port %d for federation %s.", type, port, rti_remote->federation_id); - - if (socket_type == TCP) { - rti_remote->final_port_TCP = port; - // Enable listening for socket connections. - // The second argument is the maximum number of queued socket requests, - // which according to the Mac man page is limited to 128. - listen(socket_descriptor, 128); - } else if (socket_type == UDP) { - rti_remote->final_port_UDP = port; - // No need to listen on the UDP socket - } - - return socket_descriptor; -} - void notify_tag_advance_grant(scheduling_node_t *e, tag_t tag) { if (e->state == NOT_CONNECTED || lf_tag_compare(tag, e->last_granted) <= 0 @@ -1254,7 +1104,8 @@ void send_reject(int *socket_id, unsigned char error_code) { * @param client_fd The socket address. * @return The federate ID for success or -1 for failure. */ -static int32_t net_receive_and_check_fed_id_message(netdrv_t *netdrv) { +//TODO: UPDATE comments. +static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { // Buffer for message ID, federate ID, federation ID length, and federation ID. unsigned char buffer[256]; //TODO: NEED TO CHECK. // Read bytes from the socket. We need 4 bytes. @@ -1372,153 +1223,12 @@ static int32_t net_receive_and_check_fed_id_message(netdrv_t *netdrv) { return (int32_t)fed_id; } -/** - * Listen for a MSG_TYPE_FED_IDS message, which includes as a payload - * a federate ID and a federation ID. If the federation ID - * matches this federation, send an MSG_TYPE_ACK and otherwise send - * a MSG_TYPE_REJECT message. - * @param socket_id Pointer to the socket on which to listen. - * @param client_fd The socket address. - * @return The federate ID for success or -1 for failure. - */ -static int32_t receive_and_check_fed_id_message(int *socket_id, struct sockaddr_in *client_fd) { - // Buffer for message ID, federate ID, and federation ID length. - size_t length = 1 + sizeof(uint16_t) + 1; // Message ID, federate ID, length of fedration ID. - unsigned char buffer[length]; - - // Read bytes from the socket. We need 4 bytes. - if (read_from_socket_close_on_error(socket_id, length, buffer)) { - lf_print_error("RTI failed to read from accepted socket."); - return -1; - } - - uint16_t fed_id = rti_remote->base.number_of_scheduling_nodes; // Initialize to an invalid value. - - // First byte received is the message type. - if (buffer[0] != MSG_TYPE_FED_IDS) { - if (rti_remote->base.tracing_enabled) { - tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); - } - if (buffer[0] == MSG_TYPE_P2P_SENDING_FED_ID || buffer[0] == MSG_TYPE_P2P_TAGGED_MESSAGE) { - // The federate is trying to connect to a peer, not to the RTI. - // It has connected to the RTI instead. - // FIXME: This should not happen, but apparently has been observed. - // It should not happen because the peers get the port and IP address - // of the peer they want to connect to from the RTI. - // If the connection is a peer-to-peer connection between two - // federates, reject the connection with the WRONG_SERVER error. - send_reject(socket_id, WRONG_SERVER); - } else { - send_reject(socket_id, UNEXPECTED_MESSAGE); - } - lf_print_error("RTI expected a MSG_TYPE_FED_IDS message. Got %u (see net_common.h).", buffer[0]); - return -1; - } else { - // Received federate ID. - fed_id = extract_uint16(buffer + 1); - LF_PRINT_DEBUG("RTI received federate ID: %d.", fed_id); - - // Read the federation ID. First read the length, which is one byte. - size_t federation_id_length = (size_t)buffer[sizeof(uint16_t) + 1]; - char federation_id_received[federation_id_length + 1]; // One extra for null terminator. - // Next read the actual federation ID. - if (read_from_socket_close_on_error(socket_id, federation_id_length, - (unsigned char *)federation_id_received)) { - lf_print_error("RTI failed to read federation id from federate %d.", fed_id); - return -1; - } - - // Terminate the string with a null. - federation_id_received[federation_id_length] = 0; - - LF_PRINT_DEBUG("RTI received federation ID: %s.", federation_id_received); - - if (rti_remote->base.tracing_enabled) { - tracepoint_rti_from_federate(rti_remote->base.trace, receive_FED_ID, fed_id, NULL); - } - // Compare the received federation ID to mine. - if (strncmp(rti_remote->federation_id, federation_id_received, federation_id_length) != 0) { - // Federation IDs do not match. Send back a MSG_TYPE_REJECT message. - lf_print_warning("Federate from another federation %s attempted to connect to RTI in federation %s.", - federation_id_received, - rti_remote->federation_id); - if (rti_remote->base.tracing_enabled) { - tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); - } - send_reject(socket_id, FEDERATION_ID_DOES_NOT_MATCH); - return -1; - } else { - if (fed_id >= rti_remote->base.number_of_scheduling_nodes) { - // Federate ID is out of range. - lf_print_error("RTI received federate ID %d, which is out of range.", fed_id); - if (rti_remote->base.tracing_enabled) { - tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); - } - send_reject(socket_id, FEDERATE_ID_OUT_OF_RANGE); - return -1; - } else { - if ((rti_remote->base.scheduling_nodes[fed_id])->state != NOT_CONNECTED) { - lf_print_error("RTI received duplicate federate ID: %d.", fed_id); - if (rti_remote->base.tracing_enabled) { - tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); - } - send_reject(socket_id, FEDERATE_ID_IN_USE); - return -1; - } - } - } - } - federate_info_t *fed = GET_FED_INFO(fed_id); - // The MSG_TYPE_FED_IDS message has the right federation ID. - // Assign the address information for federate. - // The IP address is stored here as an in_addr struct (in .server_ip_addr) that can be useful - // to create sockets and can be efficiently sent over the network. - // First, convert the sockaddr structure into a sockaddr_in that contains an internet address. - struct sockaddr_in *pV4_addr = client_fd; - // Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server - fed->server_ip_addr = pV4_addr->sin_addr; - -#if LOG_LEVEL >= LOG_LEVEL_DEBUG - // Create the human readable format and copy that into - // the .server_hostname field of the federate. - char str[INET_ADDRSTRLEN + 1]; - inet_ntop(AF_INET, &fed->server_ip_addr, str, INET_ADDRSTRLEN); - strncpy(fed->server_hostname, str, INET_ADDRSTRLEN); - - LF_PRINT_DEBUG("RTI got address %s from federate %d.", fed->server_hostname, fed_id); -#endif - fed->socket = *socket_id; - - // Set the federate's state as pending - // because it is waiting for the start time to be - // sent by the RTI before beginning its execution. - fed->enclave.state = PENDING; - - LF_PRINT_DEBUG("RTI responding with MSG_TYPE_ACK to federate %d.", fed_id); - // Send an MSG_TYPE_ACK message. - unsigned char ack_message = MSG_TYPE_ACK; - if (rti_remote->base.tracing_enabled) { - tracepoint_rti_to_federate(rti_remote->base.trace, send_ACK, fed_id, NULL); - } - LF_MUTEX_LOCK(rti_mutex); - if (write_to_socket_close_on_error(&fed->socket, 1, &ack_message)) { - LF_MUTEX_UNLOCK(rti_mutex); - lf_print_error("RTI failed to write MSG_TYPE_ACK message to federate %d.", fed_id); - return -1; - } - LF_MUTEX_UNLOCK(rti_mutex); - - LF_PRINT_DEBUG("RTI sent MSG_TYPE_ACK to federate %d.", fed_id); - - return (int32_t)fed_id; -} - /** * Listen for a MSG_TYPE_NEIGHBOR_STRUCTURE message, and upon receiving it, fill * out the relevant information in the federate's struct. * @return 1 on success and 0 on failure. */ -static int net_receive_connection_information(netdrv_t *netdrv, uint16_t fed_id) { +static int receive_connection_information(netdrv_t *netdrv, uint16_t fed_id) { unsigned char connection_info_buffer[1024]; LF_PRINT_DEBUG("RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate %d.", fed_id); read_from_netdrv_fail_on_error( @@ -1587,92 +1297,6 @@ static int net_receive_connection_information(netdrv_t *netdrv, uint16_t fed_id) return 1; } -/** - * Listen for a MSG_TYPE_NEIGHBOR_STRUCTURE message, and upon receiving it, fill - * out the relevant information in the federate's struct. - * @return 1 on success and 0 on failure. - */ -static int receive_connection_information(int *socket_id, uint16_t fed_id) { - LF_PRINT_DEBUG("RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate %d.", fed_id); - unsigned char connection_info_header[MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE]; - read_from_socket_fail_on_error( - socket_id, - MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE, - connection_info_header, - NULL, - "RTI failed to read MSG_TYPE_NEIGHBOR_STRUCTURE message header from federate %d.", - fed_id); - - if (connection_info_header[0] != MSG_TYPE_NEIGHBOR_STRUCTURE) { - lf_print_error( - "RTI was expecting a MSG_TYPE_UDP_PORT message from federate %d. Got %u instead. " - "Rejecting federate.", - fed_id, connection_info_header[0]); - send_reject(socket_id, UNEXPECTED_MESSAGE); - return 0; - } else { - federate_info_t *fed = GET_FED_INFO(fed_id); - // Read the number of upstream and downstream connections - fed->enclave.num_upstream = extract_int32(&(connection_info_header[1])); - fed->enclave.num_downstream = extract_int32(&(connection_info_header[1 + sizeof(int32_t)])); - LF_PRINT_DEBUG( - "RTI got %d upstreams and %d downstreams from federate %d.", - fed->enclave.num_upstream, - fed->enclave.num_downstream, - fed_id); - - // Allocate memory for the upstream and downstream pointers - if (fed->enclave.num_upstream > 0) { - fed->enclave.upstream = (int *)malloc(sizeof(uint16_t) * fed->enclave.num_upstream); - // Allocate memory for the upstream delay pointers - fed->enclave.upstream_delay = (interval_t *)malloc( - sizeof(interval_t) * fed->enclave.num_upstream); - } else { - fed->enclave.upstream = (int *)NULL; - fed->enclave.upstream_delay = (interval_t *)NULL; - } - if (fed->enclave.num_downstream > 0) { - fed->enclave.downstream = (int *)malloc(sizeof(uint16_t) * fed->enclave.num_downstream); - } else { - fed->enclave.downstream = (int *)NULL; - } - - size_t connections_info_body_size = ( - (sizeof(uint16_t) + sizeof(int64_t)) * fed->enclave.num_upstream) - + (sizeof(uint16_t) * fed->enclave.num_downstream); - unsigned char *connections_info_body = NULL; - if (connections_info_body_size > 0) { - connections_info_body = (unsigned char *)malloc(connections_info_body_size); - read_from_socket_fail_on_error( - socket_id, - connections_info_body_size, - connections_info_body, - NULL, - "RTI failed to read MSG_TYPE_NEIGHBOR_STRUCTURE message body from federate %d.", - fed_id); - // Keep track of where we are in the buffer - size_t message_head = 0; - // First, read the info about upstream federates - for (int i = 0; i < fed->enclave.num_upstream; i++) { - fed->enclave.upstream[i] = extract_uint16(&(connections_info_body[message_head])); - message_head += sizeof(uint16_t); - fed->enclave.upstream_delay[i] = extract_int64(&(connections_info_body[message_head])); - message_head += sizeof(int64_t); - } - - // Next, read the info about downstream federates - for (int i = 0; i < fed->enclave.num_downstream; i++) { - fed->enclave.downstream[i] = extract_uint16(&(connections_info_body[message_head])); - message_head += sizeof(uint16_t); - } - - free(connections_info_body); - } - } - LF_PRINT_DEBUG("RTI received neighbor structure from federate %d.", fed_id); - return 1; -} - //TODO: NEEDS TO BE FIXED!! /** * Listen for a MSG_TYPE_UDP_PORT message, and upon receiving it, set up @@ -1686,7 +1310,7 @@ static int receive_connection_information(int *socket_id, uint16_t fed_id) { * @param fed_id The federate ID. * @return 1 for success, 0 for failure. */ -static int net_receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t fed_id) { +static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t fed_id) { // Read the MSG_TYPE_UDP_PORT message from the federate regardless of the status of // clock synchronization. This message will tell the RTI whether the federate // is doing clock synchronization, and if it is, what port to use for UDP. @@ -1761,93 +1385,6 @@ static int net_receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint1 return 1; } -/** - * Listen for a MSG_TYPE_UDP_PORT message, and upon receiving it, set up - * clock synchronization and perform the initial clock synchronization. - * Initial clock synchronization is performed only if the MSG_TYPE_UDP_PORT message - * payload is not UINT16_MAX. If it is also not 0, then this function sets - * up to perform runtime clock synchronization using the UDP port number - * specified in the payload to communicate with the federate's clock - * synchronization logic. - * @param socket_id The socket on which to listen. - * @param fed_id The federate ID. - * @return 1 for success, 0 for failure. - */ -static int receive_udp_message_and_set_up_clock_sync(int *socket_id, uint16_t fed_id) { - // Read the MSG_TYPE_UDP_PORT message from the federate regardless of the status of - // clock synchronization. This message will tell the RTI whether the federate - // is doing clock synchronization, and if it is, what port to use for UDP. - LF_PRINT_DEBUG("RTI waiting for MSG_TYPE_UDP_PORT from federate %d.", fed_id); - unsigned char response[1 + sizeof(uint16_t)]; - read_from_socket_fail_on_error(socket_id, 1 + sizeof(uint16_t), response, NULL, - "RTI failed to read MSG_TYPE_UDP_PORT message from federate %d.", fed_id); - if (response[0] != MSG_TYPE_UDP_PORT) { - lf_print_error( - "RTI was expecting a MSG_TYPE_UDP_PORT message from federate %d. Got %u instead. " - "Rejecting federate.", - fed_id, response[0]); - send_reject(socket_id, UNEXPECTED_MESSAGE); - return 0; - } else { - federate_info_t *fed = GET_FED_INFO(fed_id); - if (rti_remote->clock_sync_global_status >= clock_sync_init) { - // If no initial clock sync, no need perform initial clock sync. - uint16_t federate_UDP_port_number = extract_uint16(&(response[1])); - - LF_PRINT_DEBUG("RTI got MSG_TYPE_UDP_PORT %u from federate %d.", federate_UDP_port_number, fed_id); - - // A port number of UINT16_MAX means initial clock sync should not be performed. - if (federate_UDP_port_number != UINT16_MAX) { - // Perform the initialization clock synchronization with the federate. - // Send the required number of messages for clock synchronization - for (int i = 0; i < rti_remote->clock_sync_exchanges_per_interval; i++) { - // Send the RTI's current physical time T1 to the federate. - send_physical_clock(MSG_TYPE_CLOCK_SYNC_T1, fed, TCP); - - // Listen for reply message, which should be T3. - size_t message_size = 1 + sizeof(int32_t); - unsigned char buffer[message_size]; - read_from_socket_fail_on_error(socket_id, message_size, buffer, NULL, - "Socket to federate %d unexpectedly closed.", fed_id); - if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T3) { - int32_t fed_id = extract_int32(&(buffer[1])); - assert(fed_id > -1); - assert(fed_id < 65536); - LF_PRINT_DEBUG("RTI received T3 clock sync message from federate %d.", fed_id); - handle_physical_clock_sync_message(fed, TCP); - } else { - lf_print_error("Unexpected message %u from federate %d.", buffer[0], fed_id); - send_reject(socket_id, UNEXPECTED_MESSAGE); - return 0; - } - } - LF_PRINT_DEBUG("RTI finished initial clock synchronization with federate %d.", fed_id); - } - if (rti_remote->clock_sync_global_status >= clock_sync_on) { - // If no runtime clock sync, no need to set up the UDP port. - if (federate_UDP_port_number > 0) { - // Initialize the UDP_addr field of the federate struct - fed->UDP_addr.sin_family = AF_INET; - fed->UDP_addr.sin_port = htons(federate_UDP_port_number); - fed->UDP_addr.sin_addr = fed->server_ip_addr; - } - } else { - // Disable clock sync after initial round. - fed->clock_synchronization_enabled = false; - } - } else { - // No clock synchronization at all. - LF_PRINT_DEBUG("RTI: No clock synchronization for federate %d.", fed_id); - // Clock synchronization is universally disabled via the clock-sync command-line parameter - // (-c off was passed to the RTI). - // Note that the federates are still going to send a - // MSG_TYPE_UDP_PORT message but with a payload (port) of -1. - fed->clock_synchronization_enabled = false; - } - } - return 1; -} - #ifdef __RTI_AUTH__ /** * Authenticate incoming federate by performing HMAC-based authentication. @@ -1925,7 +1462,7 @@ static bool authenticate_federate(netdrv_t *rti_netdrv) { #endif -void net_lf_connect_to_federates(netdrv_t *rti_netdrv) { +void lf_connect_to_federates(netdrv_t *rti_netdrv) { for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { netdrv_t *fed_netdrv = accept_connection(rti_netdrv); @@ -1946,85 +1483,10 @@ void net_lf_connect_to_federates(netdrv_t *rti_netdrv) { #endif // The first message from the federate should contain its ID and the federation ID. - int32_t fed_id = net_receive_and_check_fed_id_message(fed_netdrv); + int32_t fed_id = receive_and_check_fed_id_message(fed_netdrv); if (fed_id >= 0 - && net_receive_connection_information(fed_netdrv, (uint16_t)fed_id) - && net_receive_udp_message_and_set_up_clock_sync(fed_netdrv, (uint16_t)fed_id)) { - - // Create a thread to communicate with the federate. - // This has to be done after clock synchronization is finished - // or that thread may end up attempting to handle incoming clock - // synchronization messages. - federate_info_t *fed = GET_FED_INFO(fed_id); - lf_thread_create(&(fed->thread_id), federate_info_thread_TCP, fed); - } else { - // Received message was rejected. Try again. - i--; - } - } - // All federates have connected. - LF_PRINT_DEBUG("All federates have connected to RTI."); - - if (rti_remote->clock_sync_global_status >= clock_sync_on) { - // Create the thread that performs periodic PTP clock synchronization sessions - // over the UDP channel, but only if the UDP channel is open and at least one - // federate is performing runtime clock synchronization. - bool clock_sync_enabled = false; - for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { - federate_info_t *fed_info = GET_FED_INFO(i); - if (fed_info->clock_synchronization_enabled) { - clock_sync_enabled = true; - break; - } - } - if (rti_remote->final_port_UDP != UINT16_MAX && clock_sync_enabled) { - lf_thread_create(&rti_remote->clock_thread, clock_synchronization_thread, NULL); - } - } -} - -void lf_connect_to_federates(int socket_descriptor) { - for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { - // Wait for an incoming connection request. - struct sockaddr client_fd; - uint32_t client_length = sizeof(client_fd); - // The following blocks until a federate connects. - int socket_id = -1; - while (1) { - socket_id = accept(rti_remote->socket_descriptor_TCP, &client_fd, &client_length); - if (socket_id >= 0) { - // Got a socket - break; - } else if (socket_id < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { - lf_print_error_system_failure("RTI failed to accept the socket."); - } else { - // Try again - lf_print_warning("RTI failed to accept the socket. %s. Trying again.", strerror(errno)); - continue; - } - } - -// Wait for the first message from the federate when RTI -a option is on. -#ifdef __RTI_AUTH__ - if (rti_remote->authentication_enabled) { - if (!authenticate_federate(&socket_id)) { - lf_print_warning("RTI failed to authenticate the incoming federate."); - // Close the socket. - shutdown(socket_id, SHUT_RDWR); - close(socket_id); - socket_id = -1; - // Ignore the federate that failed authentication. - i--; - continue; - } - } -#endif - - // The first message from the federate should contain its ID and the federation ID. - int32_t fed_id = receive_and_check_fed_id_message(&socket_id, (struct sockaddr_in *)&client_fd); - if (fed_id >= 0 && socket_id >= 0 - && receive_connection_information(&socket_id, (uint16_t)fed_id) - && receive_udp_message_and_set_up_clock_sync(&socket_id, (uint16_t)fed_id)) { + && receive_connection_information(fed_netdrv, (uint16_t)fed_id) + && receive_udp_message_and_set_up_clock_sync(fed_netdrv, (uint16_t)fed_id)) { // Create a thread to communicate with the federate. // This has to be done after clock synchronization is finished @@ -2114,7 +1576,7 @@ int32_t start_rti_server() { void wait_for_federates(netdrv_t *netdrv) { // Wait for connections from federates and create a thread for each. - net_lf_connect_to_federates(netdrv); + lf_connect_to_federates(netdrv); // All federates have connected. lf_print("RTI: All expected federates have connected. Starting execution."); diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index afddbc4fd..6f73d2510 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -376,7 +376,8 @@ void send_reject(int* socket_id, unsigned char error_code); * that federate. Return when all federates have connected. * @param socket_descriptor The socket on which to accept connections. */ -void lf_connect_to_federates(int socket_descriptor); +//TODO: Update comments. +void lf_connect_to_federates(netdrv_t *rti_netdrv); /** * Thread to respond to new connections, which could be federates of other @@ -391,9 +392,6 @@ void* respond_to_erroneous_connections(void* nothing); */ void initialize_federate(federate_info_t* fed, uint16_t id); -//TODO: Need to add descriptions. -int32_t start_net_rti_server(); - // /** // * Start the socket server for the runtime infrastructure (RTI) and // * return the socket descriptor. @@ -401,7 +399,8 @@ int32_t start_net_rti_server(); // * @param port The port on which to listen for socket connections, or // * 0 to use the default port range. // */ -// int32_t start_rti_server(uint16_t port); +//TODO: Need to add descriptions. +int32_t start_rti_server(); //TODO: Add documentation. void wait_for_federates(netdrv_t *netdrv); diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 37affa35e..50b3b96bd 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -140,7 +140,23 @@ static int net_create_real_time_tcp_socket_errexit() { return sock; } -void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type) { +/** + * Create a server and enable listening for socket connections. + * If the specified port if it is non-zero, it will attempt to acquire that port. + * If it fails, it will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times with + * a delay of PORT_BIND_RETRY_INTERVAL in between. If the specified port is + * zero, then it will attempt to acquire DEFAULT_PORT first. If this fails, then it + * will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times, incrementing the port + * number between attempts, with no delay between attempts. Once it has incremented + * the port number MAX_NUM_PORT_ADDRESSES times, it will cycle around and begin again + * with DEFAULT_PORT. + * + * @param port The port number to use or 0 to start trying at DEFAULT_PORT. + * @param socket_type The type of the socket for the server (TCP or UDP). + * @return The socket descriptor on which to accept connections. + */ +//TODO: Fix comments. +int create_rti_server(netdrv_t *drv, netdrv_type_t netdrv_type) { socket_priv_t *priv = get_priv(drv); // Timeout time for the communications of the server @@ -280,6 +296,7 @@ void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type) { priv->port = port; // No need to listen on the UDP socket } + return priv->socket_descriptor; } void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index 81d9c59d6..718ae0a3e 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -81,7 +81,8 @@ netdrv_t * netdrv_init(); * @param socket_type The type of the socket for the server (TCP or UDP). * @return The socket descriptor on which to accept connections. */ -void create_net_server(netdrv_t *drv, netdrv_type_t netdrv_type); +//TODO: Update descriptions. +int create_rti_server(netdrv_t *drv, netdrv_type_t netdrv_type); // int create_real_time_tcp_socket_errexit(); From 6b654a7e4ff87ebb28595c5734761d72e14622f6 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 14:09:02 -0700 Subject: [PATCH 038/262] Fix send_rejects --- core/federated/RTI/rti_remote.c | 37 +++++++++------------------------ core/federated/RTI/rti_remote.h | 3 ++- 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index d5c3c02e0..1900477f2 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1063,7 +1063,7 @@ void *federate_info_thread_TCP(void *fed) { return NULL; } -void net_send_reject(netdrv_t *netdrv, unsigned char error_code) { +void send_reject(netdrv_t *netdrv, unsigned char error_code) { LF_PRINT_DEBUG("RTI sending MSG_TYPE_REJECT."); unsigned char response[2]; response[0] = MSG_TYPE_REJECT; @@ -1078,23 +1078,6 @@ void net_send_reject(netdrv_t *netdrv, unsigned char error_code) { LF_MUTEX_UNLOCK(rti_mutex); } -void send_reject(int *socket_id, unsigned char error_code) { - LF_PRINT_DEBUG("RTI sending MSG_TYPE_REJECT."); - unsigned char response[2]; - response[0] = MSG_TYPE_REJECT; - response[1] = error_code; - LF_MUTEX_LOCK(rti_mutex); - // NOTE: Ignore errors on this response. - if (write_to_socket(*socket_id, 2, response)) { - lf_print_warning("RTI failed to write MSG_TYPE_REJECT message on the socket."); - } - // Close the socket. - shutdown(*socket_id, SHUT_RDWR); - close(*socket_id); - *socket_id = -1; - LF_MUTEX_UNLOCK(rti_mutex); -} - /** * Listen for a MSG_TYPE_FED_IDS message, which includes as a payload * a federate ID and a federation ID. If the federation ID @@ -1127,9 +1110,9 @@ static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { // of the peer they want to connect to from the RTI. // If the connection is a peer-to-peer connection between two // federates, reject the connection with the WRONG_SERVER error. - net_send_reject(netdrv, WRONG_SERVER); + send_reject(netdrv, WRONG_SERVER); } else { - net_send_reject(netdrv, UNEXPECTED_MESSAGE); + send_reject(netdrv, UNEXPECTED_MESSAGE); } if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); @@ -1161,7 +1144,7 @@ static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); } - net_send_reject(netdrv, FEDERATION_ID_DOES_NOT_MATCH); + send_reject(netdrv, FEDERATION_ID_DOES_NOT_MATCH); return -1; } else { if (fed_id >= rti_remote->base.number_of_scheduling_nodes) { @@ -1170,7 +1153,7 @@ static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); } - net_send_reject(netdrv, FEDERATE_ID_OUT_OF_RANGE); + send_reject(netdrv, FEDERATE_ID_OUT_OF_RANGE); return -1; } else { if ((rti_remote->base.scheduling_nodes[fed_id])->state != NOT_CONNECTED) { @@ -1178,7 +1161,7 @@ static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { if (rti_remote->base.tracing_enabled) { tracepoint_rti_to_federate(rti_remote->base.trace, send_REJECT, fed_id, NULL); } - net_send_reject(netdrv, FEDERATE_ID_IN_USE); + send_reject(netdrv, FEDERATE_ID_IN_USE); return -1; } } @@ -1243,7 +1226,7 @@ static int receive_connection_information(netdrv_t *netdrv, uint16_t fed_id) { "RTI was expecting a MSG_TYPE_UDP_PORT message from federate %d. Got %u instead. " "Rejecting federate.", fed_id, connection_info_buffer[0]); - net_send_reject(netdrv, UNEXPECTED_MESSAGE); + send_reject(netdrv, UNEXPECTED_MESSAGE); return 0; } else { federate_info_t *fed = GET_FED_INFO(fed_id); @@ -1323,7 +1306,7 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t "RTI was expecting a MSG_TYPE_UDP_PORT message from federate %d. Got %u instead. " "Rejecting federate.", fed_id, response[0]); - net_send_reject(netdrv, UNEXPECTED_MESSAGE); + send_reject(netdrv, UNEXPECTED_MESSAGE); return 0; } else { federate_info_t *fed = GET_FED_INFO(fed_id); @@ -1354,7 +1337,7 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t net_handle_physical_clock_sync_message(fed, TCP); } else { lf_print_error("Unexpected message %u from federate %d.", buffer[0], fed_id); - net_send_reject(netdrv, UNEXPECTED_MESSAGE); + send_reject(netdrv, UNEXPECTED_MESSAGE); return 0; } } @@ -1452,7 +1435,7 @@ static bool authenticate_federate(netdrv_t *rti_netdrv) { if (memcmp(&received[1], rti_tag, hmac_length) != 0) { // Federation IDs do not match. Send back a HMAC_DOES_NOT_MATCH message. lf_print_warning("HMAC authentication failed. Rejecting the federate."); - net_send_reject(rti_netdrv, HMAC_DOES_NOT_MATCH); + send_reject(rti_netdrv, HMAC_DOES_NOT_MATCH); return false; } else { LF_PRINT_LOG("Federate's HMAC verified."); diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 6f73d2510..45b1dd53b 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -368,7 +368,8 @@ void* federate_info_thread_TCP(void* fed); * @param socket_id Pointer to the socket ID. * @param error_code An error code. */ -void send_reject(int* socket_id, unsigned char error_code); +//TODO: Update comments. +void send_reject(netdrv_t *netdrv, unsigned char error_code); /** * Wait for one incoming connection request from each federate, From a61d2d2999b97b6d03be25fbdb9643820c007756 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 15:40:28 -0700 Subject: [PATCH 039/262] Fix respond_to_erroneous_connections --- core/federated/RTI/rti_remote.c | 15 ++++----------- core/federated/network/lf_socket_support.c | 15 +++++++++++++-- .../core/federated/network/lf_socket_support.h | 4 +++- include/core/federated/network/net_util.h | 10 ---------- 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 1900477f2..ff5c87ba9 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1505,13 +1505,7 @@ void lf_connect_to_federates(netdrv_t *rti_netdrv) { void *respond_to_erroneous_connections(void *nothing) { while (true) { - // Wait for an incoming connection request. - struct sockaddr client_fd; - uint32_t client_length = sizeof(client_fd); - // The following will block until either a federate attempts to connect - // or close(rti->socket_descriptor_TCP) is called. - int socket_id = accept(rti_remote->socket_descriptor_TCP, &client_fd, &client_length); - if (socket_id < 0) return NULL; + netdrv_t *fed_netdrv = netdrv_accept(rti_remote->rti_netdrv); if (rti_remote->all_federates_exited) { return NULL; @@ -1522,12 +1516,11 @@ void *respond_to_erroneous_connections(void *nothing) { response[0] = MSG_TYPE_REJECT; response[1] = FEDERATION_ID_DOES_NOT_MATCH; // Ignore errors on this response. - if (write_to_socket(socket_id, 2, response)) { + if (write_to_netdrv(fed_netdrv, 2, response)) { lf_print_warning("RTI failed to write FEDERATION_ID_DOES_NOT_MATCH to erroneous incoming connection."); } - // Close the socket. - shutdown(socket_id, SHUT_RDWR); - close(socket_id); + // Close the netdriver. + fed_netdrv->close(fed_netdrv); } return NULL; } diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 50b3b96bd..80c69130a 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -112,7 +112,7 @@ netdrv_t *netdrv_init() { * * @return The socket ID (a file descriptor). */ -static int net_create_real_time_tcp_socket_errexit() { +static int create_real_time_tcp_socket_errexit() { int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sock < 0) { lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); @@ -167,7 +167,7 @@ int create_rti_server(netdrv_t *drv, netdrv_type_t netdrv_type) { // Create an IPv4 socket for TCP (not UDP) communication over IP (0). priv->socket_descriptor = -1; if (netdrv_type == RTI) { - priv->socket_descriptor = net_create_real_time_tcp_socket_errexit(); + priv->socket_descriptor = create_real_time_tcp_socket_errexit(); } else if (netdrv_type == CLOCKSYNC) { priv->socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); // Set the appropriate timeout time @@ -323,6 +323,17 @@ void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { } } +netdrv_t *netdrv_accept(netdrv_t *rti_netdrv) { + netdrv_t *fed_netdrv = netdrv_init(); + socket_priv_t *rti_priv = get_priv(rti_netdrv); + socket_priv_t *fed_priv = get_priv(fed_netdrv); + struct sockaddr client_fd; + uint32_t client_length = sizeof(client_fd); + fed_priv->socket_descriptor = accept(rti_priv->socket_descriptor, &client_fd, &client_length); + if (fed_priv->socket_descriptor < 0) return NULL; + return fed_netdrv; +} + netdrv_t *accept_connection(netdrv_t *rti_netdrv) { netdrv_t *fed_netdrv = netdrv_init(); socket_priv_t *rti_priv = get_priv(rti_netdrv); diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index 718ae0a3e..d40ea2881 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -87,8 +87,10 @@ int create_rti_server(netdrv_t *drv, netdrv_type_t netdrv_type); // int create_real_time_tcp_socket_errexit(); void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv); -netdrv_t *accept_connection(netdrv_t * rti_netdrv); +netdrv_t *netdrv_accept(netdrv_t *rti_netdrv); + +netdrv_t *accept_connection(netdrv_t * rti_netdrv); diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index e784fcc0b..03c29ba07 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -102,16 +102,6 @@ int netdrv_write(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); */ extern lf_mutex_t socket_mutex; -//TODO: Copied at lf_socket_support.c. Erase after finished. -/** - * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled - * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application - * on any error. - * - * @return The socket ID (a file descriptor). - */ -int create_real_time_tcp_socket_errexit(); - //TODO: Copied at lf_socket_support.c. Erase after finished. /** * Read the specified number of bytes from the specified socket into the specified buffer. From d24cab66b97e7c41bd707e309861f5091da0806b Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 15:49:14 -0700 Subject: [PATCH 040/262] Minor fix --- core/federated/RTI/rti_remote.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 45b1dd53b..167d68b1e 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -393,25 +393,23 @@ void* respond_to_erroneous_connections(void* nothing); */ void initialize_federate(federate_info_t* fed, uint16_t id); -// /** -// * Start the socket server for the runtime infrastructure (RTI) and -// * return the socket descriptor. -// * @param num_feds Number of federates. -// * @param port The port on which to listen for socket connections, or -// * 0 to use the default port range. -// */ +/** + * Start the socket server for the runtime infrastructure (RTI) and + * return the socket descriptor. + * @param num_feds Number of federates. + * @param port The port on which to listen for socket connections, or + * 0 to use the default port range. + */ //TODO: Need to add descriptions. int32_t start_rti_server(); -//TODO: Add documentation. -void wait_for_federates(netdrv_t *netdrv); - // /** // * Start the runtime infrastructure (RTI) interaction with the federates // * and wait for the federates to exit. // * @param socket_descriptor The socket descriptor returned by start_rti_server(). // */ -// void wait_for_federates(int socket_descriptor); +//TODO: Add documentation. +void wait_for_federates(netdrv_t *netdrv); /** * Print a usage message. From 183285e641ca4e93e69c997415464bd1fded2872 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 15:50:10 -0700 Subject: [PATCH 041/262] Minor fix --- include/core/federated/network/net_util.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 03c29ba07..635e1db04 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -77,20 +77,6 @@ typedef struct netdrv_t { int ( *read)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); int (*write)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); } netdrv_t; - // void * (*get_priv)(struct netdrv_t *drv); - - -// typedef struct netdrv_t { -// ... -// int ( *read)(size_t num_bytes, unsigned char* buffer); -// int ( *read_close_on_error)(size_t num_bytes, unsigned char* buffer); -// int ( *read_fail_on_error)(size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...); -// ... -// } netdrv_t; - -// netdrv.read(num_bytes, read_buffer); -// netdrv.read_close_on_error(num_bytes, write_buffer); -// netdrv.read_fail_on_error(num_bytes, write_buffer, mutex, format, ...); int netdrv_open(netdrv_t *drv); void netdrv_close(netdrv_t *drv); From 7605169f8bfbc2dec5bf3060f938fb6ac589b9a4 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 1 Feb 2024 15:53:40 -0700 Subject: [PATCH 042/262] Minor fix --- core/federated/RTI/rti_remote.c | 58 ++------------------------------- 1 file changed, 3 insertions(+), 55 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index ff5c87ba9..433cceb40 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -699,7 +699,7 @@ void handle_timestamp(federate_info_t *my_fed, unsigned char *buffer) { LF_PRINT_LOG("RTI sent start time " PRINTF_TIME " to federate %d.", start_time, my_fed->enclave.id); LF_MUTEX_UNLOCK(rti_mutex); } -void net_send_physical_clock(unsigned char message_type, federate_info_t *fed, socket_type_t socket_type) { +void send_physical_clock(unsigned char message_type, federate_info_t *fed, socket_type_t socket_type) { if (fed->enclave.state == NOT_CONNECTED) { lf_print_warning("Clock sync: RTI failed to send physical time to federate %d. Socket not connected.\n", fed->enclave.id); @@ -738,58 +738,6 @@ void net_send_physical_clock(unsigned char message_type, federate_info_t *fed, s fed->enclave.id); } -void send_physical_clock(unsigned char message_type, federate_info_t *fed, socket_type_t socket_type) { - if (fed->enclave.state == NOT_CONNECTED) { - lf_print_warning("Clock sync: RTI failed to send physical time to federate %d. Socket not connected.\n", - fed->enclave.id); - return; - } - unsigned char buffer[sizeof(int64_t) + 1]; - buffer[0] = message_type; - int64_t current_physical_time = lf_time_physical(); - encode_int64(current_physical_time, &(buffer[1])); - - // Send the message - if (socket_type == UDP) { - // FIXME: UDP_addr is never initialized. - LF_PRINT_DEBUG("Clock sync: RTI sending UDP message type %u.", buffer[0]); - ssize_t bytes_written = sendto(rti_remote->socket_descriptor_UDP, buffer, 1 + sizeof(int64_t), 0, - (struct sockaddr *)&fed->UDP_addr, sizeof(fed->UDP_addr)); - if (bytes_written < (ssize_t)sizeof(int64_t) + 1) { - lf_print_warning("Clock sync: RTI failed to send physical time to federate %d: %s\n", - fed->enclave.id, - strerror(errno)); - return; - } - } - else if (socket_type == TCP) { - LF_PRINT_DEBUG("Clock sync: RTI sending TCP message type %u.", buffer[0]); - LF_MUTEX_LOCK(rti_mutex); - write_to_socket_fail_on_error(&fed->socket, 1 + sizeof(int64_t), buffer, &rti_mutex, - "Clock sync: RTI failed to send physical time to federate %d.", - fed->enclave.id); - LF_MUTEX_UNLOCK(rti_mutex); - } - LF_PRINT_DEBUG("Clock sync: RTI sent PHYSICAL_TIME_SYNC_MESSAGE with timestamp " PRINTF_TIME - " to federate %d.", - current_physical_time, - fed->enclave.id); -} - -void net_handle_physical_clock_sync_message(federate_info_t *my_fed, socket_type_t socket_type) { - // Lock the mutex to prevent interference between sending the two - // coded probe messages. - LF_MUTEX_LOCK(rti_mutex); - // Reply with a T4 type message - net_send_physical_clock(MSG_TYPE_CLOCK_SYNC_T4, my_fed, socket_type); - // Send the corresponding coded probe immediately after, - // but only if this is a UDP channel. - if (socket_type == UDP) { - net_send_physical_clock(MSG_TYPE_CLOCK_SYNC_CODED_PROBE, my_fed, socket_type); - } - LF_MUTEX_UNLOCK(rti_mutex); -} - void handle_physical_clock_sync_message(federate_info_t *my_fed, socket_type_t socket_type) { // Lock the mutex to prevent interference between sending the two // coded probe messages. @@ -1322,7 +1270,7 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t // Send the required number of messages for clock synchronization for (int i = 0; i < rti_remote->clock_sync_exchanges_per_interval; i++) { // Send the RTI's current physical time T1 to the federate. - net_send_physical_clock(MSG_TYPE_CLOCK_SYNC_T1, fed, TCP); + send_physical_clock(MSG_TYPE_CLOCK_SYNC_T1, fed, TCP); // Listen for reply message, which should be T3. size_t message_size = 1 + sizeof(int32_t); @@ -1334,7 +1282,7 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t assert(fed_id > -1); assert(fed_id < 65536); LF_PRINT_DEBUG("RTI received T3 clock sync message from federate %d.", fed_id); - net_handle_physical_clock_sync_message(fed, TCP); + handle_physical_clock_sync_message(fed, TCP); } else { lf_print_error("Unexpected message %u from federate %d.", buffer[0], fed_id); send_reject(netdrv, UNEXPECTED_MESSAGE); From 2cac7738d8c88006da14aea255a6af7a106406bd Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Fri, 2 Feb 2024 14:04:47 -0700 Subject: [PATCH 043/262] Temporarily add create_real_time_tcp_socket_errexit() --- include/core/federated/network/net_util.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 635e1db04..33de7c700 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -88,6 +88,15 @@ int netdrv_write(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); */ extern lf_mutex_t socket_mutex; +/** + * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled + * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application + * on any error. + * + * @return The socket ID (a file descriptor). + */ +int create_real_time_tcp_socket_errexit(); + //TODO: Copied at lf_socket_support.c. Erase after finished. /** * Read the specified number of bytes from the specified socket into the specified buffer. From 5a62b8d5678bba8d5290e6d5c05aded0ba214180 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Fri, 2 Feb 2024 14:05:17 -0700 Subject: [PATCH 044/262] Fix clock_synchronization thread --- core/federated/RTI/rti_remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 433cceb40..0249c27db 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -805,7 +805,7 @@ void *clock_synchronization_thread(void *noargs) { int remaining_attempts = 5; while (remaining_attempts > 0) { remaining_attempts--; - int read_failed = read_from_socket(rti_remote->socket_descriptor_UDP, message_size, buffer); + int read_failed = read_from_netdrv(rti_remote->clock_netdrv, buffer); // If any errors occur, either discard the message or the clock sync round. if (!read_failed) { if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T3) { From 91ea5a1adc350ea3cabf0663eee419108668ea19 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Fri, 2 Feb 2024 14:05:56 -0700 Subject: [PATCH 045/262] Add breaks to switch case --- core/federated/network/lf_socket_support.c | 25 ++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 80c69130a..7c92c9f9f 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -112,7 +112,7 @@ netdrv_t *netdrv_init() { * * @return The socket ID (a file descriptor). */ -static int create_real_time_tcp_socket_errexit() { +static int net_create_real_time_tcp_socket_errexit() { int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sock < 0) { lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); @@ -167,7 +167,7 @@ int create_rti_server(netdrv_t *drv, netdrv_type_t netdrv_type) { // Create an IPv4 socket for TCP (not UDP) communication over IP (0). priv->socket_descriptor = -1; if (netdrv_type == RTI) { - priv->socket_descriptor = create_real_time_tcp_socket_errexit(); + priv->socket_descriptor = net_create_real_time_tcp_socket_errexit(); } else if (netdrv_type == CLOCKSYNC) { priv->socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); // Set the appropriate timeout time @@ -571,9 +571,18 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { // case MSG_TYPE_RESIGN: // handle_federate_resign(my_fed); // return NULL; - // case MSG_TYPE_TAGGED_MESSAGE: - // handle_timed_message(my_fed, buffer); - // break; + case MSG_TYPE_TAGGED_MESSAGE: + size_t header_size = 1 + sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + + sizeof(int64_t) + sizeof(uint32_t); + net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, + "RTI failed to read the content of the next event tag."); + size_t length = (size_t) extract_int32(buffer + sizeof(uint16_t) + sizeof(uint16_t)); + size_t total_bytes_to_read = length + header_size; + size_t bytes_to_read = length; + if (bytes_to_read > FED_COM_BUFFER_SIZE - header_size) { + bytes_to_read = FED_COM_BUFFER_SIZE - header_size; + } + break; @@ -582,6 +591,7 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { case MSG_TYPE_NEXT_EVENT_TAG: net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, "RTI failed to read the content of the next event tag."); + break; // case MSG_TYPE_TAG_ADVANCE_GRANT: // handle_tag_advance_grant(); // break; @@ -592,19 +602,21 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { case MSG_TYPE_LATEST_TAG_COMPLETE: net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, "RTI failed to read the content of the logical tag complete."); + break; case MSG_TYPE_STOP_REQUEST: net_read_from_socket_fail_on_error(&priv->socket_descriptor, MSG_TYPE_STOP_REQUEST_LENGTH - 1, buffer, NULL, "RTI failed to read the MSG_TYPE_STOP_REQUEST payload."); + break; case MSG_TYPE_STOP_REQUEST_REPLY: net_read_from_socket_fail_on_error(&priv->socket_descriptor, MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1, buffer, NULL, "RTI failed to read the reply to MSG_TYPE_STOP_REQUEST message."); + break; // case MSG_TYPE_STOP_GRANTED: // handle_stop_granted_message(); // break; case MSG_TYPE_ADDRESS_QUERY: return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t), buffer); - break; case MSG_TYPE_ADDRESS_ADVERTISEMENT: net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int32_t), buffer, NULL, "Error reading port data."); @@ -643,6 +655,7 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { case MSG_TYPE_PORT_ABSENT: net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, "RTI failed to read port absent message."); + break; case MSG_TYPE_NEIGHBOR_STRUCTURE: net_read_from_socket(priv->socket_descriptor, MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1, buffer); From 3a95d8184dc361f23cbeb1c302275db6a0bf3a5a Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Fri, 2 Feb 2024 16:45:33 -0700 Subject: [PATCH 046/262] Handle_timed message --- core/federated/RTI/rti_remote.c | 75 ++++++++++------------ core/federated/network/lf_socket_support.c | 16 ++--- 2 files changed, 40 insertions(+), 51 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 0249c27db..4fea0cf02 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -223,40 +223,33 @@ void handle_port_absent_message(federate_info_t *sending_federate, unsigned char void handle_timed_message(federate_info_t *sending_federate, unsigned char *buffer) { size_t header_size = 1 + sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); - // Read the header, minus the first byte which has already been read. - read_from_socket_fail_on_error( - &sending_federate->socket, header_size - 1, &(buffer[1]), NULL, - "RTI failed to read the timed message header from remote federate."); // Extract the header information. of the sender uint16_t reactor_port_id; uint16_t federate_id; size_t length; tag_t intended_tag; // Extract information from the header. - extract_timed_header(&(buffer[1]), &reactor_port_id, &federate_id, &length, &intended_tag); + extract_timed_header(buffer + 1, &reactor_port_id, &federate_id, &length, &intended_tag); - size_t total_bytes_to_read = length + header_size; - size_t bytes_to_read = length; + // size_t total_bytes_to_read = length + header_size; + // size_t bytes_to_read = length; - if (FED_COM_BUFFER_SIZE < header_size + 1) { - lf_print_error_and_exit("Buffer size (%d) is not large enough to " - "read the header plus one byte.", - FED_COM_BUFFER_SIZE); - } + // if (FED_COM_BUFFER_SIZE < header_size + 1) { + // lf_print_error_and_exit("Buffer size (%d) is not large enough to " + // "read the header plus one byte.", + // FED_COM_BUFFER_SIZE); + // } - // Cut up the payload in chunks. - if (bytes_to_read > FED_COM_BUFFER_SIZE - header_size) { - bytes_to_read = FED_COM_BUFFER_SIZE - header_size; - } + // // Cut up the payload in chunks. + // if (bytes_to_read > FED_COM_BUFFER_SIZE - header_size) { + // bytes_to_read = FED_COM_BUFFER_SIZE - header_size; + // } LF_PRINT_LOG("RTI received message from federate %d for federate %u port %u with intended tag " PRINTF_TAG ". Forwarding.", sending_federate->enclave.id, federate_id, reactor_port_id, intended_tag.time - lf_time_start(), intended_tag.microstep); - read_from_socket_fail_on_error( - &sending_federate->socket, bytes_to_read, &(buffer[header_size]), NULL, - "RTI failed to read timed message from federate %d.", federate_id); - size_t bytes_read = bytes_to_read + header_size; + // size_t bytes_read = bytes_to_read + header_size; // Following only works for string messages. // LF_PRINT_DEBUG("Message received by RTI: %s.", buffer + header_size); @@ -308,29 +301,29 @@ void handle_timed_message(federate_info_t *sending_federate, unsigned char *buff tracepoint_rti_to_federate(rti_remote->base.trace, send_TAGGED_MSG, federate_id, &intended_tag); } - write_to_socket_fail_on_error(&fed->socket, bytes_read, buffer, &rti_mutex, + write_to_netdrv_fail_on_error(fed->fed_netdrv, length + header_size, buffer, &rti_mutex, "RTI failed to forward message to federate %d.", federate_id); - // The message length may be longer than the buffer, - // in which case we have to handle it in chunks. - size_t total_bytes_read = bytes_read; - while (total_bytes_read < total_bytes_to_read) { - LF_PRINT_DEBUG("Forwarding message in chunks."); - bytes_to_read = total_bytes_to_read - total_bytes_read; - if (bytes_to_read > FED_COM_BUFFER_SIZE) { - bytes_to_read = FED_COM_BUFFER_SIZE; - } - read_from_socket_fail_on_error(&sending_federate->socket, bytes_to_read, buffer, NULL, - "RTI failed to read message chunks."); - total_bytes_read += bytes_to_read; - - // FIXME: a mutex needs to be held for this so that other threads - // do not write to destination_socket and cause interleaving. However, - // holding the rti_mutex might be very expensive. Instead, each outgoing - // socket should probably have its own mutex. - write_to_socket_fail_on_error(&fed->socket, bytes_to_read, buffer, &rti_mutex, - "RTI failed to send message chunks."); - } + // // The message length may be longer than the buffer, + // // in which case we have to handle it in chunks. + // size_t total_bytes_read = bytes_read; + // while (total_bytes_read < total_bytes_to_read) { + // LF_PRINT_DEBUG("Forwarding message in chunks."); + // bytes_to_read = total_bytes_to_read - total_bytes_read; + // if (bytes_to_read > FED_COM_BUFFER_SIZE) { + // bytes_to_read = FED_COM_BUFFER_SIZE; + // } + // read_from_socket_fail_on_error(&sending_federate->socket, bytes_to_read, buffer, NULL, + // "RTI failed to read message chunks."); + // total_bytes_read += bytes_to_read; + + // // FIXME: a mutex needs to be held for this so that other threads + // // do not write to destination_socket and cause interleaving. However, + // // holding the rti_mutex might be very expensive. Instead, each outgoing + // // socket should probably have its own mutex. + // write_to_socket_fail_on_error(&fed->socket, bytes_to_read, buffer, &rti_mutex, + // "RTI failed to send message chunks."); + // } // Record this in-transit message in federate's in-transit message queue. if (lf_tag_compare(fed->enclave.completed, intended_tag) < 0) { diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 7c92c9f9f..730ed8c33 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -571,17 +571,13 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { // case MSG_TYPE_RESIGN: // handle_federate_resign(my_fed); // return NULL; - case MSG_TYPE_TAGGED_MESSAGE: - size_t header_size = 1 + sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) - + sizeof(int64_t) + sizeof(uint32_t); - net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, - "RTI failed to read the content of the next event tag."); + case MSG_TYPE_TAGGED_MESSAGE: ; + size_t header_size = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); + net_read_from_socket_fail_on_error(&priv->socket_descriptor, header_size, buffer, NULL, + "RTI failed to read the timed message header from remote federate."); size_t length = (size_t) extract_int32(buffer + sizeof(uint16_t) + sizeof(uint16_t)); - size_t total_bytes_to_read = length + header_size; - size_t bytes_to_read = length; - if (bytes_to_read > FED_COM_BUFFER_SIZE - header_size) { - bytes_to_read = FED_COM_BUFFER_SIZE - header_size; - } + net_read_from_socket_fail_on_error(&priv->socket_descriptor, length, buffer + header_size, NULL, + "RTI failed to read timed message."); break; From 0fbfda4756ba484dc79d9da6900dc2ca794d2d10 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Sat, 3 Feb 2024 12:51:44 -0700 Subject: [PATCH 047/262] Fix handle adress query and address ad --- core/federated/RTI/rti_remote.c | 31 +++++++++++-------- core/federated/federate.c | 1 + core/federated/network/lf_socket_support.c | 21 ++++++++++++- .../federated/network/lf_socket_support.h | 4 +++ 4 files changed, 43 insertions(+), 14 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 4fea0cf02..3c7e2d65f 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -598,25 +598,28 @@ void handle_address_query(uint16_t fed_id, unsigned char *buffer) { // NOTE: server_port initializes to -1, which means the RTI does not know // the port number because it has not yet received an MSG_TYPE_ADDRESS_ADVERTISEMENT message - // from this federate. In that case, it will respond by sending -1. + // from this federate. In that case, it will respond by sending -1. federate_info_t *remote_fed = GET_FED_INFO(remote_fed_id); - unsigned char buf[1 + sizeof(int32_t) + sizeof(remote_fed->server_ip_addr)]; + struct in_addr a = *get_ip_addr(remote_fed->fed_netdrv); + size_t size = sizeof(*get_ip_addr(remote_fed->fed_netdrv)); + int32_t port = *get_port(remote_fed->fed_netdrv); + unsigned char buf[1 + sizeof(int32_t) + sizeof(*get_ip_addr(remote_fed->fed_netdrv))]; // Response message is also of type MSG_TYPE_ADDRESS_QUERY. buf[0] = MSG_TYPE_ADDRESS_QUERY; // Send the port number (which could be -1) and server IP address to federate. LF_MUTEX_LOCK(rti_mutex); - encode_int32(remote_fed->server_port, (unsigned char *)&buf[1]); - memcpy(buf + 1 + sizeof(int32_t), (unsigned char *)&remote_fed->server_ip_addr, sizeof(remote_fed->server_ip_addr)); + encode_int32(*get_port(remote_fed->fed_netdrv), (unsigned char *)&buf[1]); + memcpy(buf + 1 + sizeof(int32_t), (unsigned char *)get_ip_addr(remote_fed->fed_netdrv), sizeof(*get_ip_addr(remote_fed->fed_netdrv))); write_to_netdrv_fail_on_error( - fed->fed_netdrv, sizeof(int32_t) + 1, (unsigned char *)buf, &rti_mutex, + fed->fed_netdrv, sizeof(int32_t) + 1 + sizeof(*get_ip_addr(remote_fed->fed_netdrv)), (unsigned char *)buf, &rti_mutex, "Failed to write port number to socket of federate %d.", fed_id); LF_MUTEX_UNLOCK(rti_mutex); LF_PRINT_DEBUG("Replied to address query from federate %d with address %s:%d.", - fed_id, remote_fed->server_hostname, remote_fed->server_port); + fed_id, get_host_name(remote_fed->fed_netdrv), *get_port(remote_fed->fed_netdrv)); } //TODO: NEED to be fixed. @@ -631,7 +634,7 @@ void handle_address_ad(uint16_t federate_id, unsigned char *buffer) { assert(server_port < 65536); LF_MUTEX_LOCK(rti_mutex); - fed->server_port = server_port; //TODO: NEED to be fixed. + *get_port(fed->fed_netdrv) = server_port; LF_MUTEX_UNLOCK(rti_mutex); LF_PRINT_LOG("Received address advertisement with port %d from federate %d.", server_port, federate_id); @@ -1111,16 +1114,17 @@ static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { federate_info_t *fed = GET_FED_INFO(fed_id); fed->fed_netdrv = netdrv; +// TODO: Make this work for only TCP. #if LOG_LEVEL >= LOG_LEVEL_DEBUG // Create the human readable format and copy that into // the .server_hostname field of the federate. char str[INET_ADDRSTRLEN + 1]; //TODO: NEED TO FIX HERE! - // inet_ntop(AF_INET, &fed->server_ip_addr, str, INET_ADDRSTRLEN); - // strncpy(fed->server_hostname, str, INET_ADDRSTRLEN); + inet_ntop(AF_INET, get_ip_addr(fed->fed_netdrv), str, INET_ADDRSTRLEN); + strncpy(get_host_name(fed->fed_netdrv), str, INET_ADDRSTRLEN); - // LF_PRINT_DEBUG("RTI got address %s from federate %d.", fed->server_hostname, fed_id); + LF_PRINT_DEBUG("RTI got address %s from federate %d.", fed->server_hostname, fed_id); #endif // Set the federate's state as pending @@ -1472,9 +1476,10 @@ void initialize_federate(federate_info_t *fed, uint16_t id) { fed->socket = -1; // No socket. fed->clock_synchronization_enabled = true; fed->in_transit_message_tags = pqueue_tag_init(10); - strncpy(fed->server_hostname, "localhost", INET_ADDRSTRLEN); - fed->server_ip_addr.s_addr = 0; - fed->server_port = -1; + //TODO: Need to fix. This point, the fed_netdrv is not initialized. + // strncpy(fed->server_hostname, "localhost", INET_ADDRSTRLEN); + // fed->server_ip_addr.s_addr = 0; + // fed->server_port = -1; // fed->fed_netdrv = netdrv_init(); fed->clock_netdrv = netdrv_init(); } diff --git a/core/federated/federate.c b/core/federated/federate.c index ae605b457..dd2b18cb9 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1756,6 +1756,7 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { LF_MUTEX_UNLOCK(lf_outbound_socket_mutex); // Read RTI's response. + //TODO: Fix two reads. read_from_socket_fail_on_error(&_fed.socket_TCP_RTI, sizeof(int32_t) + 1, buffer, NULL, "Failed to read the requested port number for federate %d from RTI.", remote_federate_id); diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 730ed8c33..2bd509fcb 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -24,6 +24,18 @@ static socket_priv_t *get_priv(netdrv_t *drv) { return (socket_priv_t *)(drv + 1); } +char *get_host_name(netdrv_t *drv) { + socket_priv_t *priv = get_priv(drv); + return priv->server_hostname; +} +int32_t *get_port(netdrv_t *drv) { + socket_priv_t *priv = get_priv(drv); + return &priv->server_port; +} +struct in_addr *get_ip_addr(netdrv_t *drv) { + socket_priv_t *priv = get_priv(drv); + return &priv->server_ip_addr; +} static int socket_open(netdrv_t *drv) { // socket_priv_t *priv = get_priv(drv); // priv->sock = socket(AF_PACKET, SOCK_RAW, htons(priv->proto)); @@ -97,6 +109,11 @@ netdrv_t *netdrv_init() { priv->socket_descriptor = 0; priv->user_specified_port = 0; + //federate initialization + strncpy(priv->server_hostname, "localhost", INET_ADDRSTRLEN); + priv->server_port = -1; + priv->server_ip_addr.s_addr = 0; + // drv->open = socket_open; drv->close = socket_close; // drv->read = socket_read; @@ -612,7 +629,9 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { // break; case MSG_TYPE_ADDRESS_QUERY: - return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t), buffer); + net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(uint16_t), buffer, NULL, + "Failed to read address query."); + break; case MSG_TYPE_ADDRESS_ADVERTISEMENT: net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int32_t), buffer, NULL, "Error reading port data."); diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index d40ea2881..2ac6b9e8a 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -64,6 +64,10 @@ typedef struct socket_priv_t { // server of the federate. } socket_priv_t; +char *get_host_name(netdrv_t *drv); +int32_t *get_port(netdrv_t *drv); +struct in_addr *get_ip_addr(netdrv_t *drv); + netdrv_t * netdrv_init(); /** From eda21c0b63a51b18d9ff637a1022233084992b62 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Mon, 5 Feb 2024 09:13:26 -0700 Subject: [PATCH 048/262] Fix debug message --- core/federated/RTI/rti_remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 3c7e2d65f..5a5e48c41 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1124,7 +1124,7 @@ static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { inet_ntop(AF_INET, get_ip_addr(fed->fed_netdrv), str, INET_ADDRSTRLEN); strncpy(get_host_name(fed->fed_netdrv), str, INET_ADDRSTRLEN); - LF_PRINT_DEBUG("RTI got address %s from federate %d.", fed->server_hostname, fed_id); + LF_PRINT_DEBUG("RTI got address %s from federate %d.", get_host_name(fed->fed_netdrv), fed_id); #endif // Set the federate's state as pending From 7e9f360cfe63d687bea92a6d2d082bfa22a123d2 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Wed, 7 Feb 2024 17:51:38 -0700 Subject: [PATCH 049/262] Fix read_netdrv to make it stateful --- core/federated/RTI/rti_remote.c | 15 +- core/federated/network/lf_socket_support.c | 550 +++++++++++------- .../federated/network/lf_socket_support.h | 6 +- include/core/federated/network/net_util.h | 2 + 4 files changed, 358 insertions(+), 215 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 5a5e48c41..cbdfab492 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -801,7 +801,7 @@ void *clock_synchronization_thread(void *noargs) { int remaining_attempts = 5; while (remaining_attempts > 0) { remaining_attempts--; - int read_failed = read_from_netdrv(rti_remote->clock_netdrv, buffer); + int read_failed = read_from_netdrv(rti_remote->clock_netdrv, buffer, message_size); // If any errors occur, either discard the message or the clock sync round. if (!read_failed) { if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T3) { @@ -948,7 +948,7 @@ void *federate_info_thread_TCP(void *fed) { // Listen for messages from the federate. while (my_fed->enclave.state != NOT_CONNECTED) { // Read no more than one byte to get the message type. - int read_failed = read_from_netdrv(my_fed->fed_netdrv, buffer); + int read_failed = read_from_netdrv(my_fed->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); if (read_failed) { // Socket is closed lf_print_warning("RTI: Socket to federate %d is closed. Exiting the thread.", my_fed->enclave.id); @@ -1037,7 +1037,7 @@ static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { unsigned char buffer[256]; //TODO: NEED TO CHECK. // Read bytes from the socket. We need 4 bytes. - if (read_from_netdrv_close_on_error(netdrv, buffer)) { + if (read_from_netdrv_close_on_error(netdrv, buffer, 256)) { //TODO: check length. lf_print_error("RTI failed to read from accepted socket."); return -1; } @@ -1162,6 +1162,7 @@ static int receive_connection_information(netdrv_t *netdrv, uint16_t fed_id) { read_from_netdrv_fail_on_error( netdrv, connection_info_buffer, + 1024, NULL, "RTI failed to read MSG_TYPE_NEIGHBOR_STRUCTURE message header from federate %d.", fed_id); @@ -1244,7 +1245,7 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t // is doing clock synchronization, and if it is, what port to use for UDP. LF_PRINT_DEBUG("RTI waiting for MSG_TYPE_UDP_PORT from federate %d.", fed_id); unsigned char response[1 + sizeof(uint16_t)]; - read_from_netdrv_fail_on_error(netdrv, response, NULL, + read_from_netdrv_fail_on_error(netdrv, response, 1 + sizeof(uint16_t), NULL, "RTI failed to read MSG_TYPE_UDP_PORT message from federate %d.", fed_id); if (response[0] != MSG_TYPE_UDP_PORT) { lf_print_error( @@ -1272,7 +1273,7 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t // Listen for reply message, which should be T3. size_t message_size = 1 + sizeof(int32_t); unsigned char buffer[message_size]; - read_from_netdrv_fail_on_error(netdrv, buffer, NULL, + read_from_netdrv_fail_on_error(netdrv, buffer, message_size, NULL, "Socket to federate %d unexpectedly closed.", fed_id); if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T3) { int32_t fed_id = extract_int32(&(buffer[1])); @@ -1324,7 +1325,7 @@ static bool authenticate_federate(netdrv_t *rti_netdrv) { // Wait for MSG_TYPE_FED_NONCE from federate. size_t fed_id_length = sizeof(uint16_t); unsigned char buffer[1 + fed_id_length + NONCE_LENGTH]; - read_from_netdrv_fail_on_error(rti_netdrv, buffer, NULL, + read_from_netdrv_fail_on_error(rti_netdrv, buffer, 1 + fed_id_length + NONCE_LENGTH, NULL, "Failed to read MSG_TYPE_FED_NONCE."); if (buffer[0] != MSG_TYPE_FED_NONCE) { lf_print_error_and_exit( @@ -1358,7 +1359,7 @@ static bool authenticate_federate(netdrv_t *rti_netdrv) { // Wait for MSG_TYPE_FED_RESPONSE unsigned char received[1 + hmac_length]; - read_from_netdrv_fail_on_error(rti_netdrv, 1 + hmac_length, received, NULL, + read_from_netdrv_fail_on_error(rti_netdrv, received, 1 + hmac_length, NULL, "Failed to read federate response."); if (received[0] != MSG_TYPE_FED_RESPONSE) { lf_print_error_and_exit( diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 2bd509fcb..0384d8f1c 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -451,78 +451,9 @@ void write_to_netdrv_fail_on_error( } } } - -static int net_read_from_socket(int socket, size_t num_bytes, unsigned char* buffer) { - if (socket < 0) { - // Socket is not open. - errno = EBADF; - return -1; - } - ssize_t bytes_read = 0; - int retry_count = 0; - while (bytes_read < (ssize_t)num_bytes) { - ssize_t more = read(socket, buffer + bytes_read, num_bytes - (size_t)bytes_read); - if(more < 0 && retry_count++ < NUM_SOCKET_RETRIES - && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { - // Those error codes set by the socket indicates - // that we should try again (@see man errno). - lf_print_warning("Reading from socket failed. Will try again."); - lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); - continue; - } else if (more < 0) { - // A more serious error occurred. - return -1; - } else if (more == 0) { - // EOF received. - return 1; - } - bytes_read += more; - } - return 0; -} - -static int net_read_from_socket_close_on_error(int* socket, size_t num_bytes, unsigned char* buffer) { - assert(socket); - int read_failed = read_from_socket(*socket, num_bytes, buffer); - if (read_failed) { - // Read failed. - // Socket has probably been closed from the other side. - // Shut down and close the socket from this side. - shutdown(*socket, SHUT_RDWR); - close(*socket); - // Mark the socket closed. - *socket = -1; - return -1; - } - return 0; -} - -static void net_read_from_socket_fail_on_error( - int* socket, - size_t num_bytes, - unsigned char* buffer, - lf_mutex_t* mutex, - char* format, ...) { - va_list args; - assert(socket); - int read_failed = read_from_socket_close_on_error(socket, num_bytes, buffer); - if (read_failed) { - // Read failed. - if (mutex != NULL) { - lf_mutex_unlock(mutex); - } - if (format != NULL) { - lf_print_error_system_failure(format, args); - } else { - lf_print_error_system_failure("Failed to read from socket."); - } - } -} - -int read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer) { - socket_priv_t *priv = get_priv(drv); - assert(&priv->socket_descriptor); - int read_failed = read_from_netdrv(drv, buffer); +// TODO: Fix return. +int read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer, size_t buffer_length) { + int read_failed = read_from_netdrv(drv, buffer, buffer_length); if (read_failed) { drv->close(drv); return -1; @@ -530,15 +461,15 @@ int read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer) { return 0; } +//TODO: FIX return void read_from_netdrv_fail_on_error( netdrv_t *drv, unsigned char* buffer, + size_t buffer_length, lf_mutex_t* mutex, char* format, ...) { va_list args; - socket_priv_t *priv = get_priv(drv); - assert(&priv->socket_descriptor); - int read_failed = read_from_netdrv_close_on_error(drv, buffer); + int read_failed = read_from_netdrv_close_on_error(drv, buffer, buffer_length); if (read_failed) { // Read failed. if (mutex != NULL) { @@ -554,139 +485,348 @@ void read_from_netdrv_fail_on_error( -int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { - socket_priv_t *priv = get_priv(netdrv); - net_read_from_socket(priv->socket_descriptor, 1, buffer); - int msg_type = buffer[0]; - buffer += 1; - switch (msg_type) { - - // case MSG_TYPE_REJECT: // 1 +1 - // break; - // case MSG_TYPE_ACK: // 1 - // break; - case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 - return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t), buffer); - case MSG_TYPE_FED_IDS: // 1 + sizeof(uint16_t) + 1 + federation_id - net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t) + 1, buffer); - size_t federation_id_length = (size_t)buffer[sizeof(uint16_t)]; - return net_read_from_socket(priv->socket_descriptor, federation_id_length, buffer + 1 + sizeof(uint16_t)); - - case MSG_TYPE_FED_NONCE: //1 + sizeof(uint16_t) + NONCE_LENGTH(8) - return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t) + NONCE_LENGTH, buffer); - - - // case MSG_TYPE_RTI_RESPONSE: //1 + sizeof(uint16_t) + NONCE_LENGTH(8) - // break; - - // case MSG_TYPE_FED_RESPONSE: //1 + NONCE_LENGTH(8) - // break; - - case MSG_TYPE_TIMESTAMP: // 1+sizeof(int64_t) - return net_read_from_socket(priv->socket_descriptor, sizeof(int64_t), buffer); - - // case MSG_TYPE_RESIGN: - // handle_federate_resign(my_fed); - // return NULL; - case MSG_TYPE_TAGGED_MESSAGE: ; - size_t header_size = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); - net_read_from_socket_fail_on_error(&priv->socket_descriptor, header_size, buffer, NULL, - "RTI failed to read the timed message header from remote federate."); - size_t length = (size_t) extract_int32(buffer + sizeof(uint16_t) + sizeof(uint16_t)); - net_read_from_socket_fail_on_error(&priv->socket_descriptor, length, buffer + header_size, NULL, - "RTI failed to read timed message."); - break; - - - - - - case MSG_TYPE_NEXT_EVENT_TAG: - net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, - "RTI failed to read the content of the next event tag."); - break; - // case MSG_TYPE_TAG_ADVANCE_GRANT: - // handle_tag_advance_grant(); - // break; - // case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: - // handle_provisional_tag_advance_grant(); - // break; - - case MSG_TYPE_LATEST_TAG_COMPLETE: - net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, - "RTI failed to read the content of the logical tag complete."); - break; - case MSG_TYPE_STOP_REQUEST: - net_read_from_socket_fail_on_error(&priv->socket_descriptor, MSG_TYPE_STOP_REQUEST_LENGTH - 1, buffer, NULL, - "RTI failed to read the MSG_TYPE_STOP_REQUEST payload."); - break; - case MSG_TYPE_STOP_REQUEST_REPLY: - net_read_from_socket_fail_on_error(&priv->socket_descriptor, MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1, buffer, NULL, - "RTI failed to read the reply to MSG_TYPE_STOP_REQUEST message."); - break; - // case MSG_TYPE_STOP_GRANTED: - // handle_stop_granted_message(); - // break; - - case MSG_TYPE_ADDRESS_QUERY: - net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(uint16_t), buffer, NULL, - "Failed to read address query."); - break; - case MSG_TYPE_ADDRESS_ADVERTISEMENT: - net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int32_t), buffer, NULL, - "Error reading port data."); - break; - - // case MSG_TYPE_P2P_SENDING_FED_ID: //1 /////////TODO: CHECK!!!!!!! - // break; - - // case MSG_TYPE_P2P_MESSAGE: - // LF_PRINT_LOG("Received untimed message from federate %d.", fed_id); - // if (handle_message(socket_id, fed_id)) { - // // Failed to complete the reading of a message on a physical connection. - // lf_print_warning("Failed to complete reading of message on physical connection."); - // socket_closed = true; - // } - // break; - // case MSG_TYPE_P2P_TAGGED_MESSAGE: - // LF_PRINT_LOG("Received tagged message from federate %d.", fed_id); - // if (handle_tagged_message(socket_id, fed_id)) { - // // P2P tagged messages are only used in decentralized coordination, and - // // it is not a fatal error if the socket is closed before the whole message is read. - // // But this thread should exit. - // lf_print_warning("Failed to complete reading of tagged message."); - // socket_closed = true; - // } - // break; - // case MSG_TYPE_CLOCK_SYNC_T1: - // break; - - case MSG_TYPE_CLOCK_SYNC_T3: - return net_read_from_socket(priv->socket_descriptor, sizeof(int32_t), buffer); - // case MSG_TYPE_CLOCK_SYNC_T4: - // break; - // case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: - // break; - case MSG_TYPE_PORT_ABSENT: - net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, - "RTI failed to read port absent message."); - break; - - case MSG_TYPE_NEIGHBOR_STRUCTURE: - net_read_from_socket(priv->socket_descriptor, MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1, buffer); - int num_upstream = extract_int32(buffer); - int num_downstream = extract_int32(buffer+sizeof(int32_t)); - size_t connections_info_body_size = ((sizeof(uint16_t) + sizeof(int64_t)) * num_upstream)+ (sizeof(uint16_t) * num_downstream); - return net_read_from_socket(priv->socket_descriptor, connections_info_body_size, buffer + MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1); - +// int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { +// socket_priv_t *priv = get_priv(netdrv); +// net_read_from_socket(priv->socket_descriptor, 1, buffer); +// int msg_type = buffer[0]; +// buffer += 1; +// switch (msg_type) { +// // case MSG_TYPE_REJECT: // 1 +1 +// // break; +// // case MSG_TYPE_ACK: // 1 +// // break; +// case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 +// return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t), buffer); +// case MSG_TYPE_FED_IDS: // 1 + sizeof(uint16_t) + 1 + federation_id +// net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t) + 1, buffer); +// size_t federation_id_length = (size_t)buffer[sizeof(uint16_t)]; +// return net_read_from_socket(priv->socket_descriptor, federation_id_length, buffer + 1 + sizeof(uint16_t)); +// case MSG_TYPE_FED_NONCE: //1 + sizeof(uint16_t) + NONCE_LENGTH(8) +// return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t) + NONCE_LENGTH, buffer); + - // case MSG_TYPE_FAILED: - // handle_federate_failed(my_fed); - // return NULL; - default: - return -1; +// // case MSG_TYPE_RTI_RESPONSE: //1 + sizeof(uint16_t) + NONCE_LENGTH(8) +// // break; + +// // case MSG_TYPE_FED_RESPONSE: //1 + NONCE_LENGTH(8) +// // break; + +// case MSG_TYPE_TIMESTAMP: // 1+sizeof(int64_t) +// return net_read_from_socket(priv->socket_descriptor, sizeof(int64_t), buffer); + +// // case MSG_TYPE_RESIGN: +// // handle_federate_resign(my_fed); +// // return NULL; +// case MSG_TYPE_TAGGED_MESSAGE: ; +// size_t header_size = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); +// net_read_from_socket_fail_on_error(&priv->socket_descriptor, header_size, buffer, NULL, +// "RTI failed to read the timed message header from remote federate."); +// size_t length = (size_t) extract_int32(buffer + sizeof(uint16_t) + sizeof(uint16_t)); +// net_read_from_socket_fail_on_error(&priv->socket_descriptor, length, buffer + header_size, NULL, +// "RTI failed to read timed message."); +// break; + + + + + +// case MSG_TYPE_NEXT_EVENT_TAG: +// net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, +// "RTI failed to read the content of the next event tag."); +// break; +// // case MSG_TYPE_TAG_ADVANCE_GRANT: +// // handle_tag_advance_grant(); +// // break; +// // case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: +// // handle_provisional_tag_advance_grant(); +// // break; + +// case MSG_TYPE_LATEST_TAG_COMPLETE: +// net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, +// "RTI failed to read the content of the logical tag complete."); +// break; +// case MSG_TYPE_STOP_REQUEST: +// net_read_from_socket_fail_on_error(&priv->socket_descriptor, MSG_TYPE_STOP_REQUEST_LENGTH - 1, buffer, NULL, +// "RTI failed to read the MSG_TYPE_STOP_REQUEST payload."); +// break; +// case MSG_TYPE_STOP_REQUEST_REPLY: +// net_read_from_socket_fail_on_error(&priv->socket_descriptor, MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1, buffer, NULL, +// "RTI failed to read the reply to MSG_TYPE_STOP_REQUEST message."); +// break; +// // case MSG_TYPE_STOP_GRANTED: +// // handle_stop_granted_message(); +// // break; + +// case MSG_TYPE_ADDRESS_QUERY: +// net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(uint16_t), buffer, NULL, +// "Failed to read address query."); +// break; +// case MSG_TYPE_ADDRESS_ADVERTISEMENT: +// net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int32_t), buffer, NULL, +// "Error reading port data."); +// break; + +// // case MSG_TYPE_P2P_SENDING_FED_ID: //1 /////////TODO: CHECK!!!!!!! +// // break; + +// // case MSG_TYPE_P2P_MESSAGE: +// // LF_PRINT_LOG("Received untimed message from federate %d.", fed_id); +// // if (handle_message(socket_id, fed_id)) { +// // // Failed to complete the reading of a message on a physical connection. +// // lf_print_warning("Failed to complete reading of message on physical connection."); +// // socket_closed = true; +// // } +// // break; +// // case MSG_TYPE_P2P_TAGGED_MESSAGE: +// // LF_PRINT_LOG("Received tagged message from federate %d.", fed_id); +// // if (handle_tagged_message(socket_id, fed_id)) { +// // // P2P tagged messages are only used in decentralized coordination, and +// // // it is not a fatal error if the socket is closed before the whole message is read. +// // // But this thread should exit. +// // lf_print_warning("Failed to complete reading of tagged message."); +// // socket_closed = true; +// // } +// // break; +// // case MSG_TYPE_CLOCK_SYNC_T1: +// // break; + +// case MSG_TYPE_CLOCK_SYNC_T3: +// return net_read_from_socket(priv->socket_descriptor, sizeof(int32_t), buffer); +// // case MSG_TYPE_CLOCK_SYNC_T4: +// // break; +// // case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: +// // break; +// case MSG_TYPE_PORT_ABSENT: +// net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, +// "RTI failed to read port absent message."); +// break; + +// case MSG_TYPE_NEIGHBOR_STRUCTURE: +// net_read_from_socket(priv->socket_descriptor, MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1, buffer); +// int num_upstream = extract_int32(buffer); +// int num_downstream = extract_int32(buffer+sizeof(int32_t)); +// size_t connections_info_body_size = ((sizeof(uint16_t) + sizeof(int64_t)) * num_upstream)+ (sizeof(uint16_t) * num_downstream); +// return net_read_from_socket(priv->socket_descriptor, connections_info_body_size, buffer + MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1); + + + + +// // case MSG_TYPE_FAILED: +// // handle_federate_failed(my_fed); +// // return NULL; +// default: +// return -1; +// } +// } +typedef enum { + HEADER_READ, + READ_MSG_TYPE_FED_IDS, + READ_MSG_TYPE_NEIGHBOR_STRUCTURE, + READ_MSG_TYPE_TAGGED_MESSAGE, + KEEP_READING, + FINISH_READ +} read_state_t; + +// Returns the total bytes read. +int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { + socket_priv_t *priv = get_priv(netdrv); + size_t bytes_to_read; // The bytes to read in future. + size_t bytes_read = 0; // The bytes that was read by a single read() function. + size_t total_bytes_read = 0; // The total bytes that have been read, and will be the return of the read_from netdrv. + int retry_count; + int state; + // Check if socket_descriptor is open. + if (priv->socket_descriptor < 0) { + // Socket is not open. + errno = EBADF; + return -1; + } + // First, check if there are remaining bytes. + // If there are remaining bytes, it reads as long as it can (buffer_length). + // Then it becomes KEEP_READING state. + if (netdrv->read_remaining_bytes > 0) { + bytes_to_read = (netdrv->read_remaining_bytes > buffer_length) ? buffer_length : netdrv->read_remaining_bytes; + state = KEEP_READING; + } else { + // If there are no left bytes to read, it reads the header byte. + bytes_to_read = 1; // read header + state = HEADER_READ; + } + + for (;;) { + retry_count = 0; + while (bytes_to_read > 0) { + bytes_read = read(priv->socket_descriptor, buffer + total_bytes_read, bytes_to_read); + if (bytes_read < 0 && // If) Error has occurred, + retry_count++ < NUM_SOCKET_RETRIES && // there are left retry counts, + (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { // and the error code was these three, + // Print warning, sleep for a short time, and retry. + lf_print_warning("Reading from socket failed. Will try again."); + lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); + continue; + } else if (bytes_read <= 0) { + // An error occurred without those three error codes. + // https://stackoverflow.com/questions/42188128/does-reading-from-a-socket-wait-or-get-eof + // bytes_read == 0 means disconnected. + return -1; + } + bytes_to_read -= bytes_read; + total_bytes_read += bytes_read; + } + + switch(state) { + case HEADER_READ: + switch(buffer[0]) { + // case MSG_TYPE_REJECT: // 1 +1 + // break; + // case MSG_TYPE_ACK: // 1 + // break; + case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 + bytes_to_read = sizeof(uint16_t); + state = FINISH_READ; + break; + case MSG_TYPE_FED_IDS: // 1 + sizeof(uint16_t) + 1 + federation_id + bytes_to_read = sizeof(uint16_t) + 1; + state = READ_MSG_TYPE_FED_IDS; + break; + + case MSG_TYPE_FED_NONCE: //1 + sizeof(uint16_t) + NONCE_LENGTH(8) + bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; + state = FINISH_READ; + break; + + // case MSG_TYPE_RTI_RESPONSE: //1 + sizeof(uint16_t) + NONCE_LENGTH(8) + // break; + + // case MSG_TYPE_FED_RESPONSE: //1 + NONCE_LENGTH(8) + // break; + + case MSG_TYPE_TIMESTAMP: // 1+sizeof(int64_t) + bytes_to_read = sizeof(int64_t); + state = FINISH_READ; + break; + + // case MSG_TYPE_RESIGN: + // handle_federate_resign(my_fed); + // return NULL; + case MSG_TYPE_TAGGED_MESSAGE: ; + bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); + state = READ_MSG_TYPE_TAGGED_MESSAGE; ; + break; + case MSG_TYPE_NEXT_EVENT_TAG: + bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); + state = FINISH_READ; + break; + // case MSG_TYPE_TAG_ADVANCE_GRANT: + // handle_tag_advance_grant(); + // break; + // case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: + // handle_provisional_tag_advance_grant(); + // break; + + case MSG_TYPE_LATEST_TAG_COMPLETE: + bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); + state = FINISH_READ; + break; + case MSG_TYPE_STOP_REQUEST: + bytes_to_read = MSG_TYPE_STOP_REQUEST_LENGTH - 1; + state = FINISH_READ; + break; + + case MSG_TYPE_STOP_REQUEST_REPLY: + bytes_to_read = MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1; + state = FINISH_READ; + break; + // case MSG_TYPE_STOP_GRANTED: + // handle_stop_granted_message(); + // break; + + case MSG_TYPE_ADDRESS_QUERY: + bytes_to_read = sizeof(uint16_t); + state = FINISH_READ; + break; + case MSG_TYPE_ADDRESS_ADVERTISEMENT: + bytes_to_read = sizeof(int32_t); + state = FINISH_READ; + break; + // case MSG_TYPE_P2P_SENDING_FED_ID: //1 /////////TODO: CHECK!!!!!!! + // break; + + // case MSG_TYPE_P2P_MESSAGE: + // LF_PRINT_LOG("Received untimed message from federate %d.", fed_id); + // if (handle_message(socket_id, fed_id)) { + // // Failed to complete the reading of a message on a physical connection. + // lf_print_warning("Failed to complete reading of message on physical connection."); + // socket_closed = true; + // } + // break; + // case MSG_TYPE_P2P_TAGGED_MESSAGE: + // LF_PRINT_LOG("Received tagged message from federate %d.", fed_id); + // if (handle_tagged_message(socket_id, fed_id)) { + // // P2P tagged messages are only used in decentralized coordination, and + // // it is not a fatal error if the socket is closed before the whole message is read. + // // But this thread should exit. + // lf_print_warning("Failed to complete reading of tagged message."); + // socket_closed = true; + // } + // break; + // case MSG_TYPE_CLOCK_SYNC_T1: + // break; + + case MSG_TYPE_CLOCK_SYNC_T3: + bytes_to_read = sizeof(int32_t); + state = FINISH_READ; + break; + // case MSG_TYPE_CLOCK_SYNC_T4: + // break; + // case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: + // break; + case MSG_TYPE_PORT_ABSENT: + bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); + state = FINISH_READ; + break; + case MSG_TYPE_NEIGHBOR_STRUCTURE: + bytes_to_read = MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1; + state = READ_MSG_TYPE_NEIGHBOR_STRUCTURE; + break; + // case MSG_TYPE_FAILED: + // handle_federate_failed(my_fed); + // return NULL; + default: + return -1; + } + break; + case READ_MSG_TYPE_FED_IDS: ; + size_t federation_id_length = (size_t)buffer[1 + sizeof(uint16_t)]; + bytes_to_read = federation_id_length; + state = FINISH_READ; + break; + case READ_MSG_TYPE_NEIGHBOR_STRUCTURE: ; + int num_upstream = extract_int32(buffer + 1); + int num_downstream = extract_int32(buffer + 1 + sizeof(int32_t)); + bytes_to_read = ((sizeof(uint16_t) + sizeof(int64_t)) * num_upstream)+ (sizeof(uint16_t) * num_downstream); + state = FINISH_READ; + break; + case READ_MSG_TYPE_TAGGED_MESSAGE: ; + size_t length = (size_t) extract_int32(buffer + sizeof(uint16_t) + sizeof(uint16_t)); + if(length > buffer_length - total_bytes_read) { + bytes_to_read = buffer_length - total_bytes_read; + netdrv->read_remaining_bytes = length - bytes_to_read; + } else { + bytes_to_read = length; + } + state = FINISH_READ; + break; + case KEEP_READING: + netdrv->read_remaining_bytes -= total_bytes_read; + // return total_bytes_read; + return 0; + case FINISH_READ: + // return total_bytes_read; + return 0; + } } } \ No newline at end of file diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index 2ac6b9e8a..f0252673d 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -171,7 +171,7 @@ void write_to_netdrv_fail_on_error( * @param buffer The buffer into which to put the bytes. * @return 0 for success, 1 for EOF, and -1 for an error. */ -int read_from_netdrv(netdrv_t *drv, unsigned char* buffer); +int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length); /** * Read the specified number of bytes to the specified socket using read_from_socket @@ -182,7 +182,7 @@ int read_from_netdrv(netdrv_t *drv, unsigned char* buffer); * @param buffer The buffer from which to get the bytes. * @return 0 for success, -1 for failure. */ -int read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer); +int read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer, size_t buffer_length); /** * Read the specified number of bytes from the specified socket into the @@ -200,6 +200,6 @@ int read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer); * @return The number of bytes read, or 0 if an EOF is received, or * a negative number for an error. */ -void read_from_netdrv_fail_on_error(netdrv_t *drv, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...); +void read_from_netdrv_fail_on_error(netdrv_t *drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, char* format, ...); #endif // LF_SOCKET_SUPPORT_H diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 33de7c700..8bad178df 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -76,6 +76,8 @@ typedef struct netdrv_t { void (*close)(struct netdrv_t *drv); int ( *read)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); int (*write)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); + unsigned int read_remaining_bytes; + unsigned int write_remaining_bytes; } netdrv_t; int netdrv_open(netdrv_t *drv); From c2f6f0a7b5882d33360b7eef9e178a5a5c436e94 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 8 Feb 2024 12:17:31 -0700 Subject: [PATCH 050/262] Fixed tagged message bugs --- core/federated/network/lf_socket_support.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 0384d8f1c..d18ba7c72 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -114,6 +114,8 @@ netdrv_t *netdrv_init() { priv->server_port = -1; priv->server_ip_addr.s_addr = 0; + drv->read_remaining_bytes = 0; + // drv->open = socket_open; drv->close = socket_close; // drv->read = socket_read; @@ -714,7 +716,7 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_leng // return NULL; case MSG_TYPE_TAGGED_MESSAGE: ; bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); - state = READ_MSG_TYPE_TAGGED_MESSAGE; ; + state = READ_MSG_TYPE_TAGGED_MESSAGE; break; case MSG_TYPE_NEXT_EVENT_TAG: bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); @@ -811,7 +813,7 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_leng state = FINISH_READ; break; case READ_MSG_TYPE_TAGGED_MESSAGE: ; - size_t length = (size_t) extract_int32(buffer + sizeof(uint16_t) + sizeof(uint16_t)); + size_t length = (size_t) extract_int32(buffer + 1+ sizeof(uint16_t) + sizeof(uint16_t)); if(length > buffer_length - total_bytes_read) { bytes_to_read = buffer_length - total_bytes_read; netdrv->read_remaining_bytes = length - bytes_to_read; From c400a13b9fb209c6629ac8594de74c4339b7a7ed Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 8 Feb 2024 16:49:18 -0700 Subject: [PATCH 051/262] Fix handle_federate_resign && fix comments && add message_type understand HMAC authentication. --- core/federated/RTI/rti_remote.c | 37 ++--- core/federated/network/lf_socket_support.c | 153 ++------------------- 2 files changed, 28 insertions(+), 162 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index ceac7b433..014601da0 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -614,7 +614,7 @@ void handle_address_query(uint16_t fed_id, unsigned char *buffer) { memcpy(buf + 1 + sizeof(int32_t), (unsigned char *)get_ip_addr(remote_fed->fed_netdrv), sizeof(*get_ip_addr(remote_fed->fed_netdrv))); write_to_netdrv_fail_on_error( fed->fed_netdrv, sizeof(int32_t) + 1 + sizeof(*get_ip_addr(remote_fed->fed_netdrv)), (unsigned char *)buf, &rti_mutex, - "Failed to write port number to socket of federate %d.", fed_id); + "Failed to write port number to netdrv of federate %d.", fed_id); LF_MUTEX_UNLOCK(&rti_mutex); @@ -697,7 +697,7 @@ void handle_timestamp(federate_info_t *my_fed, unsigned char *buffer) { } void send_physical_clock(unsigned char message_type, federate_info_t *fed, socket_type_t socket_type) { if (fed->enclave.state == NOT_CONNECTED) { - lf_print_warning("Clock sync: RTI failed to send physical time to federate %d. Socket not connected.\n", + lf_print_warning("Clock sync: RTI failed to send physical time to federate %d. Netdrv not connected.\n", fed->enclave.id); return; } @@ -855,7 +855,7 @@ void *clock_synchronization_thread(void *noargs) { * @param my_fed The federate sending a MSG_TYPE_FAILED message. */ static void handle_federate_failed(federate_info_t *my_fed) { - // Nothing more to do. Close the socket and exit. + // Nothing more to do. Close the netdrv and exit. LF_MUTEX_LOCK(&rti_mutex); if (rti_remote->base.tracing_enabled) { @@ -912,20 +912,23 @@ static void handle_federate_resign(federate_info_t *my_fed) { // Indicate that there will no further events from this federate. my_fed->enclave.next_event = FOREVER_TAG; - // According to this: https://stackoverflow.com/questions/4160347/close-vs-shutdown-socket, - // the close should happen when receiving a 0 length message from the other end. - // Here, we just signal the other side that no further writes to the socket are - // forthcoming, which should result in the other end getting a zero-length reception. - shutdown(my_fed->socket, SHUT_WR); + // TODO: Needs discussion. + // // According to this: https://stackoverflow.com/questions/4160347/close-vs-shutdown-socket, + // // the close should happen when receiving a 0 length message from the other end. + // // Here, we just signal the other side that no further writes to the socket are + // // forthcoming, which should result in the other end getting a zero-length reception. + // shutdown(my_fed->socket, SHUT_WR); + + // // Wait for the federate to send an EOF or a socket error to occur. + // // Discard any incoming bytes. Normally, this read should return 0 because + // // the federate is resigning and should itself invoke shutdown. + // unsigned char buffer[10]; + // while (read(my_fed->socket, buffer, 10) > 0); - // Wait for the federate to send an EOF or a socket error to occur. - // Discard any incoming bytes. Normally, this read should return 0 because - // the federate is resigning and should itself invoke shutdown. - unsigned char buffer[10]; - while (read(my_fed->socket, buffer, 10) > 0); + // // We can now safely close the socket. + // close(my_fed->socket); // from unistd.h - // We can now safely close the socket. - close(my_fed->socket); // from unistd.h + my_fed->fed_netdrv->close(my_fed->fed_netdrv); // Check downstream federates to see whether they should now be granted a TAG. // To handle cycles, need to create a boolean array to keep @@ -943,7 +946,7 @@ void *federate_info_thread_TCP(void *fed) { // Buffer for incoming messages. // This does not constrain the message size because messages // are forwarded piece by piece. - unsigned char buffer[FED_COM_BUFFER_SIZE]; //TODO: NEED TO CHECK SIZE. + unsigned char buffer[FED_COM_BUFFER_SIZE]; // Listen for messages from the federate. while (my_fed->enclave.state != NOT_CONNECTED) { @@ -1002,7 +1005,7 @@ void *federate_info_thread_TCP(void *fed) { // Nothing more to do. Close the socket and exit. // Prevent multiple threads from closing the same socket at the same time. LF_MUTEX_LOCK(&rti_mutex); - close(my_fed->socket); // from unistd.h + my_fed->fed_netdrv->close(my_fed->fed_netdrv); LF_MUTEX_UNLOCK(&rti_mutex); return NULL; } diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index d18ba7c72..7d7d7d560 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -485,144 +485,6 @@ void read_from_netdrv_fail_on_error( } } - - -// int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer) { -// socket_priv_t *priv = get_priv(netdrv); -// net_read_from_socket(priv->socket_descriptor, 1, buffer); -// int msg_type = buffer[0]; -// buffer += 1; -// switch (msg_type) { - -// // case MSG_TYPE_REJECT: // 1 +1 -// // break; -// // case MSG_TYPE_ACK: // 1 -// // break; -// case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 -// return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t), buffer); -// case MSG_TYPE_FED_IDS: // 1 + sizeof(uint16_t) + 1 + federation_id -// net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t) + 1, buffer); -// size_t federation_id_length = (size_t)buffer[sizeof(uint16_t)]; -// return net_read_from_socket(priv->socket_descriptor, federation_id_length, buffer + 1 + sizeof(uint16_t)); - -// case MSG_TYPE_FED_NONCE: //1 + sizeof(uint16_t) + NONCE_LENGTH(8) -// return net_read_from_socket(priv->socket_descriptor, sizeof(uint16_t) + NONCE_LENGTH, buffer); - - -// // case MSG_TYPE_RTI_RESPONSE: //1 + sizeof(uint16_t) + NONCE_LENGTH(8) -// // break; - -// // case MSG_TYPE_FED_RESPONSE: //1 + NONCE_LENGTH(8) -// // break; - -// case MSG_TYPE_TIMESTAMP: // 1+sizeof(int64_t) -// return net_read_from_socket(priv->socket_descriptor, sizeof(int64_t), buffer); - -// // case MSG_TYPE_RESIGN: -// // handle_federate_resign(my_fed); -// // return NULL; -// case MSG_TYPE_TAGGED_MESSAGE: ; -// size_t header_size = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); -// net_read_from_socket_fail_on_error(&priv->socket_descriptor, header_size, buffer, NULL, -// "RTI failed to read the timed message header from remote federate."); -// size_t length = (size_t) extract_int32(buffer + sizeof(uint16_t) + sizeof(uint16_t)); -// net_read_from_socket_fail_on_error(&priv->socket_descriptor, length, buffer + header_size, NULL, -// "RTI failed to read timed message."); -// break; - - - - - -// case MSG_TYPE_NEXT_EVENT_TAG: -// net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, -// "RTI failed to read the content of the next event tag."); -// break; -// // case MSG_TYPE_TAG_ADVANCE_GRANT: -// // handle_tag_advance_grant(); -// // break; -// // case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: -// // handle_provisional_tag_advance_grant(); -// // break; - -// case MSG_TYPE_LATEST_TAG_COMPLETE: -// net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, -// "RTI failed to read the content of the logical tag complete."); -// break; -// case MSG_TYPE_STOP_REQUEST: -// net_read_from_socket_fail_on_error(&priv->socket_descriptor, MSG_TYPE_STOP_REQUEST_LENGTH - 1, buffer, NULL, -// "RTI failed to read the MSG_TYPE_STOP_REQUEST payload."); -// break; -// case MSG_TYPE_STOP_REQUEST_REPLY: -// net_read_from_socket_fail_on_error(&priv->socket_descriptor, MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1, buffer, NULL, -// "RTI failed to read the reply to MSG_TYPE_STOP_REQUEST message."); -// break; -// // case MSG_TYPE_STOP_GRANTED: -// // handle_stop_granted_message(); -// // break; - -// case MSG_TYPE_ADDRESS_QUERY: -// net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(uint16_t), buffer, NULL, -// "Failed to read address query."); -// break; -// case MSG_TYPE_ADDRESS_ADVERTISEMENT: -// net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(int32_t), buffer, NULL, -// "Error reading port data."); -// break; - -// // case MSG_TYPE_P2P_SENDING_FED_ID: //1 /////////TODO: CHECK!!!!!!! -// // break; - -// // case MSG_TYPE_P2P_MESSAGE: -// // LF_PRINT_LOG("Received untimed message from federate %d.", fed_id); -// // if (handle_message(socket_id, fed_id)) { -// // // Failed to complete the reading of a message on a physical connection. -// // lf_print_warning("Failed to complete reading of message on physical connection."); -// // socket_closed = true; -// // } -// // break; -// // case MSG_TYPE_P2P_TAGGED_MESSAGE: -// // LF_PRINT_LOG("Received tagged message from federate %d.", fed_id); -// // if (handle_tagged_message(socket_id, fed_id)) { -// // // P2P tagged messages are only used in decentralized coordination, and -// // // it is not a fatal error if the socket is closed before the whole message is read. -// // // But this thread should exit. -// // lf_print_warning("Failed to complete reading of tagged message."); -// // socket_closed = true; -// // } -// // break; -// // case MSG_TYPE_CLOCK_SYNC_T1: -// // break; - -// case MSG_TYPE_CLOCK_SYNC_T3: -// return net_read_from_socket(priv->socket_descriptor, sizeof(int32_t), buffer); -// // case MSG_TYPE_CLOCK_SYNC_T4: -// // break; -// // case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: -// // break; -// case MSG_TYPE_PORT_ABSENT: -// net_read_from_socket_fail_on_error(&priv->socket_descriptor, sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t), buffer, NULL, -// "RTI failed to read port absent message."); -// break; - -// case MSG_TYPE_NEIGHBOR_STRUCTURE: -// net_read_from_socket(priv->socket_descriptor, MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1, buffer); -// int num_upstream = extract_int32(buffer); -// int num_downstream = extract_int32(buffer+sizeof(int32_t)); -// size_t connections_info_body_size = ((sizeof(uint16_t) + sizeof(int64_t)) * num_upstream)+ (sizeof(uint16_t) * num_downstream); -// return net_read_from_socket(priv->socket_descriptor, connections_info_body_size, buffer + MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1); - - - - -// // case MSG_TYPE_FAILED: -// // handle_federate_failed(my_fed); -// // return NULL; -// default: -// return -1; - -// } -// } typedef enum { HEADER_READ, READ_MSG_TYPE_FED_IDS, @@ -695,16 +557,18 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_leng state = READ_MSG_TYPE_FED_IDS; break; - case MSG_TYPE_FED_NONCE: //1 + sizeof(uint16_t) + NONCE_LENGTH(8) + case MSG_TYPE_FED_NONCE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; state = FINISH_READ; break; - // case MSG_TYPE_RTI_RESPONSE: //1 + sizeof(uint16_t) + NONCE_LENGTH(8) + // case MSG_TYPE_RTI_RESPONSE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) // break; - // case MSG_TYPE_FED_RESPONSE: //1 + NONCE_LENGTH(8) - // break; + case MSG_TYPE_FED_RESPONSE: // 1 + NONCE_LENGTH(8) + bytes_to_read = NONCE_LENGTH; + state = FINISH_READ; + break; case MSG_TYPE_TIMESTAMP: // 1+sizeof(int64_t) bytes_to_read = sizeof(int64_t); @@ -794,9 +658,8 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_leng bytes_to_read = MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1; state = READ_MSG_TYPE_NEIGHBOR_STRUCTURE; break; - // case MSG_TYPE_FAILED: - // handle_federate_failed(my_fed); - // return NULL; + case MSG_TYPE_FAILED: + state = FINISH_READ; default: return -1; } From c66be9b09531192cb64a2262dfdc0e0a0fa5ced6 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 8 Feb 2024 17:15:38 -0700 Subject: [PATCH 052/262] Fix send_failed signal && add resign msg_type --- core/federated/RTI/main.c | 2 +- core/federated/network/lf_socket_support.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index 617fcd0b2..0c9196132 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -81,7 +81,7 @@ static void send_failed_signal(federate_info_t* fed) { if (rti.base.tracing_enabled) { tracepoint_rti_to_federate(rti.base.trace, send_FAILED, fed->enclave.id, NULL); } - int failed = write_to_socket(fed->socket, bytes_to_write, &(buffer[0])); + int failed = write_to_netdrv(fed->fed_netdrv, bytes_to_write, &(buffer[0])); if (failed == 0) { LF_PRINT_LOG("RTI has sent failed signal to federate %d due to abnormal termination.", fed->enclave.id); } else { diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 7d7d7d560..f25ce0658 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -575,10 +575,10 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_leng state = FINISH_READ; break; - // case MSG_TYPE_RESIGN: - // handle_federate_resign(my_fed); - // return NULL; - case MSG_TYPE_TAGGED_MESSAGE: ; + case MSG_TYPE_RESIGN: + state = FINISH_READ; + break; + case MSG_TYPE_TAGGED_MESSAGE: bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); state = READ_MSG_TYPE_TAGGED_MESSAGE; break; From 5e7e79624cc588dd1916a23bd716a33a7a2707bb Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Fri, 9 Feb 2024 13:14:07 -0700 Subject: [PATCH 053/262] Fix authenticated bugs --- core/federated/RTI/rti_remote.c | 14 +++++++------- core/federated/network/lf_socket_support.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 014601da0..8ebeb6c7a 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1324,11 +1324,11 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t * @param socket Socket for the incoming federate tryting to authenticate. * @return True if authentication is successful and false otherwise. */ -static bool authenticate_federate(netdrv_t *rti_netdrv) { +static bool authenticate_federate(netdrv_t *fed_netdrv) { // Wait for MSG_TYPE_FED_NONCE from federate. size_t fed_id_length = sizeof(uint16_t); unsigned char buffer[1 + fed_id_length + NONCE_LENGTH]; - read_from_netdrv_fail_on_error(rti_netdrv, buffer, 1 + fed_id_length + NONCE_LENGTH, NULL, + read_from_netdrv_fail_on_error(fed_netdrv, buffer, 1 + fed_id_length + NONCE_LENGTH, NULL, "Failed to read MSG_TYPE_FED_NONCE."); if (buffer[0] != MSG_TYPE_FED_NONCE) { lf_print_error_and_exit( @@ -1356,13 +1356,13 @@ static bool authenticate_federate(netdrv_t *rti_netdrv) { RAND_bytes(rti_nonce, NONCE_LENGTH); memcpy(&sender[1], rti_nonce, NONCE_LENGTH); memcpy(&sender[1 + NONCE_LENGTH], hmac_tag, hmac_length); - if (write_to_netdrv(rti_netdrv, 1 + NONCE_LENGTH + hmac_length, sender)) { + if (write_to_netdrv(fed_netdrv, 1 + NONCE_LENGTH + hmac_length, sender)) { lf_print_error("Failed to send nonce to federate."); } // Wait for MSG_TYPE_FED_RESPONSE unsigned char received[1 + hmac_length]; - read_from_netdrv_fail_on_error(rti_netdrv, received, 1 + hmac_length, NULL, + read_from_netdrv_fail_on_error(fed_netdrv, received, 1 + hmac_length, NULL, "Failed to read federate response."); if (received[0] != MSG_TYPE_FED_RESPONSE) { lf_print_error_and_exit( @@ -1384,7 +1384,7 @@ static bool authenticate_federate(netdrv_t *rti_netdrv) { if (memcmp(&received[1], rti_tag, hmac_length) != 0) { // Federation IDs do not match. Send back a HMAC_DOES_NOT_MATCH message. lf_print_warning("HMAC authentication failed. Rejecting the federate."); - send_reject(rti_netdrv, HMAC_DOES_NOT_MATCH); + send_reject(fed_netdrv, HMAC_DOES_NOT_MATCH); return false; } else { LF_PRINT_LOG("Federate's HMAC verified."); @@ -1403,10 +1403,10 @@ void lf_connect_to_federates(netdrv_t *rti_netdrv) { // Wait for the first message from the federate when RTI -a option is on. #ifdef __RTI_AUTH__ if (rti_remote->authentication_enabled) { - if (!authenticate_federate(rti_netdrv)) { + if (!authenticate_federate(fed_netdrv)) { lf_print_warning("RTI failed to authenticate the incoming federate."); - rti_netdrv->close(rti_netdrv); + fed_netdrv->close(fed_netdrv); // Ignore the federate that failed authentication. i--; continue; diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index f25ce0658..2145f4042 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -498,7 +498,7 @@ typedef enum { int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { socket_priv_t *priv = get_priv(netdrv); size_t bytes_to_read; // The bytes to read in future. - size_t bytes_read = 0; // The bytes that was read by a single read() function. + ssize_t bytes_read = 0; // The bytes that was read by a single read() function. size_t total_bytes_read = 0; // The total bytes that have been read, and will be the return of the read_from netdrv. int retry_count; int state; @@ -565,8 +565,8 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_leng // case MSG_TYPE_RTI_RESPONSE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) // break; - case MSG_TYPE_FED_RESPONSE: // 1 + NONCE_LENGTH(8) - bytes_to_read = NONCE_LENGTH; + case MSG_TYPE_FED_RESPONSE: // 1 + SHA256_HMAC_LENGTH(8) + bytes_to_read = SHA256_HMAC_LENGTH; state = FINISH_READ; break; From 0f9a5c157d7abb0c39fd6aa6171343f9c8699492 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Fri, 9 Feb 2024 13:43:31 -0700 Subject: [PATCH 054/262] Erase unused code --- core/federated/network/lf_socket_support.c | 23 ---------------------- 1 file changed, 23 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 2145f4042..88ffe8891 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -73,29 +73,6 @@ static void socket_close(netdrv_t *drv) { } } -// static ssize_t socket_read(netdrv_t *drv, size_t num_bytes, unsigned char* buffer, char* format, ...) { -// // if (!drv) { -// // return -1; -// // } -// // socket_priv_t *priv = get_priv(drv); -// // if (priv->timeout_us > 0) { -// // int res = -1; -// // do { -// // res = recv(priv->sock, buffer, size, MSG_TRUNC); -// // } while (res > 0); -// // return res; -// // } -// // return recv(priv->sock, buffer, size, MSG_TRUNC); -// } - -// static ssize_t socket_write(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { -// if (!drv) { -// return -1; -// } -// socket_priv_t *priv = get_priv(drv); -// return send(priv->sock, buffer, size, MSG_DONTWAIT); -// } - netdrv_t *netdrv_init() { // TODO: Should it be malloc? To support different network stacks operate simulatneously? netdrv_t *drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); // Don't need to call malloc() twice. From 1a5aa83ba273b100e482a2d67c45573dedba444f Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Fri, 9 Feb 2024 13:48:45 -0700 Subject: [PATCH 055/262] Add timed message forwarding large buffers --- core/federated/RTI/rti_remote.c | 8 ++++++-- core/federated/RTI/rti_remote.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 8ebeb6c7a..6564b99b7 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -220,7 +220,7 @@ void handle_port_absent_message(federate_info_t *sending_federate, unsigned char LF_MUTEX_UNLOCK(&rti_mutex); } -void handle_timed_message(federate_info_t *sending_federate, unsigned char *buffer) { +void handle_timed_message(federate_info_t *sending_federate, unsigned char *buffer, size_t buffer_length) { size_t header_size = 1 + sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); // Extract the header information. of the sender @@ -303,6 +303,10 @@ void handle_timed_message(federate_info_t *sending_federate, unsigned char *buff write_to_netdrv_fail_on_error(fed->fed_netdrv, length + header_size, buffer, &rti_mutex, "RTI failed to forward message to federate %d.", federate_id); + + if (sending_federate->fed_netdrv->read_remaining_bytes > 0 ) { + read_from_netdrv(sending_federate->fed_netdrv, ); + } // // The message length may be longer than the buffer, // // in which case we have to handle it in chunks. @@ -972,7 +976,7 @@ void *federate_info_thread_TCP(void *fed) { handle_address_ad(my_fed->enclave.id, buffer + 1); break; case MSG_TYPE_TAGGED_MESSAGE: - handle_timed_message(my_fed, buffer); + handle_timed_message(my_fed, buffer, FED_COM_BUFFER_SIZE); break; case MSG_TYPE_RESIGN: handle_federate_resign(my_fed); diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 167d68b1e..d43f8c776 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -237,7 +237,7 @@ void handle_port_absent_message(federate_info_t* sending_federate, unsigned char * @param sending_federate The sending federate. * @param buffer The buffer to read into (the first byte is already there). */ -void handle_timed_message(federate_info_t* sending_federate, unsigned char* buffer); +void handle_timed_message(federate_info_t* sending_federate, unsigned char* buffer, size_t buffer_length); /** * Handle a latest tag complete (LTC) message. @see From 46906c1e304bbc6eb12123b83997319d26deaa16 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Fri, 9 Feb 2024 13:53:54 -0700 Subject: [PATCH 056/262] Fix return of read messages to return the bytes read, not success and fail values. --- core/federated/RTI/rti_remote.c | 16 +++++++++------- core/federated/network/lf_socket_support.c | 18 +++++++++--------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 6564b99b7..16a974c39 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -304,8 +304,10 @@ void handle_timed_message(federate_info_t *sending_federate, unsigned char *buff write_to_netdrv_fail_on_error(fed->fed_netdrv, length + header_size, buffer, &rti_mutex, "RTI failed to forward message to federate %d.", federate_id); - if (sending_federate->fed_netdrv->read_remaining_bytes > 0 ) { - read_from_netdrv(sending_federate->fed_netdrv, ); + while (sending_federate->fed_netdrv->read_remaining_bytes > 0) { + int num_bytes = read_from_netdrv(sending_federate->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); + write_to_netdrv_fail_on_error(fed->fed_netdrv, num_bytes, buffer, &rti_mutex, + "RTI failed to forward message to federate %d.", federate_id); } // // The message length may be longer than the buffer, @@ -805,9 +807,9 @@ void *clock_synchronization_thread(void *noargs) { int remaining_attempts = 5; while (remaining_attempts > 0) { remaining_attempts--; - int read_failed = read_from_netdrv(rti_remote->clock_netdrv, buffer, message_size); + int bytes_read = read_from_netdrv(rti_remote->clock_netdrv, buffer, message_size); // If any errors occur, either discard the message or the clock sync round. - if (!read_failed) { + if (bytes_read > 0) { if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T3) { int32_t fed_id_2 = extract_int32(&(buffer[1])); // Check that this message came from the correct federate. @@ -955,8 +957,8 @@ void *federate_info_thread_TCP(void *fed) { // Listen for messages from the federate. while (my_fed->enclave.state != NOT_CONNECTED) { // Read no more than one byte to get the message type. - int read_failed = read_from_netdrv(my_fed->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); - if (read_failed) { + int bytes_read = read_from_netdrv(my_fed->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); + if (bytes_read <= 0) { // Socket is closed lf_print_warning("RTI: Socket to federate %d is closed. Exiting the thread.", my_fed->enclave.id); my_fed->enclave.state = NOT_CONNECTED; @@ -1044,7 +1046,7 @@ static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { unsigned char buffer[256]; //TODO: NEED TO CHECK. // Read bytes from the socket. We need 4 bytes. - if (read_from_netdrv_close_on_error(netdrv, buffer, 256)) { //TODO: check length. + if (read_from_netdrv_close_on_error(netdrv, buffer, 256) <= 0) { //TODO: check length. lf_print_error("RTI failed to read from accepted socket."); return -1; } diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 88ffe8891..4d5e54054 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -432,12 +432,12 @@ void write_to_netdrv_fail_on_error( } // TODO: Fix return. int read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer, size_t buffer_length) { - int read_failed = read_from_netdrv(drv, buffer, buffer_length); - if (read_failed) { + int bytes_read = read_from_netdrv(drv, buffer, buffer_length); + if (bytes_read <= 0) { drv->close(drv); return -1; } - return 0; + return bytes_read; } //TODO: FIX return @@ -448,8 +448,8 @@ void read_from_netdrv_fail_on_error( lf_mutex_t* mutex, char* format, ...) { va_list args; - int read_failed = read_from_netdrv_close_on_error(drv, buffer, buffer_length); - if (read_failed) { + int bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); + if (bytes_read <= 0) { // Read failed. if (mutex != NULL) { lf_mutex_unlock(mutex); @@ -664,11 +664,11 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_leng break; case KEEP_READING: netdrv->read_remaining_bytes -= total_bytes_read; - // return total_bytes_read; - return 0; + return total_bytes_read; + // return 0; case FINISH_READ: - // return total_bytes_read; - return 0; + return total_bytes_read; + // return 0; } } } \ No newline at end of file From 68178c43004e0d2d24637324b32c6e8827ccddbe Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Mon, 12 Feb 2024 08:50:20 -0700 Subject: [PATCH 057/262] Change read return type to ssize_t --- core/federated/RTI/rti_remote.c | 6 +++--- core/federated/federate.c | 1 + core/federated/network/lf_socket_support.c | 8 ++++---- include/core/federated/network/lf_socket_support.h | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 16a974c39..eccb504e3 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -305,7 +305,7 @@ void handle_timed_message(federate_info_t *sending_federate, unsigned char *buff "RTI failed to forward message to federate %d.", federate_id); while (sending_federate->fed_netdrv->read_remaining_bytes > 0) { - int num_bytes = read_from_netdrv(sending_federate->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); + ssize_t num_bytes = read_from_netdrv(sending_federate->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); write_to_netdrv_fail_on_error(fed->fed_netdrv, num_bytes, buffer, &rti_mutex, "RTI failed to forward message to federate %d.", federate_id); } @@ -807,7 +807,7 @@ void *clock_synchronization_thread(void *noargs) { int remaining_attempts = 5; while (remaining_attempts > 0) { remaining_attempts--; - int bytes_read = read_from_netdrv(rti_remote->clock_netdrv, buffer, message_size); + ssize_t bytes_read = read_from_netdrv(rti_remote->clock_netdrv, buffer, message_size); // If any errors occur, either discard the message or the clock sync round. if (bytes_read > 0) { if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T3) { @@ -957,7 +957,7 @@ void *federate_info_thread_TCP(void *fed) { // Listen for messages from the federate. while (my_fed->enclave.state != NOT_CONNECTED) { // Read no more than one byte to get the message type. - int bytes_read = read_from_netdrv(my_fed->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); + ssize_t bytes_read = read_from_netdrv(my_fed->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); if (bytes_read <= 0) { // Socket is closed lf_print_warning("RTI: Socket to federate %d is closed. Exiting the thread.", my_fed->enclave.id); diff --git a/core/federated/federate.c b/core/federated/federate.c index 9fa3d9048..e5bb2f12f 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1896,6 +1896,7 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { _fed.sockets_for_outbound_p2p_connections[remote_federate_id] = socket_id; } +// TODO: void lf_connect_to_rti(const char* hostname, int port) { LF_PRINT_LOG("Connecting to the RTI."); diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 4d5e54054..38da2300e 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -431,8 +431,8 @@ void write_to_netdrv_fail_on_error( } } // TODO: Fix return. -int read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer, size_t buffer_length) { - int bytes_read = read_from_netdrv(drv, buffer, buffer_length); +ssize_t read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer, size_t buffer_length) { + ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); if (bytes_read <= 0) { drv->close(drv); return -1; @@ -448,7 +448,7 @@ void read_from_netdrv_fail_on_error( lf_mutex_t* mutex, char* format, ...) { va_list args; - int bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); + ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); if (bytes_read <= 0) { // Read failed. if (mutex != NULL) { @@ -472,7 +472,7 @@ typedef enum { } read_state_t; // Returns the total bytes read. -int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { +ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { socket_priv_t *priv = get_priv(netdrv); size_t bytes_to_read; // The bytes to read in future. ssize_t bytes_read = 0; // The bytes that was read by a single read() function. diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index f0252673d..5c693f2c7 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -171,7 +171,7 @@ void write_to_netdrv_fail_on_error( * @param buffer The buffer into which to put the bytes. * @return 0 for success, 1 for EOF, and -1 for an error. */ -int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length); +ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length); /** * Read the specified number of bytes to the specified socket using read_from_socket @@ -182,7 +182,7 @@ int read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_leng * @param buffer The buffer from which to get the bytes. * @return 0 for success, -1 for failure. */ -int read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer, size_t buffer_length); +ssize_t read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer, size_t buffer_length); /** * Read the specified number of bytes from the specified socket into the From cbfd30251db7aa6bf09d413e1fccd27e232dd890 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Wed, 14 Feb 2024 15:43:47 -0700 Subject: [PATCH 058/262] Make inner switch case to be handled in a different helper function. --- core/federated/network/lf_socket_support.c | 238 ++++++++++----------- 1 file changed, 118 insertions(+), 120 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 38da2300e..3987ad229 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -471,6 +471,121 @@ typedef enum { FINISH_READ } read_state_t; +static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* bytes_to_read, int* state) { + switch(buffer[0]) { + // case MSG_TYPE_REJECT: // 1 +1 + // break; + // case MSG_TYPE_ACK: // 1 + // break; + case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 + *bytes_to_read = sizeof(uint16_t); + *state = FINISH_READ; + break; + case MSG_TYPE_FED_IDS: // 1 + sizeof(uint16_t) + 1 + federation_id + *bytes_to_read = sizeof(uint16_t) + 1; + *state = READ_MSG_TYPE_FED_IDS; + break; + case MSG_TYPE_FED_NONCE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) + *bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; + *state = FINISH_READ; + break; + // case MSG_TYPE_RTI_RESPONSE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) + // break; + case MSG_TYPE_FED_RESPONSE: // 1 + SHA256_HMAC_LENGTH(8) + *bytes_to_read = SHA256_HMAC_LENGTH; + *state = FINISH_READ; + break; + case MSG_TYPE_TIMESTAMP: // 1+sizeof(int64_t) + *bytes_to_read = sizeof(int64_t); + *state = FINISH_READ; + break; + case MSG_TYPE_RESIGN: + *state = FINISH_READ; + break; + case MSG_TYPE_TAGGED_MESSAGE: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); + *state = READ_MSG_TYPE_TAGGED_MESSAGE; + break; + case MSG_TYPE_NEXT_EVENT_TAG: + *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); + *state = FINISH_READ; + break; + // case MSG_TYPE_TAG_ADVANCE_GRANT: + // handle_tag_advance_grant(); + // break; + // case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: + // handle_provisional_tag_advance_grant(); + // break; + case MSG_TYPE_LATEST_TAG_COMPLETE: + *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_STOP_REQUEST: + *bytes_to_read = MSG_TYPE_STOP_REQUEST_LENGTH - 1; + *state = FINISH_READ; + break; + case MSG_TYPE_STOP_REQUEST_REPLY: + *bytes_to_read = MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1; + *state = FINISH_READ; + break; + // case MSG_TYPE_STOP_GRANTED: + // handle_stop_granted_message(); + // break; + case MSG_TYPE_ADDRESS_QUERY: + *bytes_to_read = sizeof(uint16_t); + *state = FINISH_READ; + break; + case MSG_TYPE_ADDRESS_ADVERTISEMENT: + *bytes_to_read = sizeof(int32_t); + *state = FINISH_READ; + break; + // case MSG_TYPE_P2P_SENDING_FED_ID: //1 /////////TODO: CHECK!!!!!!! + // break; + // case MSG_TYPE_P2P_MESSAGE: + // LF_PRINT_LOG("Received untimed message from federate %d.", fed_id); + // if (handle_message(socket_id, fed_id)) { + // // Failed to complete the reading of a message on a physical connection. + // lf_print_warning("Failed to complete reading of message on physical connection."); + // socket_closed = true; + // } + // break; + // case MSG_TYPE_P2P_TAGGED_MESSAGE: + // LF_PRINT_LOG("Received tagged message from federate %d.", fed_id); + // if (handle_tagged_message(socket_id, fed_id)) { + // // P2P tagged messages are only used in decentralized coordination, and + // // it is not a fatal error if the socket is closed before the whole message is read. + // // But this thread should exit. + // lf_print_warning("Failed to complete reading of tagged message."); + // socket_closed = true; + // } + // break; + // case MSG_TYPE_CLOCK_SYNC_T1: + // break; + case MSG_TYPE_CLOCK_SYNC_T3: + *bytes_to_read = sizeof(int32_t); + *state = FINISH_READ; + break; + // case MSG_TYPE_CLOCK_SYNC_T4: + // break; + // case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: + // break; + case MSG_TYPE_PORT_ABSENT: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_NEIGHBOR_STRUCTURE: + *bytes_to_read = MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1; + *state = READ_MSG_TYPE_NEIGHBOR_STRUCTURE; + break; + case MSG_TYPE_FAILED: + *state = FINISH_READ; + default: + // Error handling? + *state = FINISH_READ; + } +} + + // Returns the total bytes read. ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { socket_priv_t *priv = get_priv(netdrv); @@ -500,6 +615,7 @@ ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_ for (;;) { retry_count = 0; while (bytes_to_read > 0) { + //TODO: Check buffer_length. bytes_read = read(priv->socket_descriptor, buffer + total_bytes_read, bytes_to_read); if (bytes_read < 0 && // If) Error has occurred, retry_count++ < NUM_SOCKET_RETRIES && // there are left retry counts, @@ -520,127 +636,9 @@ ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_ switch(state) { case HEADER_READ: - switch(buffer[0]) { - // case MSG_TYPE_REJECT: // 1 +1 - // break; - // case MSG_TYPE_ACK: // 1 - // break; - case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 - bytes_to_read = sizeof(uint16_t); - state = FINISH_READ; - break; - case MSG_TYPE_FED_IDS: // 1 + sizeof(uint16_t) + 1 + federation_id - bytes_to_read = sizeof(uint16_t) + 1; - state = READ_MSG_TYPE_FED_IDS; - break; - - case MSG_TYPE_FED_NONCE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) - bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; - state = FINISH_READ; - break; - - // case MSG_TYPE_RTI_RESPONSE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) - // break; - - case MSG_TYPE_FED_RESPONSE: // 1 + SHA256_HMAC_LENGTH(8) - bytes_to_read = SHA256_HMAC_LENGTH; - state = FINISH_READ; - break; - - case MSG_TYPE_TIMESTAMP: // 1+sizeof(int64_t) - bytes_to_read = sizeof(int64_t); - state = FINISH_READ; - break; - - case MSG_TYPE_RESIGN: - state = FINISH_READ; - break; - case MSG_TYPE_TAGGED_MESSAGE: - bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); - state = READ_MSG_TYPE_TAGGED_MESSAGE; - break; - case MSG_TYPE_NEXT_EVENT_TAG: - bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); - state = FINISH_READ; - break; - // case MSG_TYPE_TAG_ADVANCE_GRANT: - // handle_tag_advance_grant(); - // break; - // case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: - // handle_provisional_tag_advance_grant(); - // break; - - case MSG_TYPE_LATEST_TAG_COMPLETE: - bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); - state = FINISH_READ; - break; - case MSG_TYPE_STOP_REQUEST: - bytes_to_read = MSG_TYPE_STOP_REQUEST_LENGTH - 1; - state = FINISH_READ; - break; - - case MSG_TYPE_STOP_REQUEST_REPLY: - bytes_to_read = MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1; - state = FINISH_READ; - break; - // case MSG_TYPE_STOP_GRANTED: - // handle_stop_granted_message(); - // break; - - case MSG_TYPE_ADDRESS_QUERY: - bytes_to_read = sizeof(uint16_t); - state = FINISH_READ; - break; - case MSG_TYPE_ADDRESS_ADVERTISEMENT: - bytes_to_read = sizeof(int32_t); - state = FINISH_READ; - break; - // case MSG_TYPE_P2P_SENDING_FED_ID: //1 /////////TODO: CHECK!!!!!!! - // break; - - // case MSG_TYPE_P2P_MESSAGE: - // LF_PRINT_LOG("Received untimed message from federate %d.", fed_id); - // if (handle_message(socket_id, fed_id)) { - // // Failed to complete the reading of a message on a physical connection. - // lf_print_warning("Failed to complete reading of message on physical connection."); - // socket_closed = true; - // } - // break; - // case MSG_TYPE_P2P_TAGGED_MESSAGE: - // LF_PRINT_LOG("Received tagged message from federate %d.", fed_id); - // if (handle_tagged_message(socket_id, fed_id)) { - // // P2P tagged messages are only used in decentralized coordination, and - // // it is not a fatal error if the socket is closed before the whole message is read. - // // But this thread should exit. - // lf_print_warning("Failed to complete reading of tagged message."); - // socket_closed = true; - // } - // break; - // case MSG_TYPE_CLOCK_SYNC_T1: - // break; - - case MSG_TYPE_CLOCK_SYNC_T3: - bytes_to_read = sizeof(int32_t); - state = FINISH_READ; - break; - // case MSG_TYPE_CLOCK_SYNC_T4: - // break; - // case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: - // break; - case MSG_TYPE_PORT_ABSENT: - bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); - state = FINISH_READ; - break; - case MSG_TYPE_NEIGHBOR_STRUCTURE: - bytes_to_read = MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1; - state = READ_MSG_TYPE_NEIGHBOR_STRUCTURE; - break; - case MSG_TYPE_FAILED: - state = FINISH_READ; - default: - return -1; - } + handle_header_read(netdrv, buffer, &bytes_to_read, &state); break; + case READ_MSG_TYPE_FED_IDS: ; size_t federation_id_length = (size_t)buffer[1 + sizeof(uint16_t)]; bytes_to_read = federation_id_length; From 31461aadd1f6f9d04485e50987059a08c76cee94 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Wed, 14 Feb 2024 17:30:53 -0700 Subject: [PATCH 059/262] Make socket_open to api --- core/federated/network/lf_socket_support.c | 49 ++++++++++++---------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 3987ad229..f4bc38ad7 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -37,28 +37,31 @@ struct in_addr *get_ip_addr(netdrv_t *drv) { return &priv->server_ip_addr; } static int socket_open(netdrv_t *drv) { - // socket_priv_t *priv = get_priv(drv); - // priv->sock = socket(AF_PACKET, SOCK_RAW, htons(priv->proto)); - // if (priv->sock < 0) - // return -1; - - // /* If Rx, timeout is a good thing */ - // if (priv->timeout_us > 0) { - // struct timeval tv = { - // .tv_sec = priv->timeout_us / 1e6, - // .tv_usec = priv->timeout_us % 1000000, - // }; - // if (setsockopt(priv->sock, SOL_SOCKET, SO_RCVTIMEO, (const char *)&tv, sizeof tv) == -1) { - // printf("%s(): Could not set timeout on socket (%d): %s\n", - // __func__, priv->sock, strerror(errno)); - // close(priv->sock); - // return -1; - // } - // } - // /* bind to device, ... */ - - // printf("Socket created\n"); - // return 0; + int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (sock < 0) { + lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); + } + // Disable Nagle's algorithm which bundles together small TCP messages to + // reduce network traffic + // TODO: Re-consider if we should do this, and whether disabling delayed ACKs + // is enough. + int flag = 1; + int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } + +// Disable delayed ACKs. Only possible on Linux +#if defined(PLATFORM_Linux) + result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } +#endif + + return sock; } static void socket_close(netdrv_t *drv) { @@ -93,7 +96,7 @@ netdrv_t *netdrv_init() { drv->read_remaining_bytes = 0; - // drv->open = socket_open; + drv->open = socket_open; drv->close = socket_close; // drv->read = socket_read; // drv->write = socket_write; From 054a8f3786139e5b482f7b0964a13db8fcff1b55 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Wed, 14 Feb 2024 17:33:21 -0700 Subject: [PATCH 060/262] Add some comments --- core/federated/RTI/rti_remote.c | 1 + core/federated/RTI/rti_remote.h | 2 +- include/core/federated/network/lf_socket_support.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 9c29a7d81..609337b60 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1301,6 +1301,7 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t if (rti_remote->clock_sync_global_status >= clock_sync_on) { // If no runtime clock sync, no need to set up the UDP port. if (federate_UDP_port_number > 0) { + // TODO: DONGHA: NEED to be fixed. // Initialize the UDP_addr field of the federate struct fed->UDP_addr.sin_family = AF_INET; fed->UDP_addr.sin_port = htons(federate_UDP_port_number); diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index d43f8c776..3fce292d6 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -76,7 +76,7 @@ typedef struct federate_info_t { struct in_addr server_ip_addr; // Information about the IP address of the socket // server of the federate. - netdrv_t *fed_netdrv; + netdrv_t *fed_netdrv; // The netdriver that the RTI handling each federate. netdrv_t *clock_netdrv; } federate_info_t; diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index 5c693f2c7..45187bd92 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -55,6 +55,7 @@ typedef struct socket_priv_t { int proto; uint16_t user_specified_port; + // Used for the RTI, to read the connected federate's info. char server_hostname[INET_ADDRSTRLEN]; // Human-readable IP address and int32_t server_port; // port number of the socket server of the federate // if it has any incoming direct connections from other federates. From 5643b28eef5b439407b4110a4438b88f3c1d6182 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 15 Feb 2024 12:53:48 -0700 Subject: [PATCH 061/262] Fix netdrv_accept fixing /DistributedPhysicalActionUpstream.lf --- core/federated/network/lf_socket_support.c | 26 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index f4bc38ad7..912ca0cbc 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -24,18 +24,31 @@ static socket_priv_t *get_priv(netdrv_t *drv) { return (socket_priv_t *)(drv + 1); } -char *get_host_name(netdrv_t *drv) { +char* get_host_name(netdrv_t *drv) { socket_priv_t *priv = get_priv(drv); return priv->server_hostname; } -int32_t *get_port(netdrv_t *drv) { +int32_t* get_port(netdrv_t *drv) { socket_priv_t *priv = get_priv(drv); return &priv->server_port; } -struct in_addr *get_ip_addr(netdrv_t *drv) { +struct in_addr* get_ip_addr(netdrv_t *drv) { socket_priv_t *priv = get_priv(drv); return &priv->server_ip_addr; } +// void set_host_name(netdrv_t *drv, const char* hostname) { +// socket_priv_t *priv = get_priv(drv); +// memcpy(priv->server_hostname, hostname, len(hostname)) +// priv->server_hostname = hostname; +// } +// void set_port(netdrv_t *drv, int port) { +// socket_priv_t *priv = get_priv(drv); +// priv->server_port = port; +// } +// void set_ip_addr(netdrv_t *drv) { +// socket_priv_t *priv = get_priv(drv); +// return &priv->server_ip_addr; +// } static int socket_open(netdrv_t *drv) { int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sock < 0) { @@ -329,7 +342,7 @@ netdrv_t *netdrv_accept(netdrv_t *rti_netdrv) { struct sockaddr client_fd; uint32_t client_length = sizeof(client_fd); fed_priv->socket_descriptor = accept(rti_priv->socket_descriptor, &client_fd, &client_length); - if (fed_priv->socket_descriptor < 0) return NULL; + // if (fed_priv->socket_descriptor < 0) return NULL; return fed_netdrv; } @@ -364,6 +377,11 @@ netdrv_t *accept_connection(netdrv_t *rti_netdrv) { return fed_netdrv; } +int netdrv_connect(netdrv_t *netdrv) { + +} + + ssize_t peek_from_netdrv(netdrv_t *drv, unsigned char* result) { socket_priv_t *priv = get_priv(drv); ssize_t bytes_read = recv(priv->socket_descriptor, result, 1, MSG_DONTWAIT | MSG_PEEK); From b5e42bc6fd19676857e06b4472b271b9b16fb1e3 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 15 Feb 2024 12:55:02 -0700 Subject: [PATCH 062/262] Add commits --- core/federated/RTI/rti_remote.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 609337b60..fef1fc0a4 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1461,6 +1461,7 @@ void lf_connect_to_federates(netdrv_t *rti_netdrv) { void *respond_to_erroneous_connections(void *nothing) { while (true) { + // TODO: DONGHA: Need to fix. Do we need accept as api? netdrv_t *fed_netdrv = netdrv_accept(rti_remote->rti_netdrv); if (rti_remote->all_federates_exited) { From 4acfdce2a730ee194b1347ace496b72f4e6dc340 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 15 Feb 2024 12:55:35 -0700 Subject: [PATCH 063/262] Add helper functions --- include/core/federated/network/lf_socket_support.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index 45187bd92..fafd8a150 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -65,9 +65,13 @@ typedef struct socket_priv_t { // server of the federate. } socket_priv_t; -char *get_host_name(netdrv_t *drv); -int32_t *get_port(netdrv_t *drv); -struct in_addr *get_ip_addr(netdrv_t *drv); +char* get_host_name(netdrv_t *drv); +int32_t* get_port(netdrv_t *drv); +struct in_addr* get_ip_addr(netdrv_t *drv); + +void set_host_name(netdrv_t *drv, const char* hostname); +void set_port(netdrv_t *drv, int port); +// void set_ip_addr(netdrv_t *drv); netdrv_t * netdrv_init(); @@ -97,6 +101,8 @@ netdrv_t *netdrv_accept(netdrv_t *rti_netdrv); netdrv_t *accept_connection(netdrv_t * rti_netdrv); +int netdrv_connect(netdrv_t *netdrv); + /** From 8f33200c514b3dfdbbc1d51a9d24f2ce043b8e87 Mon Sep 17 00:00:00 2001 From: Jakio815 Date: Thu, 15 Feb 2024 12:55:56 -0700 Subject: [PATCH 064/262] Starting changes to federate.c --- core/federated/federate.c | 22 ++++++++++++++++++++-- include/core/federated/federate.h | 8 ++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index 034d7b52c..cffa068e1 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -75,6 +75,8 @@ int max_level_allowed_to_advance; * The state of this federate instance. Each executable has exactly one federate instance, * and the _fed global variable refers to that instance. */ + +//TODO: DONGHA: Need to change socket_related. socket_TCP_RTI, server_socket, server_port federate_instance_t _fed = { .socket_TCP_RTI = -1, .number_of_inbound_p2p_connections = 0, @@ -93,6 +95,7 @@ federate_instance_t _fed = { .min_delay_from_physical_action_to_federate_output = NEVER }; +//TODO: DONGHA: Need to change host and port. federation_metadata_t federation_metadata = { .federation_id = "Unidentified Federation", .rti_host = NULL, @@ -1895,10 +1898,11 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { _fed.sockets_for_outbound_p2p_connections[remote_federate_id] = socket_id; } -// TODO: + void lf_connect_to_rti(const char* hostname, int port) { LF_PRINT_LOG("Connecting to the RTI."); + // TODO: DONGHA: Need to change these? // Override passed hostname and port if passed as runtime arguments. hostname = federation_metadata.rti_host ? federation_metadata.rti_host : hostname; port = federation_metadata.rti_port >= 0 ? federation_metadata.rti_port : port; @@ -1920,14 +1924,25 @@ void lf_connect_to_rti(const char* hostname, int port) { uport = DEFAULT_PORT; } - // Create a socket + // Initialize netdriver to rti. + // _fed.netdrv_to_rti = netdrv_init(); + // _fed.netdrv_to_rti->open(_fed.netdrv_to_rti); + // set_host_name(_fed.netdrv_to_rti, hostname); + // set_port(_fed.netdrv_to_rti, port); + // // Create a socket _fed.socket_TCP_RTI = create_real_time_tcp_socket_errexit(); + // Connect int result = -1; int count_retries = 0; struct addrinfo* res = NULL; while (count_retries++ < CONNECT_MAX_RETRIES && !_lf_termination_executed) { + // TODO: DONGHA: Connecting phase. Let's just make a connect() api first. + // if (netdrv_connect() < 0) continue; // Connect failed. + + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// if (res != NULL) { // This is a repeated attempt. if (_fed.socket_TCP_RTI >= 0) close_rti_socket(); @@ -1956,6 +1971,8 @@ void lf_connect_to_rti(const char* hostname, int port) { result = connect(_fed.socket_TCP_RTI, res->ai_addr, res->ai_addrlen); if (result < 0) continue; // Connect failed. +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // Have connected to an RTI, but not sure it's the right RTI. // Send a MSG_TYPE_FED_IDS message and wait for a reply. // Notify the RTI of the ID of this federate and its federation. @@ -1969,6 +1986,7 @@ void lf_connect_to_rti(const char* hostname, int port) { // No point in trying again because it will be the same port. close_rti_socket(); lf_print_error_and_exit("Authentication failed."); + // _fed.netdrv_to_rti->close(_fed.netdrv_to_rti); } } #else diff --git a/include/core/federated/federate.h b/include/core/federated/federate.h index e035d94c0..4fb28ff19 100644 --- a/include/core/federated/federate.h +++ b/include/core/federated/federate.h @@ -19,6 +19,9 @@ #include "environment.h" #include "platform.h" +//TODO: Need to be fixed later. +#include "lf_socket_support.h" + #ifndef ADVANCE_MESSAGE_INTERVAL #define ADVANCE_MESSAGE_INTERVAL MSEC(10) #endif @@ -30,6 +33,11 @@ * Structure that a federate instance uses to keep track of its own state. */ typedef struct federate_instance_t { + netdrv_t *netdrv_to_rti; // socket_TCP_RTI; + netdrv_t *my_netdrv; // server_socket; server_port; + netdrv_t *netdrv_to_inbound[NUMBER_OF_FEDERATES]; //sockets_for_inbound_p2p_connections[NUMBER_OF_FEDERATES]; + netdrv_t *netdrv_to_outbound[NUMBER_OF_FEDERATES]; //sockets_for_outbound_p2p_connections[NUMBER_OF_FEDERATES]; + /** * The TCP socket descriptor for this federate to communicate with the RTI. * This is set by lf_connect_to_rti(), which must be called before other From 2099dcddfe7a89b14babe20fea99c4e89a826b5c Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 15 Feb 2024 16:18:28 -0700 Subject: [PATCH 065/262] Finished until lf_create_server() --- core/federated/federate.c | 176 +++++---------------- core/federated/network/lf_socket_support.c | 130 ++++++++++++--- include/core/federated/federate.h | 2 +- 3 files changed, 154 insertions(+), 154 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index cffa068e1..7e7e347db 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -874,8 +874,8 @@ static int perform_hmac_authentication() { RAND_bytes(fed_nonce, NONCE_LENGTH); memcpy(&fed_hello_buf[1 + fed_id_length], fed_nonce, NONCE_LENGTH); - write_to_socket_fail_on_error( - &_fed.socket_TCP_RTI, message_length, fed_hello_buf, NULL, + write_to_netdrv_fail_on_error( + _fed.netdrv_to_rti, message_length, fed_hello_buf, NULL, "Failed to write nonce."); // Check HMAC of received FED_RESPONSE message. @@ -883,7 +883,7 @@ static int perform_hmac_authentication() { size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); unsigned char received[1 + NONCE_LENGTH + hmac_length]; - if (read_from_socket_close_on_error(&_fed.socket_TCP_RTI, 1 + NONCE_LENGTH + hmac_length, received)) { + if (read_from_netdrv_close_on_error(_fed.netdrv_to_rti, received, 1 + NONCE_LENGTH + hmac_length)) { lf_print_warning("Failed to read RTI response."); return -1; } @@ -916,7 +916,7 @@ static int perform_hmac_authentication() { response[1] = HMAC_DOES_NOT_MATCH; // Ignore errors on writing back. - write_to_socket(_fed.socket_TCP_RTI, 2, response); + write_to_netdrv(_fed.netdrv_to_rti, 2, response); return -1; } else { LF_PRINT_LOG("HMAC verified."); @@ -930,8 +930,8 @@ static int perform_hmac_authentication() { HMAC(EVP_sha256(), federation_metadata.federation_id, federation_id_length, mac_buf, 1 + NONCE_LENGTH, &sender[1], &hmac_length); - write_to_socket_fail_on_error( - &_fed.socket_TCP_RTI, 1 + hmac_length, sender, NULL, + write_to_netdrv_fail_on_error( + _fed.netdrv_to_rti, 1 + hmac_length, sender, NULL, "Failed to write fed response."); } return 0; @@ -944,36 +944,6 @@ static void close_rti_socket() { _fed.socket_TCP_RTI = -1; } -/** - * Return in the result a struct with the address info for the specified hostname and port. - * The memory for the result is dynamically allocated and must be freed using freeaddrinfo. - * @param hostname The host name. - * @param port The port number. - * @param result The struct into which to write. - */ -static void rti_address(const char* hostname, uint16_t port, struct addrinfo** result) { - struct addrinfo hints; - - memset(&hints, 0, sizeof(hints)); - hints.ai_family = AF_INET; /* Allow IPv4 */ - hints.ai_socktype = SOCK_STREAM; /* Stream socket */ - hints.ai_protocol = IPPROTO_TCP; /* TCP protocol */ - hints.ai_addr = NULL; - hints.ai_next = NULL; - hints.ai_flags = AI_NUMERICSERV; /* Allow only numeric port numbers */ - - // Convert port number to string. - char str[6]; - sprintf(str, "%u", port); - - // Get address structure matching hostname and hints criteria, and - // set port to the port number provided in str. There should only - // ever be one matching address structure, and we connect to that. - if (getaddrinfo(hostname, (const char*)&str, &hints, result)) { - lf_print_error_and_exit("No host for RTI matching given hostname: %s", hostname); - } -} - /** * Send the specified timestamp to the RTI and wait for a response. * The specified timestamp should be current physical time of the @@ -1925,54 +1895,32 @@ void lf_connect_to_rti(const char* hostname, int port) { } // Initialize netdriver to rti. - // _fed.netdrv_to_rti = netdrv_init(); - // _fed.netdrv_to_rti->open(_fed.netdrv_to_rti); - // set_host_name(_fed.netdrv_to_rti, hostname); - // set_port(_fed.netdrv_to_rti, port); - // // Create a socket - _fed.socket_TCP_RTI = create_real_time_tcp_socket_errexit(); + _fed.netdrv_to_rti = netdrv_init(); // set memory. + _fed.netdrv_to_rti->open(_fed.netdrv_to_rti); // open netdriver. + set_host_name(_fed.netdrv_to_rti, hostname); + set_port(_fed.netdrv_to_rti, uport); // Connect int result = -1; int count_retries = 0; struct addrinfo* res = NULL; - +//TODO: DONGHA: count_retries not being updated for the authentication process? while (count_retries++ < CONNECT_MAX_RETRIES && !_lf_termination_executed) { - // TODO: DONGHA: Connecting phase. Let's just make a connect() api first. - // if (netdrv_connect() < 0) continue; // Connect failed. - - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - if (res != NULL) { - // This is a repeated attempt. - if (_fed.socket_TCP_RTI >= 0) close_rti_socket(); - - lf_sleep(CONNECT_RETRY_INTERVAL); - - // Create a new socket. - _fed.socket_TCP_RTI = create_real_time_tcp_socket_errexit(); - - if (port == 0) { - // Free previously allocated address info. - freeaddrinfo(res); - // Increment the port number. + // TODO: DONGHA: Connecting phase. Let's just make a netdrv_connect() api first. + if (netdrv_connect(_fed.netdrv_to_rti) < 0) { + _fed.netdrv_to_rti->close(_fed.netdrv_to_rti); + netdrv_free(_fed.netdrv_to_rti); + _fed.netdrv_to_rti = netdrv_init(); + _fed.netdrv_to_rti->open(_fed.netdrv_to_rti); + set_host_name(_fed.netdrv_to_rti, hostname); + if (port == 0) { uport++; if (uport >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) uport = DEFAULT_PORT; - - // Reconstruct the address info. - rti_address(hostname, uport, &res); } - lf_print("Trying RTI again on port %d (attempt %d).", uport, count_retries); - } else { - // This is the first attempt. - rti_address(hostname, uport, &res); + set_port(_fed.netdrv_to_rti, uport); + continue; // Connect failed. } - result = connect(_fed.socket_TCP_RTI, res->ai_addr, res->ai_addrlen); - if (result < 0) continue; // Connect failed. - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Have connected to an RTI, but not sure it's the right RTI. // Send a MSG_TYPE_FED_IDS message and wait for a reply. // Notify the RTI of the ID of this federate and its federation. @@ -1984,9 +1932,9 @@ void lf_connect_to_rti(const char* hostname, int port) { continue; // Try again with a new port. } else { // No point in trying again because it will be the same port. - close_rti_socket(); + // close_rti_socket(); + _fed.netdrv_to_rti->close(_fed.netdrv_to_rti); lf_print_error_and_exit("Authentication failed."); - // _fed.netdrv_to_rti->close(_fed.netdrv_to_rti); } } #else @@ -2010,7 +1958,7 @@ void lf_connect_to_rti(const char* hostname, int port) { tracepoint_federate_to_rti(_fed.trace, send_FED_ID, _lf_my_fed_id, NULL); // No need for a mutex here because no other threads are writing to this socket. - if (write_to_socket(_fed.socket_TCP_RTI, 2 + sizeof(uint16_t) + federation_id_length, buffer)) { + if (write_to_netdrv(_fed.netdrv_to_rti, 2 + sizeof(uint16_t) + federation_id_length, buffer)) { continue; // Try again, possibly on a new port. } @@ -2018,20 +1966,18 @@ void lf_connect_to_rti(const char* hostname, int port) { // The response will be MSG_TYPE_REJECT if the federation ID doesn't match. // Otherwise, it will be either MSG_TYPE_ACK or MSG_TYPE_UDP_PORT, where the latter // is used if clock synchronization will be performed. - unsigned char response; + unsigned char response[2]; LF_PRINT_DEBUG("Waiting for response to federation ID from the RTI."); - if (read_from_socket(_fed.socket_TCP_RTI, 1, &response)) { + if (read_from_netdrv(_fed.netdrv_to_rti, response, 2)) { continue; // Try again. } if (response == MSG_TYPE_REJECT) { // Trace the event when tracing is enabled tracepoint_federate_from_rti(_fed.trace, receive_REJECT, _lf_my_fed_id, NULL); // Read one more byte to determine the cause of rejection. - unsigned char cause; - read_from_socket_fail_on_error(&_fed.socket_TCP_RTI, 1, &cause, NULL, - "Failed to read the cause of rejection by the RTI."); + unsigned char cause = response[1]; if (cause == FEDERATION_ID_DOES_NOT_MATCH || cause == WRONG_SERVER) { lf_print_warning("Connected to the wrong RTI on port %d. Will try again", uport); continue; @@ -2053,96 +1999,56 @@ void lf_connect_to_rti(const char* hostname, int port) { lf_print_error_and_exit("Failed to connect to RTI after %d tries.", CONNECT_MAX_RETRIES); } - freeaddrinfo(res); /* No longer needed */ - // Call a generated (external) function that sends information // about connections between this federate and other federates // where messages are routed through the RTI. // @see MSG_TYPE_NEIGHBOR_STRUCTURE in net_common.h - lf_send_neighbor_structure_to_RTI(_fed.socket_TCP_RTI); + lf_send_neighbor_structure_to_RTI(_fed.netdrv_to_rti); + + //TODO: DONGHA: Handle UDP Clock sync. uint16_t udp_port = setup_clock_synchronization_with_rti(); // Write the returned port number to the RTI unsigned char UDP_port_number[1 + sizeof(uint16_t)]; UDP_port_number[0] = MSG_TYPE_UDP_PORT; encode_uint16(udp_port, &(UDP_port_number[1])); - write_to_socket_fail_on_error(&_fed.socket_TCP_RTI, 1 + sizeof(uint16_t), UDP_port_number, NULL, + write_to_netdrv_fail_on_error(_fed.netdrv_to_rti, 1 + sizeof(uint16_t), UDP_port_number, NULL, "Failed to send the UDP port number to the RTI."); lf_print("Connected to RTI at %s:%d.", hostname, uport); } +//TODO: DONGHA: NEED to make specified port work. void lf_create_server(int specified_port) { assert(specified_port <= UINT16_MAX && specified_port >= 0); uint16_t port = (uint16_t)specified_port; LF_PRINT_LOG("Creating a socket server on port %d.", port); - // Create an IPv4 socket for TCP (not UDP) communication over IP (0). - int socket_descriptor = create_real_time_tcp_socket_errexit(); - - // Server file descriptor. - struct sockaddr_in server_fd; - // Zero out the server address structure. - bzero((char*)&server_fd, sizeof(server_fd)); - - server_fd.sin_family = AF_INET; // IPv4 - server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. - // Convert the port number from host byte order to network byte order. - server_fd.sin_port = htons(port); - - int result = bind( - socket_descriptor, - (struct sockaddr *) &server_fd, - sizeof(server_fd)); - int count = 0; - while (result < 0 && count++ < PORT_BIND_RETRY_LIMIT) { - lf_sleep(PORT_BIND_RETRY_INTERVAL); - result = bind( - socket_descriptor, - (struct sockaddr *) &server_fd, - sizeof(server_fd)); - } - if (result < 0) { - lf_print_error_and_exit("Failed to bind socket on port %d.", port); - } - - // Set the global server port. - if (specified_port == 0) { - // Need to retrieve the port number assigned by the OS. - struct sockaddr_in assigned; - socklen_t addr_len = sizeof(assigned); - if (getsockname(socket_descriptor, (struct sockaddr *) &assigned, &addr_len) < 0) { - lf_print_error_and_exit("Failed to retrieve assigned port number."); - } - _fed.server_port = ntohs(assigned.sin_port); - } else { - _fed.server_port = port; - } - // Enable listening for socket connections. - // The second argument is the maximum number of queued socket requests, - // which according to the Mac man page is limited to 128. - listen(socket_descriptor, 128); + netdrv_t* my_netdrv = netdrv_init(); + my_netdrv->open(my_netdrv); + create_federate_server(my_netdrv, port, specified_port); - LF_PRINT_LOG("Server for communicating with other federates started using port %d.", _fed.server_port); + //TODO: NEED to fix. + LF_PRINT_LOG("Server for communicating with other federates started using port %d.", get_my_port(_fed.my_netdrv)); // Send the server port number to the RTI // on an MSG_TYPE_ADDRESS_ADVERTISEMENT message (@see net_common.h). unsigned char buffer[sizeof(int32_t) + 1]; buffer[0] = MSG_TYPE_ADDRESS_ADVERTISEMENT; - encode_int32(_fed.server_port, &(buffer[1])); + encode_int32(get_my_port(_fed.my_netdrv), &(buffer[1])); // Trace the event when tracing is enabled tracepoint_federate_to_rti(_fed.trace, send_ADR_AD, _lf_my_fed_id, NULL); // No need for a mutex because we have the only handle on this socket. - write_to_socket_fail_on_error(&_fed.socket_TCP_RTI, sizeof(int32_t) + 1, (unsigned char*)buffer, NULL, + write_to_netdrv_fail_on_error(_fed.netdrv_to_rti, sizeof(int32_t) + 1, (unsigned char*)buffer, NULL, "Failed to send address advertisement."); - LF_PRINT_DEBUG("Sent port %d to the RTI.", _fed.server_port); + LF_PRINT_DEBUG("Sent port %d to the RTI.", get_my_port(_fed.my_netdrv)); // Set the global server socket - _fed.server_socket = socket_descriptor; + _fed.my_netdrv = my_netdrv; } void lf_enqueue_port_absent_reactions(environment_t* env){ diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 912ca0cbc..1ab98443e 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -7,10 +7,13 @@ #include #include // IPPROTO_TCP, IPPROTO_UDP #include // TCP_NODELAY +#include #include #include #include #include +#include +#include #include #include "util.h" @@ -28,6 +31,10 @@ char* get_host_name(netdrv_t *drv) { socket_priv_t *priv = get_priv(drv); return priv->server_hostname; } +int32_t* get_my_port(netdrv_t *drv) { + socket_priv_t *priv = get_priv(drv); + return &priv->port; +} int32_t* get_port(netdrv_t *drv) { socket_priv_t *priv = get_priv(drv); return &priv->server_port; @@ -36,19 +43,20 @@ struct in_addr* get_ip_addr(netdrv_t *drv) { socket_priv_t *priv = get_priv(drv); return &priv->server_ip_addr; } -// void set_host_name(netdrv_t *drv, const char* hostname) { -// socket_priv_t *priv = get_priv(drv); -// memcpy(priv->server_hostname, hostname, len(hostname)) -// priv->server_hostname = hostname; -// } -// void set_port(netdrv_t *drv, int port) { -// socket_priv_t *priv = get_priv(drv); -// priv->server_port = port; -// } +void set_host_name(netdrv_t *drv, const char* hostname) { + socket_priv_t *priv = get_priv(drv); + memcpy(priv->server_hostname, hostname, INET_ADDRSTRLEN); +} +void set_port(netdrv_t *drv, int port) { + socket_priv_t *priv = get_priv(drv); + priv->server_port = port; +} // void set_ip_addr(netdrv_t *drv) { // socket_priv_t *priv = get_priv(drv); // return &priv->server_ip_addr; // } + +// create_real_time_tcp_socket_errexit static int socket_open(netdrv_t *drv) { int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sock < 0) { @@ -77,6 +85,12 @@ static int socket_open(netdrv_t *drv) { return sock; } +void netdrv_free(netdrv_t *drv) { + socket_priv_t *priv = get_priv(drv); + free(priv); + free(drv); +} + static void socket_close(netdrv_t *drv) { if (!drv){ return; @@ -152,6 +166,54 @@ static int net_create_real_time_tcp_socket_errexit() { return sock; } +//TODO: DONGHA: Need to fix port. +int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port) { + socket_priv_t *priv = get_priv(drv); + // Server file descriptor. + struct sockaddr_in server_fd; + // Zero out the server address structure. + bzero((char*)&server_fd, sizeof(server_fd)); + + server_fd.sin_family = AF_INET; // IPv4 + server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. + // Convert the port number from host byte order to network byte order. + server_fd.sin_port = htons(port); + + int result = bind( + priv->socket_descriptor, + (struct sockaddr *) &server_fd, + sizeof(server_fd)); + int count = 0; + while (result < 0 && count++ < PORT_BIND_RETRY_LIMIT) { + lf_sleep(PORT_BIND_RETRY_INTERVAL); + result = bind( + priv->socket_descriptor, + (struct sockaddr *) &server_fd, + sizeof(server_fd)); + } + if (result < 0) { + lf_print_error_and_exit("Failed to bind socket on port %d.", port); + } + + // Set the global server port. + if (specified_port == 0) { + // Need to retrieve the port number assigned by the OS. + struct sockaddr_in assigned; + socklen_t addr_len = sizeof(assigned); + if (getsockname(priv->socket_descriptor, (struct sockaddr *) &assigned, &addr_len) < 0) { + lf_print_error_and_exit("Failed to retrieve assigned port number."); + } + priv->port = ntohs(assigned.sin_port); + } else { + priv->port = port; + } + + // Enable listening for socket connections. + // The second argument is the maximum number of queued socket requests, + // which according to the Mac man page is limited to 128. + listen(priv->socket_descriptor, 128); +} + /** * Create a server and enable listening for socket connections. * If the specified port if it is non-zero, it will attempt to acquire that port. @@ -168,7 +230,7 @@ static int net_create_real_time_tcp_socket_errexit() { * @return The socket descriptor on which to accept connections. */ //TODO: Fix comments. -int create_rti_server(netdrv_t *drv, netdrv_type_t netdrv_type) { +int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { socket_priv_t *priv = get_priv(drv); // Timeout time for the communications of the server @@ -377,8 +439,34 @@ netdrv_t *accept_connection(netdrv_t *rti_netdrv) { return fed_netdrv; } -int netdrv_connect(netdrv_t *netdrv) { - +int netdrv_connect(netdrv_t *drv) { + socket_priv_t *priv = get_priv(drv); + + struct addrinfo hints; + struct addrinfo *result; + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_INET; /* Allow IPv4 */ + hints.ai_socktype = SOCK_STREAM; /* Stream socket */ + hints.ai_protocol = IPPROTO_TCP; /* TCP protocol */ + hints.ai_addr = NULL; + hints.ai_next = NULL; + hints.ai_flags = AI_NUMERICSERV; /* Allow only numeric port numbers */ + + // Convert port number to string. + char str[6]; + sprintf(str, "%u", priv->port); + + // Get address structure matching hostname and hints criteria, and + // set port to the port number provided in str. There should only + // ever be one matching address structure, and we connect to that. + if (getaddrinfo(priv->server_hostname, (const char*)&str, &hints, &result)) { + lf_print_error_and_exit("No host for RTI matching given hostname: %s", priv->server_hostname); + } + + int ret = connect(priv->socket_descriptor, result->ai_addr, result->ai_addrlen); + freeaddrinfo(result); + return ret; } @@ -494,10 +582,13 @@ typedef enum { static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* bytes_to_read, int* state) { switch(buffer[0]) { - // case MSG_TYPE_REJECT: // 1 +1 - // break; - // case MSG_TYPE_ACK: // 1 - // break; + case MSG_TYPE_REJECT: // 1 +1 + *bytes_to_read = 1; + *state = FINISH_READ; + break; + case MSG_TYPE_ACK: // 1 + *state = FINISH_READ; + break; case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 *bytes_to_read = sizeof(uint16_t); *state = FINISH_READ; @@ -510,8 +601,10 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* *bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; *state = FINISH_READ; break; - // case MSG_TYPE_RTI_RESPONSE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) - // break; + case MSG_TYPE_RTI_RESPONSE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) + *bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; + *state = FINISH_READ; + break; case MSG_TYPE_FED_RESPONSE: // 1 + SHA256_HMAC_LENGTH(8) *bytes_to_read = SHA256_HMAC_LENGTH; *state = FINISH_READ; @@ -607,6 +700,7 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* } +//TODO: DONGHA: ADD buffer_length checking. // Returns the total bytes read. ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { socket_priv_t *priv = get_priv(netdrv); diff --git a/include/core/federated/federate.h b/include/core/federated/federate.h index 4fb28ff19..5618ed20c 100644 --- a/include/core/federated/federate.h +++ b/include/core/federated/federate.h @@ -373,7 +373,7 @@ int lf_send_message(int message_type, * information is needed for the RTI to perform the centralized coordination. * @see MSG_TYPE_NEIGHBOR_STRUCTURE in net_common.h */ -void lf_send_neighbor_structure_to_RTI(int); +void lf_send_neighbor_structure_to_RTI(netdrv_t *netdrv); /** * @brief Send a next event tag (NET) signal. From 059c6c4686192f4987ab81c7a66c337b2b3d0b11 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 15 Feb 2024 17:37:52 -0700 Subject: [PATCH 066/262] Finished lf_handle_p2p_connections_from_federates --- core/federated/RTI/rti_remote.c | 2 + core/federated/federate.c | 136 +++++++++--------- core/federated/network/lf_socket_support.c | 16 ++- include/core/federated/federate.h | 12 +- .../federated/network/lf_socket_support.h | 14 +- 5 files changed, 94 insertions(+), 86 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index fef1fc0a4..44f75c256 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1464,6 +1464,8 @@ void *respond_to_erroneous_connections(void *nothing) { // TODO: DONGHA: Need to fix. Do we need accept as api? netdrv_t *fed_netdrv = netdrv_accept(rti_remote->rti_netdrv); + if (fed_netdrv == NULL) continue; + if (rti_remote->all_federates_exited) { return NULL; } diff --git a/core/federated/federate.c b/core/federated/federate.c index 7e7e347db..b3ac1310d 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -48,7 +48,7 @@ extern instant_t start_time; extern bool _lf_termination_executed; // Global variables references in federate.h -lf_mutex_t lf_outbound_socket_mutex; +lf_mutex_t lf_outbound_netdrv_mutex; lf_cond_t lf_port_status_changed; lf_cond_t lf_current_tag_changed; @@ -80,7 +80,7 @@ int max_level_allowed_to_advance; federate_instance_t _fed = { .socket_TCP_RTI = -1, .number_of_inbound_p2p_connections = 0, - .inbound_socket_listeners = NULL, + .inbound_netdriv_listeners = NULL, .number_of_outbound_p2p_connections = 0, .inbound_p2p_handling_thread_id = 0, .server_socket = -1, @@ -108,7 +108,7 @@ federation_metadata_t federation_metadata = { // Static functions (used only internally) /** - * Send a time to the RTI. This acquires the lf_outbound_socket_mutex. + * Send a time to the RTI. This acquires the lf_outbound_netdrv_mutex. * @param type The message type (MSG_TYPE_TIMESTAMP). * @param time The time. */ @@ -123,15 +123,15 @@ static void send_time(unsigned char type, instant_t time) { tag_t tag = {.time = time, .microstep = 0}; tracepoint_federate_to_rti(_fed.trace, send_TIMESTAMP, _lf_my_fed_id, &tag); - LF_MUTEX_LOCK(&lf_outbound_socket_mutex); - write_to_socket_fail_on_error(&_fed.socket_TCP_RTI, bytes_to_write, buffer, &lf_outbound_socket_mutex, + LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); + write_to_socket_fail_on_error(&_fed.socket_TCP_RTI, bytes_to_write, buffer, &lf_outbound_netdrv_mutex, "Failed to send time " PRINTF_TIME " to the RTI.", time - start_time); - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); } /** * Send a tag to the RTI. - * This function acquires the lf_outbound_socket_mutex. + * This function acquires the lf_outbound_netdrv_mutex. * @param type The message type (MSG_TYPE_NEXT_EVENT_TAG or MSG_TYPE_LATEST_TAG_COMPLETE). * @param tag The tag. */ @@ -142,19 +142,19 @@ static void send_tag(unsigned char type, tag_t tag) { buffer[0] = type; encode_tag(&(buffer[1]), tag); - LF_MUTEX_LOCK(&lf_outbound_socket_mutex); + LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); if (_fed.socket_TCP_RTI < 0) { lf_print_warning("Socket is no longer connected. Dropping message."); - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); return; } trace_event_t event_type = (type == MSG_TYPE_NEXT_EVENT_TAG) ? send_NET : send_LTC; // Trace the event when tracing is enabled tracepoint_federate_to_rti(_fed.trace, event_type, _lf_my_fed_id, &tag); write_to_socket_fail_on_error( - &_fed.socket_TCP_RTI, bytes_to_write, buffer, &lf_outbound_socket_mutex, + &_fed.socket_TCP_RTI, bytes_to_write, buffer, &lf_outbound_netdrv_mutex, "Failed to send tag " PRINTF_TAG " to the RTI.", tag.time - start_time, tag.microstep); - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); } /** @@ -823,7 +823,7 @@ static void* listen_to_federates(void* _args) { /** * Close the socket that sends outgoing messages to the - * specified federate ID. This function acquires the lf_outbound_socket_mutex mutex lock + * specified federate ID. This function acquires the lf_outbound_netdrv_mutex mutex lock * if _lf_normal_termination is true and otherwise proceeds without the lock. * @param fed_id The ID of the peer federate receiving messages from this * federate, or -1 if the RTI (centralized coordination). @@ -832,7 +832,7 @@ static void* listen_to_federates(void* _args) { static void close_outbound_socket(int fed_id, int flag) { assert (fed_id >= 0 && fed_id < NUMBER_OF_FEDERATES); if (_lf_normal_termination) { - LF_MUTEX_LOCK(&lf_outbound_socket_mutex); + LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); } if (_fed.sockets_for_outbound_p2p_connections[fed_id] >= 0) { // Close the socket by sending a FIN packet indicating that no further writes @@ -852,7 +852,7 @@ static void close_outbound_socket(int fed_id, int flag) { _fed.sockets_for_outbound_p2p_connections[fed_id] = -1; } if (_lf_normal_termination) { - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); } } @@ -1383,7 +1383,7 @@ static void handle_stop_request_message() { // is guarded by the outbound socket mutex. // The second is guarded by the global mutex. // Note that the RTI should not send stop requests more than once to federates. - LF_MUTEX_LOCK(&lf_outbound_socket_mutex); + LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); if (_fed.received_stop_request_from_rti) { LF_PRINT_LOG("Redundant MSG_TYPE_STOP_REQUEST from RTI. Ignoring it."); already_blocked = true; @@ -1392,7 +1392,7 @@ static void handle_stop_request_message() { // prevent lf_request_stop from sending. _fed.received_stop_request_from_rti = true; } - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); if (already_blocked) { // Either we have sent a stop request to the RTI ourselves, @@ -1426,11 +1426,11 @@ static void handle_stop_request_message() { tracepoint_federate_to_rti(_fed.trace, send_STOP_REQ_REP, _lf_my_fed_id, &tag_to_stop); // Send the current logical time to the RTI. - LF_MUTEX_LOCK(&lf_outbound_socket_mutex); + LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); write_to_socket_fail_on_error( - &_fed.socket_TCP_RTI, MSG_TYPE_STOP_REQUEST_REPLY_LENGTH, outgoing_buffer, &lf_outbound_socket_mutex, + &_fed.socket_TCP_RTI, MSG_TYPE_STOP_REQUEST_REPLY_LENGTH, outgoing_buffer, &lf_outbound_netdrv_mutex, "Failed to send the answer to MSG_TYPE_STOP_REQUEST to RTI."); - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); LF_PRINT_DEBUG("Sent MSG_TYPE_STOP_REQUEST_REPLY to RTI with tag " PRINTF_TAG, tag_to_stop.time, tag_to_stop.microstep); @@ -1443,11 +1443,11 @@ static void send_resign_signal(environment_t* env) { size_t bytes_to_write = 1; unsigned char buffer[bytes_to_write]; buffer[0] = MSG_TYPE_RESIGN; - LF_MUTEX_LOCK(&lf_outbound_socket_mutex); + LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); write_to_socket_fail_on_error( - &_fed.socket_TCP_RTI, bytes_to_write, &(buffer[0]), &lf_outbound_socket_mutex, + &_fed.socket_TCP_RTI, bytes_to_write, &(buffer[0]), &lf_outbound_netdrv_mutex, "Failed to send MSG_TYPE_RESIGN."); - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); LF_PRINT_LOG("Resigned."); } @@ -1673,12 +1673,12 @@ void terminate_execution(environment_t* env) { LF_PRINT_DEBUG("Waiting for inbound p2p socket listener threads."); // Wait for each inbound socket listener thread to close. - if (_fed.number_of_inbound_p2p_connections > 0 && _fed.inbound_socket_listeners != NULL) { + if (_fed.number_of_inbound_p2p_connections > 0 && _fed.inbound_netdriv_listeners != NULL) { LF_PRINT_LOG("Waiting for %zu threads listening for incoming messages to exit.", _fed.number_of_inbound_p2p_connections); for (int i=0; i < _fed.number_of_inbound_p2p_connections; i++) { // Ignoring errors here. - lf_thread_join(_fed.inbound_socket_listeners[i], NULL); + lf_thread_join(_fed.inbound_netdriv_listeners[i], NULL); } } @@ -1689,7 +1689,7 @@ void terminate_execution(environment_t* env) { // For abnormal termination, there is no need to free memory. if (_lf_normal_termination) { LF_PRINT_DEBUG("Freeing memory occupied by the federate."); - free(_fed.inbound_socket_listeners); + free(_fed.inbound_netdriv_listeners); free(federation_metadata.rti_host); free(federation_metadata.rti_user); } @@ -1720,12 +1720,12 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { // Trace the event when tracing is enabled tracepoint_federate_to_rti(_fed.trace, send_ADR_QR, _lf_my_fed_id, NULL); - LF_MUTEX_LOCK(&lf_outbound_socket_mutex); + LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); write_to_socket_fail_on_error( - &_fed.socket_TCP_RTI, sizeof(uint16_t) + 1, buffer, &lf_outbound_socket_mutex, + &_fed.socket_TCP_RTI, sizeof(uint16_t) + 1, buffer, &lf_outbound_netdrv_mutex, "Failed to send address query for federate %d to RTI.", remote_federate_id); - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); // Read RTI's response. //TODO: Fix two reads. @@ -1973,7 +1973,7 @@ void lf_connect_to_rti(const char* hostname, int port) { if (read_from_netdrv(_fed.netdrv_to_rti, response, 2)) { continue; // Try again. } - if (response == MSG_TYPE_REJECT) { + if (response[0] == MSG_TYPE_REJECT) { // Trace the event when tracing is enabled tracepoint_federate_from_rti(_fed.trace, receive_REJECT, _lf_my_fed_id, NULL); // Read one more byte to determine the cause of rejection. @@ -1982,16 +1982,16 @@ void lf_connect_to_rti(const char* hostname, int port) { lf_print_warning("Connected to the wrong RTI on port %d. Will try again", uport); continue; } - } else if (response == MSG_TYPE_ACK) { + } else if (response[0] == MSG_TYPE_ACK) { // Trace the event when tracing is enabled tracepoint_federate_from_rti(_fed.trace, receive_ACK, _lf_my_fed_id, NULL); LF_PRINT_LOG("Received acknowledgment from the RTI."); break; - } else if (response == MSG_TYPE_RESIGN) { + } else if (response[0] == MSG_TYPE_RESIGN) { lf_print_warning("RTI on port %d resigned. Will try again", uport); continue; } else { - lf_print_warning("RTI on port %d gave unexpect response %u. Will try again", uport, response); + lf_print_warning("RTI on port %d gave unexpect response %u. Will try again", uport, response[0]); continue; } } @@ -2080,31 +2080,29 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { environment_t* env = (environment_t *) env_arg; int received_federates = 0; // Allocate memory to store thread IDs. - _fed.inbound_socket_listeners = (lf_thread_t*)calloc(_fed.number_of_inbound_p2p_connections, sizeof(lf_thread_t)); + _fed.inbound_netdriv_listeners = (lf_thread_t*)calloc(_fed.number_of_inbound_p2p_connections, sizeof(lf_thread_t)); while (received_federates < _fed.number_of_inbound_p2p_connections && !_lf_termination_executed) { // Wait for an incoming connection request. - struct sockaddr client_fd; - uint32_t client_length = sizeof(client_fd); - int socket_id = accept(_fed.server_socket, &client_fd, &client_length); + netdrv_t *client_fed_netdrv = netdrv_accept(_fed.my_netdrv); - if (socket_id < 0) { + if (client_fed_netdrv == NULL) { if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) { if (rti_failed()) break; else continue; // Try again. } else if (errno == EPERM) { lf_print_error_system_failure("Firewall permissions prohibit connection."); } else { - lf_print_error_system_failure("A fatal error occurred while accepting a new socket."); + lf_print_error_system_failure("A fatal error occurred while accepting a new netdriver."); } } LF_PRINT_LOG("Accepted new connection from remote federate."); size_t header_length = 1 + sizeof(uint16_t) + 1; unsigned char buffer[header_length]; - int read_failed = read_from_socket(socket_id, header_length, (unsigned char*)&buffer); - if (read_failed || buffer[0] != MSG_TYPE_P2P_SENDING_FED_ID) { + ssize_t bytes_read = read_from_netdrv(client_fed_netdrv, (unsigned char*)&buffer, header_length); + if (bytes_read <= 0 || buffer[0] != MSG_TYPE_P2P_SENDING_FED_ID) { lf_print_warning("Federate received invalid first message on P2P socket. Closing socket."); - if (read_failed == 0) { + if (bytes_read > 0) { // Wrong message received. unsigned char response[2]; response[0] = MSG_TYPE_REJECT; @@ -2112,28 +2110,28 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { // Trace the event when tracing is enabled tracepoint_federate_to_federate(_fed.trace, send_REJECT, _lf_my_fed_id, -3, NULL); // Ignore errors on this response. - write_to_socket(socket_id, 2, response); + write_to_netdrv(client_fed_netdrv, 2, response); } - close(socket_id); + client_fed_netdrv->close(client_fed_netdrv); continue; } // Get the federation ID and check it. unsigned char federation_id_length = buffer[header_length - 1]; char remote_federation_id[federation_id_length]; - read_failed = read_from_socket(socket_id, federation_id_length, (unsigned char*)remote_federation_id); - if (read_failed || (strncmp(federation_metadata.federation_id, remote_federation_id, strnlen(federation_metadata.federation_id, 255)) != 0)) { + bytes_read = read_from_netdrv(client_fed_netdrv, (unsigned char*)remote_federation_id, federation_id_length); + if (bytes_read <= 0 || (strncmp(federation_metadata.federation_id, remote_federation_id, strnlen(federation_metadata.federation_id, 255)) != 0)) { lf_print_warning("Received invalid federation ID. Closing socket."); - if (read_failed == 0) { + if (bytes_read > 0) { unsigned char response[2]; response[0] = MSG_TYPE_REJECT; response[1] = FEDERATION_ID_DOES_NOT_MATCH; // Trace the event when tracing is enabled tracepoint_federate_to_federate(_fed.trace, send_REJECT, _lf_my_fed_id, -3, NULL); // Ignore errors on this response. - write_to_socket(socket_id, 2, response); + write_to_netdrv(client_fed_netdrv, 2, response); } - close(socket_id); + client_fed_netdrv->close(client_fed_netdrv); continue; } @@ -2149,7 +2147,7 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { // element should be reset to -1 during that critical section. // Otherwise, there can be race condition where, during termination, // two threads attempt to simultaneously close the socket. - _fed.sockets_for_inbound_p2p_connections[remote_fed_id] = socket_id; + _fed.netdrv_for_inbound_p2p_connections[remote_fed_id] = client_fed_netdrv; // Send an MSG_TYPE_ACK message. unsigned char response = MSG_TYPE_ACK; @@ -2157,28 +2155,28 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { // Trace the event when tracing is enabled tracepoint_federate_to_federate(_fed.trace, send_ACK, _lf_my_fed_id, remote_fed_id, NULL); - LF_MUTEX_LOCK(&lf_outbound_socket_mutex); - write_to_socket_fail_on_error( - &_fed.sockets_for_inbound_p2p_connections[remote_fed_id], + LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); + write_to_netdrv_fail_on_error( + _fed.netdrv_for_inbound_p2p_connections[remote_fed_id], 1, (unsigned char*)&response, - &lf_outbound_socket_mutex, + &lf_outbound_netdrv_mutex, "Failed to write MSG_TYPE_ACK in response to federate %d.", remote_fed_id); - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); // Start a thread to listen for incoming messages from other federates. // The fed_id is a uint16_t, which we assume can be safely cast to and from void*. void* fed_id_arg = (void*)(uintptr_t)remote_fed_id; int result = lf_thread_create( - &_fed.inbound_socket_listeners[received_federates], + &_fed.inbound_netdriv_listeners[received_federates], listen_to_federates, fed_id_arg); if (result != 0) { // Failed to create a listening thread. LF_MUTEX_LOCK(&socket_mutex); - if (_fed.sockets_for_inbound_p2p_connections[remote_fed_id] != -1) { - close(socket_id); - _fed.sockets_for_inbound_p2p_connections[remote_fed_id] = -1; + if (_fed.netdrv_for_inbound_p2p_connections[remote_fed_id] != NULL) { + _fed.netdrv_for_inbound_p2p_connections[remote_fed_id]->close(_fed.netdrv_for_inbound_p2p_connections[remote_fed_id]); + _fed.netdrv_for_inbound_p2p_connections[remote_fed_id] = NULL; } LF_MUTEX_UNLOCK(&socket_mutex); lf_print_error_and_exit( @@ -2286,7 +2284,7 @@ int lf_send_message(int message_type, const int header_length = 1 + sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); // Use a mutex lock to prevent multiple threads from simultaneously sending. - LF_MUTEX_LOCK(&lf_outbound_socket_mutex); + LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); int* socket = &_fed.sockets_for_outbound_p2p_connections[federate]; @@ -2302,7 +2300,7 @@ int lf_send_message(int message_type, // Message did not send. Since this is used for physical connections, this is not critical. lf_print_warning("Failed to send message to %s. Dropping the message.", next_destination_str); } - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); return result; } @@ -2491,9 +2489,9 @@ void lf_send_port_absent_to_federate( _fed.trace, send_PORT_ABS, _lf_my_fed_id, fed_ID, ¤t_message_intended_tag); } - LF_MUTEX_LOCK(&lf_outbound_socket_mutex); + LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); int result = write_to_socket_close_on_error(socket, message_length, buffer); - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); if (result != 0) { // Write failed. Response depends on whether coordination is centralized. @@ -2517,7 +2515,7 @@ int lf_send_stop_request_to_rti(tag_t stop_tag) { stop_tag.microstep++; ENCODE_STOP_REQUEST(buffer, stop_tag.time, stop_tag.microstep); - LF_MUTEX_LOCK(&lf_outbound_socket_mutex); + LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); // Do not send a stop request if a stop request has been previously received from the RTI. if (!_fed.received_stop_request_from_rti) { LF_PRINT_LOG("Sending to RTI a MSG_TYPE_STOP_REQUEST message with tag " PRINTF_TAG ".", @@ -2526,22 +2524,22 @@ int lf_send_stop_request_to_rti(tag_t stop_tag) { if (_fed.socket_TCP_RTI < 0) { lf_print_warning("Socket is no longer connected. Dropping message."); - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); return -1; } // Trace the event when tracing is enabled tracepoint_federate_to_rti(_fed.trace, send_STOP_REQ, _lf_my_fed_id, &stop_tag); write_to_socket_fail_on_error(&_fed.socket_TCP_RTI, MSG_TYPE_STOP_REQUEST_LENGTH, - buffer, &lf_outbound_socket_mutex, + buffer, &lf_outbound_netdrv_mutex, "Failed to send stop time " PRINTF_TIME " to the RTI.", stop_tag.time - start_time); // Treat this sending as equivalent to having received a stop request from the RTI. _fed.received_stop_request_from_rti = true; - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); return 0; } else { - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); return 1; } } @@ -2604,7 +2602,7 @@ int lf_send_tagged_message(environment_t* env, next_destination_str); // Use a mutex lock to prevent multiple threads from simultaneously sending. - LF_MUTEX_LOCK(&lf_outbound_socket_mutex); + LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); int* socket; if (message_type == MSG_TYPE_P2P_TAGGED_MESSAGE) { @@ -2629,7 +2627,7 @@ int lf_send_tagged_message(environment_t* env, next_destination_str); } } - LF_MUTEX_UNLOCK(&lf_outbound_socket_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); return result; } diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 1ab98443e..fe1339b88 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -397,15 +397,17 @@ void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { } } -netdrv_t *netdrv_accept(netdrv_t *rti_netdrv) { - netdrv_t *fed_netdrv = netdrv_init(); - socket_priv_t *rti_priv = get_priv(rti_netdrv); - socket_priv_t *fed_priv = get_priv(fed_netdrv); +netdrv_t *netdrv_accept(netdrv_t *my_netdrv) { + netdrv_t *client_netdrv = netdrv_init(); + socket_priv_t *my_priv = get_priv(my_netdrv); + socket_priv_t *client_priv = get_priv(client_netdrv); struct sockaddr client_fd; uint32_t client_length = sizeof(client_fd); - fed_priv->socket_descriptor = accept(rti_priv->socket_descriptor, &client_fd, &client_length); - // if (fed_priv->socket_descriptor < 0) return NULL; - return fed_netdrv; + client_priv->socket_descriptor = accept(my_priv->socket_descriptor, &client_fd, &client_length); + if (client_priv->socket_descriptor < 0) { + return NULL; + } + return client_netdrv; } netdrv_t *accept_connection(netdrv_t *rti_netdrv) { diff --git a/include/core/federated/federate.h b/include/core/federated/federate.h index 5618ed20c..ea5c4b26f 100644 --- a/include/core/federated/federate.h +++ b/include/core/federated/federate.h @@ -35,8 +35,8 @@ typedef struct federate_instance_t { netdrv_t *netdrv_to_rti; // socket_TCP_RTI; netdrv_t *my_netdrv; // server_socket; server_port; - netdrv_t *netdrv_to_inbound[NUMBER_OF_FEDERATES]; //sockets_for_inbound_p2p_connections[NUMBER_OF_FEDERATES]; - netdrv_t *netdrv_to_outbound[NUMBER_OF_FEDERATES]; //sockets_for_outbound_p2p_connections[NUMBER_OF_FEDERATES]; + netdrv_t *netdrv_for_inbound_p2p_connections[NUMBER_OF_FEDERATES]; //sockets_for_inbound_p2p_connections[NUMBER_OF_FEDERATES]; + netdrv_t *netdrv_for_outbound_p2p_connections[NUMBER_OF_FEDERATES]; //sockets_for_outbound_p2p_connections[NUMBER_OF_FEDERATES]; /** * The TCP socket descriptor for this federate to communicate with the RTI. @@ -62,7 +62,7 @@ typedef struct federate_instance_t { * This is NULL if there are none and otherwise has size given by * number_of_inbound_p2p_connections. */ - lf_thread_t *inbound_socket_listeners; + lf_thread_t *inbound_netdriv_listeners; /** * Number of outbound peer-to-peer connections from the federate. @@ -227,7 +227,7 @@ typedef enum parse_rti_code_t { /** * Mutex lock held while performing socket write and close operations. */ -extern lf_mutex_t lf_outbound_socket_mutex; +extern lf_mutex_t lf_outbound_netdrv_mutex; /** * Condition variable for blocking on unkonwn federate input ports. @@ -346,7 +346,7 @@ void lf_reset_status_fields_on_input_port_triggers(); * between federates. If the socket connection to the remote federate or the RTI has been broken, * then this returns -1 without sending. Otherwise, it returns 0. * - * This method assumes that the caller does not hold the lf_outbound_socket_mutex lock, + * This method assumes that the caller does not hold the lf_outbound_netdrv_mutex lock, * which it acquires to perform the send. * * @param message_type The type of the message being sent (currently only MSG_TYPE_P2P_MESSAGE). @@ -476,7 +476,7 @@ int lf_send_stop_request_to_rti(tag_t stop_tag); * to believe that there were no messages forthcoming. In this case, on failure to send * the message, this function returns -11. * - * This method assumes that the caller does not hold the lf_outbound_socket_mutex lock, + * This method assumes that the caller does not hold the lf_outbound_netdrv_mutex lock, * which it acquires to perform the send. * * @param env The environment from which to get the current tag. diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index fafd8a150..a77ad54de 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -50,12 +50,12 @@ #define DELAY_BETWEEN_SOCKET_RETRIES MSEC(100) typedef struct socket_priv_t { - int port; + int port; // my port number int socket_descriptor; int proto; uint16_t user_specified_port; - // Used for the RTI, to read the connected federate's info. + // The connected other side's info. char server_hostname[INET_ADDRSTRLEN]; // Human-readable IP address and int32_t server_port; // port number of the socket server of the federate // if it has any incoming direct connections from other federates. @@ -66,6 +66,7 @@ typedef struct socket_priv_t { } socket_priv_t; char* get_host_name(netdrv_t *drv); +int32_t* get_my_port(netdrv_t *drv); int32_t* get_port(netdrv_t *drv); struct in_addr* get_ip_addr(netdrv_t *drv); @@ -75,6 +76,11 @@ void set_port(netdrv_t *drv, int port); netdrv_t * netdrv_init(); +void netdrv_free(netdrv_t *drv); + + +int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port); + /** * Create a server and enable listening for socket connections. * If the specified port if it is non-zero, it will attempt to acquire that port. @@ -97,11 +103,11 @@ int create_rti_server(netdrv_t *drv, netdrv_type_t netdrv_type); // int create_real_time_tcp_socket_errexit(); void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv); -netdrv_t *netdrv_accept(netdrv_t *rti_netdrv); +netdrv_t *netdrv_accept(netdrv_t *my_netdrv); netdrv_t *accept_connection(netdrv_t * rti_netdrv); -int netdrv_connect(netdrv_t *netdrv); +int netdrv_connect(netdrv_t *drv); From db2ef8b9203fce58b7c5656a046b0b106a03c6bb Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 15 Feb 2024 17:42:27 -0700 Subject: [PATCH 067/262] Minor fix --- core/federated/RTI/rti_remote.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 44f75c256..4d4b964d6 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -607,9 +607,6 @@ void handle_address_query(uint16_t fed_id, unsigned char *buffer) { // from this federate. In that case, it will respond by sending -1. federate_info_t *remote_fed = GET_FED_INFO(remote_fed_id); - struct in_addr a = *get_ip_addr(remote_fed->fed_netdrv); - size_t size = sizeof(*get_ip_addr(remote_fed->fed_netdrv)); - int32_t port = *get_port(remote_fed->fed_netdrv); unsigned char buf[1 + sizeof(int32_t) + sizeof(*get_ip_addr(remote_fed->fed_netdrv))]; // Response message is also of type MSG_TYPE_ADDRESS_QUERY. buf[0] = MSG_TYPE_ADDRESS_QUERY; From cd8532cd03db9df9f4f2d339973a2c2e0ece9133 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 16 Feb 2024 13:08:45 -0700 Subject: [PATCH 068/262] Finished lf_connect_to_federate --- core/federated/federate.c | 82 +++++++++------------- core/federated/network/lf_socket_support.c | 10 +-- 2 files changed, 39 insertions(+), 53 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index b3ac1310d..b1233bcb3 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -163,7 +163,7 @@ static void send_tag(unsigned char type, tag_t tag) { */ static bool rti_failed() { unsigned char first_byte; - ssize_t bytes = peek_from_socket(_fed.socket_TCP_RTI, &first_byte); + ssize_t bytes = peek_from_netdrv(_fed.netdrv_to_rti, &first_byte); if (bytes < 0 || (bytes == 1 && first_byte == MSG_TYPE_FAILED)) return true; else return false; } @@ -1700,6 +1700,7 @@ void terminate_execution(environment_t* env) { ////////////////////////////////////////////////////////////////////////////////// // Public functions (declared in federate.h, in alphabetical order) +//TODO: DONGHA: Handling address queries must be changed. Just leaving port and ip_addr now. void lf_connect_to_federate(uint16_t remote_federate_id) { int result = -1; int count_retries = 0; @@ -1721,15 +1722,15 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { tracepoint_federate_to_rti(_fed.trace, send_ADR_QR, _lf_my_fed_id, NULL); LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); - write_to_socket_fail_on_error( - &_fed.socket_TCP_RTI, sizeof(uint16_t) + 1, buffer, &lf_outbound_netdrv_mutex, + write_to_netdrv_fail_on_error( + _fed.netdrv_to_rti, sizeof(uint16_t) + 1, buffer, &lf_outbound_netdrv_mutex, "Failed to send address query for federate %d to RTI.", remote_federate_id); LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); // Read RTI's response. //TODO: Fix two reads. - read_from_socket_fail_on_error(&_fed.socket_TCP_RTI, sizeof(int32_t) + 1, buffer, NULL, + read_from_netdrv_fail_on_error(_fed.netdrv_to_rti, buffer, sizeof(int32_t) + INET_ADDRSTRLEN + 1, NULL, "Failed to read the requested port number for federate %d from RTI.", remote_federate_id); @@ -1743,8 +1744,8 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { } port = extract_int32(&buffer[1]); - read_from_socket_fail_on_error( - &_fed.socket_TCP_RTI, sizeof(host_ip_addr), (unsigned char*)&host_ip_addr, NULL, + read_from_netdrv_fail_on_error( + _fed.netdrv_to_rti, (unsigned char*)&host_ip_addr, sizeof(host_ip_addr), NULL, "Failed to read the IP address for federate %d from RTI.", remote_federate_id); @@ -1765,39 +1766,24 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { assert(port > 0); uint16_t uport = (uint16_t)port; -#if LOG_LEVEL > 3 - // Print the received IP address in a human readable format - // Create the human readable format of the received address. - // This is avoided unless LOG_LEVEL is high enough to - // subdue the overhead caused by inet_ntop(). char hostname[INET_ADDRSTRLEN]; inet_ntop(AF_INET, &host_ip_addr, hostname, INET_ADDRSTRLEN); LF_PRINT_LOG("Received address %s port %d for federate %d from RTI.", hostname, uport, remote_federate_id); -#endif // Iterate until we either successfully connect or exceed the number of // attempts given by CONNECT_MAX_RETRIES. + netdrv_t* netdrv = netdrv_init(); + + int socket_id = -1; while (result < 0 && !_lf_termination_executed) { // Create an IPv4 socket for TCP (not UDP) communication over IP (0). socket_id = create_real_time_tcp_socket_errexit(); - - // Server file descriptor. - struct sockaddr_in server_fd; - // Zero out the server_fd struct. - bzero((char*)&server_fd, sizeof(server_fd)); - - // Set up the server_fd fields. - server_fd.sin_family = AF_INET; // IPv4 - server_fd.sin_addr = host_ip_addr; // Received from the RTI - - // Convert the port number from host byte order to network byte order. - server_fd.sin_port = htons(uport); - result = connect( - socket_id, - (struct sockaddr *)&server_fd, - sizeof(server_fd)); + netdrv->open(netdrv); + set_host_name(netdrv, hostname); + set_port(netdrv, uport); + result = netdrv_connect(netdrv); if (result != 0) { lf_print_error("Failed to connect to federate %d on port %d.", remote_federate_id, uport); @@ -1812,60 +1798,60 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { // treat it as a soft error condition and return. lf_print_error("Failed to connect to federate %d after %d retries. Giving up.", remote_federate_id, CONNECT_MAX_RETRIES); + netdrv_free(netdrv); return; } lf_print_warning("Could not connect to federate %d. Will try again every" PRINTF_TIME "nanoseconds.\n", remote_federate_id, ADDRESS_QUERY_RETRY_INTERVAL); // Check whether the RTI is still there. - if (rti_failed()) break; - + if (rti_failed()) { + netdrv_free(netdrv); + break; + } + netdrv->close(netdrv); // Wait ADDRESS_QUERY_RETRY_INTERVAL nanoseconds. lf_sleep(ADDRESS_QUERY_RETRY_INTERVAL); } else { // Connect was successful. - size_t buffer_length = 1 + sizeof(uint16_t) + 1; - unsigned char buffer[buffer_length]; + size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); + unsigned char *buffer = (unsigned char*) malloc(1 + sizeof(uint16_t) + 1 + federation_id_length); buffer[0] = MSG_TYPE_P2P_SENDING_FED_ID; if (_lf_my_fed_id > UINT16_MAX) { // This error is very unlikely to occur. lf_print_error_and_exit("Too many federates! More than %d.", UINT16_MAX); } encode_uint16((uint16_t)_lf_my_fed_id, (unsigned char*)&(buffer[1])); - unsigned char federation_id_length = (unsigned char)strnlen(federation_metadata.federation_id, 255); - buffer[sizeof(uint16_t) + 1] = federation_id_length; + buffer[1 + sizeof(uint16_t)] = (unsigned char)(federation_id_length & 0xff); + + memcpy(buffer + 2 + sizeof(uint16_t), (unsigned char*)federation_metadata.federation_id, federation_id_length); // Trace the event when tracing is enabled tracepoint_federate_to_federate(_fed.trace, send_FED_ID, _lf_my_fed_id, remote_federate_id, NULL); - + // No need for a mutex because we have the only handle on the socket. - write_to_socket_fail_on_error(&socket_id, - buffer_length, buffer, NULL, - "Failed to send fed_id to federate %d.", remote_federate_id); - write_to_socket_fail_on_error(&socket_id, - federation_id_length, (unsigned char*)federation_metadata.federation_id, NULL, - "Failed to send federation id to federate %d.", - remote_federate_id); + write_to_netdrv_fail_on_error(netdrv, 2 + sizeof(uint16_t) + federation_id_length, buffer, NULL, + "Failed to send fed_id and federation id to federate %d.", remote_federate_id); - read_from_socket_fail_on_error(&socket_id, 1, (unsigned char*)buffer, NULL, + read_from_netdrv_fail_on_error(netdrv,(unsigned char*)buffer, 2, NULL, "Failed to read MSG_TYPE_ACK from federate %d in response to sending fed_id.", remote_federate_id); if (buffer[0] != MSG_TYPE_ACK) { // Get the error code. - read_from_socket_fail_on_error(&socket_id, 1, (unsigned char*)buffer, NULL, - "Failed to read error code from federate %d in response to sending fed_id.", remote_federate_id); - lf_print_error("Received MSG_TYPE_REJECT message from remote federate (%d).", buffer[0]); + lf_print_error("Received MSG_TYPE_REJECT message from remote federate (%d).", buffer[1]); result = -1; + free(buffer); continue; } else { lf_print("Connected to federate %d, port %d.", remote_federate_id, port); // Trace the event when tracing is enabled tracepoint_federate_to_federate(_fed.trace, receive_ACK, _lf_my_fed_id, remote_federate_id, NULL); + free(buffer); } } } // Once we set this variable, then all future calls to close() on this // socket ID should reset it to -1 within a critical section. - _fed.sockets_for_outbound_p2p_connections[remote_federate_id] = socket_id; + _fed.netdrv_for_outbound_p2p_connections[remote_federate_id] = netdrv; } @@ -1942,7 +1928,6 @@ void lf_connect_to_rti(const char* hostname, int port) { #endif // Send message_type + federate_ID + federation_id_length + federation_id size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); - lf_print("federation_id_length: %d", federation_id_length); unsigned char *buffer = (unsigned char*) malloc(1 + sizeof(uint16_t) + 1 + federation_id_length); buffer[0] = MSG_TYPE_FED_IDS; // Next send the federate ID. @@ -1961,6 +1946,7 @@ void lf_connect_to_rti(const char* hostname, int port) { if (write_to_netdrv(_fed.netdrv_to_rti, 2 + sizeof(uint16_t) + federation_id_length, buffer)) { continue; // Try again, possibly on a new port. } + free(buffer); // Wait for a response. // The response will be MSG_TYPE_REJECT if the federation ID doesn't match. diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index fe1339b88..21ed0b36d 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -51,10 +51,10 @@ void set_port(netdrv_t *drv, int port) { socket_priv_t *priv = get_priv(drv); priv->server_port = port; } -// void set_ip_addr(netdrv_t *drv) { -// socket_priv_t *priv = get_priv(drv); -// return &priv->server_ip_addr; -// } +void set_ip_addr(netdrv_t *drv, struct in_addr ip_addr){ + socket_priv_t *priv = get_priv(drv); + priv->server_ip_addr = ip_addr; +} // create_real_time_tcp_socket_errexit static int socket_open(netdrv_t *drv) { @@ -463,7 +463,7 @@ int netdrv_connect(netdrv_t *drv) { // set port to the port number provided in str. There should only // ever be one matching address structure, and we connect to that. if (getaddrinfo(priv->server_hostname, (const char*)&str, &hints, &result)) { - lf_print_error_and_exit("No host for RTI matching given hostname: %s", priv->server_hostname); + lf_print_error_and_exit("No host matching given hostname: %s", priv->server_hostname); } int ret = connect(priv->socket_descriptor, result->ai_addr, result->ai_addrlen); From 4a12bbdb58f147b1a5fa64fd669ee2a62a4d242d Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 16 Feb 2024 14:47:41 -0700 Subject: [PATCH 069/262] Fix handling messsages --- core/federated/RTI/rti_remote.c | 6 +- core/federated/clock-sync.c | 28 ++-- core/federated/federate.c | 146 +++++++----------- core/federated/network/lf_socket_support.c | 41 +++-- include/core/federated/clock-sync.h | 7 +- include/core/federated/federate.h | 2 +- .../federated/network/lf_socket_support.h | 4 +- 7 files changed, 112 insertions(+), 122 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 4d4b964d6..4b3210581 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -613,7 +613,7 @@ void handle_address_query(uint16_t fed_id, unsigned char *buffer) { // Send the port number (which could be -1) and server IP address to federate. LF_MUTEX_LOCK(&rti_mutex); - encode_int32(*get_port(remote_fed->fed_netdrv), (unsigned char *)&buf[1]); + encode_int32(get_port(remote_fed->fed_netdrv), (unsigned char *)&buf[1]); memcpy(buf + 1 + sizeof(int32_t), (unsigned char *)get_ip_addr(remote_fed->fed_netdrv), sizeof(*get_ip_addr(remote_fed->fed_netdrv))); write_to_netdrv_fail_on_error( fed->fed_netdrv, sizeof(int32_t) + 1 + sizeof(*get_ip_addr(remote_fed->fed_netdrv)), (unsigned char *)buf, &rti_mutex, @@ -622,7 +622,7 @@ void handle_address_query(uint16_t fed_id, unsigned char *buffer) { LF_MUTEX_UNLOCK(&rti_mutex); LF_PRINT_DEBUG("Replied to address query from federate %d with address %s:%d.", - fed_id, get_host_name(remote_fed->fed_netdrv), *get_port(remote_fed->fed_netdrv)); + fed_id, get_host_name(remote_fed->fed_netdrv), get_port(remote_fed->fed_netdrv)); } //TODO: NEED to be fixed. @@ -637,7 +637,7 @@ void handle_address_ad(uint16_t federate_id, unsigned char *buffer) { assert(server_port < 65536); LF_MUTEX_LOCK(&rti_mutex); - *get_port(fed->fed_netdrv) = server_port; + get_port(fed->fed_netdrv) = server_port; LF_MUTEX_UNLOCK(&rti_mutex); LF_PRINT_LOG("Received address advertisement with port %d from federate %d.", server_port, federate_id); diff --git a/core/federated/clock-sync.c b/core/federated/clock-sync.c index ada5d858e..7e41624d3 100644 --- a/core/federated/clock-sync.c +++ b/core/federated/clock-sync.c @@ -44,6 +44,9 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "net_util.h" #include "util.h" +//TODO: Temp include. +#include "lf_socket_support.h" + /** Offset calculated by the clock synchronization algorithm. */ interval_t _lf_clock_sync_offset = NSEC(0); /** Offset used to test clock synchronization (clock sync should largely remove this offset). */ @@ -212,7 +215,7 @@ uint16_t setup_clock_synchronization_with_rti() { return port_to_return; } -void synchronize_initial_physical_clock_with_rti(int* rti_socket_TCP) { +void synchronize_initial_physical_clock_with_rti(netdrv_t* netdrv_to_rti) { LF_PRINT_DEBUG("Waiting for initial clock synchronization messages from the RTI."); size_t message_size = 1 + sizeof(instant_t); @@ -220,7 +223,7 @@ void synchronize_initial_physical_clock_with_rti(int* rti_socket_TCP) { for (int i=0; i < _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL; i++) { // The first message expected from the RTI is MSG_TYPE_CLOCK_SYNC_T1 - read_from_socket_fail_on_error(rti_socket_TCP, message_size, buffer, NULL, + read_from_netdrv_fail_on_error(netdrv_to_rti, buffer, message_size, NULL, "Federate %d did not get the initial clock synchronization message T1 from the RTI.", _lf_my_fed_id); @@ -234,12 +237,12 @@ void synchronize_initial_physical_clock_with_rti(int* rti_socket_TCP) { // Handle the message and send a reply T3 message. // NOTE: No need to acquire the mutex lock during initialization because only // one thread is running. - if (handle_T1_clock_sync_message(buffer, *rti_socket_TCP, receive_time) != 0) { + if (handle_T1_clock_sync_message(buffer, netdrv_to_rti, receive_time) != 0) { lf_print_error_and_exit("Initial clock sync: Failed to send T3 reply to RTI."); } // Next message from the RTI is required to be MSG_TYPE_CLOCK_SYNC_T4 - read_from_socket_fail_on_error(rti_socket_TCP, message_size, buffer, NULL, + read_from_netdrv_fail_on_error(netdrv_to_rti, buffer, message_size, NULL, "Federate %d did not get the clock synchronization message T4 from the RTI.", _lf_my_fed_id); @@ -249,7 +252,7 @@ void synchronize_initial_physical_clock_with_rti(int* rti_socket_TCP) { } // Handle the message. - handle_T4_clock_sync_message(buffer, *rti_socket_TCP, receive_time); + handle_T4_clock_sync_message(buffer, netdrv_to_rti, receive_time); } LF_PRINT_LOG("Finished initial clock synchronization with the RTI."); @@ -266,7 +269,7 @@ void synchronize_initial_physical_clock_with_rti(int* rti_socket_TCP) { * @param t2 The physical time at which the T1 message was received. * @return 0 if T3 reply is successfully sent, -1 otherwise. */ -int handle_T1_clock_sync_message(unsigned char* buffer, int socket, instant_t t2) { +int handle_T1_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, instant_t t2) { // Extract the payload instant_t t1 = extract_int64(&(buffer[1])); @@ -286,7 +289,7 @@ int handle_T1_clock_sync_message(unsigned char* buffer, int socket, instant_t t2 // Write the reply to the socket. LF_PRINT_DEBUG("Sending T3 message to RTI."); - if (write_to_socket(socket, 1 + sizeof(int), reply_buffer)) { + if (write_to_netdrv(netdrv, 1 + sizeof(int), reply_buffer)) { lf_print_error("Clock sync: Failed to send T3 message to RTI."); return -1; } @@ -314,7 +317,9 @@ int handle_T1_clock_sync_message(unsigned char* buffer, int socket, instant_t t2 * @param socket The socket (either _lf_rti_socket_TCP or _lf_rti_socket_UDP). * @param r4 The physical time at which this T4 message was received. */ -void handle_T4_clock_sync_message(unsigned char* buffer, int socket, instant_t r4) { + +//TODO: DONGHA: Need to check here... +void handle_T4_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, instant_t r4) { // Increment the number of received T4 messages _lf_rti_socket_stat.received_T4_messages_in_current_sync_window++; @@ -350,14 +355,17 @@ void handle_T4_clock_sync_message(unsigned char* buffer, int socket, instant_t r // If the socket is _lf_rti_socket_UDP, then // after sending T4, the RTI sends a "coded probe" message, // which can be used to filter out noise. + + //TODO: DONGHA: CHECK here. + int socket = 0; // Makeshift. if (socket == _lf_rti_socket_UDP) { // Read the coded probe message. // We can reuse the same buffer. - int read_failed = read_from_socket(socket, 1 + sizeof(instant_t), buffer); + int bytes_read = read_from_netdrv(netdrv, buffer, 1 + sizeof(instant_t)); instant_t r5 = lf_time_physical(); - if (read_failed || buffer[0] != MSG_TYPE_CLOCK_SYNC_CODED_PROBE) { + if (bytes_read <= 0 || buffer[0] != MSG_TYPE_CLOCK_SYNC_CODED_PROBE) { lf_print_warning("Clock sync: Did not get the expected coded probe message from the RTI. " "Skipping clock synchronization round."); return; diff --git a/core/federated/federate.c b/core/federated/federate.c index b1233bcb3..f482eb3d4 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -124,7 +124,7 @@ static void send_time(unsigned char type, instant_t time) { tracepoint_federate_to_rti(_fed.trace, send_TIMESTAMP, _lf_my_fed_id, &tag); LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); - write_to_socket_fail_on_error(&_fed.socket_TCP_RTI, bytes_to_write, buffer, &lf_outbound_netdrv_mutex, + write_to_netdrv_fail_on_error(_fed.netdrv_to_rti, bytes_to_write, buffer, &lf_outbound_netdrv_mutex, "Failed to send time " PRINTF_TIME " to the RTI.", time - start_time); LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); } @@ -151,8 +151,8 @@ static void send_tag(unsigned char type, tag_t tag) { trace_event_t event_type = (type == MSG_TYPE_NEXT_EVENT_TAG) ? send_NET : send_LTC; // Trace the event when tracing is enabled tracepoint_federate_to_rti(_fed.trace, event_type, _lf_my_fed_id, &tag); - write_to_socket_fail_on_error( - &_fed.socket_TCP_RTI, bytes_to_write, buffer, &lf_outbound_netdrv_mutex, + write_to_netdrv_fail_on_error( + _fed.netdrv_to_rti, bytes_to_write, buffer, &lf_outbound_netdrv_mutex, "Failed to send tag " PRINTF_TAG " to the RTI.", tag.time - start_time, tag.microstep); LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); } @@ -692,13 +692,7 @@ static int handle_tagged_message(int* socket, int fed_id) { * @param fed_id The sending federate ID or -1 if the centralized coordination. * @return 0 for success, -1 for failure to complete the read. */ -static int handle_port_absent_message(int* socket, int fed_id) { - size_t bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(instant_t) + sizeof(microstep_t); - unsigned char buffer[bytes_to_read]; - if (read_from_socket_close_on_error(socket, bytes_to_read, buffer)) { - return -1; - } - +static int handle_port_absent_message(unsigned char* buffer, int fed_id) { // Extract the header information. unsigned short port_id = extract_uint16(buffer); // The next part of the message is the federate_id, but we don't need it. @@ -759,7 +753,7 @@ static void* listen_to_federates(void* _args) { bool socket_closed = false; // Read one byte to get the message type. LF_PRINT_DEBUG("Waiting for a P2P message on socket %d.", *socket_id); - if (read_from_socket_close_on_error(socket_id, 1, buffer)) { + if (read_from_netdrv_close_on_error(socket_id, buffer, FED_COM_BUFFER_SIZE)) { // Socket has been closed. lf_print("Socket from federate %d is closed.", fed_id); // Stop listening to this federate. @@ -790,7 +784,7 @@ static void* listen_to_federates(void* _args) { break; case MSG_TYPE_PORT_ABSENT: LF_PRINT_LOG("Received port absent message from federate %d.", fed_id); - if (handle_port_absent_message(socket_id, fed_id)) { + if (handle_port_absent_message(buffer + 1, fed_id)) { // P2P tagged messages are only used in decentralized coordination, and // it is not a fatal error if the socket is closed before the whole message is read. // But this thread should exit. @@ -962,7 +956,7 @@ static instant_t get_start_time_from_rti(instant_t my_physical_time) { size_t buffer_length = 1 + sizeof(instant_t); unsigned char buffer[buffer_length]; - read_from_socket_fail_on_error(&_fed.socket_TCP_RTI, buffer_length, buffer, NULL, + read_from_netdrv_fail_on_error(_fed.netdrv_to_rti, buffer, buffer_length, NULL, "Failed to read MSG_TYPE_TIMESTAMP message from RTI."); LF_PRINT_DEBUG("Read 9 bytes."); @@ -1000,15 +994,11 @@ static instant_t get_start_time_from_rti(instant_t my_physical_time) { * @note This function is very similar to handle_provisinal_tag_advance_grant() except that * it sets last_TAG_was_provisional to false. */ -static void handle_tag_advance_grant(void) { +static void handle_tag_advance_grant(unsigned char* buffer) { // Environment is always the one corresponding to the top-level scheduling enclave. environment_t *env; _lf_get_environments(&env); - size_t bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); - unsigned char buffer[bytes_to_read]; - read_from_socket_fail_on_error(&_fed.socket_TCP_RTI, bytes_to_read, buffer, NULL, - "Failed to read tag advance grant from RTI."); tag_t TAG = extract_tag(buffer); // Trace the event when tracing is enabled @@ -1204,15 +1194,10 @@ static void* update_ports_from_staa_offsets(void* args) { * it sets last_TAG_was_provisional to true and also it does not update the * last known tag for input ports. */ -static void handle_provisional_tag_advance_grant() { +static void handle_provisional_tag_advance_grant(unsigned char* buffer) { // Environment is always the one corresponding to the top-level scheduling enclave. environment_t *env; _lf_get_environments(&env); - - size_t bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); - unsigned char buffer[bytes_to_read]; - read_from_socket_fail_on_error(&_fed.socket_TCP_RTI, bytes_to_read, buffer, NULL, - "Failed to read provisional tag advance grant from RTI."); tag_t PTAG = extract_tag(buffer); // Trace the event when tracing is enabled @@ -1306,13 +1291,7 @@ static void handle_provisional_tag_advance_grant() { * logical time raised when lf_request_stop() was * called in the environment for each enclave. */ -static void handle_stop_granted_message() { - - size_t bytes_to_read = MSG_TYPE_STOP_GRANTED_LENGTH - 1; - unsigned char buffer[bytes_to_read]; - read_from_socket_fail_on_error(&_fed.socket_TCP_RTI, bytes_to_read, buffer, NULL, - "Failed to read stop granted from RTI."); - +static void handle_stop_granted_message(unsigned char* buffer) { tag_t received_stop_tag = extract_tag(buffer); // Trace the event when tracing is enabled @@ -1350,11 +1329,7 @@ static void handle_stop_granted_message() { /** * Handle a MSG_TYPE_STOP_REQUEST message from the RTI. */ -static void handle_stop_request_message() { - size_t bytes_to_read = MSG_TYPE_STOP_REQUEST_LENGTH - 1; - unsigned char buffer[bytes_to_read]; - read_from_socket_fail_on_error(&_fed.socket_TCP_RTI, bytes_to_read, buffer, NULL, - "Failed to read stop request from RTI."); +static void handle_stop_request_message(unsigned char* buffer) { tag_t tag_to_stop = extract_tag(buffer); // Trace the event when tracing is enabled @@ -1427,8 +1402,8 @@ static void handle_stop_request_message() { // Send the current logical time to the RTI. LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); - write_to_socket_fail_on_error( - &_fed.socket_TCP_RTI, MSG_TYPE_STOP_REQUEST_REPLY_LENGTH, outgoing_buffer, &lf_outbound_netdrv_mutex, + write_to_netdrv_fail_on_error( + _fed.netdrv_to_rti, MSG_TYPE_STOP_REQUEST_REPLY_LENGTH, outgoing_buffer, &lf_outbound_netdrv_mutex, "Failed to send the answer to MSG_TYPE_STOP_REQUEST to RTI."); LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); @@ -1444,8 +1419,8 @@ static void send_resign_signal(environment_t* env) { unsigned char buffer[bytes_to_write]; buffer[0] = MSG_TYPE_RESIGN; LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); - write_to_socket_fail_on_error( - &_fed.socket_TCP_RTI, bytes_to_write, &(buffer[0]), &lf_outbound_netdrv_mutex, + write_to_netdrv_fail_on_error( + _fed.netdrv_to_rti, bytes_to_write, &(buffer[0]), &lf_outbound_netdrv_mutex, "Failed to send MSG_TYPE_RESIGN."); LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); LF_PRINT_LOG("Resigned."); @@ -1458,8 +1433,8 @@ static void send_failed_signal(environment_t* env) { size_t bytes_to_write = 1; unsigned char buffer[bytes_to_write]; buffer[0] = MSG_TYPE_FAILED; - write_to_socket_fail_on_error( - &_fed.socket_TCP_RTI, bytes_to_write, &(buffer[0]), NULL, + write_to_netdrv_fail_on_error( + _fed.netdrv_to_rti, bytes_to_write, &(buffer[0]), NULL, "Failed to send MSG_TYPE_FAILED."); LF_PRINT_LOG("Failed."); } @@ -1498,36 +1473,34 @@ static void* listen_to_rti_TCP(void* args) { // Listen for messages from the federate. while (1) { - // Check whether the RTI socket is still valid - if (_fed.socket_TCP_RTI < 0) { - lf_print_warning("Socket to the RTI unexpectedly closed."); - return NULL; - } // Read one byte to get the message type. // This will exit if the read fails. - int read_failed = read_from_socket(_fed.socket_TCP_RTI, 1, buffer); - if (read_failed < 0) { - if (errno == ECONNRESET) { - lf_print_error("Socket connection to the RTI was closed by the RTI without" - " properly sending an EOF first. Considering this a soft error."); - // FIXME: If this happens, possibly a new RTI must be elected. - _fed.socket_TCP_RTI = -1; - return NULL; - } else { - lf_print_error("Socket connection to the RTI has been broken with error %d: %s." - " The RTI should close connections with an EOF first." - " Considering this a soft error.", - errno, - strerror(errno)); - // FIXME: If this happens, possibly a new RTI must be elected. - _fed.socket_TCP_RTI = -1; - return NULL; - } - } else if (read_failed > 0) { - // EOF received. - lf_print("Connection to the RTI closed with an EOF."); - _fed.socket_TCP_RTI = -1; - stop_all_traces(); + int bytes_read = read_from_netdrv(_fed.netdrv_to_rti, buffer, FED_COM_BUFFER_SIZE); + // if (read_failed < 0) { + // if (errno == ECONNRESET) { + // lf_print_error("Socket connection to the RTI was closed by the RTI without" + // " properly sending an EOF first. Considering this a soft error."); + // // FIXME: If this happens, possibly a new RTI must be elected. + // _fed.socket_TCP_RTI = -1; + // return NULL; + // } else { + // lf_print_error("Socket connection to the RTI has been broken with error %d: %s." + // " The RTI should close connections with an EOF first." + // " Considering this a soft error.", + // errno, + // strerror(errno)); + // // FIXME: If this happens, possibly a new RTI must be elected. + // _fed.socket_TCP_RTI = -1; + // return NULL; + // } + // } else if (read_failed > 0) { + // // EOF received. + // lf_print("Connection to the RTI closed with an EOF."); + // _fed.socket_TCP_RTI = -1; + // stop_all_traces(); + // return NULL; + // } + if (bytes_read <= 0) { return NULL; } switch (buffer[0]) { @@ -1538,19 +1511,19 @@ static void* listen_to_rti_TCP(void* args) { } break; case MSG_TYPE_TAG_ADVANCE_GRANT: - handle_tag_advance_grant(); + handle_tag_advance_grant(buffer + 1); break; case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: - handle_provisional_tag_advance_grant(); + handle_provisional_tag_advance_grant(buffer + 1); break; case MSG_TYPE_STOP_REQUEST: - handle_stop_request_message(); + handle_stop_request_message(buffer + 1); break; case MSG_TYPE_STOP_GRANTED: - handle_stop_granted_message(); + handle_stop_granted_message(buffer + 1); break; case MSG_TYPE_PORT_ABSENT: - if (handle_port_absent_message(&_fed.socket_TCP_RTI, -1)) { + if (handle_port_absent_message(buffer + 1, -1)) { // Failures to complete the read of absent messages from the RTI are fatal. lf_print_error_and_exit("Failed to complete the reading of an absent message from the RTI."); } @@ -1684,7 +1657,7 @@ void terminate_execution(environment_t* env) { LF_PRINT_DEBUG("Waiting for RTI's socket listener threads."); // Wait for the thread listening for messages from the RTI to close. - lf_thread_join(_fed.RTI_socket_listener, NULL); + lf_thread_join(_fed.RTI_netdrv_listener, NULL); // For abnormal termination, there is no need to free memory. if (_lf_normal_termination) { @@ -2272,15 +2245,16 @@ int lf_send_message(int message_type, // Use a mutex lock to prevent multiple threads from simultaneously sending. LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); - int* socket = &_fed.sockets_for_outbound_p2p_connections[federate]; + netdrv_t* netdrv = _fed.netdrv_for_outbound_p2p_connections[federate]; // Trace the event when tracing is enabled tracepoint_federate_to_federate(_fed.trace, send_P2P_MSG, _lf_my_fed_id, federate, NULL); - int result = write_to_socket_close_on_error(socket, header_length, header_buffer); + //TODO: Need to fix in future. + int result = write_to_netdrv_close_on_error(netdrv, header_length, header_buffer); if (result == 0) { // Header sent successfully. Send the body. - result = write_to_socket_close_on_error(socket, length, message); + result = write_to_netdrv_close_on_error(netdrv, length, message); } if (result != 0) { // Message did not send. Since this is used for physical connections, this is not critical. @@ -2461,13 +2435,13 @@ void lf_send_port_absent_to_federate( #ifdef FEDERATED_CENTRALIZED // Send the absent message through the RTI - int* socket = &_fed.socket_TCP_RTI; + netdrv_t* netdrv = _fed.netdrv_to_rti; #else // Send the absent message directly to the federate - int* socket = &_fed.sockets_for_outbound_p2p_connections[fed_ID]; + netdrv_t* netdrv = _fed.netdrv_for_outbound_p2p_connections[fed_ID]; #endif - if (socket == &_fed.socket_TCP_RTI) { + if (netdrv == _fed.netdrv_to_rti) { tracepoint_federate_to_rti( _fed.trace, send_PORT_ABS, _lf_my_fed_id, ¤t_message_intended_tag); } else { @@ -2476,12 +2450,12 @@ void lf_send_port_absent_to_federate( } LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); - int result = write_to_socket_close_on_error(socket, message_length, buffer); + int result = write_to_netdrv_close_on_error(netdrv, message_length, buffer); LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); if (result != 0) { // Write failed. Response depends on whether coordination is centralized. - if (socket == &_fed.socket_TCP_RTI) { + if (netdrv == _fed.netdrv_to_rti) { // Centralized coordination. This is a critical error. lf_print_error_system_failure("Failed to send port absent message for port %hu to federate %hu.", port_ID, fed_ID); @@ -2516,7 +2490,7 @@ int lf_send_stop_request_to_rti(tag_t stop_tag) { // Trace the event when tracing is enabled tracepoint_federate_to_rti(_fed.trace, send_STOP_REQ, _lf_my_fed_id, &stop_tag); - write_to_socket_fail_on_error(&_fed.socket_TCP_RTI, MSG_TYPE_STOP_REQUEST_LENGTH, + write_to_netdrv_fail_on_error(_fed.netdrv_to_rti, MSG_TYPE_STOP_REQUEST_LENGTH, buffer, &lf_outbound_netdrv_mutex, "Failed to send stop time " PRINTF_TIME " to the RTI.", stop_tag.time - start_time); @@ -2654,7 +2628,7 @@ void lf_synchronize_with_other_federates(void) { // @note Up until this point, the federate has been listening for messages // from the RTI in a sequential manner in the main thread. From now on, a // separate thread is created to allow for asynchronous communication. - lf_thread_create(&_fed.RTI_socket_listener, listen_to_rti_TCP, NULL); + lf_thread_create(&_fed.RTI_netdrv_listener, listen_to_rti_TCP, NULL); lf_thread_t thread_id; if (create_clock_sync_thread(&thread_id)) { lf_print_warning("Failed to create thread to handle clock synchronization."); diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 21ed0b36d..f538394ed 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -31,13 +31,13 @@ char* get_host_name(netdrv_t *drv) { socket_priv_t *priv = get_priv(drv); return priv->server_hostname; } -int32_t* get_my_port(netdrv_t *drv) { +int32_t get_my_port(netdrv_t *drv) { socket_priv_t *priv = get_priv(drv); - return &priv->port; + return priv->port; } -int32_t* get_port(netdrv_t *drv) { +int32_t get_port(netdrv_t *drv) { socket_priv_t *priv = get_priv(drv); - return &priv->server_port; + return priv->server_port; } struct in_addr* get_ip_addr(netdrv_t *drv) { socket_priv_t *priv = get_priv(drv); @@ -626,12 +626,14 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); *state = FINISH_READ; break; - // case MSG_TYPE_TAG_ADVANCE_GRANT: - // handle_tag_advance_grant(); - // break; - // case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: - // handle_provisional_tag_advance_grant(); - // break; + case MSG_TYPE_TAG_ADVANCE_GRANT: + *bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); + *state = FINISH_READ; + break; + case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: + *bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); + *state = FINISH_READ; + break; case MSG_TYPE_LATEST_TAG_COMPLETE: *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); *state = FINISH_READ; @@ -644,9 +646,10 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* *bytes_to_read = MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1; *state = FINISH_READ; break; - // case MSG_TYPE_STOP_GRANTED: - // handle_stop_granted_message(); - // break; + case MSG_TYPE_STOP_GRANTED: + *bytes_to_read = MSG_TYPE_STOP_GRANTED_LENGTH - 1; + *state = FINISH_READ; + break; case MSG_TYPE_ADDRESS_QUERY: *bytes_to_read = sizeof(uint16_t); *state = FINISH_READ; @@ -675,14 +678,18 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* // socket_closed = true; // } // break; - // case MSG_TYPE_CLOCK_SYNC_T1: - // break; + case MSG_TYPE_CLOCK_SYNC_T1: + *bytes_to_read = sizeof(instant_t); + *state = FINISH_READ; + break; case MSG_TYPE_CLOCK_SYNC_T3: *bytes_to_read = sizeof(int32_t); *state = FINISH_READ; break; - // case MSG_TYPE_CLOCK_SYNC_T4: - // break; + case MSG_TYPE_CLOCK_SYNC_T4: + *bytes_to_read = sizeof(instant_t); + *state = FINISH_READ; + break; // case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: // break; case MSG_TYPE_PORT_ABSENT: diff --git a/include/core/federated/clock-sync.h b/include/core/federated/clock-sync.h index 8fd1886f5..967817a5e 100644 --- a/include/core/federated/clock-sync.h +++ b/include/core/federated/clock-sync.h @@ -34,6 +34,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define CLOCK_SYNC_H #include "platform.h" +#include "net_util.h" /** * Number of required clock sync T4 messages per synchronization @@ -151,7 +152,7 @@ uint16_t setup_clock_synchronization_with_rti(void); * * @param rti_socket_TCP Pointer to the RTI's socket */ -void synchronize_initial_physical_clock_with_rti(int* rti_socket_TCP); +void synchronize_initial_physical_clock_with_rti(netdrv_t* netdrv_to_rti); /** * Handle a clock synchroninzation message T1 coming from the RTI. @@ -164,7 +165,7 @@ void synchronize_initial_physical_clock_with_rti(int* rti_socket_TCP); * @param t2 The physical time at which the T1 message was received. * @return 0 if T3 reply is successfully sent, -1 otherwise. */ -int handle_T1_clock_sync_message(unsigned char* buffer, int socket, instant_t t2); +int handle_T1_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, instant_t t2); /** * Handle a clock synchronization message T4 coming from the RTI. @@ -182,7 +183,7 @@ int handle_T1_clock_sync_message(unsigned char* buffer, int socket, instant_t t2 * @param socket The socket (either _lf_rti_socket_TCP or _lf_rti_socket_UDP). * @param r4 The physical time at which this T4 message was received. */ -void handle_T4_clock_sync_message(unsigned char* buffer, int socket, instant_t r4); +void handle_T4_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, instant_t r4); /** * Thread that listens for UDP inputs from the RTI. diff --git a/include/core/federated/federate.h b/include/core/federated/federate.h index ea5c4b26f..38e92f5bc 100644 --- a/include/core/federated/federate.h +++ b/include/core/federated/federate.h @@ -48,7 +48,7 @@ typedef struct federate_instance_t { /** * Thread listening for incoming TCP messages from the RTI. */ - lf_thread_t RTI_socket_listener; + lf_thread_t RTI_netdrv_listener; /** * Number of inbound physical connections to the federate. diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index a77ad54de..243ecc224 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -66,8 +66,8 @@ typedef struct socket_priv_t { } socket_priv_t; char* get_host_name(netdrv_t *drv); -int32_t* get_my_port(netdrv_t *drv); -int32_t* get_port(netdrv_t *drv); +int32_t get_my_port(netdrv_t *drv); +int32_t get_port(netdrv_t *drv); struct in_addr* get_ip_addr(netdrv_t *drv); void set_host_name(netdrv_t *drv, const char* hostname); From 9569c9689ae29e5d5b0cbe2ac10dcd7eab133f8a Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 18 Feb 2024 18:49:51 -0700 Subject: [PATCH 070/262] Fix federate's p2p tagged message and similiar messages --- core/federated/RTI/main.c | 4 +- core/federated/RTI/rti_remote.c | 26 +-- core/federated/RTI/rti_remote.h | 2 +- core/federated/clock-sync.c | 2 +- core/federated/federate.c | 175 +++++++++++---------- core/federated/network/lf_socket_support.c | 38 ++--- core/federated/network/net_util.c | 2 +- include/core/federated/network/net_util.h | 2 +- 8 files changed, 123 insertions(+), 128 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index 0c9196132..c37360cfc 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -81,8 +81,8 @@ static void send_failed_signal(federate_info_t* fed) { if (rti.base.tracing_enabled) { tracepoint_rti_to_federate(rti.base.trace, send_FAILED, fed->enclave.id, NULL); } - int failed = write_to_netdrv(fed->fed_netdrv, bytes_to_write, &(buffer[0])); - if (failed == 0) { + int bytes_written = write_to_netdrv(fed->fed_netdrv, bytes_to_write, &(buffer[0])); + if (bytes_written > 0) { LF_PRINT_LOG("RTI has sent failed signal to federate %d due to abnormal termination.", fed->enclave.id); } else { lf_print_error("RTI failed to send failed signal to federate %d on socket ID %d.", fed->enclave.id, fed->socket); diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 4b3210581..93a69288a 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -80,7 +80,7 @@ void notify_tag_advance_grant(scheduling_node_t *e, tag_t tag) { // This function is called in notify_advance_grant_if_safe(), which is a long // function. During this call, the socket might close, causing the following write_to_socket // to fail. Consider a failure here a soft failure and update the federate's status. - if (write_to_netdrv(((federate_info_t *)e)->fed_netdrv, message_length, buffer)) { + if (write_to_netdrv(((federate_info_t *)e)->fed_netdrv, message_length, buffer) <= 0) { lf_print_error("RTI failed to send tag advance grant to federate %d.", e->id); e->state = NOT_CONNECTED; } else { @@ -114,7 +114,7 @@ void notify_provisional_tag_advance_grant(scheduling_node_t *e, tag_t tag) { // This function is called in notify_advance_grant_if_safe(), which is a long // function. During this call, the socket might close, causing the following write_to_socket // to fail. Consider a failure here a soft failure and update the federate's status. - if (write_to_netdrv(((federate_info_t *)e)->fed_netdrv, message_length, buffer)) { + if (write_to_netdrv(((federate_info_t *)e)->fed_netdrv, message_length, buffer) <= 0) { lf_print_error("RTI failed to send tag advance grant to federate %d.", e->id); e->state = NOT_CONNECTED; } else { @@ -220,7 +220,7 @@ void handle_port_absent_message(federate_info_t *sending_federate, unsigned char LF_MUTEX_UNLOCK(&rti_mutex); } -void handle_timed_message(federate_info_t *sending_federate, unsigned char *buffer, size_t buffer_length) { +void handle_timed_message(federate_info_t *sending_federate, unsigned char *buffer, size_t buffer_length, ssize_t bytes_read) { size_t header_size = 1 + sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); // Extract the header information. of the sender @@ -301,12 +301,12 @@ void handle_timed_message(federate_info_t *sending_federate, unsigned char *buff tracepoint_rti_to_federate(rti_remote->base.trace, send_TAGGED_MSG, federate_id, &intended_tag); } - write_to_netdrv_fail_on_error(fed->fed_netdrv, length + header_size, buffer, &rti_mutex, + write_to_netdrv_fail_on_error(fed->fed_netdrv, bytes_read, buffer, &rti_mutex, "RTI failed to forward message to federate %d.", federate_id); while (sending_federate->fed_netdrv->read_remaining_bytes > 0) { - ssize_t num_bytes = read_from_netdrv(sending_federate->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); - write_to_netdrv_fail_on_error(fed->fed_netdrv, num_bytes, buffer, &rti_mutex, + ssize_t bytes_read_again = read_from_netdrv(sending_federate->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); + write_to_netdrv_fail_on_error(fed->fed_netdrv, bytes_read_again, buffer, &rti_mutex, "RTI failed to forward message to federate %d.", federate_id); } @@ -637,7 +637,7 @@ void handle_address_ad(uint16_t federate_id, unsigned char *buffer) { assert(server_port < 65536); LF_MUTEX_LOCK(&rti_mutex); - get_port(fed->fed_netdrv) = server_port; + set_port(fed->fed_netdrv, server_port); LF_MUTEX_UNLOCK(&rti_mutex); LF_PRINT_LOG("Received address advertisement with port %d from federate %d.", server_port, federate_id); @@ -685,7 +685,7 @@ void handle_timestamp(federate_info_t *my_fed, unsigned char *buffer) { tag_t tag = {.time = start_time, .microstep = 0}; tracepoint_rti_to_federate(rti_remote->base.trace, send_TIMESTAMP, my_fed->enclave.id, &tag); } - if (write_to_netdrv(my_fed->fed_netdrv, MSG_TYPE_TIMESTAMP_LENGTH, start_time_buffer)) { + if (write_to_netdrv(my_fed->fed_netdrv, MSG_TYPE_TIMESTAMP_LENGTH, start_time_buffer) <= 0) { lf_print_error("Failed to send the starting time to federate %d.", my_fed->enclave.id); } @@ -975,7 +975,7 @@ void *federate_info_thread_TCP(void *fed) { handle_address_ad(my_fed->enclave.id, buffer + 1); break; case MSG_TYPE_TAGGED_MESSAGE: - handle_timed_message(my_fed, buffer, FED_COM_BUFFER_SIZE); + handle_timed_message(my_fed, buffer, FED_COM_BUFFER_SIZE, bytes_read); break; case MSG_TYPE_RESIGN: handle_federate_resign(my_fed); @@ -1020,7 +1020,7 @@ void send_reject(netdrv_t *netdrv, unsigned char error_code) { response[1] = error_code; LF_MUTEX_LOCK(&rti_mutex); // NOTE: Ignore errors on this response. - if (write_to_netdrv(netdrv, 2, response)) { + if (write_to_netdrv(netdrv, 2, response) <= 0) { lf_print_warning("RTI failed to write MSG_TYPE_REJECT message on the socket."); } // Shutdown and close the netdrv. @@ -1145,7 +1145,7 @@ static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { tracepoint_rti_to_federate(rti_remote->base.trace, send_ACK, fed_id, NULL); } LF_MUTEX_LOCK(&rti_mutex); - if (write_to_netdrv_close_on_error(netdrv, 1, &ack_message)) { + if (write_to_netdrv_close_on_error(netdrv, 1, &ack_message) <= 0) { LF_MUTEX_UNLOCK(&rti_mutex); lf_print_error("RTI failed to write MSG_TYPE_ACK message to federate %d.", fed_id); return -1; @@ -1360,7 +1360,7 @@ static bool authenticate_federate(netdrv_t *fed_netdrv) { RAND_bytes(rti_nonce, NONCE_LENGTH); memcpy(&sender[1], rti_nonce, NONCE_LENGTH); memcpy(&sender[1 + NONCE_LENGTH], hmac_tag, hmac_length); - if (write_to_netdrv(fed_netdrv, 1 + NONCE_LENGTH + hmac_length, sender)) { + if (write_to_netdrv(fed_netdrv, 1 + NONCE_LENGTH + hmac_length, sender) <= 0) { lf_print_error("Failed to send nonce to federate."); } @@ -1472,7 +1472,7 @@ void *respond_to_erroneous_connections(void *nothing) { response[0] = MSG_TYPE_REJECT; response[1] = FEDERATION_ID_DOES_NOT_MATCH; // Ignore errors on this response. - if (write_to_netdrv(fed_netdrv, 2, response)) { + if (write_to_netdrv(fed_netdrv, 2, response) <= 0) { lf_print_warning("RTI failed to write FEDERATION_ID_DOES_NOT_MATCH to erroneous incoming connection."); } // Close the netdriver. diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 3fce292d6..9344fc771 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -237,7 +237,7 @@ void handle_port_absent_message(federate_info_t* sending_federate, unsigned char * @param sending_federate The sending federate. * @param buffer The buffer to read into (the first byte is already there). */ -void handle_timed_message(federate_info_t* sending_federate, unsigned char* buffer, size_t buffer_length); +void handle_timed_message(federate_info_t *sending_federate, unsigned char *buffer, size_t buffer_length, ssize_t bytes_read); /** * Handle a latest tag complete (LTC) message. @see diff --git a/core/federated/clock-sync.c b/core/federated/clock-sync.c index 7e41624d3..bb39c7891 100644 --- a/core/federated/clock-sync.c +++ b/core/federated/clock-sync.c @@ -289,7 +289,7 @@ int handle_T1_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, instan // Write the reply to the socket. LF_PRINT_DEBUG("Sending T3 message to RTI."); - if (write_to_netdrv(netdrv, 1 + sizeof(int), reply_buffer)) { + if (write_to_netdrv(netdrv, 1 + sizeof(int), reply_buffer) <= 0) { lf_print_error("Clock sync: Failed to send T3 message to RTI."); return -1; } diff --git a/core/federated/federate.c b/core/federated/federate.c index f482eb3d4..0295037e2 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -401,21 +401,23 @@ static trigger_handle_t schedule_message_received_from_network_locked( * federate. * @param flag 0 if an EOF was received, -1 if a socket error occurred, 1 otherwise. */ -static void close_inbound_socket(int fed_id, int flag) { - LF_MUTEX_LOCK(&socket_mutex); - if (_fed.sockets_for_inbound_p2p_connections[fed_id] >= 0) { - if (flag >= 0) { - if (flag > 0) { - shutdown(_fed.sockets_for_inbound_p2p_connections[fed_id], SHUT_RDWR); - } else { - // Have received EOF from the other end. Send EOF to the other end. - shutdown(_fed.sockets_for_inbound_p2p_connections[fed_id], SHUT_WR); - } - } - close(_fed.sockets_for_inbound_p2p_connections[fed_id]); - _fed.sockets_for_inbound_p2p_connections[fed_id] = -1; +static void close_inbound_netdrv(int fed_id, int flag) { + LF_MUTEX_LOCK(&netdrv_mutex); + if (_fed.netdrv_for_inbound_p2p_connections[fed_id] != NULL) { + // if (flag >= 0) { + // if (flag > 0) { + // shutdown(_fed.sockets_for_inbound_p2p_connections[fed_id], SHUT_RDWR); + // } else { + // // Have received EOF from the other end. Send EOF to the other end. + // shutdown(_fed.sockets_for_inbound_p2p_connections[fed_id], SHUT_WR); + // } + // } + // close(_fed.sockets_for_inbound_p2p_connections[fed_id]); + // _fed.sockets_for_inbound_p2p_connections[fed_id] = -1; + _fed.netdrv_for_inbound_p2p_connections[fed_id]->close(_fed.netdrv_for_inbound_p2p_connections[fed_id]); + _fed.netdrv_for_inbound_p2p_connections[fed_id] = NULL; } - LF_MUTEX_UNLOCK(&socket_mutex); + LF_MUTEX_UNLOCK(&netdrv_mutex); } /** @@ -471,15 +473,7 @@ static bool handle_message_now(environment_t* env, trigger_t* trigger, tag_t int * @param fed_id The sending federate ID or -1 if the centralized coordination. * @return 0 for success, -1 for failure. */ -static int handle_message(int* socket, int fed_id) { - // Read the header. - size_t bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); - unsigned char buffer[bytes_to_read]; - if (read_from_socket_close_on_error(socket, bytes_to_read, buffer)) { - // Read failed, which means the socket has been closed between reading the - // message ID byte and here. - return -1; - } +static int handle_message(netdrv_t* netdrv, int fed_id, unsigned char* buffer, ssize_t bytes_read) { // Extract the header information. unsigned short port_id; @@ -496,8 +490,14 @@ static int handle_message(int* socket, int fed_id) { // Read the payload. // Allocate memory for the message contents. unsigned char* message_contents = (unsigned char*)malloc(length); - if (read_from_socket_close_on_error(socket, length, message_contents)) { - return -1; + memcpy(message_contents, buffer, bytes_read); + int buf_count = bytes_read; + while(netdrv->read_remaining_bytes > 0) { + ssize_t bytes_read_again = read_from_netdrv_close_on_error(netdrv, message_contents + buf_count, length - buf_count); + if (bytes_read_again <= 0) { + return -1; + } + buf_count += bytes_read_again; } // Trace the event when tracing is enabled tracepoint_federate_from_federate(_fed.trace, receive_P2P_MSG, _lf_my_fed_id, federate_id, NULL); @@ -524,19 +524,11 @@ static int handle_message(int* socket, int fed_id) { * @param fed_id The sending federate ID or -1 if the centralized coordination. * @return 0 on successfully reading the message, -1 on failure (e.g. due to socket closed). */ -static int handle_tagged_message(int* socket, int fed_id) { +static int handle_tagged_message(netdrv_t* netdrv, int fed_id, unsigned char* buffer, ssize_t bytes_read) { // Environment is always the one corresponding to the top-level scheduling enclave. environment_t *env; _lf_get_environments(&env); - // Read the header which contains the timestamp. - size_t bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) - + sizeof(instant_t) + sizeof(microstep_t); - unsigned char buffer[bytes_to_read]; - if (read_from_socket_close_on_error(socket, bytes_to_read, buffer)) { - return -1; // Read failed. - } - // Extract the header information. unsigned short port_id; unsigned short federate_id; @@ -582,11 +574,17 @@ static int handle_tagged_message(int* socket, int fed_id) { // Read the payload. // Allocate memory for the message contents. unsigned char* message_contents = (unsigned char*)malloc(length); - if (read_from_socket_close_on_error(socket, length, message_contents)) { + memcpy(message_contents, buffer, bytes_read); + int buf_count = bytes_read; + while(netdrv->read_remaining_bytes > 0) { + ssize_t bytes_read_again = read_from_netdrv_close_on_error(netdrv, message_contents + buf_count, length - buf_count); + if (bytes_read_again <= 0) { #ifdef FEDERATED_DECENTRALIZED - _lf_decrement_tag_barrier_locked(env); + _lf_decrement_tag_barrier_locked(env); #endif - return -1; // Read failed. + return -1; + } + buf_count += bytes_read_again; } // The following is only valid for string messages. @@ -659,7 +657,7 @@ static int handle_tagged_message(int* socket, int fed_id) { env->current_tag.time - start_time, env->current_tag.microstep, intended_tag.time - start_time, intended_tag.microstep); // Close socket, reading any incoming data and discarding it. - close_inbound_socket(fed_id, 1); + close_inbound_netdrv(fed_id, 1); } else { // Need to use intended_tag here, not actual_tag, so that STP violations are detected. // It will become actual_tag (that is when the reactions will be invoked). @@ -741,7 +739,8 @@ static void* listen_to_federates(void* _args) { LF_PRINT_LOG("Listening to federate %d.", fed_id); - int* socket_id = &_fed.sockets_for_inbound_p2p_connections[fed_id]; + // int* socket_id = &_fed.sockets_for_inbound_p2p_connections[fed_id]; + netdrv_t* netdrv = _fed.netdrv_for_inbound_p2p_connections[fed_id]; // Buffer for incoming messages. // This does not constrain the message size @@ -752,21 +751,21 @@ static void* listen_to_federates(void* _args) { while (1) { bool socket_closed = false; // Read one byte to get the message type. - LF_PRINT_DEBUG("Waiting for a P2P message on socket %d.", *socket_id); - if (read_from_netdrv_close_on_error(socket_id, buffer, FED_COM_BUFFER_SIZE)) { + LF_PRINT_DEBUG("Waiting for a P2P message on netdrv"); + ssize_t bytes_read = read_from_netdrv_close_on_error(netdrv, buffer, FED_COM_BUFFER_SIZE); + if (bytes_read <= 0) { // Socket has been closed. lf_print("Socket from federate %d is closed.", fed_id); // Stop listening to this federate. socket_closed = true; break; } - LF_PRINT_DEBUG("Received a P2P message on socket %d of type %d.", - *socket_id, buffer[0]); + LF_PRINT_DEBUG("Received a P2P message on netdrv of type %d.", buffer[0]); bool bad_message = false; switch (buffer[0]) { case MSG_TYPE_P2P_MESSAGE: LF_PRINT_LOG("Received untimed message from federate %d.", fed_id); - if (handle_message(socket_id, fed_id)) { + if (handle_message(netdrv, fed_id, buffer + 1, bytes_read - 1)) { // Failed to complete the reading of a message on a physical connection. lf_print_warning("Failed to complete reading of message on physical connection."); socket_closed = true; @@ -774,7 +773,7 @@ static void* listen_to_federates(void* _args) { break; case MSG_TYPE_P2P_TAGGED_MESSAGE: LF_PRINT_LOG("Received tagged message from federate %d.", fed_id); - if (handle_tagged_message(socket_id, fed_id)) { + if (handle_tagged_message(netdrv, fed_id, buffer + 1, bytes_read - 1)) { // P2P tagged messages are only used in decentralized coordination, and // it is not a fatal error if the socket is closed before the whole message is read. // But this thread should exit. @@ -823,27 +822,30 @@ static void* listen_to_federates(void* _args) { * federate, or -1 if the RTI (centralized coordination). * @param flag 0 if the socket has received EOF, 1 if not, -1 if abnormal termination. */ -static void close_outbound_socket(int fed_id, int flag) { +//TODO: DONGHA: NEED TO FIX +static void close_outbound_netdrv(int fed_id, int flag) { assert (fed_id >= 0 && fed_id < NUMBER_OF_FEDERATES); if (_lf_normal_termination) { LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); } - if (_fed.sockets_for_outbound_p2p_connections[fed_id] >= 0) { - // Close the socket by sending a FIN packet indicating that no further writes - // are expected. Then read until we get an EOF indication. - if (flag >= 0) { - // SHUT_WR indicates no further outgoing messages. - shutdown(_fed.sockets_for_outbound_p2p_connections[fed_id], SHUT_WR); - if (flag > 0) { - // Have not received EOF yet. read until we get an EOF or error indication. - // This compensates for delayed ACKs and disabling of Nagles algorithm - // by delaying exiting until the shutdown is complete. - unsigned char message[32]; - while (read(_fed.sockets_for_outbound_p2p_connections[fed_id], &message, 32) > 0); - } - } - close(_fed.sockets_for_outbound_p2p_connections[fed_id]); - _fed.sockets_for_outbound_p2p_connections[fed_id] = -1; + if (_fed.netdrv_for_outbound_p2p_connections[fed_id] != NULL) { + // // Close the socket by sending a FIN packet indicating that no further writes + // // are expected. Then read until we get an EOF indication. + // if (flag >= 0) { + // // SHUT_WR indicates no further outgoing messages. + // shutdown(_fed.sockets_for_outbound_p2p_connections[fed_id], SHUT_WR); + // if (flag > 0) { + // // Have not received EOF yet. read until we get an EOF or error indication. + // // This compensates for delayed ACKs and disabling of Nagles algorithm + // // by delaying exiting until the shutdown is complete. + // unsigned char message[32]; + // while (read(_fed.sockets_for_outbound_p2p_connections[fed_id], &message, 32) > 0); + // } + // } + // close(_fed.sockets_for_outbound_p2p_connections[fed_id]); + // _fed.sockets_for_outbound_p2p_connections[fed_id] = -1; + _fed.netdrv_for_outbound_p2p_connections[fed_id]->close(_fed.netdrv_for_outbound_p2p_connections[fed_id]); + _fed.netdrv_for_outbound_p2p_connections[fed_id] = NULL; } if (_lf_normal_termination) { LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); @@ -1505,7 +1507,7 @@ static void* listen_to_rti_TCP(void* args) { } switch (buffer[0]) { case MSG_TYPE_TAGGED_MESSAGE: - if (handle_tagged_message(&_fed.socket_TCP_RTI, -1)) { + if (handle_tagged_message(_fed.netdrv_to_rti, -1, buffer + 1, bytes_read - 1)) { // Failures to complete the read of messages from the RTI are fatal. lf_print_error_and_exit("Failed to complete the reading of a message from the RTI."); } @@ -1626,7 +1628,7 @@ void terminate_execution(environment_t* env) { LF_PRINT_DEBUG("Closing incoming P2P sockets."); // Close any incoming P2P sockets that are still open. for (int i=0; i < NUMBER_OF_FEDERATES; i++) { - close_inbound_socket(i, 1); + close_inbound_netdrv(i, 1); // Ignore errors. Mark the socket closed. _fed.sockets_for_inbound_p2p_connections[i] = -1; } @@ -1641,7 +1643,7 @@ void terminate_execution(environment_t* env) { // This will result in EOF being sent to the remote federate, except for // abnormal termination, in which case it will just close the socket. int flag = _lf_normal_termination? 1 : -1; - close_outbound_socket(i, flag); + close_outbound_netdrv(i, flag); } LF_PRINT_DEBUG("Waiting for inbound p2p socket listener threads."); @@ -1916,7 +1918,7 @@ void lf_connect_to_rti(const char* hostname, int port) { tracepoint_federate_to_rti(_fed.trace, send_FED_ID, _lf_my_fed_id, NULL); // No need for a mutex here because no other threads are writing to this socket. - if (write_to_netdrv(_fed.netdrv_to_rti, 2 + sizeof(uint16_t) + federation_id_length, buffer)) { + if (write_to_netdrv(_fed.netdrv_to_rti, 2 + sizeof(uint16_t) + federation_id_length, buffer) <= 0) { continue; // Try again, possibly on a new port. } free(buffer); @@ -2102,7 +2104,7 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { tracepoint_federate_to_federate(_fed.trace, receive_FED_ID, _lf_my_fed_id, remote_fed_id, NULL); // Once we record the socket_id here, all future calls to close() on - // the socket should be done while holding the socket_mutex, and this array + // the socket should be done while holding the netdrv_mutex, and this array // element should be reset to -1 during that critical section. // Otherwise, there can be race condition where, during termination, // two threads attempt to simultaneously close the socket. @@ -2132,12 +2134,12 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { fed_id_arg); if (result != 0) { // Failed to create a listening thread. - LF_MUTEX_LOCK(&socket_mutex); + LF_MUTEX_LOCK(&netdrv_mutex); if (_fed.netdrv_for_inbound_p2p_connections[remote_fed_id] != NULL) { _fed.netdrv_for_inbound_p2p_connections[remote_fed_id]->close(_fed.netdrv_for_inbound_p2p_connections[remote_fed_id]); _fed.netdrv_for_inbound_p2p_connections[remote_fed_id] = NULL; } - LF_MUTEX_UNLOCK(&socket_mutex); + LF_MUTEX_UNLOCK(&netdrv_mutex); lf_print_error_and_exit( "Failed to create a thread to listen for incoming physical connection. Error code: %d.", result @@ -2250,18 +2252,19 @@ int lf_send_message(int message_type, // Trace the event when tracing is enabled tracepoint_federate_to_federate(_fed.trace, send_P2P_MSG, _lf_my_fed_id, federate, NULL); - //TODO: Need to fix in future. - int result = write_to_netdrv_close_on_error(netdrv, header_length, header_buffer); - if (result == 0) { + //TODO: DONGHA: Need to fix in future. + int bytes_written = write_to_netdrv_close_on_error(netdrv, header_length, header_buffer); + if (bytes_written > 0) { // Header sent successfully. Send the body. - result = write_to_netdrv_close_on_error(netdrv, length, message); + bytes_written = write_to_netdrv_close_on_error(netdrv, length, message); } - if (result != 0) { + if (bytes_written <= 0) { // Message did not send. Since this is used for physical connections, this is not critical. lf_print_warning("Failed to send message to %s. Dropping the message.", next_destination_str); } LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); - return result; + // TODO: DONGHA: Check result! + return bytes_written; } tag_t lf_send_next_event_tag(environment_t* env, tag_t tag, bool wait_for_reply) { @@ -2450,10 +2453,10 @@ void lf_send_port_absent_to_federate( } LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); - int result = write_to_netdrv_close_on_error(netdrv, message_length, buffer); + int bytes_written = write_to_netdrv_close_on_error(netdrv, message_length, buffer); LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); - if (result != 0) { + if (bytes_written <= 0) { // Write failed. Response depends on whether coordination is centralized. if (netdrv == _fed.netdrv_to_rti) { // Centralized coordination. This is a critical error. @@ -2564,21 +2567,22 @@ int lf_send_tagged_message(environment_t* env, // Use a mutex lock to prevent multiple threads from simultaneously sending. LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); - int* socket; + netdrv_t* netdrv; + // int* socket; if (message_type == MSG_TYPE_P2P_TAGGED_MESSAGE) { - socket = &_fed.sockets_for_outbound_p2p_connections[federate]; + netdrv = _fed.netdrv_for_outbound_p2p_connections[federate]; tracepoint_federate_to_federate(_fed.trace, send_P2P_TAGGED_MSG, _lf_my_fed_id, federate, ¤t_message_intended_tag); } else { - socket = &_fed.socket_TCP_RTI; + netdrv = _fed.netdrv_to_rti; tracepoint_federate_to_rti(_fed.trace, send_TAGGED_MSG, _lf_my_fed_id, ¤t_message_intended_tag); } - int result = write_to_socket_close_on_error(socket, header_length, header_buffer); - if (result == 0) { + int bytes_written = write_to_netdrv_close_on_error(netdrv, header_length, header_buffer); + if (bytes_written > 0) { // Header sent successfully. Send the body. - result = write_to_socket_close_on_error(socket, length, message); + bytes_written = write_to_netdrv_close_on_error(netdrv, length, message); } - if (result != 0) { + if (bytes_written <= 0) { // Message did not send. Handling depends on message type. if (message_type == MSG_TYPE_P2P_TAGGED_MESSAGE) { lf_print_warning("Failed to send message to %s. Dropping the message.", next_destination_str); @@ -2588,7 +2592,8 @@ int lf_send_tagged_message(environment_t* env, } } LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); - return result; + //TODO: Check result + return bytes_written; } void lf_set_federation_id(const char* fid) { diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index f538394ed..9272db659 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -503,20 +503,20 @@ int write_to_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { } bytes_written += more; } - return 0; + return bytes_written; } int write_to_netdrv_close_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { socket_priv_t *priv = get_priv(drv); assert(&priv->socket_descriptor); - int result = write_to_netdrv(drv, num_bytes, buffer); - if (result) { + int bytes_written = write_to_netdrv(drv, num_bytes, buffer); + if (bytes_written <= 0) { // Write failed. // Netdrv has probably been closed from the other side. // Shut down and close the netdrv from this side. drv->close(drv); } - return result; + return bytes_written; } void write_to_netdrv_fail_on_error( @@ -528,8 +528,8 @@ void write_to_netdrv_fail_on_error( va_list args; socket_priv_t *priv = get_priv(drv); assert(&priv->socket_descriptor); - int result = write_to_netdrv_close_on_error(drv, num_bytes, buffer); - if (result) { + int bytes_written = write_to_netdrv_close_on_error(drv, num_bytes, buffer); + if (bytes_written <= 0) { // Write failed. if (mutex != NULL) { lf_mutex_unlock(mutex); @@ -660,24 +660,14 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* break; // case MSG_TYPE_P2P_SENDING_FED_ID: //1 /////////TODO: CHECK!!!!!!! // break; - // case MSG_TYPE_P2P_MESSAGE: - // LF_PRINT_LOG("Received untimed message from federate %d.", fed_id); - // if (handle_message(socket_id, fed_id)) { - // // Failed to complete the reading of a message on a physical connection. - // lf_print_warning("Failed to complete reading of message on physical connection."); - // socket_closed = true; - // } - // break; - // case MSG_TYPE_P2P_TAGGED_MESSAGE: - // LF_PRINT_LOG("Received tagged message from federate %d.", fed_id); - // if (handle_tagged_message(socket_id, fed_id)) { - // // P2P tagged messages are only used in decentralized coordination, and - // // it is not a fatal error if the socket is closed before the whole message is read. - // // But this thread should exit. - // lf_print_warning("Failed to complete reading of tagged message."); - // socket_closed = true; - // } - // break; + case MSG_TYPE_P2P_MESSAGE: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); + *state = READ_MSG_TYPE_TAGGED_MESSAGE; + break; + case MSG_TYPE_P2P_TAGGED_MESSAGE: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(instant_t) + sizeof(microstep_t); + *state = READ_MSG_TYPE_TAGGED_MESSAGE; + break; case MSG_TYPE_CLOCK_SYNC_T1: *bytes_to_read = sizeof(instant_t); *state = FINISH_READ; diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index 71ca7cfd8..056a993f6 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -58,7 +58,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Mutex lock held while performing socket close operations. // A deadlock can occur if two threads simulataneously attempt to close the same socket. -lf_mutex_t socket_mutex; +lf_mutex_t netdrv_mutex; int netdrv_open(netdrv_t *drv) { if (!drv) { diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 8bad178df..dce117ab2 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -88,7 +88,7 @@ int netdrv_write(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); /** * Mutex protecting socket close operations. */ -extern lf_mutex_t socket_mutex; +extern lf_mutex_t netdrv_mutex; /** * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled From 994658455bb6451af094b084657872f584ed1e82 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 20 Feb 2024 10:14:48 -0700 Subject: [PATCH 071/262] Fix socket open and netdrv free --- core/federated/network/lf_socket_support.c | 25 +++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 9272db659..68934b8c1 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -58,16 +58,20 @@ void set_ip_addr(netdrv_t *drv, struct in_addr ip_addr){ // create_real_time_tcp_socket_errexit static int socket_open(netdrv_t *drv) { - int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (sock < 0) { - lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); + if (!drv){ + return -1; + } + socket_priv_t *priv = get_priv(drv); + priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (priv->socket_descriptor < 0) { + lf_print_error_and_exit("Could not open TCP socket. Err=%d", priv->socket_descriptor); } // Disable Nagle's algorithm which bundles together small TCP messages to // reduce network traffic // TODO: Re-consider if we should do this, and whether disabling delayed ACKs // is enough. int flag = 1; - int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); + int result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); if (result < 0) { lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); @@ -75,19 +79,19 @@ static int socket_open(netdrv_t *drv) { // Disable delayed ACKs. Only possible on Linux #if defined(PLATFORM_Linux) - result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); + result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); if (result < 0) { lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); } #endif - return sock; + return priv->socket_descriptor; } void netdrv_free(netdrv_t *drv) { socket_priv_t *priv = get_priv(drv); - free(priv); + // free(priv); // Already freed on socket close() free(drv); } @@ -457,7 +461,7 @@ int netdrv_connect(netdrv_t *drv) { // Convert port number to string. char str[6]; - sprintf(str, "%u", priv->port); + sprintf(str, "%u", priv->server_port); // Get address structure matching hostname and hints criteria, and // set port to the port number provided in str. There should only @@ -589,6 +593,7 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* *state = FINISH_READ; break; case MSG_TYPE_ACK: // 1 + *bytes_to_read = 0; *state = FINISH_READ; break; case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 @@ -616,6 +621,7 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* *state = FINISH_READ; break; case MSG_TYPE_RESIGN: + *bytes_to_read = 0; *state = FINISH_READ; break; case MSG_TYPE_TAGGED_MESSAGE: @@ -691,10 +697,13 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* *state = READ_MSG_TYPE_NEIGHBOR_STRUCTURE; break; case MSG_TYPE_FAILED: + *bytes_to_read = 0; *state = FINISH_READ; default: + *bytes_to_read = 0; // Error handling? *state = FINISH_READ; + lf_print_error_system_failure("Undefined message header. Terminating system."); } } From 1d81a9b49663bfafdd4d92352f52f61f933e8de5 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 20 Feb 2024 10:15:28 -0700 Subject: [PATCH 072/262] Minor fix --- core/federated/RTI/rti_remote.c | 2 +- include/core/federated/federate.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 93a69288a..ce4ca9971 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -305,7 +305,7 @@ void handle_timed_message(federate_info_t *sending_federate, unsigned char *buff "RTI failed to forward message to federate %d.", federate_id); while (sending_federate->fed_netdrv->read_remaining_bytes > 0) { - ssize_t bytes_read_again = read_from_netdrv(sending_federate->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); + ssize_t bytes_read_again = read_from_netdrv_close_on_error(sending_federate->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); write_to_netdrv_fail_on_error(fed->fed_netdrv, bytes_read_again, buffer, &rti_mutex, "RTI failed to forward message to federate %d.", federate_id); } diff --git a/include/core/federated/federate.h b/include/core/federated/federate.h index 38e92f5bc..ecd8c1421 100644 --- a/include/core/federated/federate.h +++ b/include/core/federated/federate.h @@ -43,7 +43,7 @@ typedef struct federate_instance_t { * This is set by lf_connect_to_rti(), which must be called before other * functions that communicate with the rti are called. */ - int socket_TCP_RTI; + // int socket_TCP_RTI; /** * Thread listening for incoming TCP messages from the RTI. @@ -84,7 +84,7 @@ typedef struct federate_instance_t { * federate is the destination. Multiple incoming p2p connections from the * same remote federate will use the same socket. */ - int sockets_for_inbound_p2p_connections[NUMBER_OF_FEDERATES]; + // int sockets_for_inbound_p2p_connections[NUMBER_OF_FEDERATES]; /** * An array that holds the socket descriptors for outbound direct @@ -99,7 +99,7 @@ typedef struct federate_instance_t { * program where this federate acts as the source. Multiple outgoing p2p * connections to the same remote federate will use the same socket. */ - int sockets_for_outbound_p2p_connections[NUMBER_OF_FEDERATES]; + // int sockets_for_outbound_p2p_connections[NUMBER_OF_FEDERATES]; /** * Thread ID for a thread that accepts sockets and then supervises From 58af408d9e6b6310969d73d7044607b61cbc96f0 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 20 Feb 2024 10:15:46 -0700 Subject: [PATCH 073/262] Fix bug on tagged message --- core/federated/federate.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index 0295037e2..83223f1da 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -78,7 +78,7 @@ int max_level_allowed_to_advance; //TODO: DONGHA: Need to change socket_related. socket_TCP_RTI, server_socket, server_port federate_instance_t _fed = { - .socket_TCP_RTI = -1, + // .socket_TCP_RTI = -1, .number_of_inbound_p2p_connections = 0, .inbound_netdriv_listeners = NULL, .number_of_outbound_p2p_connections = 0, @@ -143,7 +143,7 @@ static void send_tag(unsigned char type, tag_t tag) { encode_tag(&(buffer[1]), tag); LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); - if (_fed.socket_TCP_RTI < 0) { + if (_fed.netdrv_to_rti == NULL) { lf_print_warning("Socket is no longer connected. Dropping message."); LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); return; @@ -480,6 +480,7 @@ static int handle_message(netdrv_t* netdrv, int fed_id, unsigned char* buffer, s unsigned short federate_id; size_t length; extract_header(buffer, &port_id, &federate_id, &length); + size_t header_length = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); // Check if the message is intended for this federate assert(_lf_my_fed_id == federate_id); LF_PRINT_DEBUG("Receiving message to port %d of length %zu.", port_id, length); @@ -490,7 +491,7 @@ static int handle_message(netdrv_t* netdrv, int fed_id, unsigned char* buffer, s // Read the payload. // Allocate memory for the message contents. unsigned char* message_contents = (unsigned char*)malloc(length); - memcpy(message_contents, buffer, bytes_read); + memcpy(message_contents, buffer + header_length, bytes_read); int buf_count = bytes_read; while(netdrv->read_remaining_bytes > 0) { ssize_t bytes_read_again = read_from_netdrv_close_on_error(netdrv, message_contents + buf_count, length - buf_count); @@ -535,6 +536,8 @@ static int handle_tagged_message(netdrv_t* netdrv, int fed_id, unsigned char* bu size_t length; tag_t intended_tag; extract_timed_header(buffer, &port_id, &federate_id, &length, &intended_tag); + size_t header_length = sizeof(uint16_t) + sizeof(uint16_t) + + sizeof(int32_t) + sizeof(instant_t) + sizeof(microstep_t); // Trace the event when tracing is enabled if (fed_id == -1) { tracepoint_federate_from_rti(_fed.trace, receive_TAGGED_MSG, _lf_my_fed_id, &intended_tag); @@ -574,7 +577,7 @@ static int handle_tagged_message(netdrv_t* netdrv, int fed_id, unsigned char* bu // Read the payload. // Allocate memory for the message contents. unsigned char* message_contents = (unsigned char*)malloc(length); - memcpy(message_contents, buffer, bytes_read); + memcpy(message_contents, buffer + header_length, bytes_read); int buf_count = bytes_read; while(netdrv->read_remaining_bytes > 0) { ssize_t bytes_read_again = read_from_netdrv_close_on_error(netdrv, message_contents + buf_count, length - buf_count); @@ -879,7 +882,7 @@ static int perform_hmac_authentication() { size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); unsigned char received[1 + NONCE_LENGTH + hmac_length]; - if (read_from_netdrv_close_on_error(_fed.netdrv_to_rti, received, 1 + NONCE_LENGTH + hmac_length)) { + if (read_from_netdrv_close_on_error(_fed.netdrv_to_rti, received, 1 + NONCE_LENGTH + hmac_length) <= 0) { lf_print_warning("Failed to read RTI response."); return -1; } @@ -934,12 +937,6 @@ static int perform_hmac_authentication() { } #endif -static void close_rti_socket() { - shutdown(_fed.socket_TCP_RTI, SHUT_RDWR); - close(_fed.socket_TCP_RTI); - _fed.socket_TCP_RTI = -1; -} - /** * Send the specified timestamp to the RTI and wait for a response. * The specified timestamp should be current physical time of the @@ -1615,7 +1612,7 @@ void terminate_execution(environment_t* env) { // For an abnormal termination (e.g. a SIGINT), we need to send a // MSG_TYPE_FAILED message to the RTI, but we should not acquire a mutex. - if (_fed.socket_TCP_RTI >= 0) { + if (_fed.netdrv_to_rti != 0) { if (_lf_normal_termination) { tracepoint_federate_to_rti(_fed.trace, send_RESIGN, _lf_my_fed_id, &env->current_tag); send_resign_signal(env); @@ -1630,7 +1627,7 @@ void terminate_execution(environment_t* env) { for (int i=0; i < NUMBER_OF_FEDERATES; i++) { close_inbound_netdrv(i, 1); // Ignore errors. Mark the socket closed. - _fed.sockets_for_inbound_p2p_connections[i] = -1; + _fed.netdrv_for_inbound_p2p_connections[i] = NULL; } // Check for all outgoing physical connections in @@ -1864,11 +1861,11 @@ void lf_connect_to_rti(const char* hostname, int port) { // Connect int result = -1; int count_retries = 0; - struct addrinfo* res = NULL; //TODO: DONGHA: count_retries not being updated for the authentication process? while (count_retries++ < CONNECT_MAX_RETRIES && !_lf_termination_executed) { // TODO: DONGHA: Connecting phase. Let's just make a netdrv_connect() api first. - if (netdrv_connect(_fed.netdrv_to_rti) < 0) { + result = netdrv_connect(_fed.netdrv_to_rti); + if (result < 0) { _fed.netdrv_to_rti->close(_fed.netdrv_to_rti); netdrv_free(_fed.netdrv_to_rti); _fed.netdrv_to_rti = netdrv_init(); @@ -1893,7 +1890,6 @@ void lf_connect_to_rti(const char* hostname, int port) { continue; // Try again with a new port. } else { // No point in trying again because it will be the same port. - // close_rti_socket(); _fed.netdrv_to_rti->close(_fed.netdrv_to_rti); lf_print_error_and_exit("Authentication failed."); } @@ -1931,7 +1927,7 @@ void lf_connect_to_rti(const char* hostname, int port) { LF_PRINT_DEBUG("Waiting for response to federation ID from the RTI."); - if (read_from_netdrv(_fed.netdrv_to_rti, response, 2)) { + if (read_from_netdrv(_fed.netdrv_to_rti, response, 2) <= 0) { continue; // Try again. } if (response[0] == MSG_TYPE_REJECT) { @@ -2485,7 +2481,7 @@ int lf_send_stop_request_to_rti(tag_t stop_tag) { stop_tag.time - start_time, stop_tag.microstep); - if (_fed.socket_TCP_RTI < 0) { + if (_fed.netdrv_to_rti == NULL) { lf_print_warning("Socket is no longer connected. Dropping message."); LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); return -1; From 618925663637cebfd55809fdba4b1f0a0e2eb407 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 23 Feb 2024 11:08:12 -0700 Subject: [PATCH 074/262] Fix clock sync --- core/federated/RTI/rti_remote.c | 39 ++- core/federated/RTI/rti_remote.h | 6 +- core/federated/federate.c | 8 +- core/federated/network/lf_socket_support.c | 229 ++++++++++-------- .../federated/network/lf_socket_support.h | 10 +- include/core/federated/network/net_util.h | 1 + 6 files changed, 163 insertions(+), 130 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index ce4ca9971..6ea28db0a 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -711,17 +711,14 @@ void send_physical_clock(unsigned char message_type, federate_info_t *fed, socke // Send the message if (socket_type == UDP) { - //TODO: NEED TO FIX! - // // FIXME: UDP_addr is never initialized. - // LF_PRINT_DEBUG("Clock sync: RTI sending UDP message type %u.", buffer[0]); - // ssize_t bytes_written = sendto(rti_remote->socket_descriptor_UDP, buffer, 1 + sizeof(int64_t), 0, - // (struct sockaddr *)&fed->UDP_addr, sizeof(fed->UDP_addr)); - // if (bytes_written < (ssize_t)sizeof(int64_t) + 1) { - // lf_print_warning("Clock sync: RTI failed to send physical time to federate %d: %s\n", - // fed->enclave.id, - // strerror(errno)); - // return; - // } + LF_PRINT_DEBUG("Clock sync: RTI sending UDP message type %u.", buffer[0]); + ssize_t bytes_written = write_to_netdrv_UDP(rti_remote->clock_netdrv, fed->clock_netdrv, 1 + sizeof(int64_t), buffer, 0); + if (bytes_written < (ssize_t)sizeof(int64_t) + 1) { + lf_print_warning("Clock sync: RTI failed to send physical time to federate %d: %s\n", + fed->enclave.id, + strerror(errno)); + return; + } } else if (socket_type == TCP) { LF_PRINT_DEBUG("Clock sync: RTI sending TCP message type %u.", buffer[0]); @@ -978,7 +975,7 @@ void *federate_info_thread_TCP(void *fed) { handle_timed_message(my_fed, buffer, FED_COM_BUFFER_SIZE, bytes_read); break; case MSG_TYPE_RESIGN: - handle_federate_resign(my_fed); + // handle_federate_resign(my_fed); return NULL; case MSG_TYPE_NEXT_EVENT_TAG: handle_next_event_tag(my_fed, buffer + 1); @@ -1300,9 +1297,10 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t if (federate_UDP_port_number > 0) { // TODO: DONGHA: NEED to be fixed. // Initialize the UDP_addr field of the federate struct - fed->UDP_addr.sin_family = AF_INET; - fed->UDP_addr.sin_port = htons(federate_UDP_port_number); - fed->UDP_addr.sin_addr = fed->server_ip_addr; + // fed->UDP_addr.sin_family = AF_INET; + // fed->UDP_addr.sin_port = htons(federate_UDP_port_number); + // fed->UDP_addr.sin_addr = fed->server_ip_addr; + set_clock_netdrv(fed->clock_netdrv, netdrv, federate_UDP_port_number); } } else { // Disable clock sync after initial round. @@ -1402,7 +1400,6 @@ void lf_connect_to_federates(netdrv_t *rti_netdrv) { for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { netdrv_t *fed_netdrv = accept_connection(rti_netdrv); - int *socket_id; //TODO: erase // Wait for the first message from the federate when RTI -a option is on. #ifdef __RTI_AUTH__ @@ -1451,9 +1448,11 @@ void lf_connect_to_federates(netdrv_t *rti_netdrv) { } } if (rti_remote->final_port_UDP != UINT16_MAX && clock_sync_enabled) { + if (get_port(rti_remote->clock_netdrv) != UINT16_MAX && clock_sync_enabled) { lf_thread_create(&rti_remote->clock_thread, clock_synchronization_thread, NULL); } } + } } void *respond_to_erroneous_connections(void *nothing) { @@ -1559,10 +1558,10 @@ void initialize_RTI(rti_remote_t *rti) { rti_remote->all_federates_exited = false; rti_remote->federation_id = "Unidentified Federation"; rti_remote->user_specified_port = 0; - rti_remote->final_port_TCP = 0; - rti_remote->socket_descriptor_TCP = -1; - rti_remote->final_port_UDP = UINT16_MAX; - rti_remote->socket_descriptor_UDP = -1; + // rti_remote->final_port_TCP = 0; + // rti_remote->socket_descriptor_TCP = -1; + // rti_remote->final_port_UDP = UINT16_MAX; + // rti_remote->socket_descriptor_UDP = -1; rti_remote->clock_sync_global_status = clock_sync_init; rti_remote->clock_sync_period_ns = MSEC(10); rti_remote->clock_sync_exchanges_per_interval = 10; diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 9344fc771..2a89cecb0 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -139,10 +139,10 @@ typedef struct rti_remote_t { uint16_t user_specified_port; /** The final port number that the TCP socket server ends up using. */ - uint16_t final_port_TCP; + // uint16_t final_port_TCP; - /** The TCP socket descriptor for the socket server. */ - int socket_descriptor_TCP; + // /** The TCP socket descriptor for the socket server. */ + // int socket_descriptor_TCP; /************* UDP server information *************/ /** The final port number that the UDP socket server ends up using. */ diff --git a/core/federated/federate.c b/core/federated/federate.c index 83223f1da..c3bc9875d 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1748,10 +1748,8 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { netdrv_t* netdrv = netdrv_init(); - int socket_id = -1; while (result < 0 && !_lf_termination_executed) { // Create an IPv4 socket for TCP (not UDP) communication over IP (0). - socket_id = create_real_time_tcp_socket_errexit(); netdrv->open(netdrv); set_host_name(netdrv, hostname); set_port(netdrv, uport); @@ -1987,13 +1985,13 @@ void lf_create_server(int specified_port) { create_federate_server(my_netdrv, port, specified_port); //TODO: NEED to fix. - LF_PRINT_LOG("Server for communicating with other federates started using port %d.", get_my_port(_fed.my_netdrv)); + LF_PRINT_LOG("Server for communicating with other federates started using port %d.", get_my_port(my_netdrv)); // Send the server port number to the RTI // on an MSG_TYPE_ADDRESS_ADVERTISEMENT message (@see net_common.h). unsigned char buffer[sizeof(int32_t) + 1]; buffer[0] = MSG_TYPE_ADDRESS_ADVERTISEMENT; - encode_int32(get_my_port(_fed.my_netdrv), &(buffer[1])); + encode_int32(get_my_port(my_netdrv), &(buffer[1])); // Trace the event when tracing is enabled tracepoint_federate_to_rti(_fed.trace, send_ADR_AD, _lf_my_fed_id, NULL); @@ -2002,7 +2000,7 @@ void lf_create_server(int specified_port) { write_to_netdrv_fail_on_error(_fed.netdrv_to_rti, sizeof(int32_t) + 1, (unsigned char*)buffer, NULL, "Failed to send address advertisement."); - LF_PRINT_DEBUG("Sent port %d to the RTI.", get_my_port(_fed.my_netdrv)); + LF_PRINT_DEBUG("Sent port %d to the RTI.", get_my_port(my_netdrv)); // Set the global server socket _fed.my_netdrv = my_netdrv; diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 68934b8c1..f0c04da42 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -19,6 +19,11 @@ #include "util.h" #include "net_common.h" +typedef enum { + TCP, + UDP +} socket_type_t; + static socket_priv_t *get_priv(netdrv_t *drv) { if (!drv) { lf_print_error_and_exit("Falied get socket_priv_t."); @@ -56,6 +61,14 @@ void set_ip_addr(netdrv_t *drv, struct in_addr ip_addr){ priv->server_ip_addr = ip_addr; } +void set_clock_netdrv(netdrv_t *clock_drv, netdrv_t *rti_drv, uint16_t port_num) { + socket_priv_t *priv_clock = get_priv(clock_drv); + socket_priv_t *priv_rti = get_priv(rti_drv); + priv_clock->UDP_addr.sin_family = AF_INET; + priv_clock->UDP_addr.sin_port = htons(port_num); + priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; +} + // create_real_time_tcp_socket_errexit static int socket_open(netdrv_t *drv) { if (!drv){ @@ -63,6 +76,7 @@ static int socket_open(netdrv_t *drv) { } socket_priv_t *priv = get_priv(drv); priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + priv->proto = TCP; if (priv->socket_descriptor < 0) { lf_print_error_and_exit("Could not open TCP socket. Err=%d", priv->socket_descriptor); } @@ -246,6 +260,7 @@ int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { priv->socket_descriptor = -1; if (netdrv_type == RTI) { priv->socket_descriptor = net_create_real_time_tcp_socket_errexit(); + priv->proto = TCP; } else if (netdrv_type == CLOCKSYNC) { priv->socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); // Set the appropriate timeout time @@ -253,6 +268,7 @@ int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { .tv_sec = UDP_TIMEOUT_TIME / BILLION, .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000 }; + priv->proto = UDP; } if (priv->socket_descriptor < 0) { lf_print_error_and_exit("Failed to create RTI socket."); @@ -377,29 +393,29 @@ int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { return priv->socket_descriptor; } -void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { - socket_priv_t *rti_priv = get_priv(rti_netdrv); - socket_priv_t *clock_priv = get_priv(clock_netdrv); - // Shutdown and close the socket that is listening for incoming connections - // so that the accept() call in respond_to_erroneous_connections returns. - // That thread should then check rti->all_federates_exited and it should exit. - if (shutdown(rti_priv->socket_descriptor, SHUT_RDWR)) { - LF_PRINT_LOG("On shut down TCP socket, received reply: %s", strerror(errno)); - } - // NOTE: In all common TCP/IP stacks, there is a time period, - // typically between 30 and 120 seconds, called the TIME_WAIT period, - // before the port is released after this close. This is because - // the OS is preventing another program from accidentally receiving - // duplicated packets intended for this program. - close(rti_priv->socket_descriptor); - - if (clock_priv->socket_descriptor > 0) { - if (shutdown(clock_priv->socket_descriptor, SHUT_RDWR)) { - LF_PRINT_LOG("On shut down UDP socket, received reply: %s", strerror(errno)); - } - close(clock_priv->socket_descriptor); - } -} +// void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { +// socket_priv_t *rti_priv = get_priv(rti_netdrv); +// socket_priv_t *clock_priv = get_priv(clock_netdrv); +// // Shutdown and close the socket that is listening for incoming connections +// // so that the accept() call in respond_to_erroneous_connections returns. +// // That thread should then check rti->all_federates_exited and it should exit. +// if (shutdown(rti_priv->socket_descriptor, SHUT_RDWR)) { +// LF_PRINT_LOG("On shut down TCP socket, received reply: %s", strerror(errno)); +// } +// // NOTE: In all common TCP/IP stacks, there is a time period, +// // typically between 30 and 120 seconds, called the TIME_WAIT period, +// // before the port is released after this close. This is because +// // the OS is preventing another program from accidentally receiving +// // duplicated packets intended for this program. +// close(rti_priv->socket_descriptor); + +// if (clock_priv->socket_descriptor > 0) { +// if (shutdown(clock_priv->socket_descriptor, SHUT_RDWR)) { +// LF_PRINT_LOG("On shut down UDP socket, received reply: %s", strerror(errno)); +// } +// close(clock_priv->socket_descriptor); +// } +// } netdrv_t *netdrv_accept(netdrv_t *my_netdrv) { netdrv_t *client_netdrv = netdrv_init(); @@ -424,7 +440,7 @@ netdrv_t *accept_connection(netdrv_t *rti_netdrv) { // The following blocks until a federate connects. while (1) { fed_priv->socket_descriptor = accept(rti_priv->socket_descriptor, &client_fd, &client_length); - if (fed_priv->socket_descriptor >= 0) { + if (fed_priv->socket_descriptor >= 0) { // Got a socket break; } else if (fed_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { @@ -483,6 +499,13 @@ ssize_t peek_from_netdrv(netdrv_t *drv, unsigned char* result) { else return bytes_read; } +//Temporary function. +int write_to_netdrv_UDP(netdrv_t *drv, netdrv_t *target, size_t num_bytes, unsigned char* buffer, int flags) { + socket_priv_t *priv_drv = get_priv(drv); + socket_priv_t *priv_target = get_priv(target); + return sendto(priv_drv->socket_descriptor, buffer, num_bytes, flags, (struct sockaddr *) &priv_target->UDP_addr, sizeof(priv_target->UDP_addr)); +} + int write_to_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { socket_priv_t *priv = get_priv(drv); if (priv->socket_descriptor < 0) { @@ -707,89 +730,95 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* } } +static ssize_t read_UDP(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { + socket_priv_t *priv = get_priv(netdrv); + return read(priv->socket_descriptor, buffer, buffer_length); +} //TODO: DONGHA: ADD buffer_length checking. // Returns the total bytes read. ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { socket_priv_t *priv = get_priv(netdrv); - size_t bytes_to_read; // The bytes to read in future. - ssize_t bytes_read = 0; // The bytes that was read by a single read() function. - size_t total_bytes_read = 0; // The total bytes that have been read, and will be the return of the read_from netdrv. - int retry_count; - int state; - // Check if socket_descriptor is open. - if (priv->socket_descriptor < 0) { - // Socket is not open. - errno = EBADF; - return -1; - } - // First, check if there are remaining bytes. - // If there are remaining bytes, it reads as long as it can (buffer_length). - // Then it becomes KEEP_READING state. - if (netdrv->read_remaining_bytes > 0) { - bytes_to_read = (netdrv->read_remaining_bytes > buffer_length) ? buffer_length : netdrv->read_remaining_bytes; - state = KEEP_READING; - } else { - // If there are no left bytes to read, it reads the header byte. - bytes_to_read = 1; // read header - state = HEADER_READ; - } - - for (;;) { - retry_count = 0; - while (bytes_to_read > 0) { - //TODO: Check buffer_length. - bytes_read = read(priv->socket_descriptor, buffer + total_bytes_read, bytes_to_read); - if (bytes_read < 0 && // If) Error has occurred, - retry_count++ < NUM_SOCKET_RETRIES && // there are left retry counts, - (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { // and the error code was these three, - // Print warning, sleep for a short time, and retry. - lf_print_warning("Reading from socket failed. Will try again."); - lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); - continue; - } else if (bytes_read <= 0) { - // An error occurred without those three error codes. - // https://stackoverflow.com/questions/42188128/does-reading-from-a-socket-wait-or-get-eof - // bytes_read == 0 means disconnected. - return -1; - } - bytes_to_read -= bytes_read; - total_bytes_read += bytes_read; + if(priv->proto == TCP) { + size_t bytes_to_read; // The bytes to read in future. + ssize_t bytes_read = 0; // The bytes that was read by a single read() function. + size_t total_bytes_read = 0; // The total bytes that have been read, and will be the return of the read_from netdrv. + int retry_count; + int state; + // Check if socket_descriptor is open. + if (priv->socket_descriptor < 0) { + // Socket is not open. + errno = EBADF; + return -1; + } + // First, check if there are remaining bytes. + // If there are remaining bytes, it reads as long as it can (buffer_length). + // Then it becomes KEEP_READING state. + if (netdrv->read_remaining_bytes > 0) { + bytes_to_read = (netdrv->read_remaining_bytes > buffer_length) ? buffer_length : netdrv->read_remaining_bytes; + state = KEEP_READING; + } else { + // If there are no left bytes to read, it reads the header byte. + bytes_to_read = 1; // read header + state = HEADER_READ; } - switch(state) { - case HEADER_READ: - handle_header_read(netdrv, buffer, &bytes_to_read, &state); - break; - - case READ_MSG_TYPE_FED_IDS: ; - size_t federation_id_length = (size_t)buffer[1 + sizeof(uint16_t)]; - bytes_to_read = federation_id_length; - state = FINISH_READ; - break; - case READ_MSG_TYPE_NEIGHBOR_STRUCTURE: ; - int num_upstream = extract_int32(buffer + 1); - int num_downstream = extract_int32(buffer + 1 + sizeof(int32_t)); - bytes_to_read = ((sizeof(uint16_t) + sizeof(int64_t)) * num_upstream)+ (sizeof(uint16_t) * num_downstream); - state = FINISH_READ; - break; - case READ_MSG_TYPE_TAGGED_MESSAGE: ; - size_t length = (size_t) extract_int32(buffer + 1+ sizeof(uint16_t) + sizeof(uint16_t)); - if(length > buffer_length - total_bytes_read) { - bytes_to_read = buffer_length - total_bytes_read; - netdrv->read_remaining_bytes = length - bytes_to_read; - } else { - bytes_to_read = length; + for (;;) { + retry_count = 0; + while (bytes_to_read > 0) { + //TODO: Check buffer_length. + bytes_read = read(priv->socket_descriptor, buffer + total_bytes_read, bytes_to_read); + if (bytes_read < 0 && // If) Error has occurred, + retry_count++ < NUM_SOCKET_RETRIES && // there are left retry counts, + (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { // and the error code was these three, + // Print warning, sleep for a short time, and retry. + lf_print_warning("Reading from socket failed. Will try again."); + lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); + continue; + } else if (bytes_read <= 0) { + // An error occurred without those three error codes. + // https://stackoverflow.com/questions/42188128/does-reading-from-a-socket-wait-or-get-eof + // bytes_read == 0 means disconnected. + return -1; } - state = FINISH_READ; - break; - case KEEP_READING: - netdrv->read_remaining_bytes -= total_bytes_read; - return total_bytes_read; - // return 0; - case FINISH_READ: - return total_bytes_read; - // return 0; + bytes_to_read -= bytes_read; + total_bytes_read += bytes_read; + } + + switch(state) { + case HEADER_READ: + handle_header_read(netdrv, buffer, &bytes_to_read, &state); + break; + + case READ_MSG_TYPE_FED_IDS: ; + size_t federation_id_length = (size_t)buffer[1 + sizeof(uint16_t)]; + bytes_to_read = federation_id_length; + state = FINISH_READ; + break; + case READ_MSG_TYPE_NEIGHBOR_STRUCTURE: ; + int num_upstream = extract_int32(buffer + 1); + int num_downstream = extract_int32(buffer + 1 + sizeof(int32_t)); + bytes_to_read = ((sizeof(uint16_t) + sizeof(int64_t)) * num_upstream)+ (sizeof(uint16_t) * num_downstream); + state = FINISH_READ; + break; + case READ_MSG_TYPE_TAGGED_MESSAGE: ; + size_t length = (size_t) extract_int32(buffer + 1+ sizeof(uint16_t) + sizeof(uint16_t)); + if(length > buffer_length - total_bytes_read) { + bytes_to_read = buffer_length - total_bytes_read; + netdrv->read_remaining_bytes = length - bytes_to_read; + } else { + bytes_to_read = length; + } + state = FINISH_READ; + break; + case KEEP_READING: + netdrv->read_remaining_bytes -= total_bytes_read; + return total_bytes_read; + case FINISH_READ: + return total_bytes_read; + } } + } else if (priv->proto == UDP) { + return read_UDP(netdrv, buffer, buffer_length); } -} \ No newline at end of file +} diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index 243ecc224..c004d5277 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -63,6 +63,8 @@ typedef struct socket_priv_t { // RTI has not been informed of the port number. struct in_addr server_ip_addr; // Information about the IP address of the socket // server of the federate. + + struct sockaddr_in UDP_addr; // The UDP address for the federate. } socket_priv_t; char* get_host_name(netdrv_t *drv); @@ -72,7 +74,9 @@ struct in_addr* get_ip_addr(netdrv_t *drv); void set_host_name(netdrv_t *drv, const char* hostname); void set_port(netdrv_t *drv, int port); -// void set_ip_addr(netdrv_t *drv); +void set_ip_addr(netdrv_t *drv, struct in_addr ip_addr); +void set_clock_netdrv(netdrv_t *clock_drv, netdrv_t *rti_drv, uint16_t port_num); + netdrv_t * netdrv_init(); @@ -101,7 +105,7 @@ int create_rti_server(netdrv_t *drv, netdrv_type_t netdrv_type); // int create_real_time_tcp_socket_errexit(); -void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv); +// void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv); netdrv_t *netdrv_accept(netdrv_t *my_netdrv); @@ -121,6 +125,8 @@ int netdrv_connect(netdrv_t *drv); */ ssize_t peek_from_netdrv(netdrv_t *drv, unsigned char* result); +int write_to_netdrv_UDP(netdrv_t *drv, netdrv_t *target, size_t num_bytes, unsigned char* buffer, int flags); + /** * Write the specified number of bytes to the specified socket from the * specified buffer. If an error occurs, return -1 and set errno to indicate diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index dce117ab2..3763d7fea 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -76,6 +76,7 @@ typedef struct netdrv_t { void (*close)(struct netdrv_t *drv); int ( *read)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); int (*write)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); + void* priv; unsigned int read_remaining_bytes; unsigned int write_remaining_bytes; } netdrv_t; From 9d2c3d574e27cd72d96aac8a32ae7636e87bb173 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 23 Feb 2024 14:27:46 -0700 Subject: [PATCH 075/262] Fix proto --- core/federated/federate.c | 1 + core/federated/network/lf_socket_support.c | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index d5e44e863..5c7dc014c 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1875,6 +1875,7 @@ void lf_connect_to_rti(const char* hostname, int port) { if (uport >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) uport = DEFAULT_PORT; } set_port(_fed.netdrv_to_rti, uport); + lf_sleep(CONNECT_RETRY_INTERVAL); continue; // Connect failed. } diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index f0c04da42..9b569ad9a 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -139,6 +139,8 @@ netdrv_t *netdrv_init() { priv->server_port = -1; priv->server_ip_addr.s_addr = 0; + // priv->proto = -1; + drv->read_remaining_bytes = 0; drv->open = socket_open; @@ -440,7 +442,7 @@ netdrv_t *accept_connection(netdrv_t *rti_netdrv) { // The following blocks until a federate connects. while (1) { fed_priv->socket_descriptor = accept(rti_priv->socket_descriptor, &client_fd, &client_length); - if (fed_priv->socket_descriptor >= 0) { + if (fed_priv->socket_descriptor >= 0) { // Got a socket break; } else if (fed_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { @@ -534,8 +536,6 @@ int write_to_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { } int write_to_netdrv_close_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { - socket_priv_t *priv = get_priv(drv); - assert(&priv->socket_descriptor); int bytes_written = write_to_netdrv(drv, num_bytes, buffer); if (bytes_written <= 0) { // Write failed. @@ -553,8 +553,6 @@ void write_to_netdrv_fail_on_error( lf_mutex_t* mutex, char* format, ...) { va_list args; - socket_priv_t *priv = get_priv(drv); - assert(&priv->socket_descriptor); int bytes_written = write_to_netdrv_close_on_error(drv, num_bytes, buffer); if (bytes_written <= 0) { // Write failed. From 5ead7cc5055a42b20875069618dbe7fe24613362 Mon Sep 17 00:00:00 2001 From: Byeonggil Jun Date: Fri, 23 Feb 2024 17:54:50 -0700 Subject: [PATCH 076/262] Return -1 when priv is not initialized yet and try to get the port number --- core/federated/network/lf_socket_support.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 9b569ad9a..fa5724be3 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -26,7 +26,8 @@ typedef enum { static socket_priv_t *get_priv(netdrv_t *drv) { if (!drv) { - lf_print_error_and_exit("Falied get socket_priv_t."); + // lf_print_error_and_exit("Falied get socket_priv_t."); + // FIXME(Byeonggil): I commented out this because it shouldn't report error to send -1 port address. return NULL; } return (socket_priv_t *)(drv + 1); @@ -42,7 +43,7 @@ int32_t get_my_port(netdrv_t *drv) { } int32_t get_port(netdrv_t *drv) { socket_priv_t *priv = get_priv(drv); - return priv->server_port; + return (priv == NULL) ? -1 : priv->server_port; } struct in_addr* get_ip_addr(netdrv_t *drv) { socket_priv_t *priv = get_priv(drv); From 05abbb586d88c0db65c88d95c3ab3f0f895ae483 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 23 Feb 2024 19:00:00 -0700 Subject: [PATCH 077/262] Add ADDRESS_QUERY_REPLY msg --- core/federated/federate.c | 23 ++++++++------------- core/federated/network/lf_socket_support.c | 12 ++++++++--- include/core/federated/network/net_common.h | 2 ++ 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index 5c7dc014c..5b71baf08 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1681,9 +1681,8 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { // Ask the RTI for port number of the remote federate. // The buffer is used for both sending and receiving replies. // The size is what is needed for receiving replies. - unsigned char buffer[sizeof(int32_t) + INET_ADDRSTRLEN + 1]; + unsigned char buffer[sizeof(int32_t) + sizeof(struct in_addr) + 1 ]; int port = -1; - struct in_addr host_ip_addr; int count_tries = 0; while (port == -1 && !_lf_termination_executed) { buffer[0] = MSG_TYPE_ADDRESS_QUERY; @@ -1703,11 +1702,12 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { // Read RTI's response. //TODO: Fix two reads. - read_from_netdrv_fail_on_error(_fed.netdrv_to_rti, buffer, sizeof(int32_t) + INET_ADDRSTRLEN + 1, NULL, - "Failed to read the requested port number for federate %d from RTI.", + read_from_netdrv_fail_on_error(_fed.netdrv_to_rti, buffer, sizeof(int32_t) + sizeof(struct in_addr) + 1, NULL, + "Failed to read the requested port number and IP address for federate %d from RTI.", remote_federate_id); - if (buffer[0] != MSG_TYPE_ADDRESS_QUERY) { + // Changed message type. Must check other targets. + if (buffer[0] != MSG_TYPE_ADDRESS_QUERY_REPLY) { // Unexpected reply. Could be that RTI has failed and sent a resignation. if (buffer[0] == MSG_TYPE_FAILED) { lf_print_error_and_exit("RTI has failed."); @@ -1717,11 +1717,6 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { } port = extract_int32(&buffer[1]); - read_from_netdrv_fail_on_error( - _fed.netdrv_to_rti, (unsigned char*)&host_ip_addr, sizeof(host_ip_addr), NULL, - "Failed to read the IP address for federate %d from RTI.", - remote_federate_id); - // A reply of -1 for the port means that the RTI does not know // the port number of the remote federate, presumably because the // remote federate has not yet sent an MSG_TYPE_ADDRESS_ADVERTISEMENT message to the RTI. @@ -1740,7 +1735,7 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { uint16_t uport = (uint16_t)port; char hostname[INET_ADDRSTRLEN]; - inet_ntop(AF_INET, &host_ip_addr, hostname, INET_ADDRSTRLEN); + inet_ntop(AF_INET, buffer + 1 + sizeof(int32_t), hostname, INET_ADDRSTRLEN); LF_PRINT_LOG("Received address %s port %d for federate %d from RTI.", hostname, uport, remote_federate_id); @@ -2075,9 +2070,9 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { // Get the federation ID and check it. unsigned char federation_id_length = buffer[header_length - 1]; - char remote_federation_id[federation_id_length]; - bytes_read = read_from_netdrv(client_fed_netdrv, (unsigned char*)remote_federation_id, federation_id_length); - if (bytes_read <= 0 || (strncmp(federation_metadata.federation_id, remote_federation_id, strnlen(federation_metadata.federation_id, 255)) != 0)) { + // char remote_federation_id[federation_id_length]; + // bytes_read = read_from_netdrv(client_fed_netdrv, (unsigned char*)remote_federation_id, federation_id_length); + if (bytes_read <= 0 || (strncmp(federation_metadata.federation_id, buffer + header_length, strnlen(federation_metadata.federation_id, 255)) != 0)) { lf_print_warning("Received invalid federation ID. Closing socket."); if (bytes_read > 0) { unsigned char response[2]; diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 9b569ad9a..5f24bd82f 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -676,17 +676,23 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* case MSG_TYPE_STOP_GRANTED: *bytes_to_read = MSG_TYPE_STOP_GRANTED_LENGTH - 1; *state = FINISH_READ; - break; + break; case MSG_TYPE_ADDRESS_QUERY: *bytes_to_read = sizeof(uint16_t); *state = FINISH_READ; break; + case MSG_TYPE_ADDRESS_QUERY_REPLY: + *bytes_to_read = sizeof(int32_t) + sizeof(struct in_addr); + *state = FINISH_READ; + break; case MSG_TYPE_ADDRESS_ADVERTISEMENT: *bytes_to_read = sizeof(int32_t); *state = FINISH_READ; break; - // case MSG_TYPE_P2P_SENDING_FED_ID: //1 /////////TODO: CHECK!!!!!!! - // break; + case MSG_TYPE_P2P_SENDING_FED_ID: //1 /////////TODO: CHECK!!!!!!! + *bytes_to_read = sizeof(uint16_t) + 1; + *state = READ_MSG_TYPE_FED_IDS; + break; case MSG_TYPE_P2P_MESSAGE: *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); *state = READ_MSG_TYPE_TAGGED_MESSAGE; diff --git a/include/core/federated/network/net_common.h b/include/core/federated/network/net_common.h index b91e74d1b..e3d2ff3bc 100644 --- a/include/core/federated/network/net_common.h +++ b/include/core/federated/network/net_common.h @@ -542,6 +542,8 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define MSG_TYPE_ADDRESS_QUERY 13 +#define MSG_TYPE_ADDRESS_QUERY_REPLY 77 + /** * Byte identifying a message advertising the port for the TCP connection server * of a federate. This is utilized in decentralized coordination as well as for physical From 1d46d895620c0854b85c3137024c25d88ca0e222 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 23 Feb 2024 19:31:15 -0700 Subject: [PATCH 078/262] Fix handle address query when port is unavailable. --- core/federated/RTI/rti_remote.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 6ea28db0a..475500ea6 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -609,12 +609,21 @@ void handle_address_query(uint16_t fed_id, unsigned char *buffer) { federate_info_t *remote_fed = GET_FED_INFO(remote_fed_id); unsigned char buf[1 + sizeof(int32_t) + sizeof(*get_ip_addr(remote_fed->fed_netdrv))]; // Response message is also of type MSG_TYPE_ADDRESS_QUERY. - buf[0] = MSG_TYPE_ADDRESS_QUERY; + buf[0] = MSG_TYPE_ADDRESS_QUERY_REPLY; // Send the port number (which could be -1) and server IP address to federate. LF_MUTEX_LOCK(&rti_mutex); - encode_int32(get_port(remote_fed->fed_netdrv), (unsigned char *)&buf[1]); - memcpy(buf + 1 + sizeof(int32_t), (unsigned char *)get_ip_addr(remote_fed->fed_netdrv), sizeof(*get_ip_addr(remote_fed->fed_netdrv))); + int32_t server_port = get_port(remote_fed->fed_netdrv); + char* server_hostname; + encode_int32(server_port, (unsigned char *)&buf[1]); + if (server_port == -1){ + // RTI does not know ip_address and port yet. + server_hostname = "localhost"; + buf[1 + sizeof(int32_t)] = -1; + } else { + server_hostname = get_host_name(remote_fed->fed_netdrv); + memcpy(buf + 1 + sizeof(int32_t), (unsigned char *)get_ip_addr(remote_fed->fed_netdrv), sizeof(*get_ip_addr(remote_fed->fed_netdrv))); + } write_to_netdrv_fail_on_error( fed->fed_netdrv, sizeof(int32_t) + 1 + sizeof(*get_ip_addr(remote_fed->fed_netdrv)), (unsigned char *)buf, &rti_mutex, "Failed to write port number to netdrv of federate %d.", fed_id); @@ -622,7 +631,7 @@ void handle_address_query(uint16_t fed_id, unsigned char *buffer) { LF_MUTEX_UNLOCK(&rti_mutex); LF_PRINT_DEBUG("Replied to address query from federate %d with address %s:%d.", - fed_id, get_host_name(remote_fed->fed_netdrv), get_port(remote_fed->fed_netdrv)); + fed_id, server_hostname, server_port); } //TODO: NEED to be fixed. From a0e99312fb224848358011a5d5a84b99d2ffcaa6 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 24 Feb 2024 22:17:10 -0700 Subject: [PATCH 079/262] Fix proto initializztion --- core/federated/network/lf_socket_support.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index b31c99ee8..f57aff3ee 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -140,7 +140,7 @@ netdrv_t *netdrv_init() { priv->server_port = -1; priv->server_ip_addr.s_addr = 0; - // priv->proto = -1; + priv->proto = TCP; drv->read_remaining_bytes = 0; @@ -723,7 +723,7 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* case MSG_TYPE_NEIGHBOR_STRUCTURE: *bytes_to_read = MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1; *state = READ_MSG_TYPE_NEIGHBOR_STRUCTURE; - break; + break; case MSG_TYPE_FAILED: *bytes_to_read = 0; *state = FINISH_READ; From ad1ee04f949841c08c5193ebe4a3a2422b168ebc Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 24 Feb 2024 22:28:50 -0700 Subject: [PATCH 080/262] Fix probe message --- core/federated/network/lf_socket_support.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index f57aff3ee..cf875a06d 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -714,8 +714,10 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* *bytes_to_read = sizeof(instant_t); *state = FINISH_READ; break; - // case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: - // break; + case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: + *bytes_to_read = sizeof(int64_t); + *state = FINISH_READ; + break; case MSG_TYPE_PORT_ABSENT: *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); *state = FINISH_READ; From 59e4ffe83590e6d6cc4dc55e650db1f6944d6855 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 24 Feb 2024 22:33:47 -0700 Subject: [PATCH 081/262] Remove unnecessary socket related structs --- core/federated/RTI/rti_remote.c | 11 ----------- core/federated/RTI/rti_remote.h | 10 +++++----- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 475500ea6..0095035f4 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -965,7 +965,6 @@ void *federate_info_thread_TCP(void *fed) { // Socket is closed lf_print_warning("RTI: Socket to federate %d is closed. Exiting the thread.", my_fed->enclave.id); my_fed->enclave.state = NOT_CONNECTED; - my_fed->socket = -1; // FIXME: We need better error handling here, but do not stop execution here. break; } @@ -1303,12 +1302,8 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t } if (rti_remote->clock_sync_global_status >= clock_sync_on) { // If no runtime clock sync, no need to set up the UDP port. - if (federate_UDP_port_number > 0) { // TODO: DONGHA: NEED to be fixed. // Initialize the UDP_addr field of the federate struct - // fed->UDP_addr.sin_family = AF_INET; - // fed->UDP_addr.sin_port = htons(federate_UDP_port_number); - // fed->UDP_addr.sin_addr = fed->server_ip_addr; set_clock_netdrv(fed->clock_netdrv, netdrv, federate_UDP_port_number); } } else { @@ -1492,14 +1487,8 @@ void *respond_to_erroneous_connections(void *nothing) { void initialize_federate(federate_info_t *fed, uint16_t id) { initialize_scheduling_node(&(fed->enclave), id); fed->requested_stop = false; - fed->socket = -1; // No socket. fed->clock_synchronization_enabled = true; fed->in_transit_message_tags = pqueue_tag_init(10); - //TODO: Need to fix. This point, the fed_netdrv is not initialized. - // strncpy(fed->server_hostname, "localhost", INET_ADDRSTRLEN); - // fed->server_ip_addr.s_addr = 0; - // fed->server_port = -1; - // fed->fed_netdrv = netdrv_init(); fed->clock_netdrv = netdrv_init(); } diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 2a89cecb0..2e3cdda63 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -61,19 +61,19 @@ typedef struct federate_info_t { // to a request for stop from the RTI. Used to prevent double-counting // a federate when handling lf_request_stop(). lf_thread_t thread_id; // The ID of the thread handling communication with this federate. - int socket; // The TCP socket descriptor for communicating with this federate. - struct sockaddr_in UDP_addr; // The UDP address for the federate. + // int socket; // The TCP socket descriptor for communicating with this federate. + // struct sockaddr_in UDP_addr; // The UDP address for the federate. bool clock_synchronization_enabled; // Indicates the status of clock synchronization // for this federate. Enabled by default. pqueue_tag_t* in_transit_message_tags; // Record of in-transit messages to this federate that are not // yet processed. This record is ordered based on the time // value of each message for a more efficient access. - char server_hostname[INET_ADDRSTRLEN]; // Human-readable IP address and - int32_t server_port; // port number of the socket server of the federate + // char server_hostname[INET_ADDRSTRLEN]; // Human-readable IP address and + // int32_t server_port; // port number of the socket server of the federate // if it has any incoming direct connections from other federates. // The port number will be -1 if there is no server or if the // RTI has not been informed of the port number. - struct in_addr server_ip_addr; // Information about the IP address of the socket + // struct in_addr server_ip_addr; // Information about the IP address of the socket // server of the federate. netdrv_t *fed_netdrv; // The netdriver that the RTI handling each federate. From eada7267b3b620f22f2e456f0bec5bd5985caa0d Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 27 Feb 2024 13:42:08 -0700 Subject: [PATCH 082/262] Minor changes --- core/federated/RTI/main.c | 2 +- core/federated/RTI/rti_remote.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index f9f7fddc5..f5102c30a 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -85,7 +85,7 @@ static void send_failed_signal(federate_info_t* fed) { if (bytes_written > 0) { LF_PRINT_LOG("RTI has sent failed signal to federate %d due to abnormal termination.", fed->enclave.id); } else { - lf_print_error("RTI failed to send failed signal to federate %d on socket ID %d.", fed->enclave.id, fed->socket); + // lf_print_error("RTI failed to send failed signal to federate %d on socket ID %d.", fed->enclave.id, fed->socket); } } diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 0095035f4..7f3284861 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1302,10 +1302,8 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t } if (rti_remote->clock_sync_global_status >= clock_sync_on) { // If no runtime clock sync, no need to set up the UDP port. - // TODO: DONGHA: NEED to be fixed. - // Initialize the UDP_addr field of the federate struct - set_clock_netdrv(fed->clock_netdrv, netdrv, federate_UDP_port_number); - } + // Initialize the UDP_addr field of the federate struct + set_clock_netdrv(fed->clock_netdrv, netdrv, federate_UDP_port_number); } else { // Disable clock sync after initial round. fed->clock_synchronization_enabled = false; From a5b491a1a249d5c02415717654c7e2e20589c181 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 12 Mar 2024 14:47:11 -0700 Subject: [PATCH 083/262] Add include to clock_sync.h --- include/core/federated/clock-sync.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/core/federated/clock-sync.h b/include/core/federated/clock-sync.h index abd77d6c9..e9c06cd3c 100644 --- a/include/core/federated/clock-sync.h +++ b/include/core/federated/clock-sync.h @@ -34,6 +34,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define CLOCK_SYNC_H #include "low_level_platform.h" +#include "net_util.h" /** * Number of required clock sync T4 messages per synchronization From a205b2faf960a3aa2d226055fa277f3a3530001c Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 15 Mar 2024 11:13:08 -0700 Subject: [PATCH 084/262] Fix stack smashing for RTI --- core/federated/RTI/rti_remote.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 317ddc594..b154eff82 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -594,7 +594,6 @@ void handle_stop_request_reply(federate_info_t *fed, unsigned char *buffer) { void handle_address_query(uint16_t fed_id, unsigned char *buffer) { federate_info_t *fed = GET_FED_INFO(fed_id); - uint16_t remote_fed_id = extract_uint16(buffer); if (rti_remote->base.tracing_enabled) { @@ -608,9 +607,9 @@ void handle_address_query(uint16_t fed_id, unsigned char *buffer) { // from this federate. In that case, it will respond by sending -1. // The length is what is needed for the reply. - unsigned char buf[1 + sizeof(int32_t)]; + unsigned char buf[1 + sizeof(int32_t) + sizeof(struct in_addr)]; // Response message is MSG_TYPE_ADDRESS_QUERY_REPLY. - buffer[0] = MSG_TYPE_ADDRESS_QUERY_REPLY; + buf[0] = MSG_TYPE_ADDRESS_QUERY_REPLY; // Encode the port number. federate_info_t *remote_fed = GET_FED_INFO(remote_fed_id); From 50faf05d7352852eeb7432e453293d5cca942fee Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 15 Mar 2024 14:10:16 -0700 Subject: [PATCH 085/262] Run clang-format --- core/federated/RTI/rti_remote.c | 891 ++++++----- core/federated/network/lf_socket_support.c | 1340 ++++++++--------- core/federated/network/net_util.c | 40 +- .../federated/network/lf_socket_support.h | 90 +- include/core/federated/network/net_common.h | 16 +- include/core/federated/network/net_util.h | 45 +- 6 files changed, 1179 insertions(+), 1243 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 4d3769d2b..ba2e1c396 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -50,9 +50,7 @@ lf_cond_t sent_start_time; extern int lf_critical_section_enter(environment_t* env) { return lf_mutex_lock(&rti_mutex); } -extern int lf_critical_section_exit(environment_t *env) { - return lf_mutex_unlock(&rti_mutex); -} +extern int lf_critical_section_exit(environment_t* env) { return lf_mutex_unlock(&rti_mutex); } void notify_tag_advance_grant(scheduling_node_t* e, tag_t tag) { if (e->state == NOT_CONNECTED || lf_tag_compare(tag, e->last_granted) <= 0 || @@ -157,10 +155,10 @@ void update_federate_next_event_tag_locked(uint16_t federate_id, tag_t next_even update_scheduling_node_next_event_tag_locked(&(fed->enclave), next_event_tag); } -void handle_port_absent_message(federate_info_t *sending_federate, unsigned char *buffer) { - uint16_t reactor_port_id = extract_uint16(buffer + 1); - uint16_t federate_id = extract_uint16(buffer + 1 + sizeof(uint16_t)); - tag_t tag = extract_tag(buffer + 1 + 2 * sizeof(uint16_t)); +void handle_port_absent_message(federate_info_t* sending_federate, unsigned char* buffer) { + uint16_t reactor_port_id = extract_uint16(buffer + 1); + uint16_t federate_id = extract_uint16(buffer + 1 + sizeof(uint16_t)); + tag_t tag = extract_tag(buffer + 1 + 2 * sizeof(uint16_t)); if (rti_remote->base.tracing_enabled) { tracepoint_rti_from_federate(receive_PORT_ABS, sending_federate->enclave.id, &tag); @@ -203,46 +201,46 @@ void handle_port_absent_message(federate_info_t *sending_federate, unsigned char } // Forward the message. - size_t message_size = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); + size_t message_size = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); write_to_netdrv_fail_on_error(fed->fed_netdrv, message_size + 1, buffer, &rti_mutex, "RTI failed to forward message to federate %d.", federate_id); LF_MUTEX_UNLOCK(&rti_mutex); } -void handle_timed_message(federate_info_t *sending_federate, unsigned char *buffer, size_t buffer_length, ssize_t bytes_read) { - size_t header_size = 1 + sizeof(uint16_t) + sizeof(uint16_t) + sizeof(uint32_t) - + sizeof(int64_t) + sizeof(uint32_t); - // Extract the header information. of the sender - uint16_t reactor_port_id; - uint16_t federate_id; - size_t length; - tag_t intended_tag; - // Extract information from the header. - extract_timed_header(buffer + 1, &reactor_port_id, &federate_id, &length, &intended_tag); +void handle_timed_message(federate_info_t* sending_federate, unsigned char* buffer, size_t buffer_length, + ssize_t bytes_read) { + size_t header_size = 1 + sizeof(uint16_t) + sizeof(uint16_t) + sizeof(uint32_t) + sizeof(int64_t) + sizeof(uint32_t); + // Extract the header information. of the sender + uint16_t reactor_port_id; + uint16_t federate_id; + size_t length; + tag_t intended_tag; + // Extract information from the header. + extract_timed_header(buffer + 1, &reactor_port_id, &federate_id, &length, &intended_tag); // size_t total_bytes_to_read = length + header_size; // size_t bytes_to_read = length; - // if (FED_COM_BUFFER_SIZE < header_size + 1) { - // lf_print_error_and_exit("Buffer size (%d) is not large enough to " - // "read the header plus one byte.", - // FED_COM_BUFFER_SIZE); - // } + // if (FED_COM_BUFFER_SIZE < header_size + 1) { + // lf_print_error_and_exit("Buffer size (%d) is not large enough to " + // "read the header plus one byte.", + // FED_COM_BUFFER_SIZE); + // } - // // Cut up the payload in chunks. - // if (bytes_to_read > FED_COM_BUFFER_SIZE - header_size) { - // bytes_to_read = FED_COM_BUFFER_SIZE - header_size; - // } + // // Cut up the payload in chunks. + // if (bytes_to_read > FED_COM_BUFFER_SIZE - header_size) { + // bytes_to_read = FED_COM_BUFFER_SIZE - header_size; + // } LF_PRINT_LOG("RTI received message from federate %d for federate %u port %u with intended tag " PRINTF_TAG ". Forwarding.", sending_federate->enclave.id, federate_id, reactor_port_id, intended_tag.time - lf_time_start(), intended_tag.microstep); - // size_t bytes_read = bytes_to_read + header_size; - // Following only works for string messages. - // LF_PRINT_DEBUG("Message received by RTI: %s.", buffer + header_size); + // size_t bytes_read = bytes_to_read + header_size; + // Following only works for string messages. + // LF_PRINT_DEBUG("Message received by RTI: %s.", buffer + header_size); if (rti_remote->base.tracing_enabled) { tracepoint_rti_from_federate(receive_TAGGED_MSG, sending_federate->enclave.id, &intended_tag); @@ -285,35 +283,36 @@ void handle_timed_message(federate_info_t *sending_federate, unsigned char *buff tracepoint_rti_to_federate(send_TAGGED_MSG, federate_id, &intended_tag); } - write_to_netdrv_fail_on_error(fed->fed_netdrv, bytes_read, buffer, &rti_mutex, - "RTI failed to forward message to federate %d.", federate_id); - - while (sending_federate->fed_netdrv->read_remaining_bytes > 0) { - ssize_t bytes_read_again = read_from_netdrv_close_on_error(sending_federate->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); - write_to_netdrv_fail_on_error(fed->fed_netdrv, bytes_read_again, buffer, &rti_mutex, - "RTI failed to forward message to federate %d.", federate_id); - } - - // // The message length may be longer than the buffer, - // // in which case we have to handle it in chunks. - // size_t total_bytes_read = bytes_read; - // while (total_bytes_read < total_bytes_to_read) { - // LF_PRINT_DEBUG("Forwarding message in chunks."); - // bytes_to_read = total_bytes_to_read - total_bytes_read; - // if (bytes_to_read > FED_COM_BUFFER_SIZE) { - // bytes_to_read = FED_COM_BUFFER_SIZE; - // } - // read_from_socket_fail_on_error(&sending_federate->socket, bytes_to_read, buffer, NULL, - // "RTI failed to read message chunks."); - // total_bytes_read += bytes_to_read; - - // // FIXME: a mutex needs to be held for this so that other threads - // // do not write to destination_socket and cause interleaving. However, - // // holding the rti_mutex might be very expensive. Instead, each outgoing - // // socket should probably have its own mutex. - // write_to_socket_fail_on_error(&fed->socket, bytes_to_read, buffer, &rti_mutex, - // "RTI failed to send message chunks."); - // } + write_to_netdrv_fail_on_error(fed->fed_netdrv, bytes_read, buffer, &rti_mutex, + "RTI failed to forward message to federate %d.", federate_id); + + while (sending_federate->fed_netdrv->read_remaining_bytes > 0) { + ssize_t bytes_read_again = + read_from_netdrv_close_on_error(sending_federate->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); + write_to_netdrv_fail_on_error(fed->fed_netdrv, bytes_read_again, buffer, &rti_mutex, + "RTI failed to forward message to federate %d.", federate_id); + } + + // // The message length may be longer than the buffer, + // // in which case we have to handle it in chunks. + // size_t total_bytes_read = bytes_read; + // while (total_bytes_read < total_bytes_to_read) { + // LF_PRINT_DEBUG("Forwarding message in chunks."); + // bytes_to_read = total_bytes_to_read - total_bytes_read; + // if (bytes_to_read > FED_COM_BUFFER_SIZE) { + // bytes_to_read = FED_COM_BUFFER_SIZE; + // } + // read_from_socket_fail_on_error(&sending_federate->socket, bytes_to_read, buffer, NULL, + // "RTI failed to read message chunks."); + // total_bytes_read += bytes_to_read; + + // // FIXME: a mutex needs to be held for this so that other threads + // // do not write to destination_socket and cause interleaving. However, + // // holding the rti_mutex might be very expensive. Instead, each outgoing + // // socket should probably have its own mutex. + // write_to_socket_fail_on_error(&fed->socket, bytes_to_read, buffer, &rti_mutex, + // "RTI failed to send message chunks."); + // } // Record this in-transit message in federate's in-transit message queue. if (lf_tag_compare(fed->enclave.completed, intended_tag) < 0) { @@ -339,12 +338,12 @@ void handle_timed_message(federate_info_t *sending_federate, unsigned char *buff LF_MUTEX_UNLOCK(&rti_mutex); } -void handle_latest_tag_complete(federate_info_t *fed, unsigned char *buffer) { - tag_t completed = extract_tag(buffer); - if (rti_remote->base.tracing_enabled) { - tracepoint_rti_from_federate(receive_LTC, fed->enclave.id, &completed); - } - _logical_tag_complete(&(fed->enclave), completed); +void handle_latest_tag_complete(federate_info_t* fed, unsigned char* buffer) { + tag_t completed = extract_tag(buffer); + if (rti_remote->base.tracing_enabled) { + tracepoint_rti_from_federate(receive_LTC, fed->enclave.id, &completed); + } + _logical_tag_complete(&(fed->enclave), completed); // FIXME: Should this function be in the enclave version? LF_MUTEX_LOCK(&rti_mutex); @@ -353,11 +352,11 @@ void handle_latest_tag_complete(federate_info_t *fed, unsigned char *buffer) { LF_MUTEX_UNLOCK(&rti_mutex); } -void handle_next_event_tag(federate_info_t *fed, unsigned char *buffer) { - // Acquire a mutex lock to ensure that this state does not change while a - // message is in transport or being used to determine a TAG. - LF_MUTEX_LOCK(&rti_mutex); // FIXME: Instead of using a mutex, it might be more efficient to use a - // select() mechanism to read and process federates' buffers in an orderly fashion. +void handle_next_event_tag(federate_info_t* fed, unsigned char* buffer) { + // Acquire a mutex lock to ensure that this state does not change while a + // message is in transport or being used to determine a TAG. + LF_MUTEX_LOCK(&rti_mutex); // FIXME: Instead of using a mutex, it might be more efficient to use a + // select() mechanism to read and process federates' buffers in an orderly fashion. tag_t intended_tag = extract_tag(buffer); if (rti_remote->base.tracing_enabled) { @@ -456,11 +455,11 @@ static void* wait_for_stop_request_reply(void* args) { return NULL; } -void handle_stop_request_message(federate_info_t* fed, unsigned char *buffer) { +void handle_stop_request_message(federate_info_t* fed, unsigned char* buffer) { LF_PRINT_DEBUG("RTI handling stop_request from federate %d.", fed->enclave.id); - // Extract the proposed stop tag for the federate - tag_t proposed_stop_tag = extract_tag(buffer); + // Extract the proposed stop tag for the federate + tag_t proposed_stop_tag = extract_tag(buffer); if (rti_remote->base.tracing_enabled) { tracepoint_rti_from_federate(receive_STOP_REQ, fed->enclave.id, &proposed_stop_tag); @@ -532,8 +531,8 @@ void handle_stop_request_message(federate_info_t* fed, unsigned char *buffer) { LF_MUTEX_UNLOCK(&rti_mutex); } -void handle_stop_request_reply(federate_info_t *fed, unsigned char *buffer) { - tag_t federate_stop_tag = extract_tag(buffer); +void handle_stop_request_reply(federate_info_t* fed, unsigned char* buffer) { + tag_t federate_stop_tag = extract_tag(buffer); if (rti_remote->base.tracing_enabled) { tracepoint_rti_from_federate(receive_STOP_REQ_REP, fed->enclave.id, &federate_stop_tag); @@ -554,11 +553,11 @@ void handle_stop_request_reply(federate_info_t *fed, unsigned char *buffer) { ////////////////////////////////////////////////// -//TODO: The whole message needs to be changed. It should not be port and IP specific. -void handle_address_query(uint16_t fed_id, unsigned char *buffer) { - federate_info_t *fed = GET_FED_INFO(fed_id); +// TODO: The whole message needs to be changed. It should not be port and IP specific. +void handle_address_query(uint16_t fed_id, unsigned char* buffer) { + federate_info_t* fed = GET_FED_INFO(fed_id); - uint16_t remote_fed_id = extract_uint16(buffer); + uint16_t remote_fed_id = extract_uint16(buffer); if (rti_remote->base.tracing_enabled) { tracepoint_rti_from_federate(receive_ADR_QR, fed_id, NULL); @@ -568,45 +567,45 @@ void handle_address_query(uint16_t fed_id, unsigned char *buffer) { // NOTE: server_port initializes to -1, which means the RTI does not know // the port number because it has not yet received an MSG_TYPE_ADDRESS_ADVERTISEMENT message - // from this federate. In that case, it will respond by sending -1. - - // The length is what is needed for the reply. - unsigned char buf[1 + sizeof(int32_t) + sizeof(struct in_addr)]; + // from this federate. In that case, it will respond by sending -1. + + // The length is what is needed for the reply. + unsigned char buf[1 + sizeof(int32_t) + sizeof(struct in_addr)]; // Response message is MSG_TYPE_ADDRESS_QUERY_REPLY. buf[0] = MSG_TYPE_ADDRESS_QUERY_REPLY; // Encode the port number. federate_info_t* remote_fed = GET_FED_INFO(remote_fed_id); - // Send the port number (which could be -1) and server IP address to federate. - LF_MUTEX_LOCK(&rti_mutex); - int32_t server_port = get_port(remote_fed->fed_netdrv); - char* server_hostname; - encode_int32(server_port, (unsigned char *)&buf[1]); - if (server_port == -1){ - // RTI does not know ip_address and port yet. - server_hostname = "localhost"; - buf[1 + sizeof(int32_t)] = -1; - } else { - server_hostname = get_host_name(remote_fed->fed_netdrv); - memcpy(buf + 1 + sizeof(int32_t), (unsigned char *)get_ip_addr(remote_fed->fed_netdrv), sizeof(*get_ip_addr(remote_fed->fed_netdrv))); - } - write_to_netdrv_fail_on_error( - fed->fed_netdrv, sizeof(int32_t) + 1 + sizeof(*get_ip_addr(remote_fed->fed_netdrv)), (unsigned char *)buf, &rti_mutex, - "Failed to write port number to netdrv of federate %d.", fed_id); + // Send the port number (which could be -1) and server IP address to federate. + LF_MUTEX_LOCK(&rti_mutex); + int32_t server_port = get_port(remote_fed->fed_netdrv); + char* server_hostname; + encode_int32(server_port, (unsigned char*)&buf[1]); + if (server_port == -1) { + // RTI does not know ip_address and port yet. + server_hostname = "localhost"; + buf[1 + sizeof(int32_t)] = -1; + } else { + server_hostname = get_host_name(remote_fed->fed_netdrv); + memcpy(buf + 1 + sizeof(int32_t), (unsigned char*)get_ip_addr(remote_fed->fed_netdrv), + sizeof(*get_ip_addr(remote_fed->fed_netdrv))); + } + write_to_netdrv_fail_on_error(fed->fed_netdrv, sizeof(int32_t) + 1 + sizeof(*get_ip_addr(remote_fed->fed_netdrv)), + (unsigned char*)buf, &rti_mutex, + "Failed to write port number to netdrv of federate %d.", fed_id); - LF_MUTEX_UNLOCK(&rti_mutex); + LF_MUTEX_UNLOCK(&rti_mutex); - LF_PRINT_DEBUG("Replied to address query from federate %d with address %s:%d.", fed_id, server_hostname, - server_port); + LF_PRINT_DEBUG("Replied to address query from federate %d with address %s:%d.", fed_id, server_hostname, server_port); } -//TODO: NEED to be fixed. -void handle_address_ad(uint16_t federate_id, unsigned char *buffer) { - federate_info_t *fed = GET_FED_INFO(federate_id); - // Read the port number of the federate that can be used for physical - // connections to other federates - int32_t server_port = -1; +// TODO: NEED to be fixed. +void handle_address_ad(uint16_t federate_id, unsigned char* buffer) { + federate_info_t* fed = GET_FED_INFO(federate_id); + // Read the port number of the federate that can be used for physical + // connections to other federates + int32_t server_port = -1; server_port = extract_int32(buffer); @@ -622,13 +621,13 @@ void handle_address_ad(uint16_t federate_id, unsigned char *buffer) { } } -void handle_timestamp(federate_info_t *my_fed, unsigned char *buffer) { - int64_t timestamp = swap_bytes_if_big_endian_int64(*((int64_t *)(buffer))); - if (rti_remote->base.tracing_enabled) { - tag_t tag = {.time = timestamp, .microstep = 0}; - tracepoint_rti_from_federate(receive_TIMESTAMP, my_fed->enclave.id, &tag); - } - LF_PRINT_DEBUG("RTI received timestamp message with time: " PRINTF_TIME ".", timestamp); +void handle_timestamp(federate_info_t* my_fed, unsigned char* buffer) { + int64_t timestamp = swap_bytes_if_big_endian_int64(*((int64_t*)(buffer))); + if (rti_remote->base.tracing_enabled) { + tag_t tag = {.time = timestamp, .microstep = 0}; + tracepoint_rti_from_federate(receive_TIMESTAMP, my_fed->enclave.id, &tag); + } + LF_PRINT_DEBUG("RTI received timestamp message with time: " PRINTF_TIME ".", timestamp); LF_MUTEX_LOCK(&rti_mutex); rti_remote->num_feds_proposed_start++; @@ -686,29 +685,25 @@ void send_physical_clock(unsigned char message_type, federate_info_t* fed, socke int64_t current_physical_time = lf_time_physical(); encode_int64(current_physical_time, &(buffer[1])); - // Send the message - if (socket_type == UDP) { - LF_PRINT_DEBUG("Clock sync: RTI sending UDP message type %u.", buffer[0]); - ssize_t bytes_written = write_to_netdrv_UDP(rti_remote->clock_netdrv, fed->clock_netdrv, 1 + sizeof(int64_t), buffer, 0); - if (bytes_written < (ssize_t)sizeof(int64_t) + 1) { - lf_print_warning("Clock sync: RTI failed to send physical time to federate %d: %s\n", - fed->enclave.id, - strerror(errno)); - return; - } - } - else if (socket_type == TCP) { - LF_PRINT_DEBUG("Clock sync: RTI sending TCP message type %u.", buffer[0]); - LF_MUTEX_LOCK(&rti_mutex); - write_to_netdrv_fail_on_error(fed->fed_netdrv, 1 + sizeof(int64_t), buffer, &rti_mutex, - "Clock sync: RTI failed to send physical time to federate %d.", - fed->enclave.id); - LF_MUTEX_UNLOCK(&rti_mutex); + // Send the message + if (socket_type == UDP) { + LF_PRINT_DEBUG("Clock sync: RTI sending UDP message type %u.", buffer[0]); + ssize_t bytes_written = + write_to_netdrv_UDP(rti_remote->clock_netdrv, fed->clock_netdrv, 1 + sizeof(int64_t), buffer, 0); + if (bytes_written < (ssize_t)sizeof(int64_t) + 1) { + lf_print_warning("Clock sync: RTI failed to send physical time to federate %d: %s\n", fed->enclave.id, + strerror(errno)); + return; } - LF_PRINT_DEBUG("Clock sync: RTI sent PHYSICAL_TIME_SYNC_MESSAGE with timestamp " PRINTF_TIME - " to federate %d.", - current_physical_time, - fed->enclave.id); + } else if (socket_type == TCP) { + LF_PRINT_DEBUG("Clock sync: RTI sending TCP message type %u.", buffer[0]); + LF_MUTEX_LOCK(&rti_mutex); + write_to_netdrv_fail_on_error(fed->fed_netdrv, 1 + sizeof(int64_t), buffer, &rti_mutex, + "Clock sync: RTI failed to send physical time to federate %d.", fed->enclave.id); + LF_MUTEX_UNLOCK(&rti_mutex); + } + LF_PRINT_DEBUG("Clock sync: RTI sent PHYSICAL_TIME_SYNC_MESSAGE with timestamp " PRINTF_TIME " to federate %d.", + current_physical_time, fed->enclave.id); } void handle_physical_clock_sync_message(federate_info_t* my_fed, socket_type_t socket_type) { @@ -844,8 +839,8 @@ static void handle_federate_failed(federate_info_t* my_fed) { // Indicate that there will no further events from this federate. my_fed->enclave.next_event = FOREVER_TAG; - // Shutdown and close netdriver. - my_fed->fed_netdrv->close(my_fed->fed_netdrv); + // Shutdown and close netdriver. + my_fed->fed_netdrv->close(my_fed->fed_netdrv); // Check downstream federates to see whether they should now be granted a TAG. // To handle cycles, need to create a boolean array to keep @@ -869,7 +864,7 @@ static void handle_federate_failed(federate_info_t* my_fed) { * * @param my_fed The federate sending a MSG_TYPE_RESIGN message. */ -//TODO: NEEDS TO BE CHANGED. +// TODO: NEEDS TO BE CHANGED. static void handle_federate_resign(federate_info_t* my_fed) { // Nothing more to do. Close the socket and exit. LF_MUTEX_LOCK(&rti_mutex); @@ -886,7 +881,7 @@ static void handle_federate_resign(federate_info_t* my_fed) { my_fed->enclave.next_event = FOREVER_TAG; // TODO: Needs discussion. - // // According to this: https://stackoverflow.com/questions/4160347/close-vs-shutdown-socket, + // // According to this: https://stackoverflow.com/questions/4160347/close-vs-shutdown-socket, // // the close should happen when receiving a 0 length message from the other end. // // Here, we just signal the other side that no further writes to the socket are // // forthcoming, which should result in the other end getting a zero-length reception. @@ -897,12 +892,12 @@ static void handle_federate_resign(federate_info_t* my_fed) { // // the federate is resigning and should itself invoke shutdown. // unsigned char buffer[10]; // while (read(my_fed->socket, buffer, 10) > 0) - ; + ; // // We can now safely close the socket. // close(my_fed->socket); // from unistd.h - my_fed->fed_netdrv->close(my_fed->fed_netdrv); + my_fed->fed_netdrv->close(my_fed->fed_netdrv); // Check downstream federates to see whether they should now be granted a TAG. // To handle cycles, need to create a boolean array to keep @@ -923,58 +918,59 @@ void* federate_info_thread_TCP(void* fed) { // are forwarded piece by piece. unsigned char buffer[FED_COM_BUFFER_SIZE]; - // Listen for messages from the federate. - while (my_fed->enclave.state != NOT_CONNECTED) { - // Read no more than one byte to get the message type. - ssize_t bytes_read = read_from_netdrv(my_fed->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); - if (bytes_read <= 0) { - // Socket is closed - lf_print_warning("RTI: Socket to federate %d is closed. Exiting the thread.", my_fed->enclave.id); - my_fed->enclave.state = NOT_CONNECTED; - // FIXME: We need better error handling here, but do not stop execution here. - break; - } - LF_PRINT_DEBUG("RTI: Received message type %u from federate %d.", buffer[0], my_fed->enclave.id); - switch (buffer[0]) { - case MSG_TYPE_TIMESTAMP: - handle_timestamp(my_fed, buffer + 1); - break; - case MSG_TYPE_ADDRESS_QUERY: - handle_address_query(my_fed->enclave.id, buffer + 1); - break; - case MSG_TYPE_ADDRESS_ADVERTISEMENT: - handle_address_ad(my_fed->enclave.id, buffer + 1); - break; - case MSG_TYPE_TAGGED_MESSAGE: - handle_timed_message(my_fed, buffer, FED_COM_BUFFER_SIZE, bytes_read); - break; - case MSG_TYPE_RESIGN: - // handle_federate_resign(my_fed); - return NULL; - case MSG_TYPE_NEXT_EVENT_TAG: - handle_next_event_tag(my_fed, buffer + 1); - break; - case MSG_TYPE_LATEST_TAG_COMPLETE: - handle_latest_tag_complete(my_fed, buffer + 1); - break; - case MSG_TYPE_STOP_REQUEST: - handle_stop_request_message(my_fed, buffer + 1); - case MSG_TYPE_STOP_REQUEST_REPLY: - handle_stop_request_reply(my_fed, buffer + 1); - break; - case MSG_TYPE_PORT_ABSENT: - handle_port_absent_message(my_fed, buffer); - break; - case MSG_TYPE_FAILED: - handle_federate_failed(my_fed); - return NULL; - default: - lf_print_error("RTI received from federate %d an unrecognized TCP message type: %u.", my_fed->enclave.id, buffer[0]); - if (rti_remote->base.tracing_enabled) { - tracepoint_rti_from_federate(receive_UNIDENTIFIED, my_fed->enclave.id, NULL); - } - } + // Listen for messages from the federate. + while (my_fed->enclave.state != NOT_CONNECTED) { + // Read no more than one byte to get the message type. + ssize_t bytes_read = read_from_netdrv(my_fed->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); + if (bytes_read <= 0) { + // Socket is closed + lf_print_warning("RTI: Socket to federate %d is closed. Exiting the thread.", my_fed->enclave.id); + my_fed->enclave.state = NOT_CONNECTED; + // FIXME: We need better error handling here, but do not stop execution here. + break; + } + LF_PRINT_DEBUG("RTI: Received message type %u from federate %d.", buffer[0], my_fed->enclave.id); + switch (buffer[0]) { + case MSG_TYPE_TIMESTAMP: + handle_timestamp(my_fed, buffer + 1); + break; + case MSG_TYPE_ADDRESS_QUERY: + handle_address_query(my_fed->enclave.id, buffer + 1); + break; + case MSG_TYPE_ADDRESS_ADVERTISEMENT: + handle_address_ad(my_fed->enclave.id, buffer + 1); + break; + case MSG_TYPE_TAGGED_MESSAGE: + handle_timed_message(my_fed, buffer, FED_COM_BUFFER_SIZE, bytes_read); + break; + case MSG_TYPE_RESIGN: + // handle_federate_resign(my_fed); + return NULL; + case MSG_TYPE_NEXT_EVENT_TAG: + handle_next_event_tag(my_fed, buffer + 1); + break; + case MSG_TYPE_LATEST_TAG_COMPLETE: + handle_latest_tag_complete(my_fed, buffer + 1); + break; + case MSG_TYPE_STOP_REQUEST: + handle_stop_request_message(my_fed, buffer + 1); + case MSG_TYPE_STOP_REQUEST_REPLY: + handle_stop_request_reply(my_fed, buffer + 1); + break; + case MSG_TYPE_PORT_ABSENT: + handle_port_absent_message(my_fed, buffer); + break; + case MSG_TYPE_FAILED: + handle_federate_failed(my_fed); + return NULL; + default: + lf_print_error("RTI received from federate %d an unrecognized TCP message type: %u.", my_fed->enclave.id, + buffer[0]); + if (rti_remote->base.tracing_enabled) { + tracepoint_rti_from_federate(receive_UNIDENTIFIED, my_fed->enclave.id, NULL); + } } + } // Nothing more to do. Close the socket and exit. // Prevent multiple threads from closing the same socket at the same time. @@ -984,19 +980,19 @@ void* federate_info_thread_TCP(void* fed) { return NULL; } -void send_reject(netdrv_t *netdrv, unsigned char error_code) { - LF_PRINT_DEBUG("RTI sending MSG_TYPE_REJECT."); - unsigned char response[2]; - response[0] = MSG_TYPE_REJECT; - response[1] = error_code; - LF_MUTEX_LOCK(&rti_mutex); - // NOTE: Ignore errors on this response. - if (write_to_netdrv(netdrv, 2, response) <= 0) { - lf_print_warning("RTI failed to write MSG_TYPE_REJECT message on the socket."); - } - // Shutdown and close the netdrv. - netdrv->close(netdrv); - LF_MUTEX_UNLOCK(&rti_mutex); +void send_reject(netdrv_t* netdrv, unsigned char error_code) { + LF_PRINT_DEBUG("RTI sending MSG_TYPE_REJECT."); + unsigned char response[2]; + response[0] = MSG_TYPE_REJECT; + response[1] = error_code; + LF_MUTEX_LOCK(&rti_mutex); + // NOTE: Ignore errors on this response. + if (write_to_netdrv(netdrv, 2, response) <= 0) { + lf_print_warning("RTI failed to write MSG_TYPE_REJECT message on the socket."); + } + // Shutdown and close the netdrv. + netdrv->close(netdrv); + LF_MUTEX_UNLOCK(&rti_mutex); } /** @@ -1008,16 +1004,16 @@ void send_reject(netdrv_t *netdrv, unsigned char error_code) { * @param client_fd The socket address. * @return The federate ID for success or -1 for failure. */ -//TODO: UPDATE comments. -static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { - // Buffer for message ID, federate ID, federation ID length, and federation ID. - unsigned char buffer[256]; //TODO: NEED TO CHECK. - // Read bytes from the socket. We need 4 bytes. - - if (read_from_netdrv_close_on_error(netdrv, buffer, 256) <= 0) { //TODO: check length. - lf_print_error("RTI failed to read from accepted socket."); - return -1; - } +// TODO: UPDATE comments. +static int32_t receive_and_check_fed_id_message(netdrv_t* netdrv) { + // Buffer for message ID, federate ID, federation ID length, and federation ID. + unsigned char buffer[256]; // TODO: NEED TO CHECK. + // Read bytes from the socket. We need 4 bytes. + + if (read_from_netdrv_close_on_error(netdrv, buffer, 256) <= 0) { // TODO: check length. + lf_print_error("RTI failed to read from accepted socket."); + return -1; + } uint16_t fed_id = rti_remote->base.number_of_scheduling_nodes; // Initialize to an invalid value. @@ -1037,9 +1033,9 @@ static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { send_reject(netdrv, WRONG_SERVER); } else { send_reject(netdrv, UNEXPECTED_MESSAGE); - } - if (rti_remote->base.tracing_enabled) { - tracepoint_rti_to_federate(send_REJECT, fed_id, NULL); + } + if (rti_remote->base.tracing_enabled) { + tracepoint_rti_to_federate(send_REJECT, fed_id, NULL); } lf_print_error("RTI expected a MSG_TYPE_FED_IDS message. Got %u (see net_common.h).", buffer[0]); return -1; @@ -1048,51 +1044,50 @@ static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { fed_id = extract_uint16(buffer + 1); LF_PRINT_DEBUG("RTI received federate ID: %d.", fed_id); - // Read the federation ID. First read the length, which is one byte. - size_t federation_id_length = (size_t)buffer[sizeof(uint16_t) + 1]; + // Read the federation ID. First read the length, which is one byte. + size_t federation_id_length = (size_t)buffer[sizeof(uint16_t) + 1]; // Terminate the string with a null. buffer[2 + sizeof(uint16_t) + federation_id_length] = 0; LF_PRINT_DEBUG("RTI received federation ID: %s.", buffer + 2 + sizeof(uint16_t)); + if (rti_remote->base.tracing_enabled) { + tracepoint_rti_from_federate(receive_FED_ID, fed_id, NULL); + } + // Compare the received federation ID to mine. + if (strncmp(rti_remote->federation_id, buffer + 2 + sizeof(uint16_t), federation_id_length) != 0) { + // Federation IDs do not match. Send back a MSG_TYPE_REJECT message. + lf_print_warning("Federate from another federation %s attempted to connect to RTI in federation %s.", + buffer + 2 + sizeof(uint16_t), rti_remote->federation_id); + if (rti_remote->base.tracing_enabled) { + tracepoint_rti_to_federate(send_REJECT, fed_id, NULL); + } + send_reject(netdrv, FEDERATION_ID_DOES_NOT_MATCH); + return -1; + } else { + if (fed_id >= rti_remote->base.number_of_scheduling_nodes) { + // Federate ID is out of range. + lf_print_error("RTI received federate ID %d, which is out of range.", fed_id); if (rti_remote->base.tracing_enabled) { - tracepoint_rti_from_federate(receive_FED_ID, fed_id, NULL); + tracepoint_rti_to_federate(send_REJECT, fed_id, NULL); } - // Compare the received federation ID to mine. - if (strncmp(rti_remote->federation_id, buffer + 2 + sizeof(uint16_t), federation_id_length) != 0) { - // Federation IDs do not match. Send back a MSG_TYPE_REJECT message. - lf_print_warning("Federate from another federation %s attempted to connect to RTI in federation %s.", - buffer + 2 + sizeof(uint16_t), - rti_remote->federation_id); - if (rti_remote->base.tracing_enabled) { - tracepoint_rti_to_federate(send_REJECT, fed_id, NULL); - } - send_reject(netdrv, FEDERATION_ID_DOES_NOT_MATCH); - return -1; - } else { - if (fed_id >= rti_remote->base.number_of_scheduling_nodes) { - // Federate ID is out of range. - lf_print_error("RTI received federate ID %d, which is out of range.", fed_id); - if (rti_remote->base.tracing_enabled) { - tracepoint_rti_to_federate(send_REJECT, fed_id, NULL); - } - send_reject(netdrv, FEDERATE_ID_OUT_OF_RANGE); - return -1; - } else { - if ((rti_remote->base.scheduling_nodes[fed_id])->state != NOT_CONNECTED) { - lf_print_error("RTI received duplicate federate ID: %d.", fed_id); - if (rti_remote->base.tracing_enabled) { - tracepoint_rti_to_federate(send_REJECT, fed_id, NULL); - } - send_reject(netdrv, FEDERATE_ID_IN_USE); - return -1; - } - } + send_reject(netdrv, FEDERATE_ID_OUT_OF_RANGE); + return -1; + } else { + if ((rti_remote->base.scheduling_nodes[fed_id])->state != NOT_CONNECTED) { + lf_print_error("RTI received duplicate federate ID: %d.", fed_id); + if (rti_remote->base.tracing_enabled) { + tracepoint_rti_to_federate(send_REJECT, fed_id, NULL); + } + send_reject(netdrv, FEDERATE_ID_IN_USE); + return -1; } + } } - federate_info_t *fed = GET_FED_INFO(fed_id); - fed->fed_netdrv = netdrv; + } + federate_info_t* fed = GET_FED_INFO(fed_id); + fed->fed_netdrv = netdrv; // TODO: Make this work for only TCP. #if LOG_LEVEL >= LOG_LEVEL_DEBUG @@ -1100,7 +1095,7 @@ static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { // the .server_hostname field of the federate. char str[INET_ADDRSTRLEN + 1]; - //TODO: NEED TO FIX HERE! + // TODO: NEED TO FIX HERE! inet_ntop(AF_INET, get_ip_addr(fed->fed_netdrv), str, INET_ADDRSTRLEN); strncpy(get_host_name(fed->fed_netdrv), str, INET_ADDRSTRLEN); @@ -1136,16 +1131,12 @@ static int32_t receive_and_check_fed_id_message(netdrv_t *netdrv) { * out the relevant information in the federate's struct. * @return 1 on success and 0 on failure. */ -static int receive_connection_information(netdrv_t *netdrv, uint16_t fed_id) { - unsigned char connection_info_buffer[1024]; - LF_PRINT_DEBUG("RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate %d.", fed_id); - read_from_netdrv_fail_on_error( - netdrv, - connection_info_buffer, - 1024, - NULL, - "RTI failed to read MSG_TYPE_NEIGHBOR_STRUCTURE message header from federate %d.", - fed_id); +static int receive_connection_information(netdrv_t* netdrv, uint16_t fed_id) { + unsigned char connection_info_buffer[1024]; + LF_PRINT_DEBUG("RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate %d.", fed_id); + read_from_netdrv_fail_on_error(netdrv, connection_info_buffer, 1024, NULL, + "RTI failed to read MSG_TYPE_NEIGHBOR_STRUCTURE message header from federate %d.", + fed_id); if (connection_info_buffer[0] != MSG_TYPE_NEIGHBOR_STRUCTURE) { lf_print_error("RTI was expecting a MSG_TYPE_UDP_PORT message from federate %d. Got %u instead. " @@ -1176,32 +1167,31 @@ static int receive_connection_information(netdrv_t *netdrv, uint16_t fed_id) { fed->enclave.downstream = (int*)NULL; } - size_t connections_info_body_size = ( - (sizeof(uint16_t) + sizeof(int64_t)) * fed->enclave.num_upstream) - + (sizeof(uint16_t) * fed->enclave.num_downstream); - if (connections_info_body_size > 0) { - // Keep track of where we are in the buffer - size_t message_head = MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE; - // First, read the info about upstream federates - for (int i = 0; i < fed->enclave.num_upstream; i++) { - fed->enclave.upstream[i] = extract_uint16(&(connection_info_buffer[message_head])); - message_head += sizeof(uint16_t); - fed->enclave.upstream_delay[i] = extract_int64(&(connection_info_buffer[message_head])); - message_head += sizeof(int64_t); - } + size_t connections_info_body_size = ((sizeof(uint16_t) + sizeof(int64_t)) * fed->enclave.num_upstream) + + (sizeof(uint16_t) * fed->enclave.num_downstream); + if (connections_info_body_size > 0) { + // Keep track of where we are in the buffer + size_t message_head = MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE; + // First, read the info about upstream federates + for (int i = 0; i < fed->enclave.num_upstream; i++) { + fed->enclave.upstream[i] = extract_uint16(&(connection_info_buffer[message_head])); + message_head += sizeof(uint16_t); + fed->enclave.upstream_delay[i] = extract_int64(&(connection_info_buffer[message_head])); + message_head += sizeof(int64_t); + } - // Next, read the info about downstream federates - for (int i = 0; i < fed->enclave.num_downstream; i++) { - fed->enclave.downstream[i] = extract_uint16(&(connection_info_buffer[message_head])); - message_head += sizeof(uint16_t); - } - } + // Next, read the info about downstream federates + for (int i = 0; i < fed->enclave.num_downstream; i++) { + fed->enclave.downstream[i] = extract_uint16(&(connection_info_buffer[message_head])); + message_head += sizeof(uint16_t); + } } - LF_PRINT_DEBUG("RTI received neighbor structure from federate %d.", fed_id); - return 1; + } + LF_PRINT_DEBUG("RTI received neighbor structure from federate %d.", fed_id); + return 1; } -//TODO: NEEDS TO BE FIXED!! +// TODO: NEEDS TO BE FIXED!! /** * Listen for a MSG_TYPE_UDP_PORT message, and upon receiving it, set up * clock synchronization and perform the initial clock synchronization. @@ -1214,26 +1204,25 @@ static int receive_connection_information(netdrv_t *netdrv, uint16_t fed_id) { * @param fed_id The federate ID. * @return 1 for success, 0 for failure. */ -static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t fed_id) { - // Read the MSG_TYPE_UDP_PORT message from the federate regardless of the status of - // clock synchronization. This message will tell the RTI whether the federate - // is doing clock synchronization, and if it is, what port to use for UDP. - LF_PRINT_DEBUG("RTI waiting for MSG_TYPE_UDP_PORT from federate %d.", fed_id); - unsigned char response[1 + sizeof(uint16_t)]; - read_from_netdrv_fail_on_error(netdrv, response, 1 + sizeof(uint16_t), NULL, - "RTI failed to read MSG_TYPE_UDP_PORT message from federate %d.", fed_id); - if (response[0] != MSG_TYPE_UDP_PORT) { - lf_print_error( - "RTI was expecting a MSG_TYPE_UDP_PORT message from federate %d. Got %u instead. " - "Rejecting federate.", - fed_id, response[0]); - send_reject(netdrv, UNEXPECTED_MESSAGE); - return 0; - } else { - federate_info_t *fed = GET_FED_INFO(fed_id); - if (rti_remote->clock_sync_global_status >= clock_sync_init) { - // If no initial clock sync, no need perform initial clock sync. - uint16_t federate_UDP_port_number = extract_uint16(&(response[1])); +static int receive_udp_message_and_set_up_clock_sync(netdrv_t* netdrv, uint16_t fed_id) { + // Read the MSG_TYPE_UDP_PORT message from the federate regardless of the status of + // clock synchronization. This message will tell the RTI whether the federate + // is doing clock synchronization, and if it is, what port to use for UDP. + LF_PRINT_DEBUG("RTI waiting for MSG_TYPE_UDP_PORT from federate %d.", fed_id); + unsigned char response[1 + sizeof(uint16_t)]; + read_from_netdrv_fail_on_error(netdrv, response, 1 + sizeof(uint16_t), NULL, + "RTI failed to read MSG_TYPE_UDP_PORT message from federate %d.", fed_id); + if (response[0] != MSG_TYPE_UDP_PORT) { + lf_print_error("RTI was expecting a MSG_TYPE_UDP_PORT message from federate %d. Got %u instead. " + "Rejecting federate.", + fed_id, response[0]); + send_reject(netdrv, UNEXPECTED_MESSAGE); + return 0; + } else { + federate_info_t* fed = GET_FED_INFO(fed_id); + if (rti_remote->clock_sync_global_status >= clock_sync_init) { + // If no initial clock sync, no need perform initial clock sync. + uint16_t federate_UDP_port_number = extract_uint16(&(response[1])); LF_PRINT_DEBUG("RTI got MSG_TYPE_UDP_PORT %u from federate %d.", federate_UDP_port_number, fed_id); @@ -1245,44 +1234,44 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t // Send the RTI's current physical time T1 to the federate. send_physical_clock(MSG_TYPE_CLOCK_SYNC_T1, fed, TCP); - // Listen for reply message, which should be T3. - size_t message_size = 1 + sizeof(int32_t); - unsigned char buffer[message_size]; - read_from_netdrv_fail_on_error(netdrv, buffer, message_size, NULL, - "Socket to federate %d unexpectedly closed.", fed_id); - if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T3) { - int32_t fed_id = extract_int32(&(buffer[1])); - assert(fed_id > -1); - assert(fed_id < 65536); - LF_PRINT_DEBUG("RTI received T3 clock sync message from federate %d.", fed_id); - handle_physical_clock_sync_message(fed, TCP); - } else { - lf_print_error("Unexpected message %u from federate %d.", buffer[0], fed_id); - send_reject(netdrv, UNEXPECTED_MESSAGE); - return 0; - } - } - LF_PRINT_DEBUG("RTI finished initial clock synchronization with federate %d.", fed_id); - } - if (rti_remote->clock_sync_global_status >= clock_sync_on) { - // If no runtime clock sync, no need to set up the UDP port. - // Initialize the UDP_addr field of the federate struct - set_clock_netdrv(fed->clock_netdrv, netdrv, federate_UDP_port_number); - } else { - // Disable clock sync after initial round. - fed->clock_synchronization_enabled = false; - } - } else { - // No clock synchronization at all. - LF_PRINT_DEBUG("RTI: No clock synchronization for federate %d.", fed_id); - // Clock synchronization is universally disabled via the clock-sync command-line parameter - // (-c off was passed to the RTI). - // Note that the federates are still going to send a - // MSG_TYPE_UDP_PORT message but with a payload (port) of -1. - fed->clock_synchronization_enabled = false; + // Listen for reply message, which should be T3. + size_t message_size = 1 + sizeof(int32_t); + unsigned char buffer[message_size]; + read_from_netdrv_fail_on_error(netdrv, buffer, message_size, NULL, + "Socket to federate %d unexpectedly closed.", fed_id); + if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T3) { + int32_t fed_id = extract_int32(&(buffer[1])); + assert(fed_id > -1); + assert(fed_id < 65536); + LF_PRINT_DEBUG("RTI received T3 clock sync message from federate %d.", fed_id); + handle_physical_clock_sync_message(fed, TCP); + } else { + lf_print_error("Unexpected message %u from federate %d.", buffer[0], fed_id); + send_reject(netdrv, UNEXPECTED_MESSAGE); + return 0; + } } + LF_PRINT_DEBUG("RTI finished initial clock synchronization with federate %d.", fed_id); + } + if (rti_remote->clock_sync_global_status >= clock_sync_on) { + // If no runtime clock sync, no need to set up the UDP port. + // Initialize the UDP_addr field of the federate struct + set_clock_netdrv(fed->clock_netdrv, netdrv, federate_UDP_port_number); + } else { + // Disable clock sync after initial round. + fed->clock_synchronization_enabled = false; + } + } else { + // No clock synchronization at all. + LF_PRINT_DEBUG("RTI: No clock synchronization for federate %d.", fed_id); + // Clock synchronization is universally disabled via the clock-sync command-line parameter + // (-c off was passed to the RTI). + // Note that the federates are still going to send a + // MSG_TYPE_UDP_PORT message but with a payload (port) of -1. + fed->clock_synchronization_enabled = false; } - return 1; + } + return 1; } #ifdef __RTI_AUTH__ @@ -1292,41 +1281,38 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t *netdrv, uint16_t * @param socket Socket for the incoming federate tryting to authenticate. * @return True if authentication is successful and false otherwise. */ -static bool authenticate_federate(netdrv_t *fed_netdrv) { - // Wait for MSG_TYPE_FED_NONCE from federate. - size_t fed_id_length = sizeof(uint16_t); - unsigned char buffer[1 + fed_id_length + NONCE_LENGTH]; - read_from_netdrv_fail_on_error(fed_netdrv, buffer, 1 + fed_id_length + NONCE_LENGTH, NULL, - "Failed to read MSG_TYPE_FED_NONCE."); - if (buffer[0] != MSG_TYPE_FED_NONCE) { - lf_print_error_and_exit( - "Received unexpected response %u from the FED (see net_common.h).", - buffer[0]); - } - unsigned int hmac_length = SHA256_HMAC_LENGTH; - size_t federation_id_length = strnlen(rti_remote->federation_id, 255); - // HMAC tag is created with MSG_TYPE, federate ID, received federate nonce. - unsigned char mac_buf[1 + fed_id_length + NONCE_LENGTH]; - mac_buf[0] = MSG_TYPE_RTI_RESPONSE; - memcpy(&mac_buf[1], &buffer[1], fed_id_length); - memcpy(&mac_buf[1 + fed_id_length], &buffer[1 + fed_id_length], NONCE_LENGTH); - unsigned char hmac_tag[hmac_length]; - unsigned char *ret = HMAC(EVP_sha256(), rti_remote->federation_id, - federation_id_length, mac_buf, 1 + fed_id_length + NONCE_LENGTH, - hmac_tag, &hmac_length); - if (ret == NULL) { - lf_print_error_and_exit("HMAC construction failed for MSG_TYPE_RTI_RESPONSE."); - } - // Make buffer for message type, RTI's nonce, and HMAC tag. - unsigned char sender[1 + NONCE_LENGTH + hmac_length]; - sender[0] = MSG_TYPE_RTI_RESPONSE; - unsigned char rti_nonce[NONCE_LENGTH]; - RAND_bytes(rti_nonce, NONCE_LENGTH); - memcpy(&sender[1], rti_nonce, NONCE_LENGTH); - memcpy(&sender[1 + NONCE_LENGTH], hmac_tag, hmac_length); - if (write_to_netdrv(fed_netdrv, 1 + NONCE_LENGTH + hmac_length, sender) <= 0) { - lf_print_error("Failed to send nonce to federate."); - } +static bool authenticate_federate(netdrv_t* fed_netdrv) { + // Wait for MSG_TYPE_FED_NONCE from federate. + size_t fed_id_length = sizeof(uint16_t); + unsigned char buffer[1 + fed_id_length + NONCE_LENGTH]; + read_from_netdrv_fail_on_error(fed_netdrv, buffer, 1 + fed_id_length + NONCE_LENGTH, NULL, + "Failed to read MSG_TYPE_FED_NONCE."); + if (buffer[0] != MSG_TYPE_FED_NONCE) { + lf_print_error_and_exit("Received unexpected response %u from the FED (see net_common.h).", buffer[0]); + } + unsigned int hmac_length = SHA256_HMAC_LENGTH; + size_t federation_id_length = strnlen(rti_remote->federation_id, 255); + // HMAC tag is created with MSG_TYPE, federate ID, received federate nonce. + unsigned char mac_buf[1 + fed_id_length + NONCE_LENGTH]; + mac_buf[0] = MSG_TYPE_RTI_RESPONSE; + memcpy(&mac_buf[1], &buffer[1], fed_id_length); + memcpy(&mac_buf[1 + fed_id_length], &buffer[1 + fed_id_length], NONCE_LENGTH); + unsigned char hmac_tag[hmac_length]; + unsigned char* ret = HMAC(EVP_sha256(), rti_remote->federation_id, federation_id_length, mac_buf, + 1 + fed_id_length + NONCE_LENGTH, hmac_tag, &hmac_length); + if (ret == NULL) { + lf_print_error_and_exit("HMAC construction failed for MSG_TYPE_RTI_RESPONSE."); + } + // Make buffer for message type, RTI's nonce, and HMAC tag. + unsigned char sender[1 + NONCE_LENGTH + hmac_length]; + sender[0] = MSG_TYPE_RTI_RESPONSE; + unsigned char rti_nonce[NONCE_LENGTH]; + RAND_bytes(rti_nonce, NONCE_LENGTH); + memcpy(&sender[1], rti_nonce, NONCE_LENGTH); + memcpy(&sender[1 + NONCE_LENGTH], hmac_tag, hmac_length); + if (write_to_netdrv(fed_netdrv, 1 + NONCE_LENGTH + hmac_length, sender) <= 0) { + lf_print_error("Failed to send nonce to federate."); + } // Wait for MSG_TYPE_FED_RESPONSE unsigned char received[1 + hmac_length]; @@ -1358,31 +1344,29 @@ static bool authenticate_federate(netdrv_t *fed_netdrv) { } #endif +void lf_connect_to_federates(netdrv_t* rti_netdrv) { + for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { -void lf_connect_to_federates(netdrv_t *rti_netdrv) { - for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { - - netdrv_t *fed_netdrv = accept_connection(rti_netdrv); + netdrv_t* fed_netdrv = accept_connection(rti_netdrv); // Wait for the first message from the federate when RTI -a option is on. #ifdef __RTI_AUTH__ - if (rti_remote->authentication_enabled) { - if (!authenticate_federate(fed_netdrv)) { - lf_print_warning("RTI failed to authenticate the incoming federate."); - - fed_netdrv->close(fed_netdrv); - // Ignore the federate that failed authentication. - i--; - continue; - } - } + if (rti_remote->authentication_enabled) { + if (!authenticate_federate(fed_netdrv)) { + lf_print_warning("RTI failed to authenticate the incoming federate."); + + fed_netdrv->close(fed_netdrv); + // Ignore the federate that failed authentication. + i--; + continue; + } + } #endif - // The first message from the federate should contain its ID and the federation ID. - int32_t fed_id = receive_and_check_fed_id_message(fed_netdrv); - if (fed_id >= 0 - && receive_connection_information(fed_netdrv, (uint16_t)fed_id) - && receive_udp_message_and_set_up_clock_sync(fed_netdrv, (uint16_t)fed_id)) { + // The first message from the federate should contain its ID and the federation ID. + int32_t fed_id = receive_and_check_fed_id_message(fed_netdrv); + if (fed_id >= 0 && receive_connection_information(fed_netdrv, (uint16_t)fed_id) && + receive_udp_message_and_set_up_clock_sync(fed_netdrv, (uint16_t)fed_id)) { // Create a thread to communicate with the federate. // This has to be done after clock synchronization is finished @@ -1398,73 +1382,74 @@ void lf_connect_to_federates(netdrv_t *rti_netdrv) { // All federates have connected. LF_PRINT_DEBUG("All federates have connected to RTI."); - if (rti_remote->clock_sync_global_status >= clock_sync_on) { - // Create the thread that performs periodic PTP clock synchronization sessions - // over the UDP channel, but only if the UDP channel is open and at least one - // federate is performing runtime clock synchronization. - bool clock_sync_enabled = false; - for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { - federate_info_t *fed_info = GET_FED_INFO(i); - if (fed_info->clock_synchronization_enabled) { - clock_sync_enabled = true; - break; - } - } - if (rti_remote->final_port_UDP != UINT16_MAX && clock_sync_enabled) { - if (get_port(rti_remote->clock_netdrv) != UINT16_MAX && clock_sync_enabled) { - lf_thread_create(&rti_remote->clock_thread, clock_synchronization_thread, NULL); - } + if (rti_remote->clock_sync_global_status >= clock_sync_on) { + // Create the thread that performs periodic PTP clock synchronization sessions + // over the UDP channel, but only if the UDP channel is open and at least one + // federate is performing runtime clock synchronization. + bool clock_sync_enabled = false; + for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { + federate_info_t* fed_info = GET_FED_INFO(i); + if (fed_info->clock_synchronization_enabled) { + clock_sync_enabled = true; + break; + } } + if (rti_remote->final_port_UDP != UINT16_MAX && clock_sync_enabled) { + if (get_port(rti_remote->clock_netdrv) != UINT16_MAX && clock_sync_enabled) { + lf_thread_create(&rti_remote->clock_thread, clock_synchronization_thread, NULL); + } } + } } -void *respond_to_erroneous_connections(void *nothing) { - initialize_lf_thread_id(); - while (true) { - // TODO: DONGHA: Need to fix. Do we need accept as api? - netdrv_t *fed_netdrv = netdrv_accept(rti_remote->rti_netdrv); +void* respond_to_erroneous_connections(void* nothing) { + initialize_lf_thread_id(); + while (true) { + // TODO: DONGHA: Need to fix. Do we need accept as api? + netdrv_t* fed_netdrv = netdrv_accept(rti_remote->rti_netdrv); - if (fed_netdrv == NULL) continue; + if (fed_netdrv == NULL) + continue; if (rti_remote->all_federates_exited) { return NULL; } - lf_print_error("RTI received an unexpected connection request. Federation is running."); - unsigned char response[2]; - response[0] = MSG_TYPE_REJECT; - response[1] = FEDERATION_ID_DOES_NOT_MATCH; - // Ignore errors on this response. - if (write_to_netdrv(fed_netdrv, 2, response) <= 0) { - lf_print_warning("RTI failed to write FEDERATION_ID_DOES_NOT_MATCH to erroneous incoming connection."); - } - // Close the netdriver. - fed_netdrv->close(fed_netdrv); + lf_print_error("RTI received an unexpected connection request. Federation is running."); + unsigned char response[2]; + response[0] = MSG_TYPE_REJECT; + response[1] = FEDERATION_ID_DOES_NOT_MATCH; + // Ignore errors on this response. + if (write_to_netdrv(fed_netdrv, 2, response) <= 0) { + lf_print_warning("RTI failed to write FEDERATION_ID_DOES_NOT_MATCH to erroneous incoming connection."); } - return NULL; + // Close the netdriver. + fed_netdrv->close(fed_netdrv); + } + return NULL; } -void initialize_federate(federate_info_t *fed, uint16_t id) { - initialize_scheduling_node(&(fed->enclave), id); - fed->requested_stop = false; - fed->clock_synchronization_enabled = true; - fed->in_transit_message_tags = pqueue_tag_init(10); - fed->clock_netdrv = netdrv_init(); +void initialize_federate(federate_info_t* fed, uint16_t id) { + initialize_scheduling_node(&(fed->enclave), id); + fed->requested_stop = false; + fed->clock_synchronization_enabled = true; + fed->in_transit_message_tags = pqueue_tag_init(10); + fed->clock_netdrv = netdrv_init(); } int32_t start_rti_server() { - _lf_initialize_clock(); - // Create the RTI's netdriver. - int success = create_rti_server(rti_remote->rti_netdrv, RTI); - lf_print("RTI: Listening for federates."); - // Create the clocksync's netdriver. - if (rti_remote->clock_sync_global_status >= clock_sync_on) { - create_rti_server(rti_remote->clock_netdrv, CLOCKSYNC); - } - return success; + _lf_initialize_clock(); + // Create the RTI's netdriver. + int success = create_rti_server(rti_remote->rti_netdrv, RTI); + lf_print("RTI: Listening for federates."); + // Create the clocksync's netdriver. + if (rti_remote->clock_sync_global_status >= clock_sync_on) { + create_rti_server(rti_remote->clock_netdrv, CLOCKSYNC); + } + return success; } -void wait_for_federates(netdrv_t *netdrv) { +void wait_for_federates(netdrv_t* netdrv) { // Wait for connections from federates and create a thread for each. lf_connect_to_federates(netdrv); @@ -1490,9 +1475,9 @@ void wait_for_federates(netdrv_t *netdrv) { rti_remote->all_federates_exited = true; - netdrv->close(netdrv); - rti_remote->clock_netdrv->close(rti_remote->clock_netdrv); - // close_netdrvs(netdrv, rti_remote->clock_netdrv); + netdrv->close(netdrv); + rti_remote->clock_netdrv->close(rti_remote->clock_netdrv); + // close_netdrvs(netdrv, rti_remote->clock_netdrv); } void initialize_RTI(rti_remote_t* rti) { @@ -1506,9 +1491,9 @@ void initialize_RTI(rti_remote_t* rti) { initialize_rti_common(&rti_remote->base); rti_remote->base.mutex = &rti_mutex; - // TODO: How to make this compile dependent? When should the options be determined? - rti_remote->rti_netdrv = netdrv_init(); - rti_remote->clock_netdrv = netdrv_init(); + // TODO: How to make this compile dependent? When should the options be determined? + rti_remote->rti_netdrv = netdrv_init(); + rti_remote->clock_netdrv = netdrv_init(); // federation_rti related initializations rti_remote->max_start_time = 0LL; diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 28d032b21..1087923ca 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -5,9 +5,9 @@ #include #include /* IFNAMSIZ */ #include -#include // IPPROTO_TCP, IPPROTO_UDP -#include // TCP_NODELAY -#include +#include // IPPROTO_TCP, IPPROTO_UDP +#include // TCP_NODELAY +#include #include #include #include @@ -19,137 +19,134 @@ #include "util.h" #include "net_common.h" -typedef enum { - TCP, - UDP -} socket_type_t; - -static socket_priv_t *get_priv(netdrv_t *drv) { - if (!drv) { - // lf_print_error_and_exit("Falied get socket_priv_t."); - // FIXME(Byeonggil): I commented out this because it shouldn't report error to send -1 port address. - return NULL; - } - return (socket_priv_t *)(drv + 1); +typedef enum { TCP, UDP } socket_type_t; + +static socket_priv_t* get_priv(netdrv_t* drv) { + if (!drv) { + // lf_print_error_and_exit("Falied get socket_priv_t."); + // FIXME(Byeonggil): I commented out this because it shouldn't report error to send -1 port address. + return NULL; + } + return (socket_priv_t*)(drv + 1); } -char* get_host_name(netdrv_t *drv) { - socket_priv_t *priv = get_priv(drv); - return priv->server_hostname; +char* get_host_name(netdrv_t* drv) { + socket_priv_t* priv = get_priv(drv); + return priv->server_hostname; } -int32_t get_my_port(netdrv_t *drv) { - socket_priv_t *priv = get_priv(drv); - return priv->port; +int32_t get_my_port(netdrv_t* drv) { + socket_priv_t* priv = get_priv(drv); + return priv->port; } -int32_t get_port(netdrv_t *drv) { - socket_priv_t *priv = get_priv(drv); - return (priv == NULL) ? -1 : priv->server_port; +int32_t get_port(netdrv_t* drv) { + socket_priv_t* priv = get_priv(drv); + return (priv == NULL) ? -1 : priv->server_port; } -struct in_addr* get_ip_addr(netdrv_t *drv) { - socket_priv_t *priv = get_priv(drv); - return &priv->server_ip_addr; +struct in_addr* get_ip_addr(netdrv_t* drv) { + socket_priv_t* priv = get_priv(drv); + return &priv->server_ip_addr; } -void set_host_name(netdrv_t *drv, const char* hostname) { - socket_priv_t *priv = get_priv(drv); - memcpy(priv->server_hostname, hostname, INET_ADDRSTRLEN); +void set_host_name(netdrv_t* drv, const char* hostname) { + socket_priv_t* priv = get_priv(drv); + memcpy(priv->server_hostname, hostname, INET_ADDRSTRLEN); } -void set_port(netdrv_t *drv, int port) { - socket_priv_t *priv = get_priv(drv); - priv->server_port = port; +void set_port(netdrv_t* drv, int port) { + socket_priv_t* priv = get_priv(drv); + priv->server_port = port; } -void set_ip_addr(netdrv_t *drv, struct in_addr ip_addr){ - socket_priv_t *priv = get_priv(drv); - priv->server_ip_addr = ip_addr; +void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { + socket_priv_t* priv = get_priv(drv); + priv->server_ip_addr = ip_addr; } -void set_clock_netdrv(netdrv_t *clock_drv, netdrv_t *rti_drv, uint16_t port_num) { - socket_priv_t *priv_clock = get_priv(clock_drv); - socket_priv_t *priv_rti = get_priv(rti_drv); - priv_clock->UDP_addr.sin_family = AF_INET; - priv_clock->UDP_addr.sin_port = htons(port_num); - priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; +void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) { + socket_priv_t* priv_clock = get_priv(clock_drv); + socket_priv_t* priv_rti = get_priv(rti_drv); + priv_clock->UDP_addr.sin_family = AF_INET; + priv_clock->UDP_addr.sin_port = htons(port_num); + priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; } // create_real_time_tcp_socket_errexit -static int socket_open(netdrv_t *drv) { - if (!drv){ - return -1; - } - socket_priv_t *priv = get_priv(drv); - priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - priv->proto = TCP; - if (priv->socket_descriptor < 0) { - lf_print_error_and_exit("Could not open TCP socket. Err=%d", priv->socket_descriptor); - } - // Disable Nagle's algorithm which bundles together small TCP messages to - // reduce network traffic - // TODO: Re-consider if we should do this, and whether disabling delayed ACKs - // is enough. - int flag = 1; - int result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } +static int socket_open(netdrv_t* drv) { + if (!drv) { + return -1; + } + socket_priv_t* priv = get_priv(drv); + priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + priv->proto = TCP; + if (priv->socket_descriptor < 0) { + lf_print_error_and_exit("Could not open TCP socket. Err=%d", priv->socket_descriptor); + } + // Disable Nagle's algorithm which bundles together small TCP messages to + // reduce network traffic + // TODO: Re-consider if we should do this, and whether disabling delayed ACKs + // is enough. + int flag = 1; + int result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } // Disable delayed ACKs. Only possible on Linux #if defined(PLATFORM_Linux) - result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); + result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } #endif - return priv->socket_descriptor; + return priv->socket_descriptor; } -void netdrv_free(netdrv_t *drv) { - socket_priv_t *priv = get_priv(drv); - // free(priv); // Already freed on socket close() - free(drv); +void netdrv_free(netdrv_t* drv) { + socket_priv_t* priv = get_priv(drv); + // free(priv); // Already freed on socket close() + free(drv); } -static void socket_close(netdrv_t *drv) { - if (!drv){ - return; - } - socket_priv_t *priv = get_priv(drv); - if (priv->socket_descriptor > 0) { - shutdown(priv->socket_descriptor, SHUT_RDWR); - close(priv->socket_descriptor); - priv->socket_descriptor = -1; - } +static void socket_close(netdrv_t* drv) { + if (!drv) { + return; + } + socket_priv_t* priv = get_priv(drv); + if (priv->socket_descriptor > 0) { + shutdown(priv->socket_descriptor, SHUT_RDWR); + close(priv->socket_descriptor); + priv->socket_descriptor = -1; + } } -netdrv_t *netdrv_init() { - // TODO: Should it be malloc? To support different network stacks operate simulatneously? - netdrv_t *drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); // Don't need to call malloc() twice. - if (!drv) { // check if malloc worked. - lf_print_error_and_exit("Falied to malloc netdrv_t."); - } - memset(drv, 0, sizeof(netdrv_t)); - - socket_priv_t *priv = get_priv(drv); - priv->port = 0; - priv->socket_descriptor = 0; - priv->user_specified_port = 0; - - //federate initialization - strncpy(priv->server_hostname, "localhost", INET_ADDRSTRLEN); - priv->server_port = -1; - priv->server_ip_addr.s_addr = 0; - - priv->proto = TCP; - - drv->read_remaining_bytes = 0; - - drv->open = socket_open; - drv->close = socket_close; - // drv->read = socket_read; - // drv->write = socket_write; - // drv->get_priv = get_priv; - return drv; +netdrv_t* netdrv_init() { + // TODO: Should it be malloc? To support different network stacks operate simulatneously? + netdrv_t* drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); // Don't need to call malloc() twice. + if (!drv) { // check if malloc worked. + lf_print_error_and_exit("Falied to malloc netdrv_t."); + } + memset(drv, 0, sizeof(netdrv_t)); + + socket_priv_t* priv = get_priv(drv); + priv->port = 0; + priv->socket_descriptor = 0; + priv->user_specified_port = 0; + + // federate initialization + strncpy(priv->server_hostname, "localhost", INET_ADDRSTRLEN); + priv->server_port = -1; + priv->server_ip_addr.s_addr = 0; + + priv->proto = TCP; + + drv->read_remaining_bytes = 0; + + drv->open = socket_open; + drv->close = socket_close; + // drv->read = socket_read; + // drv->write = socket_write; + // drv->get_priv = get_priv; + return drv; } /** @@ -160,79 +157,73 @@ netdrv_t *netdrv_init() { * @return The socket ID (a file descriptor). */ static int net_create_real_time_tcp_socket_errexit() { - int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (sock < 0) { - lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); - } - // Disable Nagle's algorithm which bundles together small TCP messages to - // reduce network traffic - // TODO: Re-consider if we should do this, and whether disabling delayed ACKs - // is enough. - int flag = 1; - int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } + int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (sock < 0) { + lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); + } + // Disable Nagle's algorithm which bundles together small TCP messages to + // reduce network traffic + // TODO: Re-consider if we should do this, and whether disabling delayed ACKs + // is enough. + int flag = 1; + int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } // Disable delayed ACKs. Only possible on Linux #if defined(PLATFORM_Linux) - result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); + result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } #endif - return sock; + return sock; } -//TODO: DONGHA: Need to fix port. +// TODO: DONGHA: Need to fix port. int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port) { - socket_priv_t *priv = get_priv(drv); - // Server file descriptor. - struct sockaddr_in server_fd; - // Zero out the server address structure. - bzero((char*)&server_fd, sizeof(server_fd)); - - server_fd.sin_family = AF_INET; // IPv4 - server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. - // Convert the port number from host byte order to network byte order. - server_fd.sin_port = htons(port); - - int result = bind( - priv->socket_descriptor, - (struct sockaddr *) &server_fd, - sizeof(server_fd)); - int count = 0; - while (result < 0 && count++ < PORT_BIND_RETRY_LIMIT) { - lf_sleep(PORT_BIND_RETRY_INTERVAL); - result = bind( - priv->socket_descriptor, - (struct sockaddr *) &server_fd, - sizeof(server_fd)); - } - if (result < 0) { - lf_print_error_and_exit("Failed to bind socket on port %d.", port); - } - - // Set the global server port. - if (specified_port == 0) { - // Need to retrieve the port number assigned by the OS. - struct sockaddr_in assigned; - socklen_t addr_len = sizeof(assigned); - if (getsockname(priv->socket_descriptor, (struct sockaddr *) &assigned, &addr_len) < 0) { - lf_print_error_and_exit("Failed to retrieve assigned port number."); - } - priv->port = ntohs(assigned.sin_port); - } else { - priv->port = port; - } - - // Enable listening for socket connections. - // The second argument is the maximum number of queued socket requests, - // which according to the Mac man page is limited to 128. - listen(priv->socket_descriptor, 128); + socket_priv_t* priv = get_priv(drv); + // Server file descriptor. + struct sockaddr_in server_fd; + // Zero out the server address structure. + bzero((char*)&server_fd, sizeof(server_fd)); + + server_fd.sin_family = AF_INET; // IPv4 + server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. + // Convert the port number from host byte order to network byte order. + server_fd.sin_port = htons(port); + + int result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); + int count = 0; + while (result < 0 && count++ < PORT_BIND_RETRY_LIMIT) { + lf_sleep(PORT_BIND_RETRY_INTERVAL); + result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); + } + if (result < 0) { + lf_print_error_and_exit("Failed to bind socket on port %d.", port); + } + + // Set the global server port. + if (specified_port == 0) { + // Need to retrieve the port number assigned by the OS. + struct sockaddr_in assigned; + socklen_t addr_len = sizeof(assigned); + if (getsockname(priv->socket_descriptor, (struct sockaddr*)&assigned, &addr_len) < 0) { + lf_print_error_and_exit("Failed to retrieve assigned port number."); + } + priv->port = ntohs(assigned.sin_port); + } else { + priv->port = port; + } + + // Enable listening for socket connections. + // The second argument is the maximum number of queued socket requests, + // which according to the Mac man page is limited to 128. + listen(priv->socket_descriptor, 128); } /** @@ -250,150 +241,129 @@ int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port) { * @param socket_type The type of the socket for the server (TCP or UDP). * @return The socket descriptor on which to accept connections. */ -//TODO: Fix comments. +// TODO: Fix comments. int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { - socket_priv_t *priv = get_priv(drv); - - // Timeout time for the communications of the server - struct timeval timeout_time = { - .tv_sec = TCP_TIMEOUT_TIME / BILLION, - .tv_usec = (TCP_TIMEOUT_TIME % BILLION) / 1000 - }; - // Create an IPv4 socket for TCP (not UDP) communication over IP (0). - priv->socket_descriptor = -1; - if (netdrv_type == RTI) { - priv->socket_descriptor = net_create_real_time_tcp_socket_errexit(); - priv->proto = TCP; - } else if (netdrv_type == CLOCKSYNC) { - priv->socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - // Set the appropriate timeout time - timeout_time = (struct timeval){ - .tv_sec = UDP_TIMEOUT_TIME / BILLION, - .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000 - }; - priv->proto = UDP; - } - if (priv->socket_descriptor < 0) { - lf_print_error_and_exit("Failed to create RTI socket."); - } - - // Set the option for this socket to reuse the same address - int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option - if (setsockopt( - priv->socket_descriptor, - SOL_SOCKET, - SO_REUSEADDR, - &true_variable, - sizeof(int32_t)) < 0) { - lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno)); - } - // Set the timeout on the socket so that read and write operations don't block for too long - if (setsockopt( - priv->socket_descriptor, - SOL_SOCKET, - SO_RCVTIMEO, - (const char *)&timeout_time, - sizeof(timeout_time)) < 0) { - lf_print_error("RTI failed to set SO_RCVTIMEO option on the socket: %s.", strerror(errno)); - } - if (setsockopt( - priv->socket_descriptor, - SOL_SOCKET, - SO_SNDTIMEO, - (const char *)&timeout_time, - sizeof(timeout_time)) < 0) { - lf_print_error("RTI failed to set SO_SNDTIMEO option on the socket: %s.", strerror(errno)); - } - - /* - * The following used to permit reuse of a port that an RTI has previously - * used that has not been released. We no longer do this, but instead - * increment the port number until an available port is found. - - // SO_REUSEPORT (since Linux 3.9) - // Permits multiple AF_INET or AF_INET6 sockets to be bound to an - // identical socket address. This option must be set on each - // socket (including the first socket) prior to calling bind(2) - // on the socket. To prevent port hijacking, all of the - // processes binding to the same address must have the same - // effective UID. This option can be employed with both TCP and - // UDP sockets. - - int reuse = 1; - if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEADDR, - (const char*)&reuse, sizeof(reuse)) < 0) { - perror("setsockopt(SO_REUSEADDR) failed"); - } + socket_priv_t* priv = get_priv(drv); + + // Timeout time for the communications of the server + struct timeval timeout_time = {.tv_sec = TCP_TIMEOUT_TIME / BILLION, .tv_usec = (TCP_TIMEOUT_TIME % BILLION) / 1000}; + // Create an IPv4 socket for TCP (not UDP) communication over IP (0). + priv->socket_descriptor = -1; + if (netdrv_type == RTI) { + priv->socket_descriptor = net_create_real_time_tcp_socket_errexit(); + priv->proto = TCP; + } else if (netdrv_type == CLOCKSYNC) { + priv->socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + // Set the appropriate timeout time + timeout_time = + (struct timeval){.tv_sec = UDP_TIMEOUT_TIME / BILLION, .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000}; + priv->proto = UDP; + } + if (priv->socket_descriptor < 0) { + lf_print_error_and_exit("Failed to create RTI socket."); + } + + // Set the option for this socket to reuse the same address + int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option + if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_REUSEADDR, &true_variable, sizeof(int32_t)) < 0) { + lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno)); + } + // Set the timeout on the socket so that read and write operations don't block for too long + if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < + 0) { + lf_print_error("RTI failed to set SO_RCVTIMEO option on the socket: %s.", strerror(errno)); + } + if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < + 0) { + lf_print_error("RTI failed to set SO_SNDTIMEO option on the socket: %s.", strerror(errno)); + } + + /* + * The following used to permit reuse of a port that an RTI has previously + * used that has not been released. We no longer do this, but instead + * increment the port number until an available port is found. + + // SO_REUSEPORT (since Linux 3.9) + // Permits multiple AF_INET or AF_INET6 sockets to be bound to an + // identical socket address. This option must be set on each + // socket (including the first socket) prior to calling bind(2) + // on the socket. To prevent port hijacking, all of the + // processes binding to the same address must have the same + // effective UID. This option can be employed with both TCP and + // UDP sockets. + + int reuse = 1; + if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEADDR, + (const char*)&reuse, sizeof(reuse)) < 0) { + perror("setsockopt(SO_REUSEADDR) failed"); + } + + #ifdef SO_REUSEPORT + if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEPORT, + (const char*)&reuse, sizeof(reuse)) < 0) { + perror("setsockopt(SO_REUSEPORT) failed"); + } + #endif + */ + + // Server file descriptor. + struct sockaddr_in server_fd; + // Zero out the server address structure. + bzero((char*)&server_fd, sizeof(server_fd)); + + uint16_t port = 0; // TODO: Need to bring specified port. Not working currently. + uint16_t specified_port = port; + if (specified_port == 0) + port = DEFAULT_PORT; + + server_fd.sin_family = AF_INET; // IPv4 + server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. + // Convert the port number from host byte order to network byte order. + server_fd.sin_port = htons(port); + + int result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); + + // Try repeatedly to bind to a port. If no specific port is specified, then + // increment the port number each time. + + int count = 1; + while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { + if (specified_port == 0) { + lf_print_warning("RTI failed to get port %d.", port); + port++; + if (port >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) + port = DEFAULT_PORT; + lf_print_warning("RTI will try again with port %d.", port); + server_fd.sin_port = htons(port); + // Do not sleep. + } else { + lf_print("RTI failed to get port %d. Will try again.", port); + lf_sleep(PORT_BIND_RETRY_INTERVAL); + } + result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); + } + if (result != 0) { + lf_print_error_and_exit("Failed to bind the RTI socket. Port %d is not available. ", port); + } + char* type = "TCP"; + if (netdrv_type == CLOCKSYNC) { + type = "UDP"; + } + // lf_print("RTI using %s port %d for federation %s.", type, port, rti_remote->federation_id); //TODO: How to bring + // federation_id? + + if (netdrv_type == RTI) { + priv->port = port; - #ifdef SO_REUSEPORT - if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEPORT, - (const char*)&reuse, sizeof(reuse)) < 0) { - perror("setsockopt(SO_REUSEPORT) failed"); - } - #endif - */ - - // Server file descriptor. - struct sockaddr_in server_fd; - // Zero out the server address structure. - bzero((char *)&server_fd, sizeof(server_fd)); - - uint16_t port = 0; //TODO: Need to bring specified port. Not working currently. - uint16_t specified_port = port; - if (specified_port == 0) port = DEFAULT_PORT; - - server_fd.sin_family = AF_INET; // IPv4 - server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. - // Convert the port number from host byte order to network byte order. - server_fd.sin_port = htons(port); - - int result = bind( - priv->socket_descriptor, - (struct sockaddr *)&server_fd, - sizeof(server_fd)); - - // Try repeatedly to bind to a port. If no specific port is specified, then - // increment the port number each time. - - int count = 1; - while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { - if (specified_port == 0) { - lf_print_warning("RTI failed to get port %d.", port); - port++; - if (port >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) port = DEFAULT_PORT; - lf_print_warning("RTI will try again with port %d.", port); - server_fd.sin_port = htons(port); - // Do not sleep. - } else { - lf_print("RTI failed to get port %d. Will try again.", port); - lf_sleep(PORT_BIND_RETRY_INTERVAL); - } - result = bind( - priv->socket_descriptor, - (struct sockaddr *)&server_fd, - sizeof(server_fd)); - } - if (result != 0) { - lf_print_error_and_exit("Failed to bind the RTI socket. Port %d is not available. ", port); - } - char *type = "TCP"; - if (netdrv_type == CLOCKSYNC) { - type = "UDP"; - } - // lf_print("RTI using %s port %d for federation %s.", type, port, rti_remote->federation_id); //TODO: How to bring federation_id? - - if (netdrv_type == RTI) { - priv->port = port; - - // Enable listening for socket connections. - // The second argument is the maximum number of queued socket requests, - // which according to the Mac man page is limited to 128. - listen(priv->socket_descriptor, 128); - } else if (netdrv_type == CLOCKSYNC) { - priv->port = port; - // No need to listen on the UDP socket - } - return priv->socket_descriptor; + // Enable listening for socket connections. + // The second argument is the maximum number of queued socket requests, + // which according to the Mac man page is limited to 128. + listen(priv->socket_descriptor, 128); + } else if (netdrv_type == CLOCKSYNC) { + priv->port = port; + // No need to listen on the UDP socket + } + return priv->socket_descriptor; } // void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { @@ -420,412 +390,406 @@ int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { // } // } -netdrv_t *netdrv_accept(netdrv_t *my_netdrv) { - netdrv_t *client_netdrv = netdrv_init(); - socket_priv_t *my_priv = get_priv(my_netdrv); - socket_priv_t *client_priv = get_priv(client_netdrv); - struct sockaddr client_fd; - uint32_t client_length = sizeof(client_fd); - client_priv->socket_descriptor = accept(my_priv->socket_descriptor, &client_fd, &client_length); - if (client_priv->socket_descriptor < 0) { - return NULL; - } - return client_netdrv; +netdrv_t* netdrv_accept(netdrv_t* my_netdrv) { + netdrv_t* client_netdrv = netdrv_init(); + socket_priv_t* my_priv = get_priv(my_netdrv); + socket_priv_t* client_priv = get_priv(client_netdrv); + struct sockaddr client_fd; + uint32_t client_length = sizeof(client_fd); + client_priv->socket_descriptor = accept(my_priv->socket_descriptor, &client_fd, &client_length); + if (client_priv->socket_descriptor < 0) { + return NULL; + } + return client_netdrv; } -netdrv_t *accept_connection(netdrv_t *rti_netdrv) { - netdrv_t *fed_netdrv = netdrv_init(); - socket_priv_t *rti_priv = get_priv(rti_netdrv); - socket_priv_t *fed_priv = get_priv(fed_netdrv); - // Wait for an incoming connection request. - struct sockaddr client_fd; - uint32_t client_length = sizeof(client_fd); - // The following blocks until a federate connects. - while (1) { - fed_priv->socket_descriptor = accept(rti_priv->socket_descriptor, &client_fd, &client_length); - if (fed_priv->socket_descriptor >= 0) { - // Got a socket - break; - } else if (fed_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { - lf_print_error_and_exit("RTI failed to accept the socket. %s.", strerror(errno)); - } else { - // Try again - lf_print_warning("RTI failed to accept the socket. %s. Trying again.", strerror(errno)); - continue; - } - } - // Assign the address information for federate. - // The IP address is stored here as an in_addr struct (in .server_ip_addr) that can be useful - // to create sockets and can be efficiently sent over the network. - // First, convert the sockaddr structure into a sockaddr_in that contains an internet address. - struct sockaddr_in *pV4_addr = (struct sockaddr_in *)&client_fd; - // Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server - fed_priv->server_ip_addr = pV4_addr->sin_addr; - return fed_netdrv; +netdrv_t* accept_connection(netdrv_t* rti_netdrv) { + netdrv_t* fed_netdrv = netdrv_init(); + socket_priv_t* rti_priv = get_priv(rti_netdrv); + socket_priv_t* fed_priv = get_priv(fed_netdrv); + // Wait for an incoming connection request. + struct sockaddr client_fd; + uint32_t client_length = sizeof(client_fd); + // The following blocks until a federate connects. + while (1) { + fed_priv->socket_descriptor = accept(rti_priv->socket_descriptor, &client_fd, &client_length); + if (fed_priv->socket_descriptor >= 0) { + // Got a socket + break; + } else if (fed_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { + lf_print_error_and_exit("RTI failed to accept the socket. %s.", strerror(errno)); + } else { + // Try again + lf_print_warning("RTI failed to accept the socket. %s. Trying again.", strerror(errno)); + continue; + } + } + // Assign the address information for federate. + // The IP address is stored here as an in_addr struct (in .server_ip_addr) that can be useful + // to create sockets and can be efficiently sent over the network. + // First, convert the sockaddr structure into a sockaddr_in that contains an internet address. + struct sockaddr_in* pV4_addr = (struct sockaddr_in*)&client_fd; + // Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server + fed_priv->server_ip_addr = pV4_addr->sin_addr; + return fed_netdrv; } -int netdrv_connect(netdrv_t *drv) { - socket_priv_t *priv = get_priv(drv); - - struct addrinfo hints; - struct addrinfo *result; - - memset(&hints, 0, sizeof(hints)); - hints.ai_family = AF_INET; /* Allow IPv4 */ - hints.ai_socktype = SOCK_STREAM; /* Stream socket */ - hints.ai_protocol = IPPROTO_TCP; /* TCP protocol */ - hints.ai_addr = NULL; - hints.ai_next = NULL; - hints.ai_flags = AI_NUMERICSERV; /* Allow only numeric port numbers */ - - // Convert port number to string. - char str[6]; - sprintf(str, "%u", priv->server_port); - - // Get address structure matching hostname and hints criteria, and - // set port to the port number provided in str. There should only - // ever be one matching address structure, and we connect to that. - if (getaddrinfo(priv->server_hostname, (const char*)&str, &hints, &result)) { - lf_print_error_and_exit("No host matching given hostname: %s", priv->server_hostname); - } - - int ret = connect(priv->socket_descriptor, result->ai_addr, result->ai_addrlen); - freeaddrinfo(result); - return ret; +int netdrv_connect(netdrv_t* drv) { + socket_priv_t* priv = get_priv(drv); + + struct addrinfo hints; + struct addrinfo* result; + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_INET; /* Allow IPv4 */ + hints.ai_socktype = SOCK_STREAM; /* Stream socket */ + hints.ai_protocol = IPPROTO_TCP; /* TCP protocol */ + hints.ai_addr = NULL; + hints.ai_next = NULL; + hints.ai_flags = AI_NUMERICSERV; /* Allow only numeric port numbers */ + + // Convert port number to string. + char str[6]; + sprintf(str, "%u", priv->server_port); + + // Get address structure matching hostname and hints criteria, and + // set port to the port number provided in str. There should only + // ever be one matching address structure, and we connect to that. + if (getaddrinfo(priv->server_hostname, (const char*)&str, &hints, &result)) { + lf_print_error_and_exit("No host matching given hostname: %s", priv->server_hostname); + } + + int ret = connect(priv->socket_descriptor, result->ai_addr, result->ai_addrlen); + freeaddrinfo(result); + return ret; } - -ssize_t peek_from_netdrv(netdrv_t *drv, unsigned char* result) { - socket_priv_t *priv = get_priv(drv); - ssize_t bytes_read = recv(priv->socket_descriptor, result, 1, MSG_DONTWAIT | MSG_PEEK); - if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) return 0; - else return bytes_read; +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { + socket_priv_t* priv = get_priv(drv); + ssize_t bytes_read = recv(priv->socket_descriptor, result, 1, MSG_DONTWAIT | MSG_PEEK); + if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) + return 0; + else + return bytes_read; } -//Temporary function. -int write_to_netdrv_UDP(netdrv_t *drv, netdrv_t *target, size_t num_bytes, unsigned char* buffer, int flags) { - socket_priv_t *priv_drv = get_priv(drv); - socket_priv_t *priv_target = get_priv(target); - return sendto(priv_drv->socket_descriptor, buffer, num_bytes, flags, (struct sockaddr *) &priv_target->UDP_addr, sizeof(priv_target->UDP_addr)); +// Temporary function. +int write_to_netdrv_UDP(netdrv_t* drv, netdrv_t* target, size_t num_bytes, unsigned char* buffer, int flags) { + socket_priv_t* priv_drv = get_priv(drv); + socket_priv_t* priv_target = get_priv(target); + return sendto(priv_drv->socket_descriptor, buffer, num_bytes, flags, (struct sockaddr*)&priv_target->UDP_addr, + sizeof(priv_target->UDP_addr)); } -int write_to_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { - socket_priv_t *priv = get_priv(drv); - if (priv->socket_descriptor < 0) { - // Socket is not open. - errno = EBADF; - return -1; - } - ssize_t bytes_written = 0; - va_list args; - while (bytes_written < (ssize_t)num_bytes) { - ssize_t more = write(priv->socket_descriptor, buffer + bytes_written, num_bytes - (size_t)bytes_written); - if (more <= 0 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { - // The error codes EAGAIN or EWOULDBLOCK indicate - // that we should try again (@see man errno). - // The error code EINTR means the system call was interrupted before completing. - LF_PRINT_DEBUG("Writing to socket was blocked. Will try again."); - lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); - continue; - } else if (more < 0) { - // A more serious error occurred. - return -1; - } - bytes_written += more; - } - return bytes_written; +int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { + socket_priv_t* priv = get_priv(drv); + if (priv->socket_descriptor < 0) { + // Socket is not open. + errno = EBADF; + return -1; + } + ssize_t bytes_written = 0; + va_list args; + while (bytes_written < (ssize_t)num_bytes) { + ssize_t more = write(priv->socket_descriptor, buffer + bytes_written, num_bytes - (size_t)bytes_written); + if (more <= 0 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { + // The error codes EAGAIN or EWOULDBLOCK indicate + // that we should try again (@see man errno). + // The error code EINTR means the system call was interrupted before completing. + LF_PRINT_DEBUG("Writing to socket was blocked. Will try again."); + lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); + continue; + } else if (more < 0) { + // A more serious error occurred. + return -1; + } + bytes_written += more; + } + return bytes_written; } -int write_to_netdrv_close_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { - int bytes_written = write_to_netdrv(drv, num_bytes, buffer); - if (bytes_written <= 0) { - // Write failed. - // Netdrv has probably been closed from the other side. - // Shut down and close the netdrv from this side. - drv->close(drv); - } - return bytes_written; +int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { + int bytes_written = write_to_netdrv(drv, num_bytes, buffer); + if (bytes_written <= 0) { + // Write failed. + // Netdrv has probably been closed from the other side. + // Shut down and close the netdrv from this side. + drv->close(drv); + } + return bytes_written; } -void write_to_netdrv_fail_on_error( - netdrv_t *drv, - size_t num_bytes, - unsigned char* buffer, - lf_mutex_t* mutex, - char* format, ...) { - va_list args; - int bytes_written = write_to_netdrv_close_on_error(drv, num_bytes, buffer); - if (bytes_written <= 0) { - // Write failed. - if (mutex != NULL) { - lf_mutex_unlock(mutex); - } - if (format != NULL) { - lf_print_error_system_failure(format, args); - } else { - lf_print_error("Failed to write to socket. Closing it."); - } +void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, + char* format, ...) { + va_list args; + int bytes_written = write_to_netdrv_close_on_error(drv, num_bytes, buffer); + if (bytes_written <= 0) { + // Write failed. + if (mutex != NULL) { + lf_mutex_unlock(mutex); + } + if (format != NULL) { + lf_print_error_system_failure(format, args); + } else { + lf_print_error("Failed to write to socket. Closing it."); } + } } // TODO: Fix return. -ssize_t read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer, size_t buffer_length) { - ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); - if (bytes_read <= 0) { - drv->close(drv); - return -1; - } - return bytes_read; +ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); + if (bytes_read <= 0) { + drv->close(drv); + return -1; + } + return bytes_read; } -//TODO: FIX return -void read_from_netdrv_fail_on_error( - netdrv_t *drv, - unsigned char* buffer, - size_t buffer_length, - lf_mutex_t* mutex, - char* format, ...) { - va_list args; - ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); - if (bytes_read <= 0) { - // Read failed. - if (mutex != NULL) { - lf_mutex_unlock(mutex); - } - if (format != NULL) { - lf_print_error_system_failure(format, args); - } else { - lf_print_error_system_failure("Failed to read from netdrv."); - } +// TODO: FIX return +void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, + char* format, ...) { + va_list args; + ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); + if (bytes_read <= 0) { + // Read failed. + if (mutex != NULL) { + lf_mutex_unlock(mutex); + } + if (format != NULL) { + lf_print_error_system_failure(format, args); + } else { + lf_print_error_system_failure("Failed to read from netdrv."); } + } } typedef enum { - HEADER_READ, - READ_MSG_TYPE_FED_IDS, - READ_MSG_TYPE_NEIGHBOR_STRUCTURE, - READ_MSG_TYPE_TAGGED_MESSAGE, - KEEP_READING, - FINISH_READ + HEADER_READ, + READ_MSG_TYPE_FED_IDS, + READ_MSG_TYPE_NEIGHBOR_STRUCTURE, + READ_MSG_TYPE_TAGGED_MESSAGE, + KEEP_READING, + FINISH_READ } read_state_t; static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* bytes_to_read, int* state) { - switch(buffer[0]) { - case MSG_TYPE_REJECT: // 1 +1 - *bytes_to_read = 1; - *state = FINISH_READ; - break; - case MSG_TYPE_ACK: // 1 - *bytes_to_read = 0; - *state = FINISH_READ; - break; - case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 - *bytes_to_read = sizeof(uint16_t); - *state = FINISH_READ; - break; - case MSG_TYPE_FED_IDS: // 1 + sizeof(uint16_t) + 1 + federation_id - *bytes_to_read = sizeof(uint16_t) + 1; - *state = READ_MSG_TYPE_FED_IDS; - break; - case MSG_TYPE_FED_NONCE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) - *bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; - *state = FINISH_READ; - break; - case MSG_TYPE_RTI_RESPONSE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) - *bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; - *state = FINISH_READ; - break; - case MSG_TYPE_FED_RESPONSE: // 1 + SHA256_HMAC_LENGTH(8) - *bytes_to_read = SHA256_HMAC_LENGTH; - *state = FINISH_READ; - break; - case MSG_TYPE_TIMESTAMP: // 1+sizeof(int64_t) - *bytes_to_read = sizeof(int64_t); - *state = FINISH_READ; - break; - case MSG_TYPE_RESIGN: - *bytes_to_read = 0; - *state = FINISH_READ; - break; - case MSG_TYPE_TAGGED_MESSAGE: - *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); - *state = READ_MSG_TYPE_TAGGED_MESSAGE; - break; - case MSG_TYPE_NEXT_EVENT_TAG: - *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_TAG_ADVANCE_GRANT: - *bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); - *state = FINISH_READ; - break; - case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: - *bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); - *state = FINISH_READ; - break; - case MSG_TYPE_LATEST_TAG_COMPLETE: - *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_STOP_REQUEST: - *bytes_to_read = MSG_TYPE_STOP_REQUEST_LENGTH - 1; - *state = FINISH_READ; - break; - case MSG_TYPE_STOP_REQUEST_REPLY: - *bytes_to_read = MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1; - *state = FINISH_READ; - break; - case MSG_TYPE_STOP_GRANTED: - *bytes_to_read = MSG_TYPE_STOP_GRANTED_LENGTH - 1; - *state = FINISH_READ; - break; - case MSG_TYPE_ADDRESS_QUERY: - *bytes_to_read = sizeof(uint16_t); - *state = FINISH_READ; - break; - case MSG_TYPE_ADDRESS_QUERY_REPLY: - *bytes_to_read = sizeof(int32_t) + sizeof(struct in_addr); - *state = FINISH_READ; - break; - case MSG_TYPE_ADDRESS_ADVERTISEMENT: - *bytes_to_read = sizeof(int32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_P2P_SENDING_FED_ID: //1 /////////TODO: CHECK!!!!!!! - *bytes_to_read = sizeof(uint16_t) + 1; - *state = READ_MSG_TYPE_FED_IDS; - break; - case MSG_TYPE_P2P_MESSAGE: - *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); - *state = READ_MSG_TYPE_TAGGED_MESSAGE; - break; - case MSG_TYPE_P2P_TAGGED_MESSAGE: - *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(instant_t) + sizeof(microstep_t); - *state = READ_MSG_TYPE_TAGGED_MESSAGE; - break; - case MSG_TYPE_CLOCK_SYNC_T1: - *bytes_to_read = sizeof(instant_t); - *state = FINISH_READ; - break; - case MSG_TYPE_CLOCK_SYNC_T3: - *bytes_to_read = sizeof(int32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_CLOCK_SYNC_T4: - *bytes_to_read = sizeof(instant_t); - *state = FINISH_READ; - break; - case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: - *bytes_to_read = sizeof(int64_t); - *state = FINISH_READ; - break; - case MSG_TYPE_PORT_ABSENT: - *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_NEIGHBOR_STRUCTURE: - *bytes_to_read = MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1; - *state = READ_MSG_TYPE_NEIGHBOR_STRUCTURE; - break; - case MSG_TYPE_FAILED: - *bytes_to_read = 0; - *state = FINISH_READ; - default: - *bytes_to_read = 0; - // Error handling? - *state = FINISH_READ; - lf_print_error_system_failure("Undefined message header. Terminating system."); - } + switch (buffer[0]) { + case MSG_TYPE_REJECT: // 1 +1 + *bytes_to_read = 1; + *state = FINISH_READ; + break; + case MSG_TYPE_ACK: // 1 + *bytes_to_read = 0; + *state = FINISH_READ; + break; + case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 + *bytes_to_read = sizeof(uint16_t); + *state = FINISH_READ; + break; + case MSG_TYPE_FED_IDS: // 1 + sizeof(uint16_t) + 1 + federation_id + *bytes_to_read = sizeof(uint16_t) + 1; + *state = READ_MSG_TYPE_FED_IDS; + break; + case MSG_TYPE_FED_NONCE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) + *bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; + *state = FINISH_READ; + break; + case MSG_TYPE_RTI_RESPONSE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) + *bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; + *state = FINISH_READ; + break; + case MSG_TYPE_FED_RESPONSE: // 1 + SHA256_HMAC_LENGTH(8) + *bytes_to_read = SHA256_HMAC_LENGTH; + *state = FINISH_READ; + break; + case MSG_TYPE_TIMESTAMP: // 1+sizeof(int64_t) + *bytes_to_read = sizeof(int64_t); + *state = FINISH_READ; + break; + case MSG_TYPE_RESIGN: + *bytes_to_read = 0; + *state = FINISH_READ; + break; + case MSG_TYPE_TAGGED_MESSAGE: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); + *state = READ_MSG_TYPE_TAGGED_MESSAGE; + break; + case MSG_TYPE_NEXT_EVENT_TAG: + *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_TAG_ADVANCE_GRANT: + *bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); + *state = FINISH_READ; + break; + case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: + *bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); + *state = FINISH_READ; + break; + case MSG_TYPE_LATEST_TAG_COMPLETE: + *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_STOP_REQUEST: + *bytes_to_read = MSG_TYPE_STOP_REQUEST_LENGTH - 1; + *state = FINISH_READ; + break; + case MSG_TYPE_STOP_REQUEST_REPLY: + *bytes_to_read = MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1; + *state = FINISH_READ; + break; + case MSG_TYPE_STOP_GRANTED: + *bytes_to_read = MSG_TYPE_STOP_GRANTED_LENGTH - 1; + *state = FINISH_READ; + break; + case MSG_TYPE_ADDRESS_QUERY: + *bytes_to_read = sizeof(uint16_t); + *state = FINISH_READ; + break; + case MSG_TYPE_ADDRESS_QUERY_REPLY: + *bytes_to_read = sizeof(int32_t) + sizeof(struct in_addr); + *state = FINISH_READ; + break; + case MSG_TYPE_ADDRESS_ADVERTISEMENT: + *bytes_to_read = sizeof(int32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_P2P_SENDING_FED_ID: // 1 /////////TODO: CHECK!!!!!!! + *bytes_to_read = sizeof(uint16_t) + 1; + *state = READ_MSG_TYPE_FED_IDS; + break; + case MSG_TYPE_P2P_MESSAGE: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); + *state = READ_MSG_TYPE_TAGGED_MESSAGE; + break; + case MSG_TYPE_P2P_TAGGED_MESSAGE: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(instant_t) + sizeof(microstep_t); + *state = READ_MSG_TYPE_TAGGED_MESSAGE; + break; + case MSG_TYPE_CLOCK_SYNC_T1: + *bytes_to_read = sizeof(instant_t); + *state = FINISH_READ; + break; + case MSG_TYPE_CLOCK_SYNC_T3: + *bytes_to_read = sizeof(int32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_CLOCK_SYNC_T4: + *bytes_to_read = sizeof(instant_t); + *state = FINISH_READ; + break; + case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: + *bytes_to_read = sizeof(int64_t); + *state = FINISH_READ; + break; + case MSG_TYPE_PORT_ABSENT: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_NEIGHBOR_STRUCTURE: + *bytes_to_read = MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1; + *state = READ_MSG_TYPE_NEIGHBOR_STRUCTURE; + break; + case MSG_TYPE_FAILED: + *bytes_to_read = 0; + *state = FINISH_READ; + default: + *bytes_to_read = 0; + // Error handling? + *state = FINISH_READ; + lf_print_error_system_failure("Undefined message header. Terminating system."); + } } static ssize_t read_UDP(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { - socket_priv_t *priv = get_priv(netdrv); - return read(priv->socket_descriptor, buffer, buffer_length); + socket_priv_t* priv = get_priv(netdrv); + return read(priv->socket_descriptor, buffer, buffer_length); } -//TODO: DONGHA: ADD buffer_length checking. -// Returns the total bytes read. +// TODO: DONGHA: ADD buffer_length checking. +// Returns the total bytes read. ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { - socket_priv_t *priv = get_priv(netdrv); - if(priv->proto == TCP) { - size_t bytes_to_read; // The bytes to read in future. - ssize_t bytes_read = 0; // The bytes that was read by a single read() function. - size_t total_bytes_read = 0; // The total bytes that have been read, and will be the return of the read_from netdrv. - int retry_count; - int state; - // Check if socket_descriptor is open. - if (priv->socket_descriptor < 0) { - // Socket is not open. - errno = EBADF; - return -1; + socket_priv_t* priv = get_priv(netdrv); + if (priv->proto == TCP) { + size_t bytes_to_read; // The bytes to read in future. + ssize_t bytes_read = 0; // The bytes that was read by a single read() function. + size_t total_bytes_read = 0; // The total bytes that have been read, and will be the return of the read_from netdrv. + int retry_count; + int state; + // Check if socket_descriptor is open. + if (priv->socket_descriptor < 0) { + // Socket is not open. + errno = EBADF; + return -1; + } + // First, check if there are remaining bytes. + // If there are remaining bytes, it reads as long as it can (buffer_length). + // Then it becomes KEEP_READING state. + if (netdrv->read_remaining_bytes > 0) { + bytes_to_read = (netdrv->read_remaining_bytes > buffer_length) ? buffer_length : netdrv->read_remaining_bytes; + state = KEEP_READING; + } else { + // If there are no left bytes to read, it reads the header byte. + bytes_to_read = 1; // read header + state = HEADER_READ; + } + + for (;;) { + retry_count = 0; + while (bytes_to_read > 0) { + // TODO: Check buffer_length. + bytes_read = read(priv->socket_descriptor, buffer + total_bytes_read, bytes_to_read); + if (bytes_read < 0 && // If) Error has occurred, + retry_count++ < NUM_SOCKET_RETRIES && // there are left retry counts, + (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { // and the error code was these three, + // Print warning, sleep for a short time, and retry. + lf_print_warning("Reading from socket failed. Will try again."); + lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); + continue; + } else if (bytes_read <= 0) { + // An error occurred without those three error codes. + // https://stackoverflow.com/questions/42188128/does-reading-from-a-socket-wait-or-get-eof + // bytes_read == 0 means disconnected. + return -1; } - // First, check if there are remaining bytes. - // If there are remaining bytes, it reads as long as it can (buffer_length). - // Then it becomes KEEP_READING state. - if (netdrv->read_remaining_bytes > 0) { - bytes_to_read = (netdrv->read_remaining_bytes > buffer_length) ? buffer_length : netdrv->read_remaining_bytes; - state = KEEP_READING; + bytes_to_read -= bytes_read; + total_bytes_read += bytes_read; + } + + switch (state) { + case HEADER_READ: + handle_header_read(netdrv, buffer, &bytes_to_read, &state); + break; + + case READ_MSG_TYPE_FED_IDS:; + size_t federation_id_length = (size_t)buffer[1 + sizeof(uint16_t)]; + bytes_to_read = federation_id_length; + state = FINISH_READ; + break; + case READ_MSG_TYPE_NEIGHBOR_STRUCTURE:; + int num_upstream = extract_int32(buffer + 1); + int num_downstream = extract_int32(buffer + 1 + sizeof(int32_t)); + bytes_to_read = ((sizeof(uint16_t) + sizeof(int64_t)) * num_upstream) + (sizeof(uint16_t) * num_downstream); + state = FINISH_READ; + break; + case READ_MSG_TYPE_TAGGED_MESSAGE:; + size_t length = (size_t)extract_uint32(buffer + 1 + sizeof(uint16_t) + sizeof(uint16_t)); + if (length > buffer_length - total_bytes_read) { + bytes_to_read = buffer_length - total_bytes_read; + netdrv->read_remaining_bytes = length - bytes_to_read; } else { - // If there are no left bytes to read, it reads the header byte. - bytes_to_read = 1; // read header - state = HEADER_READ; + bytes_to_read = length; } - - for (;;) { - retry_count = 0; - while (bytes_to_read > 0) { - //TODO: Check buffer_length. - bytes_read = read(priv->socket_descriptor, buffer + total_bytes_read, bytes_to_read); - if (bytes_read < 0 && // If) Error has occurred, - retry_count++ < NUM_SOCKET_RETRIES && // there are left retry counts, - (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { // and the error code was these three, - // Print warning, sleep for a short time, and retry. - lf_print_warning("Reading from socket failed. Will try again."); - lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); - continue; - } else if (bytes_read <= 0) { - // An error occurred without those three error codes. - // https://stackoverflow.com/questions/42188128/does-reading-from-a-socket-wait-or-get-eof - // bytes_read == 0 means disconnected. - return -1; - } - bytes_to_read -= bytes_read; - total_bytes_read += bytes_read; - } - - switch(state) { - case HEADER_READ: - handle_header_read(netdrv, buffer, &bytes_to_read, &state); - break; - - case READ_MSG_TYPE_FED_IDS: ; - size_t federation_id_length = (size_t)buffer[1 + sizeof(uint16_t)]; - bytes_to_read = federation_id_length; - state = FINISH_READ; - break; - case READ_MSG_TYPE_NEIGHBOR_STRUCTURE: ; - int num_upstream = extract_int32(buffer + 1); - int num_downstream = extract_int32(buffer + 1 + sizeof(int32_t)); - bytes_to_read = ((sizeof(uint16_t) + sizeof(int64_t)) * num_upstream)+ (sizeof(uint16_t) * num_downstream); - state = FINISH_READ; - break; - case READ_MSG_TYPE_TAGGED_MESSAGE: ; - size_t length = (size_t) extract_uint32(buffer + 1+ sizeof(uint16_t) + sizeof(uint16_t)); - if(length > buffer_length - total_bytes_read) { - bytes_to_read = buffer_length - total_bytes_read; - netdrv->read_remaining_bytes = length - bytes_to_read; - } else { - bytes_to_read = length; - } - state = FINISH_READ; - break; - case KEEP_READING: - netdrv->read_remaining_bytes -= total_bytes_read; - return total_bytes_read; - case FINISH_READ: - return total_bytes_read; - } - } - } else if (priv->proto == UDP) { - return read_UDP(netdrv, buffer, buffer_length); - } + state = FINISH_READ; + break; + case KEEP_READING: + netdrv->read_remaining_bytes -= total_bytes_read; + return total_bytes_read; + case FINISH_READ: + return total_bytes_read; + } + } + } else if (priv->proto == UDP) { + return read_UDP(netdrv, buffer, buffer_length); + } } diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index 29a3c18d6..16623d1a5 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -60,31 +60,31 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // A deadlock can occur if two threads simulataneously attempt to close the same socket. lf_mutex_t netdrv_mutex; -int netdrv_open(netdrv_t *drv) { - if (!drv) { - return -1; - } - return drv->open(drv); +int netdrv_open(netdrv_t* drv) { + if (!drv) { + return -1; + } + return drv->open(drv); } -void netdrv_close(netdrv_t *drv) { - if (!drv) { - return; - } - drv->close(drv); +void netdrv_close(netdrv_t* drv) { + if (!drv) { + return; + } + drv->close(drv); } -int netdrv_read(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { - if (!drv) { - return -1; - } - return drv->read(drv, num_bytes, buffer); +int netdrv_read(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { + if (!drv) { + return -1; + } + return drv->read(drv, num_bytes, buffer); } -int netdrv_write(netdrv_t *drv, size_t num_bytes, unsigned char* buffer) { - if (!drv) { - return -1; - } - return drv->write(drv, num_bytes, buffer); +int netdrv_write(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { + if (!drv) { + return -1; + } + return drv->write(drv, num_bytes, buffer); } // void *netdrv_get_privdrv(netdrv_t *drv) { diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index c004d5277..ebebe36c5 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -1,8 +1,8 @@ #ifndef LF_SOCKET_SUPPORT_H #define LF_SOCKET_SUPPORT_H -#include // IPPROTO_TCP, IPPROTO_UDP -#include // TCP_NODELAY +#include // IPPROTO_TCP, IPPROTO_UDP +#include // TCP_NODELAY #include "net_util.h" @@ -50,38 +50,36 @@ #define DELAY_BETWEEN_SOCKET_RETRIES MSEC(100) typedef struct socket_priv_t { - int port; // my port number - int socket_descriptor; - int proto; - uint16_t user_specified_port; - - // The connected other side's info. - char server_hostname[INET_ADDRSTRLEN]; // Human-readable IP address and - int32_t server_port; // port number of the socket server of the federate - // if it has any incoming direct connections from other federates. - // The port number will be -1 if there is no server or if the - // RTI has not been informed of the port number. - struct in_addr server_ip_addr; // Information about the IP address of the socket - // server of the federate. - - struct sockaddr_in UDP_addr; // The UDP address for the federate. + int port; // my port number + int socket_descriptor; + int proto; + uint16_t user_specified_port; + + // The connected other side's info. + char server_hostname[INET_ADDRSTRLEN]; // Human-readable IP address and + int32_t server_port; // port number of the socket server of the federate + // if it has any incoming direct connections from other federates. + // The port number will be -1 if there is no server or if the + // RTI has not been informed of the port number. + struct in_addr server_ip_addr; // Information about the IP address of the socket + // server of the federate. + + struct sockaddr_in UDP_addr; // The UDP address for the federate. } socket_priv_t; -char* get_host_name(netdrv_t *drv); -int32_t get_my_port(netdrv_t *drv); -int32_t get_port(netdrv_t *drv); -struct in_addr* get_ip_addr(netdrv_t *drv); +char* get_host_name(netdrv_t* drv); +int32_t get_my_port(netdrv_t* drv); +int32_t get_port(netdrv_t* drv); +struct in_addr* get_ip_addr(netdrv_t* drv); -void set_host_name(netdrv_t *drv, const char* hostname); -void set_port(netdrv_t *drv, int port); -void set_ip_addr(netdrv_t *drv, struct in_addr ip_addr); -void set_clock_netdrv(netdrv_t *clock_drv, netdrv_t *rti_drv, uint16_t port_num); +void set_host_name(netdrv_t* drv, const char* hostname); +void set_port(netdrv_t* drv, int port); +void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr); +void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num); +netdrv_t* netdrv_init(); -netdrv_t * netdrv_init(); - -void netdrv_free(netdrv_t *drv); - +void netdrv_free(netdrv_t* drv); int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port); @@ -100,20 +98,17 @@ int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port); * @param socket_type The type of the socket for the server (TCP or UDP). * @return The socket descriptor on which to accept connections. */ -//TODO: Update descriptions. -int create_rti_server(netdrv_t *drv, netdrv_type_t netdrv_type); - +// TODO: Update descriptions. +int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type); // int create_real_time_tcp_socket_errexit(); // void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv); -netdrv_t *netdrv_accept(netdrv_t *my_netdrv); - -netdrv_t *accept_connection(netdrv_t * rti_netdrv); - -int netdrv_connect(netdrv_t *drv); +netdrv_t* netdrv_accept(netdrv_t* my_netdrv); +netdrv_t* accept_connection(netdrv_t* rti_netdrv); +int netdrv_connect(netdrv_t* drv); /** * Without blocking, peek at the specified socket and, if there is @@ -123,9 +118,9 @@ int netdrv_connect(netdrv_t *drv); * @param socket The socket ID. * @param result Pointer to where to put the first byte available on the socket. */ -ssize_t peek_from_netdrv(netdrv_t *drv, unsigned char* result); +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result); -int write_to_netdrv_UDP(netdrv_t *drv, netdrv_t *target, size_t num_bytes, unsigned char* buffer, int flags); +int write_to_netdrv_UDP(netdrv_t* drv, netdrv_t* target, size_t num_bytes, unsigned char* buffer, int flags); /** * Write the specified number of bytes to the specified socket from the @@ -141,7 +136,7 @@ int write_to_netdrv_UDP(netdrv_t *drv, netdrv_t *target, size_t num_bytes, unsig * @param buffer The buffer from which to get the bytes. * @return 0 for success, -1 for failure. */ -int write_to_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); +int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); /** * Write the specified number of bytes to the specified socket using write_to_socket @@ -152,7 +147,7 @@ int write_to_netdrv(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); * @param buffer The buffer from which to get the bytes. * @return 0 for success, -1 for failure. */ -int write_to_netdrv_close_on_error(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); +int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); /** * Write the specified number of bytes to the specified socket using @@ -169,12 +164,8 @@ int write_to_netdrv_close_on_error(netdrv_t *drv, size_t num_bytes, unsigned cha * fields that will be used to fill the format string as in printf, or NULL * to print a generic error message. */ -void write_to_netdrv_fail_on_error( - netdrv_t *drv, - size_t num_bytes, - unsigned char* buffer, - lf_mutex_t* mutex, - char* format, ...); +void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, + char* format, ...); /** * Read the specified number of bytes from the specified socket into the specified buffer. @@ -201,7 +192,7 @@ ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_ * @param buffer The buffer from which to get the bytes. * @return 0 for success, -1 for failure. */ -ssize_t read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer, size_t buffer_length); +ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); /** * Read the specified number of bytes from the specified socket into the @@ -219,6 +210,7 @@ ssize_t read_from_netdrv_close_on_error(netdrv_t *drv, unsigned char* buffer, si * @return The number of bytes read, or 0 if an EOF is received, or * a negative number for an error. */ -void read_from_netdrv_fail_on_error(netdrv_t *drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, char* format, ...); +void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, + char* format, ...); #endif // LF_SOCKET_SUPPORT_H diff --git a/include/core/federated/network/net_common.h b/include/core/federated/network/net_common.h index 4200d9692..e82b5bba6 100644 --- a/include/core/federated/network/net_common.h +++ b/include/core/federated/network/net_common.h @@ -179,14 +179,14 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef NET_COMMON_H #define NET_COMMON_H -//TODO: Copied at lf_socket_support.h. Erase after finished. +// TODO: Copied at lf_socket_support.h. Erase after finished. /** * The timeout time in ns for TCP operations. * Default value is 10 secs. */ #define TCP_TIMEOUT_TIME SEC(10) -//TODO: Copied at lf_socket_support.h. Erase after finished. +// TODO: Copied at lf_socket_support.h. Erase after finished. /** * The timeout time in ns for UDP operations. * Default value is 1 sec. @@ -212,7 +212,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define CONNECT_MAX_RETRIES 100 -//TODO: Copied at lf_socket_support.h. Erase after finished. +// TODO: Copied at lf_socket_support.h. Erase after finished. /** * Maximum number of port addresses that a federate will try to connect to the RTI on. * If you are using automatic ports begining at DEFAULT_PORT, this puts an upper bound @@ -228,7 +228,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define ADDRESS_QUERY_RETRY_INTERVAL MSEC(250) -//TODO: Copied at lf_socket_support.h. Erase after finished. +// TODO: Copied at lf_socket_support.h. Erase after finished. /** * Time to wait before re-attempting to bind to a port. * When a process closes, the network stack typically waits between 30 and 120 @@ -238,14 +238,13 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define PORT_BIND_RETRY_INTERVAL SEC(1) - -//TODO: Copied at lf_socket_support.h. Erase after finished. +// TODO: Copied at lf_socket_support.h. Erase after finished. /** * Number of attempts to bind to a port before giving up. */ #define PORT_BIND_RETRY_LIMIT 60 -//TODO: Copied at lf_socket_support.h. Erase after finished. +// TODO: Copied at lf_socket_support.h. Erase after finished. /** * Default port number for the RTI. * Unless a specific port has been specified by the LF program in the "at" @@ -354,7 +353,6 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define MSG_TYPE_FED_RESPONSE 102 - // TODO: Need to be moved. /** * The randomly created nonce size will be 8 bytes. @@ -375,7 +373,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define MSG_TYPE_TIMESTAMP 2 #define MSG_TYPE_TIMESTAMP_LENGTH (1 + sizeof(int64_t)) -//TODO: Deprecated. +// TODO: Deprecated. /** Byte identifying a message to forward to another federate. * The next two bytes will be the ID of the destination port. * The next two bytes are the destination federate ID. diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 020f6f104..8e6979167 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -52,7 +52,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "tag.h" #define NUM_SOCKET_RETRIES 10 -//TODO: Copied at lf_socket_support.h. Erase after finished. +// TODO: Copied at lf_socket_support.h. Erase after finished. #define DELAY_BETWEEN_SOCKET_RETRIES MSEC(100) #define HOST_LITTLE_ENDIAN 1 @@ -66,25 +66,22 @@ int host_is_big_endian(void); #ifdef FEDERATED -typedef enum netdrv_type_t { - RTI, - CLOCKSYNC -} netdrv_type_t; +typedef enum netdrv_type_t { RTI, CLOCKSYNC } netdrv_type_t; typedef struct netdrv_t { - int ( *open)(struct netdrv_t *drv); - void (*close)(struct netdrv_t *drv); - int ( *read)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); - int (*write)(struct netdrv_t *drv, size_t num_bytes, unsigned char* buffer); - void* priv; - unsigned int read_remaining_bytes; - unsigned int write_remaining_bytes; + int (*open)(struct netdrv_t* drv); + void (*close)(struct netdrv_t* drv); + int (*read)(struct netdrv_t* drv, size_t num_bytes, unsigned char* buffer); + int (*write)(struct netdrv_t* drv, size_t num_bytes, unsigned char* buffer); + void* priv; + unsigned int read_remaining_bytes; + unsigned int write_remaining_bytes; } netdrv_t; -int netdrv_open(netdrv_t *drv); -void netdrv_close(netdrv_t *drv); -int netdrv_read(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); -int netdrv_write(netdrv_t *drv, size_t num_bytes, unsigned char* buffer); +int netdrv_open(netdrv_t* drv); +void netdrv_close(netdrv_t* drv); +int netdrv_read(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); +int netdrv_write(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); // void * netdrv_get_privdrv(netdrv_t *drv); /** * Mutex protecting socket close operations. @@ -100,7 +97,7 @@ extern lf_mutex_t netdrv_mutex; */ int create_real_time_tcp_socket_errexit(); -//TODO: Copied at lf_socket_support.c. Erase after finished. +// TODO: Copied at lf_socket_support.c. Erase after finished. /** * Read the specified number of bytes from the specified socket into the specified buffer. * If an error occurs during this reading, return -1 and set errno to indicate @@ -117,7 +114,7 @@ int create_real_time_tcp_socket_errexit(); */ int read_from_socket(int socket, size_t num_bytes, unsigned char* buffer); -//TODO: Copied at lf_socket_support.c. Erase after finished. +// TODO: Copied at lf_socket_support.c. Erase after finished. /** * Read the specified number of bytes to the specified socket using read_from_socket * and close the socket if an error occurs. If an error occurs, this will change the @@ -129,7 +126,7 @@ int read_from_socket(int socket, size_t num_bytes, unsigned char* buffer); */ int read_from_socket_close_on_error(int* socket, size_t num_bytes, unsigned char* buffer); -//TODO: Copied at lf_socket_support.c. Erase after finished. +// TODO: Copied at lf_socket_support.c. Erase after finished. /** * Read the specified number of bytes from the specified socket into the * specified buffer. If a disconnect or an EOF occurs during this @@ -149,7 +146,7 @@ int read_from_socket_close_on_error(int* socket, size_t num_bytes, unsigned char void read_from_socket_fail_on_error(int* socket, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...); -//TODO: Copied at lf_socket_support.c. Erase after finished. +// TODO: Copied at lf_socket_support.c. Erase after finished. /** * Without blocking, peek at the specified socket and, if there is * anything on the queue, put its first byte at the specified address and return 1. @@ -160,7 +157,7 @@ void read_from_socket_fail_on_error(int* socket, size_t num_bytes, unsigned char */ ssize_t peek_from_socket(int socket, unsigned char* result); -//TODO: Copied at lf_socket_support.c. Erase after finished. +// TODO: Copied at lf_socket_support.c. Erase after finished. /** * Write the specified number of bytes to the specified socket from the * specified buffer. If an error occurs, return -1 and set errno to indicate @@ -177,7 +174,7 @@ ssize_t peek_from_socket(int socket, unsigned char* result); */ int write_to_socket(int socket, size_t num_bytes, unsigned char* buffer); -//TODO: Copied at lf_socket_support.c. Erase after finished. +// TODO: Copied at lf_socket_support.c. Erase after finished. /** * Write the specified number of bytes to the specified socket using write_to_socket * and close the socket if an error occurs. If an error occurs, this will change the @@ -189,7 +186,7 @@ int write_to_socket(int socket, size_t num_bytes, unsigned char* buffer); */ int write_to_socket_close_on_error(int* socket, size_t num_bytes, unsigned char* buffer); -//TODO: Copied at lf_socket_support.c. Erase after finished. +// TODO: Copied at lf_socket_support.c. Erase after finished. /** * Write the specified number of bytes to the specified socket using * write_to_socket_close_on_error and exit with an error code if an error occurs. @@ -304,7 +301,7 @@ int64_t extract_int64(unsigned char* bytes); */ uint16_t extract_uint16(unsigned char* bytes); -/** +/** * Extract an uint32_t from the specified byte sequence. * This will swap the order of the bytes if this machine is big endian. * @param bytes The address of the start of the sequence of bytes. From 25b021f48446b44362bda20edce6eb5bac1424e6 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 15 Mar 2024 14:14:39 -0700 Subject: [PATCH 086/262] Fix wrong emerged --- core/federated/clock-sync.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/core/federated/clock-sync.c b/core/federated/clock-sync.c index 641e935ba..f585f7f89 100644 --- a/core/federated/clock-sync.c +++ b/core/federated/clock-sync.c @@ -249,20 +249,6 @@ void synchronize_initial_physical_clock_with_rti(netdrv_t* netdrv_to_rti) { handle_T4_clock_sync_message(buffer, netdrv_to_rti, receive_time); } - // Next message from the RTI is required to be MSG_TYPE_CLOCK_SYNC_T4 - read_from_socket_fail_on_error(rti_socket_TCP, message_size, buffer, NULL, - "Federate %d did not get the clock synchronization message T4 from the RTI.", - _lf_my_fed_id); - - // Check that this is the T4 message. - if (buffer[0] != MSG_TYPE_CLOCK_SYNC_T4) { - lf_print_error_and_exit("Federate %d expected T4 message from RTI. Got %x.", _lf_my_fed_id, buffer[0]); - } - - // Handle the message. - handle_T4_clock_sync_message(buffer, *rti_socket_TCP, receive_time); -} - LF_PRINT_LOG("Finished initial clock synchronization with the RTI."); } From a45d5c87c30b9efae536506fc67f64448aa28388 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 15 Mar 2024 14:50:52 -0700 Subject: [PATCH 087/262] Fix merge conflict error --- core/federated/clock-sync.c | 151 +++++++++++++----------------------- 1 file changed, 54 insertions(+), 97 deletions(-) diff --git a/core/federated/clock-sync.c b/core/federated/clock-sync.c index f585f7f89..2d82ecdbb 100644 --- a/core/federated/clock-sync.c +++ b/core/federated/clock-sync.c @@ -249,7 +249,7 @@ void synchronize_initial_physical_clock_with_rti(netdrv_t* netdrv_to_rti) { handle_T4_clock_sync_message(buffer, netdrv_to_rti, receive_time); } -LF_PRINT_LOG("Finished initial clock synchronization with the RTI."); + LF_PRINT_LOG("Finished initial clock synchronization with the RTI."); } /** @@ -342,66 +342,23 @@ void handle_T4_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, insta // The adjustment to the clock offset (to be calculated) interval_t adjustment = 0; + + // TODO: DONGHA: CHECK here. // If the socket is _lf_rti_socket_UDP, then // after sending T4, the RTI sends a "coded probe" message, // which can be used to filter out noise. + int socket = 0; // Makeshift. if (socket == _lf_rti_socket_UDP) { // Read the coded probe message. // We can reuse the same buffer. - int read_failed = read_from_socket(socket, 1 + sizeof(instant_t), buffer); - - // The adjustment to the clock offset (to be calculated) - interval_t adjustment = 0; - // If the socket is _lf_rti_socket_UDP, then - // after sending T4, the RTI sends a "coded probe" message, - // which can be used to filter out noise. - - // TODO: DONGHA: CHECK here. - int socket = 0; // Makeshift. - if (socket == _lf_rti_socket_UDP) { - // Read the coded probe message. - // We can reuse the same buffer. - int bytes_read = read_from_netdrv(netdrv, buffer, 1 + sizeof(instant_t)); - - instant_t r5 = lf_time_physical(); - - if (bytes_read <= 0 || buffer[0] != MSG_TYPE_CLOCK_SYNC_CODED_PROBE) { - lf_print_warning("Clock sync: Did not get the expected coded probe message from the RTI. " - "Skipping clock synchronization round."); - return; - } - // Filter out noise. - instant_t t5 = extract_int64(&(buffer[1])); // Time at the RTI of sending the coded probe. - - // Compare the difference in time at the RTI between sending T4 and the coded probe - // against the difference in time at this federate of receiving these two message. - interval_t coded_probe_distance = llabs((r5 - r4) - (t5 - t4)); - - LF_PRINT_DEBUG("Clock sync: Received code probe that reveals a time discrepancy between " - "messages of " PRINTF_TIME ".", - coded_probe_distance); - - // Check against the guard band. - if (coded_probe_distance >= CLOCK_SYNC_GUARD_BAND) { - // Discard this clock sync cycle - LF_PRINT_LOG("Clock sync: Skipping the current clock synchronization cycle " - "due to impure coded probes."); - LF_PRINT_LOG("Clock sync: Coded probe packet stats: " - "Distance: " PRINTF_TIME ". r5 - r4 = " PRINTF_TIME ". t5 - t4 = " PRINTF_TIME ".", - coded_probe_distance, r5 - r4, t5 - t4); - _lf_rti_socket_stat.received_T4_messages_in_current_sync_window--; - return; - } - // Apply a jitter attenuator to the estimated clock error to prevent - // large jumps in the underlying clock. - // Note that estimated_clock_error is calculated using lf_time_physical() which includes - // the clock sync adjustment. - adjustment = estimated_clock_error / _LF_CLOCK_SYNC_ATTENUATION; - } else { - // Use of TCP socket means we are in the startup phase, so - // rather than adjust the clock offset, we simply set it to the - // estimated error. - adjustment = estimated_clock_error; + int bytes_read = read_from_netdrv(netdrv, buffer, 1 + sizeof(instant_t)); + + instant_t r5 = lf_time_physical(); + + if (bytes_read <= 0 || buffer[0] != MSG_TYPE_CLOCK_SYNC_CODED_PROBE) { + lf_print_warning("Clock sync: Did not get the expected coded probe message from the RTI. " + "Skipping clock synchronization round."); + return; } // Filter out noise. instant_t t5 = extract_int64(&(buffer[1])); // Time at the RTI of sending the coded probe. @@ -431,58 +388,58 @@ void handle_T4_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, insta // the clock sync adjustment. adjustment = estimated_clock_error / _LF_CLOCK_SYNC_ATTENUATION; } else { - // Use of TCP socket means we are in the startup phase, so - // rather than adjust the clock offset, we simply set it to the - // estimated error. - adjustment = estimated_clock_error; - } + // Use of TCP socket means we are in the startup phase, so + // rather than adjust the clock offset, we simply set it to the + // estimated error. + adjustment = estimated_clock_error; +} #ifdef _LF_CLOCK_SYNC_COLLECT_STATS // Enabled by default - // Update RTI's socket stats - update_socket_stat(&_lf_rti_socket_stat, network_round_trip_delay, estimated_clock_error); +// Update RTI's socket stats +update_socket_stat(&_lf_rti_socket_stat, network_round_trip_delay, estimated_clock_error); #endif - // FIXME: Enable alternative regression mechanism here. - LF_PRINT_DEBUG("Clock sync: Adjusting clock offset running average by " PRINTF_TIME ".", - adjustment / _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL); - // Calculate the running average - _lf_rti_socket_stat.history += adjustment / _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL; +// FIXME: Enable alternative regression mechanism here. +LF_PRINT_DEBUG("Clock sync: Adjusting clock offset running average by " PRINTF_TIME ".", + adjustment / _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL); +// Calculate the running average +_lf_rti_socket_stat.history += adjustment / _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL; - if (_lf_rti_socket_stat.received_T4_messages_in_current_sync_window >= _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL) { +if (_lf_rti_socket_stat.received_T4_messages_in_current_sync_window >= _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL) { - lf_stat_ll stats = {0, 0, 0, 0}; + lf_stat_ll stats = {0, 0, 0, 0}; #ifdef _LF_CLOCK_SYNC_COLLECT_STATS // Enabled by default - stats = calculate_socket_stat(&_lf_rti_socket_stat); - // Issue a warning if standard deviation is high in data - if (stats.standard_deviation >= CLOCK_SYNC_GUARD_BAND) { - // Reset the stats - LF_PRINT_LOG("Clock sync: Large standard deviation detected in network delays (" PRINTF_TIME - ") for the current period." - " Clock synchronization offset might not be accurate.", - stats.standard_deviation); - reset_socket_stat(&_lf_rti_socket_stat); - return; - } -#endif - // The number of received T4 messages has reached _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL - // which means we can now adjust the clock offset. - // For the AVG algorithm, history is a running average and can be directly - // applied - adjust_lf_clock_sync_offset(_lf_rti_socket_stat.history); - // @note AVG and SD will be zero if collect-stats is set to false - LF_PRINT_LOG("Clock sync:" - " New offset: " PRINTF_TIME "." - " Round trip delay to RTI (now): " PRINTF_TIME "." - " (AVG): " PRINTF_TIME "." - " (SD): " PRINTF_TIME "." - " Local round trip delay: " PRINTF_TIME ".", - _lf_clock_sync_offset, network_round_trip_delay, stats.average, stats.standard_deviation, - _lf_rti_socket_stat.local_delay); + stats = calculate_socket_stat(&_lf_rti_socket_stat); + // Issue a warning if standard deviation is high in data + if (stats.standard_deviation >= CLOCK_SYNC_GUARD_BAND) { // Reset the stats + LF_PRINT_LOG("Clock sync: Large standard deviation detected in network delays (" PRINTF_TIME + ") for the current period." + " Clock synchronization offset might not be accurate.", + stats.standard_deviation); reset_socket_stat(&_lf_rti_socket_stat); - // Set the last instant at which the clocks were synchronized - _lf_last_clock_sync_instant = r4; + return; } +#endif + // The number of received T4 messages has reached _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL + // which means we can now adjust the clock offset. + // For the AVG algorithm, history is a running average and can be directly + // applied + adjust_lf_clock_sync_offset(_lf_rti_socket_stat.history); + // @note AVG and SD will be zero if collect-stats is set to false + LF_PRINT_LOG("Clock sync:" + " New offset: " PRINTF_TIME "." + " Round trip delay to RTI (now): " PRINTF_TIME "." + " (AVG): " PRINTF_TIME "." + " (SD): " PRINTF_TIME "." + " Local round trip delay: " PRINTF_TIME ".", + _lf_clock_sync_offset, network_round_trip_delay, stats.average, stats.standard_deviation, + _lf_rti_socket_stat.local_delay); + // Reset the stats + reset_socket_stat(&_lf_rti_socket_stat); + // Set the last instant at which the clocks were synchronized + _lf_last_clock_sync_instant = r4; +} } /** From 8401fd8c08bfff7dc29357de1d2348c9ae4fe02c Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 17 Mar 2024 19:23:13 -0700 Subject: [PATCH 088/262] Finally fixed bug.... The federation ID should have a maximum value. --- core/federated/federate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index bad71b9ba..76cc946b0 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1999,7 +1999,8 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { LF_PRINT_LOG("Accepted new connection from remote federate."); size_t header_length = 1 + sizeof(uint16_t) + 1; - unsigned char buffer[header_length]; + // unsigned char buffer[header_length]; + unsigned char buffer[256]; // TODO: NEED TO CHECK. Doesn't allow super long federation IDs. ssize_t bytes_read = read_from_netdrv(client_fed_netdrv, (unsigned char*)&buffer, header_length); if (bytes_read <= 0 || buffer[0] != MSG_TYPE_P2P_SENDING_FED_ID) { lf_print_warning("Federate received invalid first message on P2P socket. Closing socket."); From d2ff61bd698e841da3542feb07132bd90f6cb6b6 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 22 Mar 2024 11:51:56 -0700 Subject: [PATCH 089/262] Fix hmac authentication MSG read. --- core/federated/network/lf_socket_support.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 1087923ca..6a5ed7fd1 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -594,11 +594,11 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* *bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; *state = FINISH_READ; break; - case MSG_TYPE_RTI_RESPONSE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) - *bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; + case MSG_TYPE_RTI_RESPONSE: // 1 + NONCE_LENGTH(8) + SHA256_HMAC_LENGTH(32) + *bytes_to_read = NONCE_LENGTH + SHA256_HMAC_LENGTH; *state = FINISH_READ; break; - case MSG_TYPE_FED_RESPONSE: // 1 + SHA256_HMAC_LENGTH(8) + case MSG_TYPE_FED_RESPONSE: // 1 + SHA256_HMAC_LENGTH(32) *bytes_to_read = SHA256_HMAC_LENGTH; *state = FINISH_READ; break; From 79b8c70d31cc993d729fa3570f6f9b8ae547b825 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 22 Mar 2024 11:52:09 -0700 Subject: [PATCH 090/262] Minor fix of comments --- core/federated/RTI/rti_remote.c | 2 +- core/federated/federate.c | 1 + include/core/federated/network/net_util.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index ba2e1c396..8b7fafdd3 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1288,7 +1288,7 @@ static bool authenticate_federate(netdrv_t* fed_netdrv) { read_from_netdrv_fail_on_error(fed_netdrv, buffer, 1 + fed_id_length + NONCE_LENGTH, NULL, "Failed to read MSG_TYPE_FED_NONCE."); if (buffer[0] != MSG_TYPE_FED_NONCE) { - lf_print_error_and_exit("Received unexpected response %u from the FED (see net_common.h).", buffer[0]); + lf_print_error_and_exit("Received unexpected response %u from the federate (see net_common.h).", buffer[0]); } unsigned int hmac_length = SHA256_HMAC_LENGTH; size_t federation_id_length = strnlen(rti_remote->federation_id, 255); diff --git a/core/federated/federate.c b/core/federated/federate.c index 76cc946b0..fe371ba04 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -844,6 +844,7 @@ static int perform_hmac_authentication() { unsigned char fed_hello_buf[message_length]; fed_hello_buf[0] = MSG_TYPE_FED_NONCE; encode_uint16((uint16_t)_lf_my_fed_id, &fed_hello_buf[1]); + // Must save fed_nonce for handshake comparison. unsigned char fed_nonce[NONCE_LENGTH]; RAND_bytes(fed_nonce, NONCE_LENGTH); memcpy(&fed_hello_buf[1 + fed_id_length], fed_nonce, NONCE_LENGTH); diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 8e6979167..016a945a5 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -75,7 +75,7 @@ typedef struct netdrv_t { int (*write)(struct netdrv_t* drv, size_t num_bytes, unsigned char* buffer); void* priv; unsigned int read_remaining_bytes; - unsigned int write_remaining_bytes; + // unsigned int write_remaining_bytes; } netdrv_t; int netdrv_open(netdrv_t* drv); From af06b3392762dc194ca3fbcf0ee3c08e8b28efb5 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 22 Mar 2024 17:16:32 -0700 Subject: [PATCH 091/262] Add gitmodules adding sst-c-api --- .gitmodules | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..089c5fd78 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "third_party/sst-c-api"] + path = third_party/sst-c-api + url = https://github.com/iotauth/sst-c-api.git \ No newline at end of file From 9a5550e586d35f225f437d2878ae5d33ddd68f99 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 22 Mar 2024 17:22:19 -0700 Subject: [PATCH 092/262] Add sst-c-api as submodule --- .gitmodules | 4 ++-- third_party/sst-c-api | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 160000 third_party/sst-c-api diff --git a/.gitmodules b/.gitmodules index 089c5fd78..993b21d4c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "third_party/sst-c-api"] - path = third_party/sst-c-api - url = https://github.com/iotauth/sst-c-api.git \ No newline at end of file + path = third_party/sst-c-api + url = https://github.com/iotauth/sst-c-api.git diff --git a/third_party/sst-c-api b/third_party/sst-c-api new file mode 160000 index 000000000..1c1f67924 --- /dev/null +++ b/third_party/sst-c-api @@ -0,0 +1 @@ +Subproject commit 1c1f67924113b625c62a781d17c293dbaf51fece From b83f35b8040f5a8b8121746f06a3cff769e57ed7 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 23 Mar 2024 14:02:59 -0700 Subject: [PATCH 093/262] Add lf_sst_support.c .h bases --- core/federated/network/lf_socket_support.c | 64 +- core/federated/network/lf_sst_support.c | 795 ++++++++++++++++++ .../core/federated/network/lf_sst_support.h | 219 +++++ third_party/sst-c-api | 2 +- 4 files changed, 1047 insertions(+), 33 deletions(-) create mode 100644 core/federated/network/lf_sst_support.c create mode 100644 include/core/federated/network/lf_sst_support.h diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 6a5ed7fd1..708f0a49b 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -21,47 +21,47 @@ typedef enum { TCP, UDP } socket_type_t; -static socket_priv_t* get_priv(netdrv_t* drv) { +static sst_socket_priv_t* get_priv(netdrv_t* drv) { if (!drv) { - // lf_print_error_and_exit("Falied get socket_priv_t."); + // lf_print_error_and_exit("Falied get sst_socket_priv_t."); // FIXME(Byeonggil): I commented out this because it shouldn't report error to send -1 port address. return NULL; } - return (socket_priv_t*)(drv + 1); + return (sst_socket_priv_t*)(drv + 1); } char* get_host_name(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); return priv->server_hostname; } int32_t get_my_port(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); return priv->port; } int32_t get_port(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); return (priv == NULL) ? -1 : priv->server_port; } struct in_addr* get_ip_addr(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); return &priv->server_ip_addr; } void set_host_name(netdrv_t* drv, const char* hostname) { - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); memcpy(priv->server_hostname, hostname, INET_ADDRSTRLEN); } void set_port(netdrv_t* drv, int port) { - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); priv->server_port = port; } void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); priv->server_ip_addr = ip_addr; } void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) { - socket_priv_t* priv_clock = get_priv(clock_drv); - socket_priv_t* priv_rti = get_priv(rti_drv); + sst_socket_priv_t* priv_clock = get_priv(clock_drv); + sst_socket_priv_t* priv_rti = get_priv(rti_drv); priv_clock->UDP_addr.sin_family = AF_INET; priv_clock->UDP_addr.sin_port = htons(port_num); priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; @@ -72,7 +72,7 @@ static int socket_open(netdrv_t* drv) { if (!drv) { return -1; } - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); priv->proto = TCP; if (priv->socket_descriptor < 0) { @@ -102,7 +102,7 @@ static int socket_open(netdrv_t* drv) { } void netdrv_free(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); // free(priv); // Already freed on socket close() free(drv); } @@ -111,7 +111,7 @@ static void socket_close(netdrv_t* drv) { if (!drv) { return; } - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); if (priv->socket_descriptor > 0) { shutdown(priv->socket_descriptor, SHUT_RDWR); close(priv->socket_descriptor); @@ -121,13 +121,13 @@ static void socket_close(netdrv_t* drv) { netdrv_t* netdrv_init() { // TODO: Should it be malloc? To support different network stacks operate simulatneously? - netdrv_t* drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); // Don't need to call malloc() twice. + netdrv_t* drv = malloc(sizeof(*drv) + sizeof(sst_socket_priv_t)); // Don't need to call malloc() twice. if (!drv) { // check if malloc worked. lf_print_error_and_exit("Falied to malloc netdrv_t."); } memset(drv, 0, sizeof(netdrv_t)); - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); priv->port = 0; priv->socket_descriptor = 0; priv->user_specified_port = 0; @@ -186,7 +186,7 @@ static int net_create_real_time_tcp_socket_errexit() { // TODO: DONGHA: Need to fix port. int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port) { - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); // Server file descriptor. struct sockaddr_in server_fd; // Zero out the server address structure. @@ -243,7 +243,7 @@ int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port) { */ // TODO: Fix comments. int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); // Timeout time for the communications of the server struct timeval timeout_time = {.tv_sec = TCP_TIMEOUT_TIME / BILLION, .tv_usec = (TCP_TIMEOUT_TIME % BILLION) / 1000}; @@ -367,8 +367,8 @@ int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { } // void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { -// socket_priv_t *rti_priv = get_priv(rti_netdrv); -// socket_priv_t *clock_priv = get_priv(clock_netdrv); +// sst_socket_priv_t *rti_priv = get_priv(rti_netdrv); +// sst_socket_priv_t *clock_priv = get_priv(clock_netdrv); // // Shutdown and close the socket that is listening for incoming connections // // so that the accept() call in respond_to_erroneous_connections returns. // // That thread should then check rti->all_federates_exited and it should exit. @@ -392,8 +392,8 @@ int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { netdrv_t* netdrv_accept(netdrv_t* my_netdrv) { netdrv_t* client_netdrv = netdrv_init(); - socket_priv_t* my_priv = get_priv(my_netdrv); - socket_priv_t* client_priv = get_priv(client_netdrv); + sst_socket_priv_t* my_priv = get_priv(my_netdrv); + sst_socket_priv_t* client_priv = get_priv(client_netdrv); struct sockaddr client_fd; uint32_t client_length = sizeof(client_fd); client_priv->socket_descriptor = accept(my_priv->socket_descriptor, &client_fd, &client_length); @@ -405,8 +405,8 @@ netdrv_t* netdrv_accept(netdrv_t* my_netdrv) { netdrv_t* accept_connection(netdrv_t* rti_netdrv) { netdrv_t* fed_netdrv = netdrv_init(); - socket_priv_t* rti_priv = get_priv(rti_netdrv); - socket_priv_t* fed_priv = get_priv(fed_netdrv); + sst_socket_priv_t* rti_priv = get_priv(rti_netdrv); + sst_socket_priv_t* fed_priv = get_priv(fed_netdrv); // Wait for an incoming connection request. struct sockaddr client_fd; uint32_t client_length = sizeof(client_fd); @@ -435,7 +435,7 @@ netdrv_t* accept_connection(netdrv_t* rti_netdrv) { } int netdrv_connect(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); struct addrinfo hints; struct addrinfo* result; @@ -465,7 +465,7 @@ int netdrv_connect(netdrv_t* drv) { } ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); ssize_t bytes_read = recv(priv->socket_descriptor, result, 1, MSG_DONTWAIT | MSG_PEEK); if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) return 0; @@ -475,14 +475,14 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { // Temporary function. int write_to_netdrv_UDP(netdrv_t* drv, netdrv_t* target, size_t num_bytes, unsigned char* buffer, int flags) { - socket_priv_t* priv_drv = get_priv(drv); - socket_priv_t* priv_target = get_priv(target); + sst_socket_priv_t* priv_drv = get_priv(drv); + sst_socket_priv_t* priv_target = get_priv(target); return sendto(priv_drv->socket_descriptor, buffer, num_bytes, flags, (struct sockaddr*)&priv_target->UDP_addr, sizeof(priv_target->UDP_addr)); } int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { - socket_priv_t* priv = get_priv(drv); + sst_socket_priv_t* priv = get_priv(drv); if (priv->socket_descriptor < 0) { // Socket is not open. errno = EBADF; @@ -702,14 +702,14 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* } static ssize_t read_UDP(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { - socket_priv_t* priv = get_priv(netdrv); + sst_socket_priv_t* priv = get_priv(netdrv); return read(priv->socket_descriptor, buffer, buffer_length); } // TODO: DONGHA: ADD buffer_length checking. // Returns the total bytes read. ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { - socket_priv_t* priv = get_priv(netdrv); + sst_socket_priv_t* priv = get_priv(netdrv); if (priv->proto == TCP) { size_t bytes_to_read; // The bytes to read in future. ssize_t bytes_read = 0; // The bytes that was read by a single read() function. diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c new file mode 100644 index 000000000..6a5ed7fd1 --- /dev/null +++ b/core/federated/network/lf_sst_support.c @@ -0,0 +1,795 @@ + +#include "lf_socket_support.h" + +#include /* htons */ +#include +#include /* IFNAMSIZ */ +#include +#include // IPPROTO_TCP, IPPROTO_UDP +#include // TCP_NODELAY +#include +#include +#include +#include +#include +#include +#include +#include + +#include "util.h" +#include "net_common.h" + +typedef enum { TCP, UDP } socket_type_t; + +static socket_priv_t* get_priv(netdrv_t* drv) { + if (!drv) { + // lf_print_error_and_exit("Falied get socket_priv_t."); + // FIXME(Byeonggil): I commented out this because it shouldn't report error to send -1 port address. + return NULL; + } + return (socket_priv_t*)(drv + 1); +} + +char* get_host_name(netdrv_t* drv) { + socket_priv_t* priv = get_priv(drv); + return priv->server_hostname; +} +int32_t get_my_port(netdrv_t* drv) { + socket_priv_t* priv = get_priv(drv); + return priv->port; +} +int32_t get_port(netdrv_t* drv) { + socket_priv_t* priv = get_priv(drv); + return (priv == NULL) ? -1 : priv->server_port; +} +struct in_addr* get_ip_addr(netdrv_t* drv) { + socket_priv_t* priv = get_priv(drv); + return &priv->server_ip_addr; +} +void set_host_name(netdrv_t* drv, const char* hostname) { + socket_priv_t* priv = get_priv(drv); + memcpy(priv->server_hostname, hostname, INET_ADDRSTRLEN); +} +void set_port(netdrv_t* drv, int port) { + socket_priv_t* priv = get_priv(drv); + priv->server_port = port; +} +void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { + socket_priv_t* priv = get_priv(drv); + priv->server_ip_addr = ip_addr; +} + +void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) { + socket_priv_t* priv_clock = get_priv(clock_drv); + socket_priv_t* priv_rti = get_priv(rti_drv); + priv_clock->UDP_addr.sin_family = AF_INET; + priv_clock->UDP_addr.sin_port = htons(port_num); + priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; +} + +// create_real_time_tcp_socket_errexit +static int socket_open(netdrv_t* drv) { + if (!drv) { + return -1; + } + socket_priv_t* priv = get_priv(drv); + priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + priv->proto = TCP; + if (priv->socket_descriptor < 0) { + lf_print_error_and_exit("Could not open TCP socket. Err=%d", priv->socket_descriptor); + } + // Disable Nagle's algorithm which bundles together small TCP messages to + // reduce network traffic + // TODO: Re-consider if we should do this, and whether disabling delayed ACKs + // is enough. + int flag = 1; + int result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } + +// Disable delayed ACKs. Only possible on Linux +#if defined(PLATFORM_Linux) + result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } +#endif + + return priv->socket_descriptor; +} + +void netdrv_free(netdrv_t* drv) { + socket_priv_t* priv = get_priv(drv); + // free(priv); // Already freed on socket close() + free(drv); +} + +static void socket_close(netdrv_t* drv) { + if (!drv) { + return; + } + socket_priv_t* priv = get_priv(drv); + if (priv->socket_descriptor > 0) { + shutdown(priv->socket_descriptor, SHUT_RDWR); + close(priv->socket_descriptor); + priv->socket_descriptor = -1; + } +} + +netdrv_t* netdrv_init() { + // TODO: Should it be malloc? To support different network stacks operate simulatneously? + netdrv_t* drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); // Don't need to call malloc() twice. + if (!drv) { // check if malloc worked. + lf_print_error_and_exit("Falied to malloc netdrv_t."); + } + memset(drv, 0, sizeof(netdrv_t)); + + socket_priv_t* priv = get_priv(drv); + priv->port = 0; + priv->socket_descriptor = 0; + priv->user_specified_port = 0; + + // federate initialization + strncpy(priv->server_hostname, "localhost", INET_ADDRSTRLEN); + priv->server_port = -1; + priv->server_ip_addr.s_addr = 0; + + priv->proto = TCP; + + drv->read_remaining_bytes = 0; + + drv->open = socket_open; + drv->close = socket_close; + // drv->read = socket_read; + // drv->write = socket_write; + // drv->get_priv = get_priv; + return drv; +} + +/** + * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled + * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application + * on any error. + * + * @return The socket ID (a file descriptor). + */ +static int net_create_real_time_tcp_socket_errexit() { + int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (sock < 0) { + lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); + } + // Disable Nagle's algorithm which bundles together small TCP messages to + // reduce network traffic + // TODO: Re-consider if we should do this, and whether disabling delayed ACKs + // is enough. + int flag = 1; + int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } + +// Disable delayed ACKs. Only possible on Linux +#if defined(PLATFORM_Linux) + result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } +#endif + + return sock; +} + +// TODO: DONGHA: Need to fix port. +int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port) { + socket_priv_t* priv = get_priv(drv); + // Server file descriptor. + struct sockaddr_in server_fd; + // Zero out the server address structure. + bzero((char*)&server_fd, sizeof(server_fd)); + + server_fd.sin_family = AF_INET; // IPv4 + server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. + // Convert the port number from host byte order to network byte order. + server_fd.sin_port = htons(port); + + int result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); + int count = 0; + while (result < 0 && count++ < PORT_BIND_RETRY_LIMIT) { + lf_sleep(PORT_BIND_RETRY_INTERVAL); + result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); + } + if (result < 0) { + lf_print_error_and_exit("Failed to bind socket on port %d.", port); + } + + // Set the global server port. + if (specified_port == 0) { + // Need to retrieve the port number assigned by the OS. + struct sockaddr_in assigned; + socklen_t addr_len = sizeof(assigned); + if (getsockname(priv->socket_descriptor, (struct sockaddr*)&assigned, &addr_len) < 0) { + lf_print_error_and_exit("Failed to retrieve assigned port number."); + } + priv->port = ntohs(assigned.sin_port); + } else { + priv->port = port; + } + + // Enable listening for socket connections. + // The second argument is the maximum number of queued socket requests, + // which according to the Mac man page is limited to 128. + listen(priv->socket_descriptor, 128); +} + +/** + * Create a server and enable listening for socket connections. + * If the specified port if it is non-zero, it will attempt to acquire that port. + * If it fails, it will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times with + * a delay of PORT_BIND_RETRY_INTERVAL in between. If the specified port is + * zero, then it will attempt to acquire DEFAULT_PORT first. If this fails, then it + * will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times, incrementing the port + * number between attempts, with no delay between attempts. Once it has incremented + * the port number MAX_NUM_PORT_ADDRESSES times, it will cycle around and begin again + * with DEFAULT_PORT. + * + * @param port The port number to use or 0 to start trying at DEFAULT_PORT. + * @param socket_type The type of the socket for the server (TCP or UDP). + * @return The socket descriptor on which to accept connections. + */ +// TODO: Fix comments. +int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { + socket_priv_t* priv = get_priv(drv); + + // Timeout time for the communications of the server + struct timeval timeout_time = {.tv_sec = TCP_TIMEOUT_TIME / BILLION, .tv_usec = (TCP_TIMEOUT_TIME % BILLION) / 1000}; + // Create an IPv4 socket for TCP (not UDP) communication over IP (0). + priv->socket_descriptor = -1; + if (netdrv_type == RTI) { + priv->socket_descriptor = net_create_real_time_tcp_socket_errexit(); + priv->proto = TCP; + } else if (netdrv_type == CLOCKSYNC) { + priv->socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + // Set the appropriate timeout time + timeout_time = + (struct timeval){.tv_sec = UDP_TIMEOUT_TIME / BILLION, .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000}; + priv->proto = UDP; + } + if (priv->socket_descriptor < 0) { + lf_print_error_and_exit("Failed to create RTI socket."); + } + + // Set the option for this socket to reuse the same address + int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option + if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_REUSEADDR, &true_variable, sizeof(int32_t)) < 0) { + lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno)); + } + // Set the timeout on the socket so that read and write operations don't block for too long + if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < + 0) { + lf_print_error("RTI failed to set SO_RCVTIMEO option on the socket: %s.", strerror(errno)); + } + if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < + 0) { + lf_print_error("RTI failed to set SO_SNDTIMEO option on the socket: %s.", strerror(errno)); + } + + /* + * The following used to permit reuse of a port that an RTI has previously + * used that has not been released. We no longer do this, but instead + * increment the port number until an available port is found. + + // SO_REUSEPORT (since Linux 3.9) + // Permits multiple AF_INET or AF_INET6 sockets to be bound to an + // identical socket address. This option must be set on each + // socket (including the first socket) prior to calling bind(2) + // on the socket. To prevent port hijacking, all of the + // processes binding to the same address must have the same + // effective UID. This option can be employed with both TCP and + // UDP sockets. + + int reuse = 1; + if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEADDR, + (const char*)&reuse, sizeof(reuse)) < 0) { + perror("setsockopt(SO_REUSEADDR) failed"); + } + + #ifdef SO_REUSEPORT + if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEPORT, + (const char*)&reuse, sizeof(reuse)) < 0) { + perror("setsockopt(SO_REUSEPORT) failed"); + } + #endif + */ + + // Server file descriptor. + struct sockaddr_in server_fd; + // Zero out the server address structure. + bzero((char*)&server_fd, sizeof(server_fd)); + + uint16_t port = 0; // TODO: Need to bring specified port. Not working currently. + uint16_t specified_port = port; + if (specified_port == 0) + port = DEFAULT_PORT; + + server_fd.sin_family = AF_INET; // IPv4 + server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. + // Convert the port number from host byte order to network byte order. + server_fd.sin_port = htons(port); + + int result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); + + // Try repeatedly to bind to a port. If no specific port is specified, then + // increment the port number each time. + + int count = 1; + while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { + if (specified_port == 0) { + lf_print_warning("RTI failed to get port %d.", port); + port++; + if (port >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) + port = DEFAULT_PORT; + lf_print_warning("RTI will try again with port %d.", port); + server_fd.sin_port = htons(port); + // Do not sleep. + } else { + lf_print("RTI failed to get port %d. Will try again.", port); + lf_sleep(PORT_BIND_RETRY_INTERVAL); + } + result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); + } + if (result != 0) { + lf_print_error_and_exit("Failed to bind the RTI socket. Port %d is not available. ", port); + } + char* type = "TCP"; + if (netdrv_type == CLOCKSYNC) { + type = "UDP"; + } + // lf_print("RTI using %s port %d for federation %s.", type, port, rti_remote->federation_id); //TODO: How to bring + // federation_id? + + if (netdrv_type == RTI) { + priv->port = port; + + // Enable listening for socket connections. + // The second argument is the maximum number of queued socket requests, + // which according to the Mac man page is limited to 128. + listen(priv->socket_descriptor, 128); + } else if (netdrv_type == CLOCKSYNC) { + priv->port = port; + // No need to listen on the UDP socket + } + return priv->socket_descriptor; +} + +// void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { +// socket_priv_t *rti_priv = get_priv(rti_netdrv); +// socket_priv_t *clock_priv = get_priv(clock_netdrv); +// // Shutdown and close the socket that is listening for incoming connections +// // so that the accept() call in respond_to_erroneous_connections returns. +// // That thread should then check rti->all_federates_exited and it should exit. +// if (shutdown(rti_priv->socket_descriptor, SHUT_RDWR)) { +// LF_PRINT_LOG("On shut down TCP socket, received reply: %s", strerror(errno)); +// } +// // NOTE: In all common TCP/IP stacks, there is a time period, +// // typically between 30 and 120 seconds, called the TIME_WAIT period, +// // before the port is released after this close. This is because +// // the OS is preventing another program from accidentally receiving +// // duplicated packets intended for this program. +// close(rti_priv->socket_descriptor); + +// if (clock_priv->socket_descriptor > 0) { +// if (shutdown(clock_priv->socket_descriptor, SHUT_RDWR)) { +// LF_PRINT_LOG("On shut down UDP socket, received reply: %s", strerror(errno)); +// } +// close(clock_priv->socket_descriptor); +// } +// } + +netdrv_t* netdrv_accept(netdrv_t* my_netdrv) { + netdrv_t* client_netdrv = netdrv_init(); + socket_priv_t* my_priv = get_priv(my_netdrv); + socket_priv_t* client_priv = get_priv(client_netdrv); + struct sockaddr client_fd; + uint32_t client_length = sizeof(client_fd); + client_priv->socket_descriptor = accept(my_priv->socket_descriptor, &client_fd, &client_length); + if (client_priv->socket_descriptor < 0) { + return NULL; + } + return client_netdrv; +} + +netdrv_t* accept_connection(netdrv_t* rti_netdrv) { + netdrv_t* fed_netdrv = netdrv_init(); + socket_priv_t* rti_priv = get_priv(rti_netdrv); + socket_priv_t* fed_priv = get_priv(fed_netdrv); + // Wait for an incoming connection request. + struct sockaddr client_fd; + uint32_t client_length = sizeof(client_fd); + // The following blocks until a federate connects. + while (1) { + fed_priv->socket_descriptor = accept(rti_priv->socket_descriptor, &client_fd, &client_length); + if (fed_priv->socket_descriptor >= 0) { + // Got a socket + break; + } else if (fed_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { + lf_print_error_and_exit("RTI failed to accept the socket. %s.", strerror(errno)); + } else { + // Try again + lf_print_warning("RTI failed to accept the socket. %s. Trying again.", strerror(errno)); + continue; + } + } + // Assign the address information for federate. + // The IP address is stored here as an in_addr struct (in .server_ip_addr) that can be useful + // to create sockets and can be efficiently sent over the network. + // First, convert the sockaddr structure into a sockaddr_in that contains an internet address. + struct sockaddr_in* pV4_addr = (struct sockaddr_in*)&client_fd; + // Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server + fed_priv->server_ip_addr = pV4_addr->sin_addr; + return fed_netdrv; +} + +int netdrv_connect(netdrv_t* drv) { + socket_priv_t* priv = get_priv(drv); + + struct addrinfo hints; + struct addrinfo* result; + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_INET; /* Allow IPv4 */ + hints.ai_socktype = SOCK_STREAM; /* Stream socket */ + hints.ai_protocol = IPPROTO_TCP; /* TCP protocol */ + hints.ai_addr = NULL; + hints.ai_next = NULL; + hints.ai_flags = AI_NUMERICSERV; /* Allow only numeric port numbers */ + + // Convert port number to string. + char str[6]; + sprintf(str, "%u", priv->server_port); + + // Get address structure matching hostname and hints criteria, and + // set port to the port number provided in str. There should only + // ever be one matching address structure, and we connect to that. + if (getaddrinfo(priv->server_hostname, (const char*)&str, &hints, &result)) { + lf_print_error_and_exit("No host matching given hostname: %s", priv->server_hostname); + } + + int ret = connect(priv->socket_descriptor, result->ai_addr, result->ai_addrlen); + freeaddrinfo(result); + return ret; +} + +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { + socket_priv_t* priv = get_priv(drv); + ssize_t bytes_read = recv(priv->socket_descriptor, result, 1, MSG_DONTWAIT | MSG_PEEK); + if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) + return 0; + else + return bytes_read; +} + +// Temporary function. +int write_to_netdrv_UDP(netdrv_t* drv, netdrv_t* target, size_t num_bytes, unsigned char* buffer, int flags) { + socket_priv_t* priv_drv = get_priv(drv); + socket_priv_t* priv_target = get_priv(target); + return sendto(priv_drv->socket_descriptor, buffer, num_bytes, flags, (struct sockaddr*)&priv_target->UDP_addr, + sizeof(priv_target->UDP_addr)); +} + +int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { + socket_priv_t* priv = get_priv(drv); + if (priv->socket_descriptor < 0) { + // Socket is not open. + errno = EBADF; + return -1; + } + ssize_t bytes_written = 0; + va_list args; + while (bytes_written < (ssize_t)num_bytes) { + ssize_t more = write(priv->socket_descriptor, buffer + bytes_written, num_bytes - (size_t)bytes_written); + if (more <= 0 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { + // The error codes EAGAIN or EWOULDBLOCK indicate + // that we should try again (@see man errno). + // The error code EINTR means the system call was interrupted before completing. + LF_PRINT_DEBUG("Writing to socket was blocked. Will try again."); + lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); + continue; + } else if (more < 0) { + // A more serious error occurred. + return -1; + } + bytes_written += more; + } + return bytes_written; +} + +int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { + int bytes_written = write_to_netdrv(drv, num_bytes, buffer); + if (bytes_written <= 0) { + // Write failed. + // Netdrv has probably been closed from the other side. + // Shut down and close the netdrv from this side. + drv->close(drv); + } + return bytes_written; +} + +void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, + char* format, ...) { + va_list args; + int bytes_written = write_to_netdrv_close_on_error(drv, num_bytes, buffer); + if (bytes_written <= 0) { + // Write failed. + if (mutex != NULL) { + lf_mutex_unlock(mutex); + } + if (format != NULL) { + lf_print_error_system_failure(format, args); + } else { + lf_print_error("Failed to write to socket. Closing it."); + } + } +} +// TODO: Fix return. +ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); + if (bytes_read <= 0) { + drv->close(drv); + return -1; + } + return bytes_read; +} + +// TODO: FIX return +void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, + char* format, ...) { + va_list args; + ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); + if (bytes_read <= 0) { + // Read failed. + if (mutex != NULL) { + lf_mutex_unlock(mutex); + } + if (format != NULL) { + lf_print_error_system_failure(format, args); + } else { + lf_print_error_system_failure("Failed to read from netdrv."); + } + } +} + +typedef enum { + HEADER_READ, + READ_MSG_TYPE_FED_IDS, + READ_MSG_TYPE_NEIGHBOR_STRUCTURE, + READ_MSG_TYPE_TAGGED_MESSAGE, + KEEP_READING, + FINISH_READ +} read_state_t; + +static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* bytes_to_read, int* state) { + switch (buffer[0]) { + case MSG_TYPE_REJECT: // 1 +1 + *bytes_to_read = 1; + *state = FINISH_READ; + break; + case MSG_TYPE_ACK: // 1 + *bytes_to_read = 0; + *state = FINISH_READ; + break; + case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 + *bytes_to_read = sizeof(uint16_t); + *state = FINISH_READ; + break; + case MSG_TYPE_FED_IDS: // 1 + sizeof(uint16_t) + 1 + federation_id + *bytes_to_read = sizeof(uint16_t) + 1; + *state = READ_MSG_TYPE_FED_IDS; + break; + case MSG_TYPE_FED_NONCE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) + *bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; + *state = FINISH_READ; + break; + case MSG_TYPE_RTI_RESPONSE: // 1 + NONCE_LENGTH(8) + SHA256_HMAC_LENGTH(32) + *bytes_to_read = NONCE_LENGTH + SHA256_HMAC_LENGTH; + *state = FINISH_READ; + break; + case MSG_TYPE_FED_RESPONSE: // 1 + SHA256_HMAC_LENGTH(32) + *bytes_to_read = SHA256_HMAC_LENGTH; + *state = FINISH_READ; + break; + case MSG_TYPE_TIMESTAMP: // 1+sizeof(int64_t) + *bytes_to_read = sizeof(int64_t); + *state = FINISH_READ; + break; + case MSG_TYPE_RESIGN: + *bytes_to_read = 0; + *state = FINISH_READ; + break; + case MSG_TYPE_TAGGED_MESSAGE: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); + *state = READ_MSG_TYPE_TAGGED_MESSAGE; + break; + case MSG_TYPE_NEXT_EVENT_TAG: + *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_TAG_ADVANCE_GRANT: + *bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); + *state = FINISH_READ; + break; + case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: + *bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); + *state = FINISH_READ; + break; + case MSG_TYPE_LATEST_TAG_COMPLETE: + *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_STOP_REQUEST: + *bytes_to_read = MSG_TYPE_STOP_REQUEST_LENGTH - 1; + *state = FINISH_READ; + break; + case MSG_TYPE_STOP_REQUEST_REPLY: + *bytes_to_read = MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1; + *state = FINISH_READ; + break; + case MSG_TYPE_STOP_GRANTED: + *bytes_to_read = MSG_TYPE_STOP_GRANTED_LENGTH - 1; + *state = FINISH_READ; + break; + case MSG_TYPE_ADDRESS_QUERY: + *bytes_to_read = sizeof(uint16_t); + *state = FINISH_READ; + break; + case MSG_TYPE_ADDRESS_QUERY_REPLY: + *bytes_to_read = sizeof(int32_t) + sizeof(struct in_addr); + *state = FINISH_READ; + break; + case MSG_TYPE_ADDRESS_ADVERTISEMENT: + *bytes_to_read = sizeof(int32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_P2P_SENDING_FED_ID: // 1 /////////TODO: CHECK!!!!!!! + *bytes_to_read = sizeof(uint16_t) + 1; + *state = READ_MSG_TYPE_FED_IDS; + break; + case MSG_TYPE_P2P_MESSAGE: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); + *state = READ_MSG_TYPE_TAGGED_MESSAGE; + break; + case MSG_TYPE_P2P_TAGGED_MESSAGE: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(instant_t) + sizeof(microstep_t); + *state = READ_MSG_TYPE_TAGGED_MESSAGE; + break; + case MSG_TYPE_CLOCK_SYNC_T1: + *bytes_to_read = sizeof(instant_t); + *state = FINISH_READ; + break; + case MSG_TYPE_CLOCK_SYNC_T3: + *bytes_to_read = sizeof(int32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_CLOCK_SYNC_T4: + *bytes_to_read = sizeof(instant_t); + *state = FINISH_READ; + break; + case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: + *bytes_to_read = sizeof(int64_t); + *state = FINISH_READ; + break; + case MSG_TYPE_PORT_ABSENT: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_NEIGHBOR_STRUCTURE: + *bytes_to_read = MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1; + *state = READ_MSG_TYPE_NEIGHBOR_STRUCTURE; + break; + case MSG_TYPE_FAILED: + *bytes_to_read = 0; + *state = FINISH_READ; + default: + *bytes_to_read = 0; + // Error handling? + *state = FINISH_READ; + lf_print_error_system_failure("Undefined message header. Terminating system."); + } +} + +static ssize_t read_UDP(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { + socket_priv_t* priv = get_priv(netdrv); + return read(priv->socket_descriptor, buffer, buffer_length); +} + +// TODO: DONGHA: ADD buffer_length checking. +// Returns the total bytes read. +ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { + socket_priv_t* priv = get_priv(netdrv); + if (priv->proto == TCP) { + size_t bytes_to_read; // The bytes to read in future. + ssize_t bytes_read = 0; // The bytes that was read by a single read() function. + size_t total_bytes_read = 0; // The total bytes that have been read, and will be the return of the read_from netdrv. + int retry_count; + int state; + // Check if socket_descriptor is open. + if (priv->socket_descriptor < 0) { + // Socket is not open. + errno = EBADF; + return -1; + } + // First, check if there are remaining bytes. + // If there are remaining bytes, it reads as long as it can (buffer_length). + // Then it becomes KEEP_READING state. + if (netdrv->read_remaining_bytes > 0) { + bytes_to_read = (netdrv->read_remaining_bytes > buffer_length) ? buffer_length : netdrv->read_remaining_bytes; + state = KEEP_READING; + } else { + // If there are no left bytes to read, it reads the header byte. + bytes_to_read = 1; // read header + state = HEADER_READ; + } + + for (;;) { + retry_count = 0; + while (bytes_to_read > 0) { + // TODO: Check buffer_length. + bytes_read = read(priv->socket_descriptor, buffer + total_bytes_read, bytes_to_read); + if (bytes_read < 0 && // If) Error has occurred, + retry_count++ < NUM_SOCKET_RETRIES && // there are left retry counts, + (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { // and the error code was these three, + // Print warning, sleep for a short time, and retry. + lf_print_warning("Reading from socket failed. Will try again."); + lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); + continue; + } else if (bytes_read <= 0) { + // An error occurred without those three error codes. + // https://stackoverflow.com/questions/42188128/does-reading-from-a-socket-wait-or-get-eof + // bytes_read == 0 means disconnected. + return -1; + } + bytes_to_read -= bytes_read; + total_bytes_read += bytes_read; + } + + switch (state) { + case HEADER_READ: + handle_header_read(netdrv, buffer, &bytes_to_read, &state); + break; + + case READ_MSG_TYPE_FED_IDS:; + size_t federation_id_length = (size_t)buffer[1 + sizeof(uint16_t)]; + bytes_to_read = federation_id_length; + state = FINISH_READ; + break; + case READ_MSG_TYPE_NEIGHBOR_STRUCTURE:; + int num_upstream = extract_int32(buffer + 1); + int num_downstream = extract_int32(buffer + 1 + sizeof(int32_t)); + bytes_to_read = ((sizeof(uint16_t) + sizeof(int64_t)) * num_upstream) + (sizeof(uint16_t) * num_downstream); + state = FINISH_READ; + break; + case READ_MSG_TYPE_TAGGED_MESSAGE:; + size_t length = (size_t)extract_uint32(buffer + 1 + sizeof(uint16_t) + sizeof(uint16_t)); + if (length > buffer_length - total_bytes_read) { + bytes_to_read = buffer_length - total_bytes_read; + netdrv->read_remaining_bytes = length - bytes_to_read; + } else { + bytes_to_read = length; + } + state = FINISH_READ; + break; + case KEEP_READING: + netdrv->read_remaining_bytes -= total_bytes_read; + return total_bytes_read; + case FINISH_READ: + return total_bytes_read; + } + } + } else if (priv->proto == UDP) { + return read_UDP(netdrv, buffer, buffer_length); + } +} diff --git a/include/core/federated/network/lf_sst_support.h b/include/core/federated/network/lf_sst_support.h new file mode 100644 index 000000000..e04875aa7 --- /dev/null +++ b/include/core/federated/network/lf_sst_support.h @@ -0,0 +1,219 @@ +#ifndef LF_SOCKET_SUPPORT_H +#define LF_SOCKET_SUPPORT_H + +#include // IPPROTO_TCP, IPPROTO_UDP +#include // TCP_NODELAY + +#include "net_util.h" +#include "lf_socket_support.h" +#include "c_api.h" + +/** + * The timeout time in ns for TCP operations. + * Default value is 10 secs. + */ +#define TCP_TIMEOUT_TIME SEC(10) + +/** + * The timeout time in ns for UDP operations. + * Default value is 1 sec. + */ +#define UDP_TIMEOUT_TIME SEC(1) + +/** + * Maximum number of port addresses that a federate will try to connect to the RTI on. + * If you are using automatic ports begining at DEFAULT_PORT, this puts an upper bound + * on the number of RTIs that can be running on the same host. + */ +#define MAX_NUM_PORT_ADDRESSES 16 + +/** + * Time to wait before re-attempting to bind to a port. + * When a process closes, the network stack typically waits between 30 and 120 + * seconds before releasing the port. This is to allow for delayed packets so + * that a new process does not receive packets from a previous process. + * Here, we limit the retries to 60 seconds. + */ +#define PORT_BIND_RETRY_INTERVAL SEC(1) + +/** + * Number of attempts to bind to a port before giving up. + */ +#define PORT_BIND_RETRY_LIMIT 60 + +/** + * Default port number for the RTI. + * Unless a specific port has been specified by the LF program in the "at" + * for the RTI or on the command line, when the RTI starts up, it will attempt + * to open a socket server on this port. + */ +#define DEFAULT_PORT 15045u + +#define DELAY_BETWEEN_SOCKET_RETRIES MSEC(100) + +typedef struct sst_socket_priv_t { + int port; // my port number + int socket_descriptor; + int proto; + uint16_t user_specified_port; + + // The connected other side's info. + char server_hostname[INET_ADDRSTRLEN]; // Human-readable IP address and + int32_t server_port; // port number of the socket server of the federate + // if it has any incoming direct connections from other federates. + // The port number will be -1 if there is no server or if the + // RTI has not been informed of the port number. + struct in_addr server_ip_addr; // Information about the IP address of the socket + // server of the federate. + + struct sockaddr_in UDP_addr; // The UDP address for the federate. + +} sst_socket_priv_t; + +char* get_host_name(netdrv_t* drv); +int32_t get_my_port(netdrv_t* drv); +int32_t get_port(netdrv_t* drv); +struct in_addr* get_ip_addr(netdrv_t* drv); + +void set_host_name(netdrv_t* drv, const char* hostname); +void set_port(netdrv_t* drv, int port); +void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr); +void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num); + +netdrv_t* netdrv_init(); + +void netdrv_free(netdrv_t* drv); + +int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port); + +/** + * Create a server and enable listening for socket connections. + * If the specified port if it is non-zero, it will attempt to acquire that port. + * If it fails, it will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times with + * a delay of PORT_BIND_RETRY_INTERVAL in between. If the specified port is + * zero, then it will attempt to acquire DEFAULT_PORT first. If this fails, then it + * will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times, incrementing the port + * number between attempts, with no delay between attempts. Once it has incremented + * the port number MAX_NUM_PORT_ADDRESSES times, it will cycle around and begin again + * with DEFAULT_PORT. + * + * @param port The port number to use or 0 to start trying at DEFAULT_PORT. + * @param socket_type The type of the socket for the server (TCP or UDP). + * @return The socket descriptor on which to accept connections. + */ +// TODO: Update descriptions. +int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type); + +// int create_real_time_tcp_socket_errexit(); +// void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv); + +netdrv_t* netdrv_accept(netdrv_t* my_netdrv); + +netdrv_t* accept_connection(netdrv_t* rti_netdrv); + +int netdrv_connect(netdrv_t* drv); + +/** + * Without blocking, peek at the specified socket and, if there is + * anything on the queue, put its first byte at the specified address and return 1. + * If there is nothing on the queue, return 0, and if an error occurs, + * return -1. + * @param socket The socket ID. + * @param result Pointer to where to put the first byte available on the socket. + */ +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result); + +int write_to_netdrv_UDP(netdrv_t* drv, netdrv_t* target, size_t num_bytes, unsigned char* buffer, int flags); + +/** + * Write the specified number of bytes to the specified socket from the + * specified buffer. If an error occurs, return -1 and set errno to indicate + * the cause of the error. If the write succeeds, return 0. + * This function repeats the attempt until the specified number of bytes + * have been written or an error occurs. Specifically, errors EAGAIN, + * EWOULDBLOCK, and EINTR are not considered errors and instead trigger + * another attempt. A delay between attempts is given by + * DELAY_BETWEEN_SOCKET_RETRIES. + * @param socket The socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. + */ +int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); + +/** + * Write the specified number of bytes to the specified socket using write_to_socket + * and close the socket if an error occurs. If an error occurs, this will change the + * socket ID pointed to by the first argument to -1 and will return -1. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. + */ +int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); + +/** + * Write the specified number of bytes to the specified socket using + * write_to_socket_close_on_error and exit with an error code if an error occurs. + * If the mutex argument is non-NULL, release the mutex before exiting. If the + * format argument is non-null, then use it an any additional arguments to form + * the error message using printf conventions. Otherwise, print a generic error + * message. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @param mutex If non-NULL, the mutex to unlock before exiting. + * @param format A format string for error messages, followed by any number of + * fields that will be used to fill the format string as in printf, or NULL + * to print a generic error message. + */ +void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, + char* format, ...); + +/** + * Read the specified number of bytes from the specified socket into the specified buffer. + * If an error occurs during this reading, return -1 and set errno to indicate + * the cause of the error. If the read succeeds in reading the specified number of bytes, + * return 0. If an EOF occurs before reading the specified number of bytes, return 1. + * This function repeats the read attempt until the specified number of bytes + * have been read, an EOF is read, or an error occurs. Specifically, errors EAGAIN, + * EWOULDBLOCK, and EINTR are not considered errors and instead trigger + * another attempt. A delay between attempts is given by DELAY_BETWEEN_SOCKET_RETRIES. + * @param socket The socket ID. + * @param num_bytes The number of bytes to read. + * @param buffer The buffer into which to put the bytes. + * @return 0 for success, 1 for EOF, and -1 for an error. + */ +ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length); + +/** + * Read the specified number of bytes to the specified socket using read_from_socket + * and close the socket if an error occurs. If an error occurs, this will change the + * socket ID pointed to by the first argument to -1 and will return -1. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. + */ +ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); + +/** + * Read the specified number of bytes from the specified socket into the + * specified buffer. If a disconnect or an EOF occurs during this + * reading, then if format is non-null, report an error and exit. + * If the mutex argument is non-NULL, release the mutex before exiting. + * If format is null, then report the error, but do not exit. + * This function takes a formatted string and additional optional arguments + * similar to printf(format, ...) that is appended to the error messages. + * @param socket The socket ID. + * @param num_bytes The number of bytes to read. + * @param buffer The buffer into which to put the bytes. + * @param format A printf-style format string, followed by arguments to + * fill the string, or NULL to not exit with an error message. + * @return The number of bytes read, or 0 if an EOF is received, or + * a negative number for an error. + */ +void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, + char* format, ...); + +#endif // LF_SOCKET_SUPPORT_H diff --git a/third_party/sst-c-api b/third_party/sst-c-api index 1c1f67924..47bb3aced 160000 --- a/third_party/sst-c-api +++ b/third_party/sst-c-api @@ -1 +1 @@ -Subproject commit 1c1f67924113b625c62a781d17c293dbaf51fece +Subproject commit 47bb3aced2de6ebd56cf5982bca855e72dfb74ad From 586128c46beb57b2260bd50b89d2c9f9e93792a8 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 25 Mar 2024 10:56:23 -0700 Subject: [PATCH 094/262] Revert mistakes --- core/federated/network/lf_socket_support.c | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 708f0a49b..6a5ed7fd1 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -21,47 +21,47 @@ typedef enum { TCP, UDP } socket_type_t; -static sst_socket_priv_t* get_priv(netdrv_t* drv) { +static socket_priv_t* get_priv(netdrv_t* drv) { if (!drv) { - // lf_print_error_and_exit("Falied get sst_socket_priv_t."); + // lf_print_error_and_exit("Falied get socket_priv_t."); // FIXME(Byeonggil): I commented out this because it shouldn't report error to send -1 port address. return NULL; } - return (sst_socket_priv_t*)(drv + 1); + return (socket_priv_t*)(drv + 1); } char* get_host_name(netdrv_t* drv) { - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); return priv->server_hostname; } int32_t get_my_port(netdrv_t* drv) { - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); return priv->port; } int32_t get_port(netdrv_t* drv) { - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); return (priv == NULL) ? -1 : priv->server_port; } struct in_addr* get_ip_addr(netdrv_t* drv) { - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); return &priv->server_ip_addr; } void set_host_name(netdrv_t* drv, const char* hostname) { - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); memcpy(priv->server_hostname, hostname, INET_ADDRSTRLEN); } void set_port(netdrv_t* drv, int port) { - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); priv->server_port = port; } void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); priv->server_ip_addr = ip_addr; } void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) { - sst_socket_priv_t* priv_clock = get_priv(clock_drv); - sst_socket_priv_t* priv_rti = get_priv(rti_drv); + socket_priv_t* priv_clock = get_priv(clock_drv); + socket_priv_t* priv_rti = get_priv(rti_drv); priv_clock->UDP_addr.sin_family = AF_INET; priv_clock->UDP_addr.sin_port = htons(port_num); priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; @@ -72,7 +72,7 @@ static int socket_open(netdrv_t* drv) { if (!drv) { return -1; } - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); priv->proto = TCP; if (priv->socket_descriptor < 0) { @@ -102,7 +102,7 @@ static int socket_open(netdrv_t* drv) { } void netdrv_free(netdrv_t* drv) { - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); // free(priv); // Already freed on socket close() free(drv); } @@ -111,7 +111,7 @@ static void socket_close(netdrv_t* drv) { if (!drv) { return; } - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); if (priv->socket_descriptor > 0) { shutdown(priv->socket_descriptor, SHUT_RDWR); close(priv->socket_descriptor); @@ -121,13 +121,13 @@ static void socket_close(netdrv_t* drv) { netdrv_t* netdrv_init() { // TODO: Should it be malloc? To support different network stacks operate simulatneously? - netdrv_t* drv = malloc(sizeof(*drv) + sizeof(sst_socket_priv_t)); // Don't need to call malloc() twice. + netdrv_t* drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); // Don't need to call malloc() twice. if (!drv) { // check if malloc worked. lf_print_error_and_exit("Falied to malloc netdrv_t."); } memset(drv, 0, sizeof(netdrv_t)); - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); priv->port = 0; priv->socket_descriptor = 0; priv->user_specified_port = 0; @@ -186,7 +186,7 @@ static int net_create_real_time_tcp_socket_errexit() { // TODO: DONGHA: Need to fix port. int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port) { - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); // Server file descriptor. struct sockaddr_in server_fd; // Zero out the server address structure. @@ -243,7 +243,7 @@ int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port) { */ // TODO: Fix comments. int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); // Timeout time for the communications of the server struct timeval timeout_time = {.tv_sec = TCP_TIMEOUT_TIME / BILLION, .tv_usec = (TCP_TIMEOUT_TIME % BILLION) / 1000}; @@ -367,8 +367,8 @@ int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { } // void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { -// sst_socket_priv_t *rti_priv = get_priv(rti_netdrv); -// sst_socket_priv_t *clock_priv = get_priv(clock_netdrv); +// socket_priv_t *rti_priv = get_priv(rti_netdrv); +// socket_priv_t *clock_priv = get_priv(clock_netdrv); // // Shutdown and close the socket that is listening for incoming connections // // so that the accept() call in respond_to_erroneous_connections returns. // // That thread should then check rti->all_federates_exited and it should exit. @@ -392,8 +392,8 @@ int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { netdrv_t* netdrv_accept(netdrv_t* my_netdrv) { netdrv_t* client_netdrv = netdrv_init(); - sst_socket_priv_t* my_priv = get_priv(my_netdrv); - sst_socket_priv_t* client_priv = get_priv(client_netdrv); + socket_priv_t* my_priv = get_priv(my_netdrv); + socket_priv_t* client_priv = get_priv(client_netdrv); struct sockaddr client_fd; uint32_t client_length = sizeof(client_fd); client_priv->socket_descriptor = accept(my_priv->socket_descriptor, &client_fd, &client_length); @@ -405,8 +405,8 @@ netdrv_t* netdrv_accept(netdrv_t* my_netdrv) { netdrv_t* accept_connection(netdrv_t* rti_netdrv) { netdrv_t* fed_netdrv = netdrv_init(); - sst_socket_priv_t* rti_priv = get_priv(rti_netdrv); - sst_socket_priv_t* fed_priv = get_priv(fed_netdrv); + socket_priv_t* rti_priv = get_priv(rti_netdrv); + socket_priv_t* fed_priv = get_priv(fed_netdrv); // Wait for an incoming connection request. struct sockaddr client_fd; uint32_t client_length = sizeof(client_fd); @@ -435,7 +435,7 @@ netdrv_t* accept_connection(netdrv_t* rti_netdrv) { } int netdrv_connect(netdrv_t* drv) { - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); struct addrinfo hints; struct addrinfo* result; @@ -465,7 +465,7 @@ int netdrv_connect(netdrv_t* drv) { } ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); ssize_t bytes_read = recv(priv->socket_descriptor, result, 1, MSG_DONTWAIT | MSG_PEEK); if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) return 0; @@ -475,14 +475,14 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { // Temporary function. int write_to_netdrv_UDP(netdrv_t* drv, netdrv_t* target, size_t num_bytes, unsigned char* buffer, int flags) { - sst_socket_priv_t* priv_drv = get_priv(drv); - sst_socket_priv_t* priv_target = get_priv(target); + socket_priv_t* priv_drv = get_priv(drv); + socket_priv_t* priv_target = get_priv(target); return sendto(priv_drv->socket_descriptor, buffer, num_bytes, flags, (struct sockaddr*)&priv_target->UDP_addr, sizeof(priv_target->UDP_addr)); } int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { - sst_socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = get_priv(drv); if (priv->socket_descriptor < 0) { // Socket is not open. errno = EBADF; @@ -702,14 +702,14 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* } static ssize_t read_UDP(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { - sst_socket_priv_t* priv = get_priv(netdrv); + socket_priv_t* priv = get_priv(netdrv); return read(priv->socket_descriptor, buffer, buffer_length); } // TODO: DONGHA: ADD buffer_length checking. // Returns the total bytes read. ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { - sst_socket_priv_t* priv = get_priv(netdrv); + socket_priv_t* priv = get_priv(netdrv); if (priv->proto == TCP) { size_t bytes_to_read; // The bytes to read in future. ssize_t bytes_read = 0; // The bytes that was read by a single read() function. From bd5de3af1b037257993c74e38dcdfa224ec13fc9 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 26 Mar 2024 17:23:37 -0700 Subject: [PATCH 095/262] Add empty mqtt support .c .h --- core/federated/network/lf_mqtt_support.c | 1 + include/core/federated/network/lf_mqtt_support.h | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 core/federated/network/lf_mqtt_support.c create mode 100644 include/core/federated/network/lf_mqtt_support.h diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c new file mode 100644 index 000000000..6989bd91c --- /dev/null +++ b/core/federated/network/lf_mqtt_support.c @@ -0,0 +1 @@ +#include "lf_mqtt_support.h" diff --git a/include/core/federated/network/lf_mqtt_support.h b/include/core/federated/network/lf_mqtt_support.h new file mode 100644 index 000000000..f8851c2cd --- /dev/null +++ b/include/core/federated/network/lf_mqtt_support.h @@ -0,0 +1,12 @@ +#ifndef LF_MQTT_SUPPORT_H +#define LF_MQTT_SUPPORT_H + +typedef struct mqtt_priv_t { + MQTTClient client; + MQTTClient_connectOptions conn_opts; // = MQTTClient_connectOptions_initializer; + MQTTClient_message pubmsg; //= MQTTClient_message_initializer; + MQTTClient_deliveryToken token; + const char* topic_name; +} mqtt_priv_t; + +#endif // LF_MQTT_SUPPORT_H From 42274f760363297b450854b862932be8e000eefb Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 26 Mar 2024 17:23:59 -0700 Subject: [PATCH 096/262] Remove unneeded functions yet for sst_support.c --- core/federated/network/lf_sst_support.c | 778 +----------------- .../core/federated/network/lf_sst_support.h | 225 +---- 2 files changed, 16 insertions(+), 987 deletions(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 6a5ed7fd1..d2c85fa34 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -1,6 +1,3 @@ - -#include "lf_socket_support.h" - #include /* htons */ #include #include /* IFNAMSIZ */ @@ -19,777 +16,4 @@ #include "util.h" #include "net_common.h" -typedef enum { TCP, UDP } socket_type_t; - -static socket_priv_t* get_priv(netdrv_t* drv) { - if (!drv) { - // lf_print_error_and_exit("Falied get socket_priv_t."); - // FIXME(Byeonggil): I commented out this because it shouldn't report error to send -1 port address. - return NULL; - } - return (socket_priv_t*)(drv + 1); -} - -char* get_host_name(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); - return priv->server_hostname; -} -int32_t get_my_port(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); - return priv->port; -} -int32_t get_port(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); - return (priv == NULL) ? -1 : priv->server_port; -} -struct in_addr* get_ip_addr(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); - return &priv->server_ip_addr; -} -void set_host_name(netdrv_t* drv, const char* hostname) { - socket_priv_t* priv = get_priv(drv); - memcpy(priv->server_hostname, hostname, INET_ADDRSTRLEN); -} -void set_port(netdrv_t* drv, int port) { - socket_priv_t* priv = get_priv(drv); - priv->server_port = port; -} -void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { - socket_priv_t* priv = get_priv(drv); - priv->server_ip_addr = ip_addr; -} - -void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) { - socket_priv_t* priv_clock = get_priv(clock_drv); - socket_priv_t* priv_rti = get_priv(rti_drv); - priv_clock->UDP_addr.sin_family = AF_INET; - priv_clock->UDP_addr.sin_port = htons(port_num); - priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; -} - -// create_real_time_tcp_socket_errexit -static int socket_open(netdrv_t* drv) { - if (!drv) { - return -1; - } - socket_priv_t* priv = get_priv(drv); - priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - priv->proto = TCP; - if (priv->socket_descriptor < 0) { - lf_print_error_and_exit("Could not open TCP socket. Err=%d", priv->socket_descriptor); - } - // Disable Nagle's algorithm which bundles together small TCP messages to - // reduce network traffic - // TODO: Re-consider if we should do this, and whether disabling delayed ACKs - // is enough. - int flag = 1; - int result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } - -// Disable delayed ACKs. Only possible on Linux -#if defined(PLATFORM_Linux) - result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } -#endif - - return priv->socket_descriptor; -} - -void netdrv_free(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); - // free(priv); // Already freed on socket close() - free(drv); -} - -static void socket_close(netdrv_t* drv) { - if (!drv) { - return; - } - socket_priv_t* priv = get_priv(drv); - if (priv->socket_descriptor > 0) { - shutdown(priv->socket_descriptor, SHUT_RDWR); - close(priv->socket_descriptor); - priv->socket_descriptor = -1; - } -} - -netdrv_t* netdrv_init() { - // TODO: Should it be malloc? To support different network stacks operate simulatneously? - netdrv_t* drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); // Don't need to call malloc() twice. - if (!drv) { // check if malloc worked. - lf_print_error_and_exit("Falied to malloc netdrv_t."); - } - memset(drv, 0, sizeof(netdrv_t)); - - socket_priv_t* priv = get_priv(drv); - priv->port = 0; - priv->socket_descriptor = 0; - priv->user_specified_port = 0; - - // federate initialization - strncpy(priv->server_hostname, "localhost", INET_ADDRSTRLEN); - priv->server_port = -1; - priv->server_ip_addr.s_addr = 0; - - priv->proto = TCP; - - drv->read_remaining_bytes = 0; - - drv->open = socket_open; - drv->close = socket_close; - // drv->read = socket_read; - // drv->write = socket_write; - // drv->get_priv = get_priv; - return drv; -} - -/** - * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled - * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application - * on any error. - * - * @return The socket ID (a file descriptor). - */ -static int net_create_real_time_tcp_socket_errexit() { - int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (sock < 0) { - lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); - } - // Disable Nagle's algorithm which bundles together small TCP messages to - // reduce network traffic - // TODO: Re-consider if we should do this, and whether disabling delayed ACKs - // is enough. - int flag = 1; - int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } - -// Disable delayed ACKs. Only possible on Linux -#if defined(PLATFORM_Linux) - result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } -#endif - - return sock; -} - -// TODO: DONGHA: Need to fix port. -int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port) { - socket_priv_t* priv = get_priv(drv); - // Server file descriptor. - struct sockaddr_in server_fd; - // Zero out the server address structure. - bzero((char*)&server_fd, sizeof(server_fd)); - - server_fd.sin_family = AF_INET; // IPv4 - server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. - // Convert the port number from host byte order to network byte order. - server_fd.sin_port = htons(port); - - int result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); - int count = 0; - while (result < 0 && count++ < PORT_BIND_RETRY_LIMIT) { - lf_sleep(PORT_BIND_RETRY_INTERVAL); - result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); - } - if (result < 0) { - lf_print_error_and_exit("Failed to bind socket on port %d.", port); - } - - // Set the global server port. - if (specified_port == 0) { - // Need to retrieve the port number assigned by the OS. - struct sockaddr_in assigned; - socklen_t addr_len = sizeof(assigned); - if (getsockname(priv->socket_descriptor, (struct sockaddr*)&assigned, &addr_len) < 0) { - lf_print_error_and_exit("Failed to retrieve assigned port number."); - } - priv->port = ntohs(assigned.sin_port); - } else { - priv->port = port; - } - - // Enable listening for socket connections. - // The second argument is the maximum number of queued socket requests, - // which according to the Mac man page is limited to 128. - listen(priv->socket_descriptor, 128); -} - -/** - * Create a server and enable listening for socket connections. - * If the specified port if it is non-zero, it will attempt to acquire that port. - * If it fails, it will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times with - * a delay of PORT_BIND_RETRY_INTERVAL in between. If the specified port is - * zero, then it will attempt to acquire DEFAULT_PORT first. If this fails, then it - * will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times, incrementing the port - * number between attempts, with no delay between attempts. Once it has incremented - * the port number MAX_NUM_PORT_ADDRESSES times, it will cycle around and begin again - * with DEFAULT_PORT. - * - * @param port The port number to use or 0 to start trying at DEFAULT_PORT. - * @param socket_type The type of the socket for the server (TCP or UDP). - * @return The socket descriptor on which to accept connections. - */ -// TODO: Fix comments. -int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { - socket_priv_t* priv = get_priv(drv); - - // Timeout time for the communications of the server - struct timeval timeout_time = {.tv_sec = TCP_TIMEOUT_TIME / BILLION, .tv_usec = (TCP_TIMEOUT_TIME % BILLION) / 1000}; - // Create an IPv4 socket for TCP (not UDP) communication over IP (0). - priv->socket_descriptor = -1; - if (netdrv_type == RTI) { - priv->socket_descriptor = net_create_real_time_tcp_socket_errexit(); - priv->proto = TCP; - } else if (netdrv_type == CLOCKSYNC) { - priv->socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - // Set the appropriate timeout time - timeout_time = - (struct timeval){.tv_sec = UDP_TIMEOUT_TIME / BILLION, .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000}; - priv->proto = UDP; - } - if (priv->socket_descriptor < 0) { - lf_print_error_and_exit("Failed to create RTI socket."); - } - - // Set the option for this socket to reuse the same address - int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option - if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_REUSEADDR, &true_variable, sizeof(int32_t)) < 0) { - lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno)); - } - // Set the timeout on the socket so that read and write operations don't block for too long - if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < - 0) { - lf_print_error("RTI failed to set SO_RCVTIMEO option on the socket: %s.", strerror(errno)); - } - if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < - 0) { - lf_print_error("RTI failed to set SO_SNDTIMEO option on the socket: %s.", strerror(errno)); - } - - /* - * The following used to permit reuse of a port that an RTI has previously - * used that has not been released. We no longer do this, but instead - * increment the port number until an available port is found. - - // SO_REUSEPORT (since Linux 3.9) - // Permits multiple AF_INET or AF_INET6 sockets to be bound to an - // identical socket address. This option must be set on each - // socket (including the first socket) prior to calling bind(2) - // on the socket. To prevent port hijacking, all of the - // processes binding to the same address must have the same - // effective UID. This option can be employed with both TCP and - // UDP sockets. - - int reuse = 1; - if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEADDR, - (const char*)&reuse, sizeof(reuse)) < 0) { - perror("setsockopt(SO_REUSEADDR) failed"); - } - - #ifdef SO_REUSEPORT - if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEPORT, - (const char*)&reuse, sizeof(reuse)) < 0) { - perror("setsockopt(SO_REUSEPORT) failed"); - } - #endif - */ - - // Server file descriptor. - struct sockaddr_in server_fd; - // Zero out the server address structure. - bzero((char*)&server_fd, sizeof(server_fd)); - - uint16_t port = 0; // TODO: Need to bring specified port. Not working currently. - uint16_t specified_port = port; - if (specified_port == 0) - port = DEFAULT_PORT; - - server_fd.sin_family = AF_INET; // IPv4 - server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. - // Convert the port number from host byte order to network byte order. - server_fd.sin_port = htons(port); - - int result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); - - // Try repeatedly to bind to a port. If no specific port is specified, then - // increment the port number each time. - - int count = 1; - while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { - if (specified_port == 0) { - lf_print_warning("RTI failed to get port %d.", port); - port++; - if (port >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) - port = DEFAULT_PORT; - lf_print_warning("RTI will try again with port %d.", port); - server_fd.sin_port = htons(port); - // Do not sleep. - } else { - lf_print("RTI failed to get port %d. Will try again.", port); - lf_sleep(PORT_BIND_RETRY_INTERVAL); - } - result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); - } - if (result != 0) { - lf_print_error_and_exit("Failed to bind the RTI socket. Port %d is not available. ", port); - } - char* type = "TCP"; - if (netdrv_type == CLOCKSYNC) { - type = "UDP"; - } - // lf_print("RTI using %s port %d for federation %s.", type, port, rti_remote->federation_id); //TODO: How to bring - // federation_id? - - if (netdrv_type == RTI) { - priv->port = port; - - // Enable listening for socket connections. - // The second argument is the maximum number of queued socket requests, - // which according to the Mac man page is limited to 128. - listen(priv->socket_descriptor, 128); - } else if (netdrv_type == CLOCKSYNC) { - priv->port = port; - // No need to listen on the UDP socket - } - return priv->socket_descriptor; -} - -// void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { -// socket_priv_t *rti_priv = get_priv(rti_netdrv); -// socket_priv_t *clock_priv = get_priv(clock_netdrv); -// // Shutdown and close the socket that is listening for incoming connections -// // so that the accept() call in respond_to_erroneous_connections returns. -// // That thread should then check rti->all_federates_exited and it should exit. -// if (shutdown(rti_priv->socket_descriptor, SHUT_RDWR)) { -// LF_PRINT_LOG("On shut down TCP socket, received reply: %s", strerror(errno)); -// } -// // NOTE: In all common TCP/IP stacks, there is a time period, -// // typically between 30 and 120 seconds, called the TIME_WAIT period, -// // before the port is released after this close. This is because -// // the OS is preventing another program from accidentally receiving -// // duplicated packets intended for this program. -// close(rti_priv->socket_descriptor); - -// if (clock_priv->socket_descriptor > 0) { -// if (shutdown(clock_priv->socket_descriptor, SHUT_RDWR)) { -// LF_PRINT_LOG("On shut down UDP socket, received reply: %s", strerror(errno)); -// } -// close(clock_priv->socket_descriptor); -// } -// } - -netdrv_t* netdrv_accept(netdrv_t* my_netdrv) { - netdrv_t* client_netdrv = netdrv_init(); - socket_priv_t* my_priv = get_priv(my_netdrv); - socket_priv_t* client_priv = get_priv(client_netdrv); - struct sockaddr client_fd; - uint32_t client_length = sizeof(client_fd); - client_priv->socket_descriptor = accept(my_priv->socket_descriptor, &client_fd, &client_length); - if (client_priv->socket_descriptor < 0) { - return NULL; - } - return client_netdrv; -} - -netdrv_t* accept_connection(netdrv_t* rti_netdrv) { - netdrv_t* fed_netdrv = netdrv_init(); - socket_priv_t* rti_priv = get_priv(rti_netdrv); - socket_priv_t* fed_priv = get_priv(fed_netdrv); - // Wait for an incoming connection request. - struct sockaddr client_fd; - uint32_t client_length = sizeof(client_fd); - // The following blocks until a federate connects. - while (1) { - fed_priv->socket_descriptor = accept(rti_priv->socket_descriptor, &client_fd, &client_length); - if (fed_priv->socket_descriptor >= 0) { - // Got a socket - break; - } else if (fed_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { - lf_print_error_and_exit("RTI failed to accept the socket. %s.", strerror(errno)); - } else { - // Try again - lf_print_warning("RTI failed to accept the socket. %s. Trying again.", strerror(errno)); - continue; - } - } - // Assign the address information for federate. - // The IP address is stored here as an in_addr struct (in .server_ip_addr) that can be useful - // to create sockets and can be efficiently sent over the network. - // First, convert the sockaddr structure into a sockaddr_in that contains an internet address. - struct sockaddr_in* pV4_addr = (struct sockaddr_in*)&client_fd; - // Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server - fed_priv->server_ip_addr = pV4_addr->sin_addr; - return fed_netdrv; -} - -int netdrv_connect(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); - - struct addrinfo hints; - struct addrinfo* result; - - memset(&hints, 0, sizeof(hints)); - hints.ai_family = AF_INET; /* Allow IPv4 */ - hints.ai_socktype = SOCK_STREAM; /* Stream socket */ - hints.ai_protocol = IPPROTO_TCP; /* TCP protocol */ - hints.ai_addr = NULL; - hints.ai_next = NULL; - hints.ai_flags = AI_NUMERICSERV; /* Allow only numeric port numbers */ - - // Convert port number to string. - char str[6]; - sprintf(str, "%u", priv->server_port); - - // Get address structure matching hostname and hints criteria, and - // set port to the port number provided in str. There should only - // ever be one matching address structure, and we connect to that. - if (getaddrinfo(priv->server_hostname, (const char*)&str, &hints, &result)) { - lf_print_error_and_exit("No host matching given hostname: %s", priv->server_hostname); - } - - int ret = connect(priv->socket_descriptor, result->ai_addr, result->ai_addrlen); - freeaddrinfo(result); - return ret; -} - -ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { - socket_priv_t* priv = get_priv(drv); - ssize_t bytes_read = recv(priv->socket_descriptor, result, 1, MSG_DONTWAIT | MSG_PEEK); - if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) - return 0; - else - return bytes_read; -} - -// Temporary function. -int write_to_netdrv_UDP(netdrv_t* drv, netdrv_t* target, size_t num_bytes, unsigned char* buffer, int flags) { - socket_priv_t* priv_drv = get_priv(drv); - socket_priv_t* priv_target = get_priv(target); - return sendto(priv_drv->socket_descriptor, buffer, num_bytes, flags, (struct sockaddr*)&priv_target->UDP_addr, - sizeof(priv_target->UDP_addr)); -} - -int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { - socket_priv_t* priv = get_priv(drv); - if (priv->socket_descriptor < 0) { - // Socket is not open. - errno = EBADF; - return -1; - } - ssize_t bytes_written = 0; - va_list args; - while (bytes_written < (ssize_t)num_bytes) { - ssize_t more = write(priv->socket_descriptor, buffer + bytes_written, num_bytes - (size_t)bytes_written); - if (more <= 0 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { - // The error codes EAGAIN or EWOULDBLOCK indicate - // that we should try again (@see man errno). - // The error code EINTR means the system call was interrupted before completing. - LF_PRINT_DEBUG("Writing to socket was blocked. Will try again."); - lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); - continue; - } else if (more < 0) { - // A more serious error occurred. - return -1; - } - bytes_written += more; - } - return bytes_written; -} - -int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { - int bytes_written = write_to_netdrv(drv, num_bytes, buffer); - if (bytes_written <= 0) { - // Write failed. - // Netdrv has probably been closed from the other side. - // Shut down and close the netdrv from this side. - drv->close(drv); - } - return bytes_written; -} - -void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, - char* format, ...) { - va_list args; - int bytes_written = write_to_netdrv_close_on_error(drv, num_bytes, buffer); - if (bytes_written <= 0) { - // Write failed. - if (mutex != NULL) { - lf_mutex_unlock(mutex); - } - if (format != NULL) { - lf_print_error_system_failure(format, args); - } else { - lf_print_error("Failed to write to socket. Closing it."); - } - } -} -// TODO: Fix return. -ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { - ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); - if (bytes_read <= 0) { - drv->close(drv); - return -1; - } - return bytes_read; -} - -// TODO: FIX return -void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, - char* format, ...) { - va_list args; - ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); - if (bytes_read <= 0) { - // Read failed. - if (mutex != NULL) { - lf_mutex_unlock(mutex); - } - if (format != NULL) { - lf_print_error_system_failure(format, args); - } else { - lf_print_error_system_failure("Failed to read from netdrv."); - } - } -} - -typedef enum { - HEADER_READ, - READ_MSG_TYPE_FED_IDS, - READ_MSG_TYPE_NEIGHBOR_STRUCTURE, - READ_MSG_TYPE_TAGGED_MESSAGE, - KEEP_READING, - FINISH_READ -} read_state_t; - -static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* bytes_to_read, int* state) { - switch (buffer[0]) { - case MSG_TYPE_REJECT: // 1 +1 - *bytes_to_read = 1; - *state = FINISH_READ; - break; - case MSG_TYPE_ACK: // 1 - *bytes_to_read = 0; - *state = FINISH_READ; - break; - case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 - *bytes_to_read = sizeof(uint16_t); - *state = FINISH_READ; - break; - case MSG_TYPE_FED_IDS: // 1 + sizeof(uint16_t) + 1 + federation_id - *bytes_to_read = sizeof(uint16_t) + 1; - *state = READ_MSG_TYPE_FED_IDS; - break; - case MSG_TYPE_FED_NONCE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) - *bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; - *state = FINISH_READ; - break; - case MSG_TYPE_RTI_RESPONSE: // 1 + NONCE_LENGTH(8) + SHA256_HMAC_LENGTH(32) - *bytes_to_read = NONCE_LENGTH + SHA256_HMAC_LENGTH; - *state = FINISH_READ; - break; - case MSG_TYPE_FED_RESPONSE: // 1 + SHA256_HMAC_LENGTH(32) - *bytes_to_read = SHA256_HMAC_LENGTH; - *state = FINISH_READ; - break; - case MSG_TYPE_TIMESTAMP: // 1+sizeof(int64_t) - *bytes_to_read = sizeof(int64_t); - *state = FINISH_READ; - break; - case MSG_TYPE_RESIGN: - *bytes_to_read = 0; - *state = FINISH_READ; - break; - case MSG_TYPE_TAGGED_MESSAGE: - *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); - *state = READ_MSG_TYPE_TAGGED_MESSAGE; - break; - case MSG_TYPE_NEXT_EVENT_TAG: - *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_TAG_ADVANCE_GRANT: - *bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); - *state = FINISH_READ; - break; - case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: - *bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); - *state = FINISH_READ; - break; - case MSG_TYPE_LATEST_TAG_COMPLETE: - *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_STOP_REQUEST: - *bytes_to_read = MSG_TYPE_STOP_REQUEST_LENGTH - 1; - *state = FINISH_READ; - break; - case MSG_TYPE_STOP_REQUEST_REPLY: - *bytes_to_read = MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1; - *state = FINISH_READ; - break; - case MSG_TYPE_STOP_GRANTED: - *bytes_to_read = MSG_TYPE_STOP_GRANTED_LENGTH - 1; - *state = FINISH_READ; - break; - case MSG_TYPE_ADDRESS_QUERY: - *bytes_to_read = sizeof(uint16_t); - *state = FINISH_READ; - break; - case MSG_TYPE_ADDRESS_QUERY_REPLY: - *bytes_to_read = sizeof(int32_t) + sizeof(struct in_addr); - *state = FINISH_READ; - break; - case MSG_TYPE_ADDRESS_ADVERTISEMENT: - *bytes_to_read = sizeof(int32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_P2P_SENDING_FED_ID: // 1 /////////TODO: CHECK!!!!!!! - *bytes_to_read = sizeof(uint16_t) + 1; - *state = READ_MSG_TYPE_FED_IDS; - break; - case MSG_TYPE_P2P_MESSAGE: - *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); - *state = READ_MSG_TYPE_TAGGED_MESSAGE; - break; - case MSG_TYPE_P2P_TAGGED_MESSAGE: - *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(instant_t) + sizeof(microstep_t); - *state = READ_MSG_TYPE_TAGGED_MESSAGE; - break; - case MSG_TYPE_CLOCK_SYNC_T1: - *bytes_to_read = sizeof(instant_t); - *state = FINISH_READ; - break; - case MSG_TYPE_CLOCK_SYNC_T3: - *bytes_to_read = sizeof(int32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_CLOCK_SYNC_T4: - *bytes_to_read = sizeof(instant_t); - *state = FINISH_READ; - break; - case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: - *bytes_to_read = sizeof(int64_t); - *state = FINISH_READ; - break; - case MSG_TYPE_PORT_ABSENT: - *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_NEIGHBOR_STRUCTURE: - *bytes_to_read = MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1; - *state = READ_MSG_TYPE_NEIGHBOR_STRUCTURE; - break; - case MSG_TYPE_FAILED: - *bytes_to_read = 0; - *state = FINISH_READ; - default: - *bytes_to_read = 0; - // Error handling? - *state = FINISH_READ; - lf_print_error_system_failure("Undefined message header. Terminating system."); - } -} - -static ssize_t read_UDP(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { - socket_priv_t* priv = get_priv(netdrv); - return read(priv->socket_descriptor, buffer, buffer_length); -} - -// TODO: DONGHA: ADD buffer_length checking. -// Returns the total bytes read. -ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { - socket_priv_t* priv = get_priv(netdrv); - if (priv->proto == TCP) { - size_t bytes_to_read; // The bytes to read in future. - ssize_t bytes_read = 0; // The bytes that was read by a single read() function. - size_t total_bytes_read = 0; // The total bytes that have been read, and will be the return of the read_from netdrv. - int retry_count; - int state; - // Check if socket_descriptor is open. - if (priv->socket_descriptor < 0) { - // Socket is not open. - errno = EBADF; - return -1; - } - // First, check if there are remaining bytes. - // If there are remaining bytes, it reads as long as it can (buffer_length). - // Then it becomes KEEP_READING state. - if (netdrv->read_remaining_bytes > 0) { - bytes_to_read = (netdrv->read_remaining_bytes > buffer_length) ? buffer_length : netdrv->read_remaining_bytes; - state = KEEP_READING; - } else { - // If there are no left bytes to read, it reads the header byte. - bytes_to_read = 1; // read header - state = HEADER_READ; - } - - for (;;) { - retry_count = 0; - while (bytes_to_read > 0) { - // TODO: Check buffer_length. - bytes_read = read(priv->socket_descriptor, buffer + total_bytes_read, bytes_to_read); - if (bytes_read < 0 && // If) Error has occurred, - retry_count++ < NUM_SOCKET_RETRIES && // there are left retry counts, - (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { // and the error code was these three, - // Print warning, sleep for a short time, and retry. - lf_print_warning("Reading from socket failed. Will try again."); - lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); - continue; - } else if (bytes_read <= 0) { - // An error occurred without those three error codes. - // https://stackoverflow.com/questions/42188128/does-reading-from-a-socket-wait-or-get-eof - // bytes_read == 0 means disconnected. - return -1; - } - bytes_to_read -= bytes_read; - total_bytes_read += bytes_read; - } - - switch (state) { - case HEADER_READ: - handle_header_read(netdrv, buffer, &bytes_to_read, &state); - break; - - case READ_MSG_TYPE_FED_IDS:; - size_t federation_id_length = (size_t)buffer[1 + sizeof(uint16_t)]; - bytes_to_read = federation_id_length; - state = FINISH_READ; - break; - case READ_MSG_TYPE_NEIGHBOR_STRUCTURE:; - int num_upstream = extract_int32(buffer + 1); - int num_downstream = extract_int32(buffer + 1 + sizeof(int32_t)); - bytes_to_read = ((sizeof(uint16_t) + sizeof(int64_t)) * num_upstream) + (sizeof(uint16_t) * num_downstream); - state = FINISH_READ; - break; - case READ_MSG_TYPE_TAGGED_MESSAGE:; - size_t length = (size_t)extract_uint32(buffer + 1 + sizeof(uint16_t) + sizeof(uint16_t)); - if (length > buffer_length - total_bytes_read) { - bytes_to_read = buffer_length - total_bytes_read; - netdrv->read_remaining_bytes = length - bytes_to_read; - } else { - bytes_to_read = length; - } - state = FINISH_READ; - break; - case KEEP_READING: - netdrv->read_remaining_bytes -= total_bytes_read; - return total_bytes_read; - case FINISH_READ: - return total_bytes_read; - } - } - } else if (priv->proto == UDP) { - return read_UDP(netdrv, buffer, buffer_length); - } -} +#include "lf_sst_support.h" \ No newline at end of file diff --git a/include/core/federated/network/lf_sst_support.h b/include/core/federated/network/lf_sst_support.h index e04875aa7..e3c627289 100644 --- a/include/core/federated/network/lf_sst_support.h +++ b/include/core/federated/network/lf_sst_support.h @@ -1,219 +1,24 @@ -#ifndef LF_SOCKET_SUPPORT_H -#define LF_SOCKET_SUPPORT_H +#ifndef LF_SST_SUPPORT_H +#define LF_SST_SUPPORT_H -#include // IPPROTO_TCP, IPPROTO_UDP -#include // TCP_NODELAY - -#include "net_util.h" -#include "lf_socket_support.h" +#include "socket_common.h" #include "c_api.h" - -/** - * The timeout time in ns for TCP operations. - * Default value is 10 secs. - */ -#define TCP_TIMEOUT_TIME SEC(10) - -/** - * The timeout time in ns for UDP operations. - * Default value is 1 sec. - */ -#define UDP_TIMEOUT_TIME SEC(1) - -/** - * Maximum number of port addresses that a federate will try to connect to the RTI on. - * If you are using automatic ports begining at DEFAULT_PORT, this puts an upper bound - * on the number of RTIs that can be running on the same host. - */ -#define MAX_NUM_PORT_ADDRESSES 16 - -/** - * Time to wait before re-attempting to bind to a port. - * When a process closes, the network stack typically waits between 30 and 120 - * seconds before releasing the port. This is to allow for delayed packets so - * that a new process does not receive packets from a previous process. - * Here, we limit the retries to 60 seconds. - */ -#define PORT_BIND_RETRY_INTERVAL SEC(1) - -/** - * Number of attempts to bind to a port before giving up. - */ -#define PORT_BIND_RETRY_LIMIT 60 - -/** - * Default port number for the RTI. - * Unless a specific port has been specified by the LF program in the "at" - * for the RTI or on the command line, when the RTI starts up, it will attempt - * to open a socket server on this port. - */ -#define DEFAULT_PORT 15045u - -#define DELAY_BETWEEN_SOCKET_RETRIES MSEC(100) - typedef struct sst_socket_priv_t { - int port; // my port number - int socket_descriptor; - int proto; - uint16_t user_specified_port; + socket_priv_t socket_priv; // Must be first variable. + SST_ctx_t* sst_ctx; + SST_session_ctx_t* session_ctx; - // The connected other side's info. - char server_hostname[INET_ADDRSTRLEN]; // Human-readable IP address and - int32_t server_port; // port number of the socket server of the federate - // if it has any incoming direct connections from other federates. - // The port number will be -1 if there is no server or if the - // RTI has not been informed of the port number. - struct in_addr server_ip_addr; // Information about the IP address of the socket - // server of the federate. + // RTI: + // RTI_netdrv needs a sst_ctx, but not session_ctx; + // fed_netdrv needs only session_ctx not sst_ctx. - struct sockaddr_in UDP_addr; // The UDP address for the federate. + // Centralized Federate: + // netdrv_to_rti needs both sst_ctx and session_ctx + // Decentralized Federate: + // my_netdrv needs a sst_ctx, but not session_ctx; + // netdrv_for_inbound_p2p_connections and outbound needs only session_ctx not sst_ctx. } sst_socket_priv_t; -char* get_host_name(netdrv_t* drv); -int32_t get_my_port(netdrv_t* drv); -int32_t get_port(netdrv_t* drv); -struct in_addr* get_ip_addr(netdrv_t* drv); - -void set_host_name(netdrv_t* drv, const char* hostname); -void set_port(netdrv_t* drv, int port); -void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr); -void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num); - -netdrv_t* netdrv_init(); - -void netdrv_free(netdrv_t* drv); - -int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port); - -/** - * Create a server and enable listening for socket connections. - * If the specified port if it is non-zero, it will attempt to acquire that port. - * If it fails, it will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times with - * a delay of PORT_BIND_RETRY_INTERVAL in between. If the specified port is - * zero, then it will attempt to acquire DEFAULT_PORT first. If this fails, then it - * will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times, incrementing the port - * number between attempts, with no delay between attempts. Once it has incremented - * the port number MAX_NUM_PORT_ADDRESSES times, it will cycle around and begin again - * with DEFAULT_PORT. - * - * @param port The port number to use or 0 to start trying at DEFAULT_PORT. - * @param socket_type The type of the socket for the server (TCP or UDP). - * @return The socket descriptor on which to accept connections. - */ -// TODO: Update descriptions. -int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type); - -// int create_real_time_tcp_socket_errexit(); -// void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv); - -netdrv_t* netdrv_accept(netdrv_t* my_netdrv); - -netdrv_t* accept_connection(netdrv_t* rti_netdrv); - -int netdrv_connect(netdrv_t* drv); - -/** - * Without blocking, peek at the specified socket and, if there is - * anything on the queue, put its first byte at the specified address and return 1. - * If there is nothing on the queue, return 0, and if an error occurs, - * return -1. - * @param socket The socket ID. - * @param result Pointer to where to put the first byte available on the socket. - */ -ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result); - -int write_to_netdrv_UDP(netdrv_t* drv, netdrv_t* target, size_t num_bytes, unsigned char* buffer, int flags); - -/** - * Write the specified number of bytes to the specified socket from the - * specified buffer. If an error occurs, return -1 and set errno to indicate - * the cause of the error. If the write succeeds, return 0. - * This function repeats the attempt until the specified number of bytes - * have been written or an error occurs. Specifically, errors EAGAIN, - * EWOULDBLOCK, and EINTR are not considered errors and instead trigger - * another attempt. A delay between attempts is given by - * DELAY_BETWEEN_SOCKET_RETRIES. - * @param socket The socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. - */ -int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); - -/** - * Write the specified number of bytes to the specified socket using write_to_socket - * and close the socket if an error occurs. If an error occurs, this will change the - * socket ID pointed to by the first argument to -1 and will return -1. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. - */ -int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); - -/** - * Write the specified number of bytes to the specified socket using - * write_to_socket_close_on_error and exit with an error code if an error occurs. - * If the mutex argument is non-NULL, release the mutex before exiting. If the - * format argument is non-null, then use it an any additional arguments to form - * the error message using printf conventions. Otherwise, print a generic error - * message. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @param mutex If non-NULL, the mutex to unlock before exiting. - * @param format A format string for error messages, followed by any number of - * fields that will be used to fill the format string as in printf, or NULL - * to print a generic error message. - */ -void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, - char* format, ...); - -/** - * Read the specified number of bytes from the specified socket into the specified buffer. - * If an error occurs during this reading, return -1 and set errno to indicate - * the cause of the error. If the read succeeds in reading the specified number of bytes, - * return 0. If an EOF occurs before reading the specified number of bytes, return 1. - * This function repeats the read attempt until the specified number of bytes - * have been read, an EOF is read, or an error occurs. Specifically, errors EAGAIN, - * EWOULDBLOCK, and EINTR are not considered errors and instead trigger - * another attempt. A delay between attempts is given by DELAY_BETWEEN_SOCKET_RETRIES. - * @param socket The socket ID. - * @param num_bytes The number of bytes to read. - * @param buffer The buffer into which to put the bytes. - * @return 0 for success, 1 for EOF, and -1 for an error. - */ -ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length); - -/** - * Read the specified number of bytes to the specified socket using read_from_socket - * and close the socket if an error occurs. If an error occurs, this will change the - * socket ID pointed to by the first argument to -1 and will return -1. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. - */ -ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); - -/** - * Read the specified number of bytes from the specified socket into the - * specified buffer. If a disconnect or an EOF occurs during this - * reading, then if format is non-null, report an error and exit. - * If the mutex argument is non-NULL, release the mutex before exiting. - * If format is null, then report the error, but do not exit. - * This function takes a formatted string and additional optional arguments - * similar to printf(format, ...) that is appended to the error messages. - * @param socket The socket ID. - * @param num_bytes The number of bytes to read. - * @param buffer The buffer into which to put the bytes. - * @param format A printf-style format string, followed by arguments to - * fill the string, or NULL to not exit with an error message. - * @return The number of bytes read, or 0 if an EOF is received, or - * a negative number for an error. - */ -void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, - char* format, ...); -#endif // LF_SOCKET_SUPPORT_H +#endif // LF_SST_SUPPORT_H From ea976ea760d275316cd328df8e4768ba45b48b45 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 26 Mar 2024 17:30:08 -0700 Subject: [PATCH 097/262] Clean net_util.h --- include/core/federated/network/net_util.h | 127 ++++++++++------------ 1 file changed, 60 insertions(+), 67 deletions(-) diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 016a945a5..6a1d52be7 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -75,7 +75,6 @@ typedef struct netdrv_t { int (*write)(struct netdrv_t* drv, size_t num_bytes, unsigned char* buffer); void* priv; unsigned int read_remaining_bytes; - // unsigned int write_remaining_bytes; } netdrv_t; int netdrv_open(netdrv_t* drv); @@ -83,21 +82,61 @@ void netdrv_close(netdrv_t* drv); int netdrv_read(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); int netdrv_write(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); // void * netdrv_get_privdrv(netdrv_t *drv); + +netdrv_t* netdrv_init(); + +typedef enum server_type_t { RTI, FED } server_type_t; + +// Port will be NULL on MQTT. +int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port); + +// Returns socket number of clock_sync_server. +int create_clock_sync_server(uint16_t* clock_sync_port); /** - * Mutex protecting socket close operations. + * Write the specified number of bytes to the specified socket from the + * specified buffer. If an error occurs, return -1 and set errno to indicate + * the cause of the error. If the write succeeds, return 0. + * This function repeats the attempt until the specified number of bytes + * have been written or an error occurs. Specifically, errors EAGAIN, + * EWOULDBLOCK, and EINTR are not considered errors and instead trigger + * another attempt. A delay between attempts is given by + * DELAY_BETWEEN_SOCKET_RETRIES. + * @param socket The socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. */ -extern lf_mutex_t netdrv_mutex; +int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); /** - * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled - * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application - * on any error. - * - * @return The socket ID (a file descriptor). + * Write the specified number of bytes to the specified socket using write_to_socket + * and close the socket if an error occurs. If an error occurs, this will change the + * socket ID pointed to by the first argument to -1 and will return -1. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. */ -int create_real_time_tcp_socket_errexit(); +int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); + +/** + * Write the specified number of bytes to the specified socket using + * write_to_socket_close_on_error and exit with an error code if an error occurs. + * If the mutex argument is non-NULL, release the mutex before exiting. If the + * format argument is non-null, then use it an any additional arguments to form + * the error message using printf conventions. Otherwise, print a generic error + * message. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @param mutex If non-NULL, the mutex to unlock before exiting. + * @param format A format string for error messages, followed by any number of + * fields that will be used to fill the format string as in printf, or NULL + * to print a generic error message. + */ +void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, + char* format, ...); -// TODO: Copied at lf_socket_support.c. Erase after finished. /** * Read the specified number of bytes from the specified socket into the specified buffer. * If an error occurs during this reading, return -1 and set errno to indicate @@ -112,9 +151,8 @@ int create_real_time_tcp_socket_errexit(); * @param buffer The buffer into which to put the bytes. * @return 0 for success, 1 for EOF, and -1 for an error. */ -int read_from_socket(int socket, size_t num_bytes, unsigned char* buffer); +ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length); -// TODO: Copied at lf_socket_support.c. Erase after finished. /** * Read the specified number of bytes to the specified socket using read_from_socket * and close the socket if an error occurs. If an error occurs, this will change the @@ -124,9 +162,8 @@ int read_from_socket(int socket, size_t num_bytes, unsigned char* buffer); * @param buffer The buffer from which to get the bytes. * @return 0 for success, -1 for failure. */ -int read_from_socket_close_on_error(int* socket, size_t num_bytes, unsigned char* buffer); +ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); -// TODO: Copied at lf_socket_support.c. Erase after finished. /** * Read the specified number of bytes from the specified socket into the * specified buffer. If a disconnect or an EOF occurs during this @@ -143,67 +180,23 @@ int read_from_socket_close_on_error(int* socket, size_t num_bytes, unsigned char * @return The number of bytes read, or 0 if an EOF is received, or * a negative number for an error. */ -void read_from_socket_fail_on_error(int* socket, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, +void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, char* format, ...); -// TODO: Copied at lf_socket_support.c. Erase after finished. /** - * Without blocking, peek at the specified socket and, if there is - * anything on the queue, put its first byte at the specified address and return 1. - * If there is nothing on the queue, return 0, and if an error occurs, - * return -1. - * @param socket The socket ID. - * @param result Pointer to where to put the first byte available on the socket. - */ -ssize_t peek_from_socket(int socket, unsigned char* result); - -// TODO: Copied at lf_socket_support.c. Erase after finished. -/** - * Write the specified number of bytes to the specified socket from the - * specified buffer. If an error occurs, return -1 and set errno to indicate - * the cause of the error. If the write succeeds, return 0. - * This function repeats the attempt until the specified number of bytes - * have been written or an error occurs. Specifically, errors EAGAIN, - * EWOULDBLOCK, and EINTR are not considered errors and instead trigger - * another attempt. A delay between attempts is given by - * DELAY_BETWEEN_SOCKET_RETRIES. - * @param socket The socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. + * Mutex protecting socket close operations. */ -int write_to_socket(int socket, size_t num_bytes, unsigned char* buffer); +extern lf_mutex_t netdrv_mutex; -// TODO: Copied at lf_socket_support.c. Erase after finished. /** - * Write the specified number of bytes to the specified socket using write_to_socket - * and close the socket if an error occurs. If an error occurs, this will change the - * socket ID pointed to by the first argument to -1 and will return -1. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. + * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled + * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application + * on any error. + * + * @return The socket ID (a file descriptor). */ -int write_to_socket_close_on_error(int* socket, size_t num_bytes, unsigned char* buffer); +int create_real_time_tcp_socket_errexit(); -// TODO: Copied at lf_socket_support.c. Erase after finished. -/** - * Write the specified number of bytes to the specified socket using - * write_to_socket_close_on_error and exit with an error code if an error occurs. - * If the mutex argument is non-NULL, release the mutex before exiting. If the - * format argument is non-null, then use it an any additional arguments to form - * the error message using printf conventions. Otherwise, print a generic error - * message. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @param mutex If non-NULL, the mutex to unlock before exiting. - * @param format A format string for error messages, followed by any number of - * fields that will be used to fill the format string as in printf, or NULL - * to print a generic error message. - */ -void write_to_socket_fail_on_error(int* socket, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, - char* format, ...); #endif // FEDERATED From bbd39de9fac1907733669752d9fc73a95981c16d Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 26 Mar 2024 17:30:26 -0700 Subject: [PATCH 098/262] Clean net_common.h --- include/core/federated/network/net_common.h | 47 --------------------- 1 file changed, 47 deletions(-) diff --git a/include/core/federated/network/net_common.h b/include/core/federated/network/net_common.h index e82b5bba6..2a02cc66f 100644 --- a/include/core/federated/network/net_common.h +++ b/include/core/federated/network/net_common.h @@ -179,20 +179,6 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef NET_COMMON_H #define NET_COMMON_H -// TODO: Copied at lf_socket_support.h. Erase after finished. -/** - * The timeout time in ns for TCP operations. - * Default value is 10 secs. - */ -#define TCP_TIMEOUT_TIME SEC(10) - -// TODO: Copied at lf_socket_support.h. Erase after finished. -/** - * The timeout time in ns for UDP operations. - * Default value is 1 sec. - */ -#define UDP_TIMEOUT_TIME SEC(1) - /** * Size of the buffer used for messages sent between federates. * This is used by both the federates and the rti, so message lengths @@ -212,14 +198,6 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define CONNECT_MAX_RETRIES 100 -// TODO: Copied at lf_socket_support.h. Erase after finished. -/** - * Maximum number of port addresses that a federate will try to connect to the RTI on. - * If you are using automatic ports begining at DEFAULT_PORT, this puts an upper bound - * on the number of RTIs that can be running on the same host. - */ -#define MAX_NUM_PORT_ADDRESSES 16 - /** * Time that a federate waits before asking * the RTI again for the port and IP address of a federate @@ -228,31 +206,6 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define ADDRESS_QUERY_RETRY_INTERVAL MSEC(250) -// TODO: Copied at lf_socket_support.h. Erase after finished. -/** - * Time to wait before re-attempting to bind to a port. - * When a process closes, the network stack typically waits between 30 and 120 - * seconds before releasing the port. This is to allow for delayed packets so - * that a new process does not receive packets from a previous process. - * Here, we limit the retries to 60 seconds. - */ -#define PORT_BIND_RETRY_INTERVAL SEC(1) - -// TODO: Copied at lf_socket_support.h. Erase after finished. -/** - * Number of attempts to bind to a port before giving up. - */ -#define PORT_BIND_RETRY_LIMIT 60 - -// TODO: Copied at lf_socket_support.h. Erase after finished. -/** - * Default port number for the RTI. - * Unless a specific port has been specified by the LF program in the "at" - * for the RTI or on the command line, when the RTI starts up, it will attempt - * to open a socket server on this port. - */ -#define DEFAULT_PORT 15045u - /** * Delay the start of all federates by this amount. * This helps ensure that the federates do not start at the same time. From d16f4f772fd0f046557c75d3d8a42671fda7790d Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 26 Mar 2024 17:31:45 -0700 Subject: [PATCH 099/262] Clean rti_remote.h --- core/federated/RTI/rti_remote.h | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 7f987da3e..e71bcdbf9 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -127,20 +127,13 @@ typedef struct rti_remote_t { /** The desired port specified by the user on the command line. */ uint16_t user_specified_port; - /** The final port number that the TCP socket server ends up using. */ - // uint16_t final_port_TCP; - - // /** The TCP socket descriptor for the socket server. */ - // int socket_descriptor_TCP; - - /************* UDP server information *************/ + /************* Clock synchronization server information *************/ /** The final port number that the UDP socket server ends up using. */ - uint16_t final_port_UDP; + uint16_t clock_sync_port; /** The UDP socket descriptor for the socket server. */ - int socket_descriptor_UDP; + int clock_sync_socket; - /************* Clock synchronization information *************/ /* Thread performing PTP clock sync sessions periodically. */ lf_thread_t clock_thread; @@ -386,19 +379,16 @@ void initialize_federate(federate_info_t* fed, uint16_t id); /** * Start the socket server for the runtime infrastructure (RTI) and * return the socket descriptor. - * @param num_feds Number of federates. * @param port The port on which to listen for socket connections, or * 0 to use the default port range. */ -// TODO: Need to add descriptions. -int32_t start_rti_server(); +int32_t start_rti_server(uint16_t port); // /** // * Start the runtime infrastructure (RTI) interaction with the federates // * and wait for the federates to exit. -// * @param socket_descriptor The socket descriptor returned by start_rti_server(). +// * @param netdrv The netdrv returned by start_rti_server(). // */ -// TODO: Add documentation. void wait_for_federates(netdrv_t* netdrv); /** From aed4c8978db008b89b402b5987f1cacb8b33eb13 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 26 Mar 2024 17:32:48 -0700 Subject: [PATCH 100/262] Make socket_common. h .c && Implement create_server(), which is used for both fed and RTI servers. --- core/federated/network/socket_common.c | 212 ++++++++++++++++++ .../core/federated/network/socket_common.h | 75 +++++++ 2 files changed, 287 insertions(+) create mode 100644 core/federated/network/socket_common.c create mode 100644 include/core/federated/network/socket_common.h diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c new file mode 100644 index 000000000..7b9632be4 --- /dev/null +++ b/core/federated/network/socket_common.c @@ -0,0 +1,212 @@ +#include /* htons */ +#include +#include /* IFNAMSIZ */ +#include +#include // IPPROTO_TCP, IPPROTO_UDP +#include // TCP_NODELAY +#include +#include +#include +#include +#include +#include +#include +#include + +#include "util.h" +#include "net_common.h" +#include "socket_common.h" + +socket_priv_t* socket_priv_init() { + socket_priv_t* priv = malloc(sizeof(socket_priv_t)); + if (!priv) { + lf_print_error_and_exit("Falied to malloc netdrv_t."); + } + memset(priv, 0, sizeof(socket_priv_t)); + + // TODO: Remove when it works. + // priv->port = 0; + // priv->socket_descriptor = 0; + // priv->user_specified_port = 0; + // priv->server_ip_addr.s_addr = 0; + + // federate initialization + strncpy(priv->server_hostname, "localhost", INET_ADDRSTRLEN); + priv->server_port = -1; +} + +/** + * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled + * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application + * on any error. + * + * @return The socket ID (a file descriptor). + */ +static int create_real_time_tcp_socket_errexit() { + // Timeout time for the communications of the server + struct timeval timeout_time = {.tv_sec = TCP_TIMEOUT_TIME / BILLION, .tv_usec = (TCP_TIMEOUT_TIME % BILLION) / 1000}; + int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (sock < 0) { + lf_print_error_system_failure("Could not open TCP socket."); + } + // Disable Nagle's algorithm which bundles together small TCP messages to + // reduce network traffic. + // TODO: Re-consider if we should do this, and whether disabling delayed ACKs + // is enough. + int flag = 1; + if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)) < 0) { + lf_print_error_system_failure("Failed to disable Nagle algorithm on socket server."); + } + + if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &flag, sizeof(int32_t)) < 0) { + lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno)); + } + // Set the timeout on the socket so that read and write operations don't block for too long + if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { + lf_print_error("RTI failed to set SO_RCVTIMEO option on the socket: %s.", strerror(errno)); + } + if (setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { + lf_print_error("RTI failed to set SO_SNDTIMEO option on the socket: %s.", strerror(errno)); + } + +#if defined(PLATFORM_Linux) + // Disable delayed ACKs. Only possible on Linux + result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_system_failure("Failed to disable Nagle algorithm on socket server."); + } +#endif // Linux + + return sock; +} + +// This only creates TCP servers not UDP. +int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + // Federate always has a specified port. The RTI can get a specified port by user input. + uint16_t specified_port = port; + if (specified_port == 0 && server_type == RTI) { + port = RTI_DEFAULT_PORT; + } + + // Create an IPv4 socket for TCP (not UDP) communication over IP (0). + priv->socket_descriptor = create_real_time_tcp_socket_errexit(); + + // Server file descriptor. + struct sockaddr_in server_fd; + // Zero out the server address structure. + bzero((char*)&server_fd, sizeof(server_fd)); + + server_fd.sin_family = AF_INET; // IPv4 + server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. + // Convert the port number from host byte order to network byte order. + server_fd.sin_port = htons(port); + + int result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); + // Try repeatedly to bind to a port. + int count = 1; + + while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { + if (specified_port == 0) { + lf_print_warning("Failed to get port %d.", port); + port++; + if (port >= RTI_DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) + port = RTI_DEFAULT_PORT; + lf_print_warning("Try again with port %d.", port); + server_fd.sin_port = htons(port); + // Do not sleep. + } else { + lf_print("RTI failed to get port %d. Will try again.", port); + lf_sleep(PORT_BIND_RETRY_INTERVAL); + } + result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); + } + if (result != 0) { + lf_print_error_and_exit("Failed to bind the socket. Port %d is not available. ", port); + } + // Enable listening for socket connections. + // The second argument is the maximum number of queued socket requests, + // which according to the Mac man page is limited to 128. + listen(priv->socket_descriptor, 128); + + // Set the port into priv->port. + if (specified_port == 0 && server_type == FED) { + // Need to retrieve the port number assigned by the OS. + struct sockaddr_in assigned; + socklen_t addr_len = sizeof(assigned); + if (getsockname(priv->socket_descriptor, (struct sockaddr*)&assigned, &addr_len) < 0) { + lf_print_error_and_exit("Failed to retrieve assigned port number."); + } + priv->port = ntohs(assigned.sin_port); + } else { + priv->port = port; + } + return 1; +} + +// Returns clock sync UDP socket. +int create_clock_sync_server(uint16_t* clock_sync_port) { + // Create UDP socket. + int socket = -1; + socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + // Set the appropriate timeout time for the communications of the server + struct timeval timeout_time = + (struct timeval){.tv_sec = UDP_TIMEOUT_TIME / BILLION, .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000}; + if (socket < 0) { + lf_print_error_system_failure("Failed to create RTI socket."); + } + + // Set the option for this socket to reuse the same address + int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option + if (setsockopt(socket, SOL_SOCKET, SO_REUSEADDR, &true_variable, sizeof(int32_t)) < 0) { + lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno)); + } + // Set the timeout on the socket so that read and write operations don't block for too long + if (setsockopt(socket, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { + lf_print_error("RTI failed to set SO_RCVTIMEO option on the socket: %s.", strerror(errno)); + } + if (setsockopt(socket, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { + lf_print_error("RTI failed to set SO_SNDTIMEO option on the socket: %s.", strerror(errno)); + } + + // Server file descriptor. + struct sockaddr_in server_fd; + // Zero out the server address structure. + bzero((char*)&server_fd, sizeof(server_fd)); + + uint16_t port = RTI_DEFAULT_UDP_PORT; // Default UDP port. + // uint16_t specified_port = port; + // if (specified_port == 0) + // port = DEFAULT_PORT; + + server_fd.sin_family = AF_INET; // IPv4 + server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. + // Convert the port number from host byte order to network byte order. + server_fd.sin_port = htons(port); + + int result = bind(socket, (struct sockaddr*)&server_fd, sizeof(server_fd)); + + // Try repeatedly to bind to a port. If no specific port is specified, then + // increment the port number each time. + + int count = 1; + while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { + lf_print_warning("RTI failed to get port %d.", port); + port++; + if (port >= DEFAULT_UDP_PORT + MAX_NUM_PORT_ADDRESSES) + port = DEFAULT_UDP_PORT; + lf_print_warning("RTI will try again with port %d.", port); + server_fd.sin_port = htons(port); + result = bind(socket, (struct sockaddr*)&server_fd, sizeof(server_fd)); + } + if (result != 0) { + lf_print_error_and_exit("Failed to bind the RTI socket. Port %d is not available. ", port); + } + + // Update port number. + *clock_sync_port = port; + // No need to listen on the UDP socket + + return socket; +} diff --git a/include/core/federated/network/socket_common.h b/include/core/federated/network/socket_common.h new file mode 100644 index 000000000..0d1a3c8a4 --- /dev/null +++ b/include/core/federated/network/socket_common.h @@ -0,0 +1,75 @@ +#ifndef SOCKET_COMMON_H +#define SOCKET_COMMON_H + +#include "net_util.h" + +#include // IPPROTO_TCP, IPPROTO_UDP +#include // TCP_NODELAY + +/** + * The timeout time in ns for TCP operations. + * Default value is 10 secs. + */ +#define TCP_TIMEOUT_TIME SEC(10) + +/** + * The timeout time in ns for UDP operations. + * Default value is 1 sec. + */ +#define UDP_TIMEOUT_TIME SEC(1) + +/** + * Maximum number of port addresses that a federate will try to connect to the RTI on. + * If you are using automatic ports begining at DEFAULT_PORT, this puts an upper bound + * on the number of RTIs that can be running on the same host. + */ +#define MAX_NUM_PORT_ADDRESSES 16 + +/** + * Time to wait before re-attempting to bind to a port. + * When a process closes, the network stack typically waits between 30 and 120 + * seconds before releasing the port. This is to allow for delayed packets so + * that a new process does not receive packets from a previous process. + * Here, we limit the retries to 60 seconds. + */ +#define PORT_BIND_RETRY_INTERVAL SEC(1) + +/** + * Number of attempts to bind to a port before giving up. + */ +#define PORT_BIND_RETRY_LIMIT 60 + +/** + * Default port number for the RTI. + * Unless a specific port has been specified by the LF program in the "at" + * for the RTI or on the command line, when the RTI starts up, it will attempt + * to open a socket server on this port. + */ +#define RTI_DEFAULT_PORT 15045u + +#define RTI_DEFAULT_UDP_PORT 15061u + +#define DELAY_BETWEEN_SOCKET_RETRIES MSEC(100) + +typedef enum { TCP, UDP } socket_type_t; + +typedef struct socket_priv_t { + int port; // my port number + int socket_descriptor; +// int proto; + uint16_t user_specified_port; + + // The connected other side's info. + char server_hostname[INET_ADDRSTRLEN]; // Human-readable IP address and + int32_t server_port; // port number of the socket server of the federate + // if it has any incoming direct connections from other federates. + // The port number will be -1 if there is no server or if the + // RTI has not been informed of the port number. + struct in_addr server_ip_addr; // Information about the IP address of the socket + // server of the federate. + + struct sockaddr_in UDP_addr; // The UDP address for the federate. +} socket_priv_t; + +socket_priv_t* socket_priv_init(); +#endif /* SOCKET_COMMON_H */ \ No newline at end of file From ce7c565c3117d47cd2d4e9e81057596ca57a2d90 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 26 Mar 2024 17:33:09 -0700 Subject: [PATCH 101/262] Apply create_server() to rti and fed. --- core/federated/RTI/rti_remote.c | 8 ++++---- core/federated/federate.c | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 8b7fafdd3..2aeac45e4 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1437,16 +1437,16 @@ void initialize_federate(federate_info_t* fed, uint16_t id) { fed->clock_netdrv = netdrv_init(); } -int32_t start_rti_server() { +int32_t start_rti_server(uint16_t port) { _lf_initialize_clock(); // Create the RTI's netdriver. - int success = create_rti_server(rti_remote->rti_netdrv, RTI); + int ret = create_server(rti_remote->rti_netdrv, RTI); lf_print("RTI: Listening for federates."); // Create the clocksync's netdriver. if (rti_remote->clock_sync_global_status >= clock_sync_on) { - create_rti_server(rti_remote->clock_netdrv, CLOCKSYNC); + rti_remote->clock_sync_socket = create_clock_sync_server(&rti_remote->clock_sync_port); } - return success; + return ret; } void wait_for_federates(netdrv_t* netdrv) { diff --git a/core/federated/federate.c b/core/federated/federate.c index fe371ba04..9bdc1ee12 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1926,8 +1926,9 @@ void lf_create_server(int specified_port) { LF_PRINT_LOG("Creating a socket server on port %d.", port); netdrv_t* my_netdrv = netdrv_init(); - my_netdrv->open(my_netdrv); - create_federate_server(my_netdrv, port, specified_port); + create_server(my_netdrv, specified_port); + // my_netdrv->open(my_netdrv); + // create_federate_server(my_netdrv, port, specified_port); //TODO: NEED to fix. LF_PRINT_LOG("Server for communicating with other federates started using port %d.", get_my_port(my_netdrv)); From f4c4d24e9715f4104e7ddd53e823bfe753ceecde Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 26 Mar 2024 17:33:24 -0700 Subject: [PATCH 102/262] Minor fix --- core/federated/RTI/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index 95b7d84f9..174203cc4 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -331,7 +331,7 @@ int main(int argc, const char* argv[]) { } // TODO: Need to add user_specified_port - if (start_rti_server()) { + if (start_rti_server(rti.user_specified_port)) { wait_for_federates(rti.rti_netdrv); normal_termination = true; if (rti.base.tracing_enabled) { From 60a06ecb53532662645ed4a9a51d111ce6104759 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 26 Mar 2024 17:36:18 -0700 Subject: [PATCH 103/262] Cleanup socket_support.c & .h --- core/federated/network/lf_socket_support.c | 338 +++--------------- .../federated/network/lf_socket_support.h | 180 +--------- 2 files changed, 55 insertions(+), 463 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 6a5ed7fd1..89ec2b08a 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -1,6 +1,3 @@ - -#include "lf_socket_support.h" - #include /* htons */ #include #include /* IFNAMSIZ */ @@ -19,7 +16,27 @@ #include "util.h" #include "net_common.h" -typedef enum { TCP, UDP } socket_type_t; +#include "lf_socket_support.h" + +netdrv_t* netdrv_init() { + netdrv_t* drv = malloc(sizeof(netdrv_t)); + if (!drv) { + lf_print_error_and_exit("Falied to malloc netdrv_t."); + } + memset(drv, 0, sizeof(netdrv_t)); + drv->open = socket_open; + drv->close = socket_close; + // drv->read = socket_read; + // drv->write = socket_write; + drv->read_remaining_bytes = 0; + + // Initialize priv. + socket_priv_t* priv = socket_priv_init(); + + // Set drv->priv pointer to point the malloc'd priv. + drv->priv = (void*)priv; + return drv; +} static socket_priv_t* get_priv(netdrv_t* drv) { if (!drv) { @@ -67,39 +84,39 @@ void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; } -// create_real_time_tcp_socket_errexit -static int socket_open(netdrv_t* drv) { - if (!drv) { - return -1; - } - socket_priv_t* priv = get_priv(drv); - priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - priv->proto = TCP; - if (priv->socket_descriptor < 0) { - lf_print_error_and_exit("Could not open TCP socket. Err=%d", priv->socket_descriptor); - } - // Disable Nagle's algorithm which bundles together small TCP messages to - // reduce network traffic - // TODO: Re-consider if we should do this, and whether disabling delayed ACKs - // is enough. - int flag = 1; - int result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } - -// Disable delayed ACKs. Only possible on Linux -#if defined(PLATFORM_Linux) - result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } -#endif - - return priv->socket_descriptor; -} +// // create_real_time_tcp_socket_errexit +// static int socket_open(netdrv_t* drv) { +// if (!drv) { +// return -1; +// } +// socket_priv_t* priv = get_priv(drv); +// priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); +// priv->proto = TCP; +// if (priv->socket_descriptor < 0) { +// lf_print_error_and_exit("Could not open TCP socket. Err=%d", priv->socket_descriptor); +// } +// // Disable Nagle's algorithm which bundles together small TCP messages to +// // reduce network traffic +// // TODO: Re-consider if we should do this, and whether disabling delayed ACKs +// // is enough. +// int flag = 1; +// int result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); + +// if (result < 0) { +// lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); +// } + +// // Disable delayed ACKs. Only possible on Linux +// #if defined(PLATFORM_Linux) +// result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); + +// if (result < 0) { +// lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); +// } +// #endif + +// return priv->socket_descriptor; +// } void netdrv_free(netdrv_t* drv) { socket_priv_t* priv = get_priv(drv); @@ -119,253 +136,6 @@ static void socket_close(netdrv_t* drv) { } } -netdrv_t* netdrv_init() { - // TODO: Should it be malloc? To support different network stacks operate simulatneously? - netdrv_t* drv = malloc(sizeof(*drv) + sizeof(socket_priv_t)); // Don't need to call malloc() twice. - if (!drv) { // check if malloc worked. - lf_print_error_and_exit("Falied to malloc netdrv_t."); - } - memset(drv, 0, sizeof(netdrv_t)); - - socket_priv_t* priv = get_priv(drv); - priv->port = 0; - priv->socket_descriptor = 0; - priv->user_specified_port = 0; - - // federate initialization - strncpy(priv->server_hostname, "localhost", INET_ADDRSTRLEN); - priv->server_port = -1; - priv->server_ip_addr.s_addr = 0; - - priv->proto = TCP; - - drv->read_remaining_bytes = 0; - - drv->open = socket_open; - drv->close = socket_close; - // drv->read = socket_read; - // drv->write = socket_write; - // drv->get_priv = get_priv; - return drv; -} - -/** - * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled - * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application - * on any error. - * - * @return The socket ID (a file descriptor). - */ -static int net_create_real_time_tcp_socket_errexit() { - int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (sock < 0) { - lf_print_error_and_exit("Could not open TCP socket. Err=%d", sock); - } - // Disable Nagle's algorithm which bundles together small TCP messages to - // reduce network traffic - // TODO: Re-consider if we should do this, and whether disabling delayed ACKs - // is enough. - int flag = 1; - int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } - -// Disable delayed ACKs. Only possible on Linux -#if defined(PLATFORM_Linux) - result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } -#endif - - return sock; -} - -// TODO: DONGHA: Need to fix port. -int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port) { - socket_priv_t* priv = get_priv(drv); - // Server file descriptor. - struct sockaddr_in server_fd; - // Zero out the server address structure. - bzero((char*)&server_fd, sizeof(server_fd)); - - server_fd.sin_family = AF_INET; // IPv4 - server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. - // Convert the port number from host byte order to network byte order. - server_fd.sin_port = htons(port); - - int result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); - int count = 0; - while (result < 0 && count++ < PORT_BIND_RETRY_LIMIT) { - lf_sleep(PORT_BIND_RETRY_INTERVAL); - result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); - } - if (result < 0) { - lf_print_error_and_exit("Failed to bind socket on port %d.", port); - } - - // Set the global server port. - if (specified_port == 0) { - // Need to retrieve the port number assigned by the OS. - struct sockaddr_in assigned; - socklen_t addr_len = sizeof(assigned); - if (getsockname(priv->socket_descriptor, (struct sockaddr*)&assigned, &addr_len) < 0) { - lf_print_error_and_exit("Failed to retrieve assigned port number."); - } - priv->port = ntohs(assigned.sin_port); - } else { - priv->port = port; - } - - // Enable listening for socket connections. - // The second argument is the maximum number of queued socket requests, - // which according to the Mac man page is limited to 128. - listen(priv->socket_descriptor, 128); -} - -/** - * Create a server and enable listening for socket connections. - * If the specified port if it is non-zero, it will attempt to acquire that port. - * If it fails, it will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times with - * a delay of PORT_BIND_RETRY_INTERVAL in between. If the specified port is - * zero, then it will attempt to acquire DEFAULT_PORT first. If this fails, then it - * will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times, incrementing the port - * number between attempts, with no delay between attempts. Once it has incremented - * the port number MAX_NUM_PORT_ADDRESSES times, it will cycle around and begin again - * with DEFAULT_PORT. - * - * @param port The port number to use or 0 to start trying at DEFAULT_PORT. - * @param socket_type The type of the socket for the server (TCP or UDP). - * @return The socket descriptor on which to accept connections. - */ -// TODO: Fix comments. -int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type) { - socket_priv_t* priv = get_priv(drv); - - // Timeout time for the communications of the server - struct timeval timeout_time = {.tv_sec = TCP_TIMEOUT_TIME / BILLION, .tv_usec = (TCP_TIMEOUT_TIME % BILLION) / 1000}; - // Create an IPv4 socket for TCP (not UDP) communication over IP (0). - priv->socket_descriptor = -1; - if (netdrv_type == RTI) { - priv->socket_descriptor = net_create_real_time_tcp_socket_errexit(); - priv->proto = TCP; - } else if (netdrv_type == CLOCKSYNC) { - priv->socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - // Set the appropriate timeout time - timeout_time = - (struct timeval){.tv_sec = UDP_TIMEOUT_TIME / BILLION, .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000}; - priv->proto = UDP; - } - if (priv->socket_descriptor < 0) { - lf_print_error_and_exit("Failed to create RTI socket."); - } - - // Set the option for this socket to reuse the same address - int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option - if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_REUSEADDR, &true_variable, sizeof(int32_t)) < 0) { - lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno)); - } - // Set the timeout on the socket so that read and write operations don't block for too long - if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < - 0) { - lf_print_error("RTI failed to set SO_RCVTIMEO option on the socket: %s.", strerror(errno)); - } - if (setsockopt(priv->socket_descriptor, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < - 0) { - lf_print_error("RTI failed to set SO_SNDTIMEO option on the socket: %s.", strerror(errno)); - } - - /* - * The following used to permit reuse of a port that an RTI has previously - * used that has not been released. We no longer do this, but instead - * increment the port number until an available port is found. - - // SO_REUSEPORT (since Linux 3.9) - // Permits multiple AF_INET or AF_INET6 sockets to be bound to an - // identical socket address. This option must be set on each - // socket (including the first socket) prior to calling bind(2) - // on the socket. To prevent port hijacking, all of the - // processes binding to the same address must have the same - // effective UID. This option can be employed with both TCP and - // UDP sockets. - - int reuse = 1; - if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEADDR, - (const char*)&reuse, sizeof(reuse)) < 0) { - perror("setsockopt(SO_REUSEADDR) failed"); - } - - #ifdef SO_REUSEPORT - if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEPORT, - (const char*)&reuse, sizeof(reuse)) < 0) { - perror("setsockopt(SO_REUSEPORT) failed"); - } - #endif - */ - - // Server file descriptor. - struct sockaddr_in server_fd; - // Zero out the server address structure. - bzero((char*)&server_fd, sizeof(server_fd)); - - uint16_t port = 0; // TODO: Need to bring specified port. Not working currently. - uint16_t specified_port = port; - if (specified_port == 0) - port = DEFAULT_PORT; - - server_fd.sin_family = AF_INET; // IPv4 - server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. - // Convert the port number from host byte order to network byte order. - server_fd.sin_port = htons(port); - - int result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); - - // Try repeatedly to bind to a port. If no specific port is specified, then - // increment the port number each time. - - int count = 1; - while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { - if (specified_port == 0) { - lf_print_warning("RTI failed to get port %d.", port); - port++; - if (port >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) - port = DEFAULT_PORT; - lf_print_warning("RTI will try again with port %d.", port); - server_fd.sin_port = htons(port); - // Do not sleep. - } else { - lf_print("RTI failed to get port %d. Will try again.", port); - lf_sleep(PORT_BIND_RETRY_INTERVAL); - } - result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); - } - if (result != 0) { - lf_print_error_and_exit("Failed to bind the RTI socket. Port %d is not available. ", port); - } - char* type = "TCP"; - if (netdrv_type == CLOCKSYNC) { - type = "UDP"; - } - // lf_print("RTI using %s port %d for federation %s.", type, port, rti_remote->federation_id); //TODO: How to bring - // federation_id? - - if (netdrv_type == RTI) { - priv->port = port; - - // Enable listening for socket connections. - // The second argument is the maximum number of queued socket requests, - // which according to the Mac man page is limited to 128. - listen(priv->socket_descriptor, 128); - } else if (netdrv_type == CLOCKSYNC) { - priv->port = port; - // No need to listen on the UDP socket - } - return priv->socket_descriptor; -} - // void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { // socket_priv_t *rti_priv = get_priv(rti_netdrv); // socket_priv_t *clock_priv = get_priv(clock_netdrv); diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index ebebe36c5..cdecd0f7e 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -1,71 +1,7 @@ #ifndef LF_SOCKET_SUPPORT_H #define LF_SOCKET_SUPPORT_H -#include // IPPROTO_TCP, IPPROTO_UDP -#include // TCP_NODELAY - -#include "net_util.h" - -/** - * The timeout time in ns for TCP operations. - * Default value is 10 secs. - */ -#define TCP_TIMEOUT_TIME SEC(10) - -/** - * The timeout time in ns for UDP operations. - * Default value is 1 sec. - */ -#define UDP_TIMEOUT_TIME SEC(1) - -/** - * Maximum number of port addresses that a federate will try to connect to the RTI on. - * If you are using automatic ports begining at DEFAULT_PORT, this puts an upper bound - * on the number of RTIs that can be running on the same host. - */ -#define MAX_NUM_PORT_ADDRESSES 16 - -/** - * Time to wait before re-attempting to bind to a port. - * When a process closes, the network stack typically waits between 30 and 120 - * seconds before releasing the port. This is to allow for delayed packets so - * that a new process does not receive packets from a previous process. - * Here, we limit the retries to 60 seconds. - */ -#define PORT_BIND_RETRY_INTERVAL SEC(1) - -/** - * Number of attempts to bind to a port before giving up. - */ -#define PORT_BIND_RETRY_LIMIT 60 - -/** - * Default port number for the RTI. - * Unless a specific port has been specified by the LF program in the "at" - * for the RTI or on the command line, when the RTI starts up, it will attempt - * to open a socket server on this port. - */ -#define DEFAULT_PORT 15045u - -#define DELAY_BETWEEN_SOCKET_RETRIES MSEC(100) - -typedef struct socket_priv_t { - int port; // my port number - int socket_descriptor; - int proto; - uint16_t user_specified_port; - - // The connected other side's info. - char server_hostname[INET_ADDRSTRLEN]; // Human-readable IP address and - int32_t server_port; // port number of the socket server of the federate - // if it has any incoming direct connections from other federates. - // The port number will be -1 if there is no server or if the - // RTI has not been informed of the port number. - struct in_addr server_ip_addr; // Information about the IP address of the socket - // server of the federate. - - struct sockaddr_in UDP_addr; // The UDP address for the federate. -} socket_priv_t; +#include "socket_common.h" char* get_host_name(netdrv_t* drv); int32_t get_my_port(netdrv_t* drv); @@ -77,31 +13,8 @@ void set_port(netdrv_t* drv, int port); void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr); void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num); -netdrv_t* netdrv_init(); - void netdrv_free(netdrv_t* drv); -int create_federate_server(netdrv_t* drv, uint16_t port, int specified_port); - -/** - * Create a server and enable listening for socket connections. - * If the specified port if it is non-zero, it will attempt to acquire that port. - * If it fails, it will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times with - * a delay of PORT_BIND_RETRY_INTERVAL in between. If the specified port is - * zero, then it will attempt to acquire DEFAULT_PORT first. If this fails, then it - * will repeatedly attempt up to PORT_BIND_RETRY_LIMIT times, incrementing the port - * number between attempts, with no delay between attempts. Once it has incremented - * the port number MAX_NUM_PORT_ADDRESSES times, it will cycle around and begin again - * with DEFAULT_PORT. - * - * @param port The port number to use or 0 to start trying at DEFAULT_PORT. - * @param socket_type The type of the socket for the server (TCP or UDP). - * @return The socket descriptor on which to accept connections. - */ -// TODO: Update descriptions. -int create_rti_server(netdrv_t* drv, netdrv_type_t netdrv_type); - -// int create_real_time_tcp_socket_errexit(); // void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv); netdrv_t* netdrv_accept(netdrv_t* my_netdrv); @@ -122,95 +35,4 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result); int write_to_netdrv_UDP(netdrv_t* drv, netdrv_t* target, size_t num_bytes, unsigned char* buffer, int flags); -/** - * Write the specified number of bytes to the specified socket from the - * specified buffer. If an error occurs, return -1 and set errno to indicate - * the cause of the error. If the write succeeds, return 0. - * This function repeats the attempt until the specified number of bytes - * have been written or an error occurs. Specifically, errors EAGAIN, - * EWOULDBLOCK, and EINTR are not considered errors and instead trigger - * another attempt. A delay between attempts is given by - * DELAY_BETWEEN_SOCKET_RETRIES. - * @param socket The socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. - */ -int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); - -/** - * Write the specified number of bytes to the specified socket using write_to_socket - * and close the socket if an error occurs. If an error occurs, this will change the - * socket ID pointed to by the first argument to -1 and will return -1. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. - */ -int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); - -/** - * Write the specified number of bytes to the specified socket using - * write_to_socket_close_on_error and exit with an error code if an error occurs. - * If the mutex argument is non-NULL, release the mutex before exiting. If the - * format argument is non-null, then use it an any additional arguments to form - * the error message using printf conventions. Otherwise, print a generic error - * message. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @param mutex If non-NULL, the mutex to unlock before exiting. - * @param format A format string for error messages, followed by any number of - * fields that will be used to fill the format string as in printf, or NULL - * to print a generic error message. - */ -void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, - char* format, ...); - -/** - * Read the specified number of bytes from the specified socket into the specified buffer. - * If an error occurs during this reading, return -1 and set errno to indicate - * the cause of the error. If the read succeeds in reading the specified number of bytes, - * return 0. If an EOF occurs before reading the specified number of bytes, return 1. - * This function repeats the read attempt until the specified number of bytes - * have been read, an EOF is read, or an error occurs. Specifically, errors EAGAIN, - * EWOULDBLOCK, and EINTR are not considered errors and instead trigger - * another attempt. A delay between attempts is given by DELAY_BETWEEN_SOCKET_RETRIES. - * @param socket The socket ID. - * @param num_bytes The number of bytes to read. - * @param buffer The buffer into which to put the bytes. - * @return 0 for success, 1 for EOF, and -1 for an error. - */ -ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length); - -/** - * Read the specified number of bytes to the specified socket using read_from_socket - * and close the socket if an error occurs. If an error occurs, this will change the - * socket ID pointed to by the first argument to -1 and will return -1. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. - */ -ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); - -/** - * Read the specified number of bytes from the specified socket into the - * specified buffer. If a disconnect or an EOF occurs during this - * reading, then if format is non-null, report an error and exit. - * If the mutex argument is non-NULL, release the mutex before exiting. - * If format is null, then report the error, but do not exit. - * This function takes a formatted string and additional optional arguments - * similar to printf(format, ...) that is appended to the error messages. - * @param socket The socket ID. - * @param num_bytes The number of bytes to read. - * @param buffer The buffer into which to put the bytes. - * @param format A printf-style format string, followed by arguments to - * fill the string, or NULL to not exit with an error message. - * @return The number of bytes read, or 0 if an EOF is received, or - * a negative number for an error. - */ -void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, - char* format, ...); - #endif // LF_SOCKET_SUPPORT_H From 11096d7e5d5f3b1a338db04565574c845aada9f5 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 26 Mar 2024 17:42:49 -0700 Subject: [PATCH 104/262] Cleanup net_util .h .c --- core/federated/network/net_util.c | 28 ----------------------- include/core/federated/network/net_util.h | 10 -------- 2 files changed, 38 deletions(-) diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index 16623d1a5..7a2ebf98e 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -94,34 +94,6 @@ int netdrv_write(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { // return drv->get_priv(drv); // } -int create_real_time_tcp_socket_errexit() { - int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (sock < 0) { - lf_print_error_system_failure("Could not open TCP socket."); - } - // Disable Nagle's algorithm which bundles together small TCP messages to - // reduce network traffic. - // TODO: Re-consider if we should do this, and whether disabling delayed ACKs - // is enough. - int flag = 1; - int result = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_system_failure("Failed to disable Nagle algorithm on socket server."); - } - -#if defined(PLATFORM_Linux) - // Disable delayed ACKs. Only possible on Linux - result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_system_failure("Failed to disable Nagle algorithm on socket server."); - } -#endif // Linux - - return sock; -} - int read_from_socket(int socket, size_t num_bytes, unsigned char* buffer) { if (socket < 0) { // Socket is not open. diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 6a1d52be7..ba2c2a7a2 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -188,16 +188,6 @@ void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t */ extern lf_mutex_t netdrv_mutex; -/** - * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled - * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application - * on any error. - * - * @return The socket ID (a file descriptor). - */ -int create_real_time_tcp_socket_errexit(); - - #endif // FEDERATED /** From db69d8fb99be356b4b174f9a5a329453627120cc Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 27 Mar 2024 10:36:12 -0700 Subject: [PATCH 105/262] Update accept_connection to establilsh_communication_session --- core/federated/RTI/rti_remote.c | 2 +- core/federated/network/lf_socket_support.c | 28 +++++++++++-------- .../federated/network/lf_socket_support.h | 2 +- include/core/federated/network/net_util.h | 3 ++ 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 2aeac45e4..e1489b0ba 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1347,7 +1347,7 @@ static bool authenticate_federate(netdrv_t* fed_netdrv) { void lf_connect_to_federates(netdrv_t* rti_netdrv) { for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { - netdrv_t* fed_netdrv = accept_connection(rti_netdrv); + netdrv_t* fed_netdrv = establish_communication_session(rti_netdrv); // Wait for the first message from the federate when RTI -a option is on. #ifdef __RTI_AUTH__ diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 89ec2b08a..98ed25d04 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -15,7 +15,6 @@ #include "util.h" #include "net_common.h" - #include "lf_socket_support.h" netdrv_t* netdrv_init() { @@ -173,24 +172,29 @@ netdrv_t* netdrv_accept(netdrv_t* my_netdrv) { return client_netdrv; } -netdrv_t* accept_connection(netdrv_t* rti_netdrv) { - netdrv_t* fed_netdrv = netdrv_init(); - socket_priv_t* rti_priv = get_priv(rti_netdrv); - socket_priv_t* fed_priv = get_priv(fed_netdrv); +/** + * 1. initializes other side's netdrv. + * 2. Establishes communication session. + +**/ +netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { + netdrv_t* ret_netdrv = netdrv_init(); + socket_priv_t* my_priv = (socket_priv_t*)my_netdrv->priv; + socket_priv_t* ret_priv = (socket_priv_t*)ret_netdrv->priv; // Wait for an incoming connection request. struct sockaddr client_fd; uint32_t client_length = sizeof(client_fd); // The following blocks until a federate connects. while (1) { - fed_priv->socket_descriptor = accept(rti_priv->socket_descriptor, &client_fd, &client_length); - if (fed_priv->socket_descriptor >= 0) { + ret_priv->socket_descriptor = accept(my_priv->socket_descriptor, &client_fd, &client_length); + if (ret_priv->socket_descriptor >= 0) { // Got a socket break; - } else if (fed_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { - lf_print_error_and_exit("RTI failed to accept the socket. %s.", strerror(errno)); + } else if (ret_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { + lf_print_error_and_exit("Failed to accept the socket. %s.", strerror(errno)); } else { // Try again - lf_print_warning("RTI failed to accept the socket. %s. Trying again.", strerror(errno)); + lf_print_warning("Failed to accept the socket. %s. Trying again.", strerror(errno)); continue; } } @@ -200,8 +204,8 @@ netdrv_t* accept_connection(netdrv_t* rti_netdrv) { // First, convert the sockaddr structure into a sockaddr_in that contains an internet address. struct sockaddr_in* pV4_addr = (struct sockaddr_in*)&client_fd; // Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server - fed_priv->server_ip_addr = pV4_addr->sin_addr; - return fed_netdrv; + ret_priv->server_ip_addr = pV4_addr->sin_addr; + return ret_netdrv; } int netdrv_connect(netdrv_t* drv) { diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index cdecd0f7e..bef0693cd 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -19,7 +19,7 @@ void netdrv_free(netdrv_t* drv); netdrv_t* netdrv_accept(netdrv_t* my_netdrv); -netdrv_t* accept_connection(netdrv_t* rti_netdrv); +// netdrv_t* establish_communication_session(netdrv_t* netdrv); int netdrv_connect(netdrv_t* drv); diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index ba2c2a7a2..2138aa8e9 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -92,6 +92,9 @@ int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port); // Returns socket number of clock_sync_server. int create_clock_sync_server(uint16_t* clock_sync_port); + +netdrv_t* establish_communication_session(netdrv_t* netdrv); + /** * Write the specified number of bytes to the specified socket from the * specified buffer. If an error occurs, return -1 and set errno to indicate From 0cde9f04c075dd27f4d8451d799334977732affb Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 27 Mar 2024 10:36:23 -0700 Subject: [PATCH 106/262] Add skeleton for lf_mqtt_support.c --- core/federated/network/lf_mqtt_support.c | 65 ++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 6989bd91c..c0d543073 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -1 +1,66 @@ #include "lf_mqtt_support.h" + +/** + * @brief + * Initializes structure of netdrv, and priv inside. + * Allocate memory. + * Check lf_socket_support.c for example. + * + * @return netdrv_t* + */ +netdrv_t* netdrv_init() {} + + +/** + * @brief Create a server object + * Initializes MQTT client, and connects to broker. + * MQTTClient_connect() + * Check socket_common.c for example. It is a common function because also lf_sst_support.c will also use it. + * @param drv + * @param server_type + * @param port The port is NULL here. + * @return int + */ +int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { } + + + +/** + * @brief + * 1. RTI subscribes “{Federation_ID}_RTI†topic. + * 2. Each federate publishes fed_id to {Federation_ID}_RTI + * 3. fed_{n} subscribes to “{Federation_Id}_RTI_to_fed_{n}â€. + * 4. RTI subscribes to “{Federation_Id}_fed_{n}_to_RTIâ€. + * Check lf_socket_support.c for example. + + * @param netdrv + * @return netdrv_t* + */ +netdrv_t* establish_communication_session(netdrv_t* netdrv) {} + + +/** + * @brief Publish message. + * + * @param drv + * @param num_bytes + * @param buffer + * @return int + */ +int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); + + +int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); + +void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, + char* format, ...); + + +ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length); + + +ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); + + +void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, + char* format, ...); \ No newline at end of file From 55449d1033b4f1b8fe0fbb9e4039d0220a2c97ba Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 27 Mar 2024 11:11:27 -0700 Subject: [PATCH 107/262] Change all netdrv_accepts to establish_communication_session --- core/federated/RTI/rti_remote.c | 2 +- core/federated/federate.c | 2 +- core/federated/network/lf_socket_support.c | 37 +------------------ .../federated/network/lf_socket_support.h | 5 --- 4 files changed, 3 insertions(+), 43 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index e1489b0ba..451f40801 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1406,7 +1406,7 @@ void* respond_to_erroneous_connections(void* nothing) { initialize_lf_thread_id(); while (true) { // TODO: DONGHA: Need to fix. Do we need accept as api? - netdrv_t* fed_netdrv = netdrv_accept(rti_remote->rti_netdrv); + netdrv_t* fed_netdrv = establish_communication_session(rti_remote->rti_netdrv); if (fed_netdrv == NULL) continue; diff --git a/core/federated/federate.c b/core/federated/federate.c index 9bdc1ee12..6a012ec00 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1984,7 +1984,7 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { _fed.inbound_netdriv_listeners = (lf_thread_t*)calloc(_fed.number_of_inbound_p2p_connections, sizeof(lf_thread_t)); while (received_federates < _fed.number_of_inbound_p2p_connections && !_lf_termination_executed) { // Wait for an incoming connection request. - netdrv_t *client_fed_netdrv = netdrv_accept(_fed.my_netdrv); + netdrv_t *client_fed_netdrv = establish_communication_session(_fed.my_netdrv); if (client_fed_netdrv == NULL) { if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) { diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 98ed25d04..d1481d8c8 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -135,42 +135,7 @@ static void socket_close(netdrv_t* drv) { } } -// void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv) { -// socket_priv_t *rti_priv = get_priv(rti_netdrv); -// socket_priv_t *clock_priv = get_priv(clock_netdrv); -// // Shutdown and close the socket that is listening for incoming connections -// // so that the accept() call in respond_to_erroneous_connections returns. -// // That thread should then check rti->all_federates_exited and it should exit. -// if (shutdown(rti_priv->socket_descriptor, SHUT_RDWR)) { -// LF_PRINT_LOG("On shut down TCP socket, received reply: %s", strerror(errno)); -// } -// // NOTE: In all common TCP/IP stacks, there is a time period, -// // typically between 30 and 120 seconds, called the TIME_WAIT period, -// // before the port is released after this close. This is because -// // the OS is preventing another program from accidentally receiving -// // duplicated packets intended for this program. -// close(rti_priv->socket_descriptor); - -// if (clock_priv->socket_descriptor > 0) { -// if (shutdown(clock_priv->socket_descriptor, SHUT_RDWR)) { -// LF_PRINT_LOG("On shut down UDP socket, received reply: %s", strerror(errno)); -// } -// close(clock_priv->socket_descriptor); -// } -// } -netdrv_t* netdrv_accept(netdrv_t* my_netdrv) { - netdrv_t* client_netdrv = netdrv_init(); - socket_priv_t* my_priv = get_priv(my_netdrv); - socket_priv_t* client_priv = get_priv(client_netdrv); - struct sockaddr client_fd; - uint32_t client_length = sizeof(client_fd); - client_priv->socket_descriptor = accept(my_priv->socket_descriptor, &client_fd, &client_length); - if (client_priv->socket_descriptor < 0) { - return NULL; - } - return client_netdrv; -} /** * 1. initializes other side's netdrv. @@ -184,7 +149,7 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { // Wait for an incoming connection request. struct sockaddr client_fd; uint32_t client_length = sizeof(client_fd); - // The following blocks until a federate connects. + // The following blocks until a client connects. while (1) { ret_priv->socket_descriptor = accept(my_priv->socket_descriptor, &client_fd, &client_length); if (ret_priv->socket_descriptor >= 0) { diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index bef0693cd..c72e2b21b 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -15,11 +15,6 @@ void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) void netdrv_free(netdrv_t* drv); -// void close_netdrvs(netdrv_t *rti_netdrv, netdrv_t *clock_netdrv); - -netdrv_t* netdrv_accept(netdrv_t* my_netdrv); - -// netdrv_t* establish_communication_session(netdrv_t* netdrv); int netdrv_connect(netdrv_t* drv); From 7395a9934098b98af0d138d43c073c45b583cdc1 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 27 Mar 2024 11:11:54 -0700 Subject: [PATCH 108/262] Fix comments --- core/federated/network/lf_mqtt_support.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index c0d543073..d5ffb999d 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -15,6 +15,7 @@ netdrv_t* netdrv_init() {} * @brief Create a server object * Initializes MQTT client, and connects to broker. * MQTTClient_connect() + * RTI subscribes “{Federation_ID}_RTI†topic. * Check socket_common.c for example. It is a common function because also lf_sst_support.c will also use it. * @param drv * @param server_type @@ -23,14 +24,11 @@ netdrv_t* netdrv_init() {} */ int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { } - - /** * @brief - * 1. RTI subscribes “{Federation_ID}_RTI†topic. - * 2. Each federate publishes fed_id to {Federation_ID}_RTI - * 3. fed_{n} subscribes to “{Federation_Id}_RTI_to_fed_{n}â€. - * 4. RTI subscribes to “{Federation_Id}_fed_{n}_to_RTIâ€. + * 1. Each federate publishes fed_id to {Federation_ID}_RTI + * 2. fed_{n} subscribes to “{Federation_Id}_RTI_to_fed_{n}â€. + * 3. RTI subscribes to “{Federation_Id}_fed_{n}_to_RTIâ€. * Check lf_socket_support.c for example. * @param netdrv From f8f5c7b1043d2da3f9c56f6509c976172b86ba38 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 27 Mar 2024 12:18:36 -0700 Subject: [PATCH 109/262] Fix not to use clock_netdrv on rti. --- core/federated/RTI/rti_remote.c | 24 ++++++++++++------------ core/federated/RTI/rti_remote.h | 15 ++++++--------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 451f40801..9ea749ba1 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -674,7 +674,7 @@ void handle_timestamp(federate_info_t* my_fed, unsigned char* buffer) { LF_PRINT_LOG("RTI sent start time " PRINTF_TIME " to federate %d.", start_time, my_fed->enclave.id); LF_MUTEX_UNLOCK(&rti_mutex); } -void send_physical_clock(unsigned char message_type, federate_info_t* fed, socket_type_t socket_type) { +void send_physical_clock(unsigned char message_type, federate_info_t* fed, netdrv_type_t netdrv_type) { if (fed->enclave.state == NOT_CONNECTED) { lf_print_warning("Clock sync: RTI failed to send physical time to federate %d. Netdrv not connected.\n", fed->enclave.id); @@ -686,16 +686,16 @@ void send_physical_clock(unsigned char message_type, federate_info_t* fed, socke encode_int64(current_physical_time, &(buffer[1])); // Send the message - if (socket_type == UDP) { + if (netdrv_type == UDP) { LF_PRINT_DEBUG("Clock sync: RTI sending UDP message type %u.", buffer[0]); - ssize_t bytes_written = - write_to_netdrv_UDP(rti_remote->clock_netdrv, fed->clock_netdrv, 1 + sizeof(int64_t), buffer, 0); + ssize_t bytes_written = sendto(rti_remote->socket_descriptor_UDP, buffer, 1 + sizeof(int64_t), 0, + (struct sockaddr*)&fed->UDP_addr, sizeof(fed->UDP_addr)); if (bytes_written < (ssize_t)sizeof(int64_t) + 1) { lf_print_warning("Clock sync: RTI failed to send physical time to federate %d: %s\n", fed->enclave.id, strerror(errno)); return; } - } else if (socket_type == TCP) { + } else if (netdrv_type == NETDRV) { LF_PRINT_DEBUG("Clock sync: RTI sending TCP message type %u.", buffer[0]); LF_MUTEX_LOCK(&rti_mutex); write_to_netdrv_fail_on_error(fed->fed_netdrv, 1 + sizeof(int64_t), buffer, &rti_mutex, @@ -706,16 +706,16 @@ void send_physical_clock(unsigned char message_type, federate_info_t* fed, socke current_physical_time, fed->enclave.id); } -void handle_physical_clock_sync_message(federate_info_t* my_fed, socket_type_t socket_type) { +void handle_physical_clock_sync_message(federate_info_t* my_fed, netdrv_type_t netdrv_type) { // Lock the mutex to prevent interference between sending the two // coded probe messages. LF_MUTEX_LOCK(&rti_mutex); // Reply with a T4 type message - send_physical_clock(MSG_TYPE_CLOCK_SYNC_T4, my_fed, socket_type); + send_physical_clock(MSG_TYPE_CLOCK_SYNC_T4, my_fed, netdrv_type); // Send the corresponding coded probe immediately after, // but only if this is a UDP channel. if (socket_type == UDP) { - send_physical_clock(MSG_TYPE_CLOCK_SYNC_CODED_PROBE, my_fed, socket_type); + send_physical_clock(MSG_TYPE_CLOCK_SYNC_CODED_PROBE, my_fed, netdrv_type); } LF_MUTEX_UNLOCK(&rti_mutex); } @@ -1232,7 +1232,7 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t* netdrv, uint16_t // Send the required number of messages for clock synchronization for (int i = 0; i < rti_remote->clock_sync_exchanges_per_interval; i++) { // Send the RTI's current physical time T1 to the federate. - send_physical_clock(MSG_TYPE_CLOCK_SYNC_T1, fed, TCP); + send_physical_clock(MSG_TYPE_CLOCK_SYNC_T1, fed, NETDRV); // Listen for reply message, which should be T3. size_t message_size = 1 + sizeof(int32_t); @@ -1444,7 +1444,7 @@ int32_t start_rti_server(uint16_t port) { lf_print("RTI: Listening for federates."); // Create the clocksync's netdriver. if (rti_remote->clock_sync_global_status >= clock_sync_on) { - rti_remote->clock_sync_socket = create_clock_sync_server(&rti_remote->clock_sync_port); + rti_remote->socket_descriptor_UDP = create_clock_sync_server(&rti_remote->final_port_UDP); } return ret; } @@ -1503,8 +1503,8 @@ void initialize_RTI(rti_remote_t* rti) { rti_remote->user_specified_port = 0; // rti_remote->final_port_TCP = 0; // rti_remote->socket_descriptor_TCP = -1; - // rti_remote->final_port_UDP = UINT16_MAX; - // rti_remote->socket_descriptor_UDP = -1; + rti_remote->final_port_UDP = UINT16_MAX; + rti_remote->socket_descriptor_UDP = -1; rti_remote->clock_sync_global_status = clock_sync_init; rti_remote->clock_sync_period_ns = MSEC(10); rti_remote->clock_sync_exchanges_per_interval = 10; diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index e71bcdbf9..56c739825 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -73,7 +73,7 @@ typedef struct federate_info_t { // struct in_addr server_ip_addr; // Information about the IP address of the socket // // server of the federate. netdrv_t* fed_netdrv; // The netdriver that the RTI handling each federate. - netdrv_t* clock_netdrv; + // netdrv_t* clock_netdrv; } federate_info_t; /** @@ -119,9 +119,8 @@ typedef struct rti_remote_t { */ const char* federation_id; - // TODO: Does it have to be a pointer? netdrv_t* rti_netdrv; - netdrv_t* clock_netdrv; + // netdrv_t* clock_netdrv; /************* TCP server information *************/ /** The desired port specified by the user on the command line. */ @@ -181,8 +180,6 @@ extern int lf_critical_section_enter(environment_t* env); */ extern int lf_critical_section_exit(environment_t* env); -void create_net_server(netdrv_t* drv, netdrv_type_t netdrv_type); - /** * Indicator that one or more federates have reported an error on resigning. */ @@ -307,9 +304,9 @@ void handle_timestamp(federate_info_t* my_fed, unsigned char* buffer); * * @param message_type The type of the clock sync message (see net_common.h). * @param fed The federate to send the physical time to. - * @param socket_type The socket type (TCP or UDP). + * @param netdrv_type The netdrv_type (NETDRV or UDP). */ -void send_physical_clock(unsigned char message_type, federate_info_t* fed, socket_type_t socket_type); +void send_physical_clock(unsigned char message_type, federate_info_t* fed, netdrv_type_t netdrv_type); /** * Handle clock synchronization T3 messages from federates. @@ -322,9 +319,9 @@ void send_physical_clock(unsigned char message_type, federate_info_t* fed, socke * clock synchronization round. * * @param my_fed The sending federate. - * @param socket_type The RTI's socket type used for the communication (TCP or UDP) + * @param netdrv_type The RTI's netdrv_type used for the communication (NETDRV or UDP) */ -void handle_physical_clock_sync_message(federate_info_t* my_fed, socket_type_t socket_type); +void handle_physical_clock_sync_message(federate_info_t* my_fed, netdrv_type_t netdrv_type); /** * A (quasi-)periodic thread that performs clock synchronization with each From d8bc0de609f55e65fae8a0b7df8ad41f14298f05 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 27 Mar 2024 14:43:40 -0700 Subject: [PATCH 110/262] Fix clock_synchronization_thread --- core/federated/RTI/rti_remote.c | 11 +++++++++-- core/federated/network/socket_common.c | 4 ++-- include/core/federated/network/net_util.h | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 9ea749ba1..f709bc1f7 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -773,9 +773,16 @@ void* clock_synchronization_thread(void* noargs) { int remaining_attempts = 5; while (remaining_attempts > 0) { remaining_attempts--; - ssize_t bytes_read = read_from_netdrv(rti_remote->clock_netdrv, buffer, message_size); + + // Read from the UDP socket + do { + ssize_t bytes = recv(rti_remote->socket_descriptor_UDP, buffer, message_size, MSG_WAITALL); + if (bytes > 0) { + bytes_read += bytes; + } + } while ((errno == EAGAIN || errno == EWOULDBLOCK) && bytes_read < (ssize_t)message_size); // If any errors occur, either discard the message or the clock sync round. - if (bytes_read > 0) { + if (!read_failed) { if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T3) { int32_t fed_id_2 = extract_int32(&(buffer[1])); // Check that this message came from the correct federate. diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index 7b9632be4..c1752337c 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -194,8 +194,8 @@ int create_clock_sync_server(uint16_t* clock_sync_port) { while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { lf_print_warning("RTI failed to get port %d.", port); port++; - if (port >= DEFAULT_UDP_PORT + MAX_NUM_PORT_ADDRESSES) - port = DEFAULT_UDP_PORT; + if (port >= RTI_DEFAULT_UDP_PORT + MAX_NUM_PORT_ADDRESSES) + port = RTI_DEFAULT_UDP_PORT; lf_print_warning("RTI will try again with port %d.", port); server_fd.sin_port = htons(port); result = bind(socket, (struct sockaddr*)&server_fd, sizeof(server_fd)); diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 2138aa8e9..d4198dbd2 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -66,7 +66,7 @@ int host_is_big_endian(void); #ifdef FEDERATED -typedef enum netdrv_type_t { RTI, CLOCKSYNC } netdrv_type_t; +typedef enum netdrv_type_t { NETDRV, UDP } netdrv_type_t; typedef struct netdrv_t { int (*open)(struct netdrv_t* drv); From 77b6d66571f8e6f60d8283bed526cff054f2c328 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 27 Mar 2024 16:57:41 -0700 Subject: [PATCH 111/262] Minor cleanup --- core/federated/RTI/CMakeLists.txt | 13 ++ core/federated/RTI/main.c | 2 +- core/federated/RTI/rti_remote.c | 23 +- core/federated/RTI/rti_remote.h | 7 +- core/federated/federate.c | 8 +- core/federated/network/lf_socket_support.c | 213 ++++++++---------- core/federated/network/net_util.c | 7 - core/federated/network/socket_common.c | 4 - include/core/federated/federate.h | 2 +- .../federated/network/lf_socket_support.h | 3 - include/core/federated/network/net_common.h | 2 +- include/core/federated/network/net_util.h | 1 - .../core/federated/network/socket_common.h | 4 +- 13 files changed, 121 insertions(+), 168 deletions(-) diff --git a/core/federated/RTI/CMakeLists.txt b/core/federated/RTI/CMakeLists.txt index 584cd636e..8958e058d 100644 --- a/core/federated/RTI/CMakeLists.txt +++ b/core/federated/RTI/CMakeLists.txt @@ -61,6 +61,7 @@ add_executable( ${CoreLib}/clock.c ${CoreLib}/federated/network/net_util.c ${CoreLib}/federated/network/lf_socket_support.c + ${CoreLib}/federated/network/socket_common.c ${CoreLib}/utils/pqueue_base.c ${CoreLib}/utils/pqueue_tag.c ${CoreLib}/utils/pqueue.c @@ -129,6 +130,18 @@ IF(AUTH MATCHES ON) target_link_libraries(RTI OpenSSL::SSL) ENDIF(AUTH MATCHES ON) +# # Option for enabling federate authentication by RTI. +# option(SST "Federate authentication by SST-c-api is enabled." OFF) +# IF(SST MATCHES ON) +# add_compile_definitions(__RTI_SST__) +# # Find OpenSSL and link to it +# find_package(OpenSSL REQUIRED) +# target_link_libraries(RTI OpenSSL::SSL) +# add_subdirectory(../../../third_party/sst-c-api SSTLIB) +# target_link_libraries(RTI SSTLIB) +# target_sources(RTI PUBLICE ${CoreLib}/federated/network/lf_sst_support.c) +# ENDIF(SST MATCHES ON) + install( TARGETS RTI DESTINATION bin diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index 174203cc4..27548e35d 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -123,7 +123,7 @@ void usage(int argc, const char* argv[]) { lf_print(" The number of federates in the federation that this RTI will control.\n"); lf_print(" -p, --port "); lf_print(" The port number to use for the RTI. Must be larger than 0 and smaller than %d. Default is %d.\n", - UINT16_MAX, DEFAULT_PORT); + UINT16_MAX, RTI_DEFAULT_PORT); lf_print(" -c, --clock_sync [off|init|on] [period ] [exchanges-per-interval ]"); lf_print(" The status of clock synchronization for this federate."); lf_print(" - off: Clock synchronization is off."); diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index f709bc1f7..cb79ae2cf 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -688,7 +688,7 @@ void send_physical_clock(unsigned char message_type, federate_info_t* fed, netdr // Send the message if (netdrv_type == UDP) { LF_PRINT_DEBUG("Clock sync: RTI sending UDP message type %u.", buffer[0]); - ssize_t bytes_written = sendto(rti_remote->socket_descriptor_UDP, buffer, 1 + sizeof(int64_t), 0, + ssize_t bytes_written = sendto(rti_remote->clock_sync_socket, buffer, 1 + sizeof(int64_t), 0, (struct sockaddr*)&fed->UDP_addr, sizeof(fed->UDP_addr)); if (bytes_written < (ssize_t)sizeof(int64_t) + 1) { lf_print_warning("Clock sync: RTI failed to send physical time to federate %d: %s\n", fed->enclave.id, @@ -714,7 +714,7 @@ void handle_physical_clock_sync_message(federate_info_t* my_fed, netdrv_type_t n send_physical_clock(MSG_TYPE_CLOCK_SYNC_T4, my_fed, netdrv_type); // Send the corresponding coded probe immediately after, // but only if this is a UDP channel. - if (socket_type == UDP) { + if (netdrv_type == UDP) { send_physical_clock(MSG_TYPE_CLOCK_SYNC_CODED_PROBE, my_fed, netdrv_type); } LF_MUTEX_UNLOCK(&rti_mutex); @@ -775,8 +775,9 @@ void* clock_synchronization_thread(void* noargs) { remaining_attempts--; // Read from the UDP socket + ssize_t bytes_read = 0; do { - ssize_t bytes = recv(rti_remote->socket_descriptor_UDP, buffer, message_size, MSG_WAITALL); + ssize_t bytes = recv(rti_remote->clock_sync_socket, buffer, message_size, MSG_WAITALL); if (bytes > 0) { bytes_read += bytes; } @@ -1263,7 +1264,9 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t* netdrv, uint16_t if (rti_remote->clock_sync_global_status >= clock_sync_on) { // If no runtime clock sync, no need to set up the UDP port. // Initialize the UDP_addr field of the federate struct - set_clock_netdrv(fed->clock_netdrv, netdrv, federate_UDP_port_number); + fed->UDP_addr.sin_family = AF_INET; + fed->UDP_addr.sin_port = htons(federate_UDP_port_number); + fed->UDP_addr.sin_addr = fed->server_ip_addr; } else { // Disable clock sync after initial round. fed->clock_synchronization_enabled = false; @@ -1402,9 +1405,7 @@ void lf_connect_to_federates(netdrv_t* rti_netdrv) { } } if (rti_remote->final_port_UDP != UINT16_MAX && clock_sync_enabled) { - if (get_port(rti_remote->clock_netdrv) != UINT16_MAX && clock_sync_enabled) { - lf_thread_create(&rti_remote->clock_thread, clock_synchronization_thread, NULL); - } + lf_thread_create(&rti_remote->clock_thread, clock_synchronization_thread, NULL); } } } @@ -1441,7 +1442,6 @@ void initialize_federate(federate_info_t* fed, uint16_t id) { fed->requested_stop = false; fed->clock_synchronization_enabled = true; fed->in_transit_message_tags = pqueue_tag_init(10); - fed->clock_netdrv = netdrv_init(); } int32_t start_rti_server(uint16_t port) { @@ -1451,7 +1451,7 @@ int32_t start_rti_server(uint16_t port) { lf_print("RTI: Listening for federates."); // Create the clocksync's netdriver. if (rti_remote->clock_sync_global_status >= clock_sync_on) { - rti_remote->socket_descriptor_UDP = create_clock_sync_server(&rti_remote->final_port_UDP); + rti_remote->clock_sync_socket = create_clock_sync_server(&rti_remote->final_port_UDP); } return ret; } @@ -1483,8 +1483,6 @@ void wait_for_federates(netdrv_t* netdrv) { rti_remote->all_federates_exited = true; netdrv->close(netdrv); - rti_remote->clock_netdrv->close(rti_remote->clock_netdrv); - // close_netdrvs(netdrv, rti_remote->clock_netdrv); } void initialize_RTI(rti_remote_t* rti) { @@ -1500,7 +1498,6 @@ void initialize_RTI(rti_remote_t* rti) { // TODO: How to make this compile dependent? When should the options be determined? rti_remote->rti_netdrv = netdrv_init(); - rti_remote->clock_netdrv = netdrv_init(); // federation_rti related initializations rti_remote->max_start_time = 0LL; @@ -1511,7 +1508,7 @@ void initialize_RTI(rti_remote_t* rti) { // rti_remote->final_port_TCP = 0; // rti_remote->socket_descriptor_TCP = -1; rti_remote->final_port_UDP = UINT16_MAX; - rti_remote->socket_descriptor_UDP = -1; + rti_remote->clock_sync_socket = -1; rti_remote->clock_sync_global_status = clock_sync_init; rti_remote->clock_sync_period_ns = MSEC(10); rti_remote->clock_sync_exchanges_per_interval = 10; diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 56c739825..37ef9635a 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -42,8 +42,6 @@ ///////////////////////////////////////////// //// Data structures -typedef enum socket_type_t { TCP, UDP } socket_type_t; - /** * Information about a federate known to the RTI, including its runtime state, * mode of execution, and connectivity with other federates. @@ -58,8 +56,7 @@ typedef struct federate_info_t { // to a request for stop from the RTI. Used to prevent double-counting // a federate when handling lf_request_stop(). lf_thread_t thread_id; // The ID of the thread handling communication with this federate. - // int socket; // The TCP socket descriptor for communicating with this federate. - // struct sockaddr_in UDP_addr; // The UDP address for the federate. + struct sockaddr_in UDP_addr; // The UDP address for the federate. bool clock_synchronization_enabled; // Indicates the status of clock synchronization // for this federate. Enabled by default. pqueue_tag_t* in_transit_message_tags; // Record of in-transit messages to this federate that are not @@ -73,7 +70,6 @@ typedef struct federate_info_t { // struct in_addr server_ip_addr; // Information about the IP address of the socket // // server of the federate. netdrv_t* fed_netdrv; // The netdriver that the RTI handling each federate. - // netdrv_t* clock_netdrv; } federate_info_t; /** @@ -120,7 +116,6 @@ typedef struct rti_remote_t { const char* federation_id; netdrv_t* rti_netdrv; - // netdrv_t* clock_netdrv; /************* TCP server information *************/ /** The desired port specified by the user on the command line. */ diff --git a/core/federated/federate.c b/core/federated/federate.c index 6a012ec00..e849229e8 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1784,14 +1784,14 @@ void lf_connect_to_rti(const char* hostname, int port) { if (port < 0 || port > INT16_MAX) { lf_print_error("lf_connect_to_rti(): Specified port (%d) is out of range," " using the default port %d instead.", - port, DEFAULT_PORT); - uport = DEFAULT_PORT; + port, RTI_DEFAULT_PORT); + uport = RTI_DEFAULT_PORT; port = 0; // Mark so that increments occur between tries. } else { uport = (uint16_t)port; } if (uport == 0) { - uport = DEFAULT_PORT; + uport = RTI_DEFAULT_PORT; } // Initialize netdriver to rti. @@ -1815,7 +1815,7 @@ void lf_connect_to_rti(const char* hostname, int port) { set_host_name(_fed.netdrv_to_rti, hostname); if (port == 0) { uport++; - if (uport >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) uport = DEFAULT_PORT; + if (uport >= RTI_DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) uport = RTI_DEFAULT_PORT; } set_port(_fed.netdrv_to_rti, uport); lf_sleep(CONNECT_RETRY_INTERVAL); diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index d1481d8c8..86be66f7a 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -23,7 +23,7 @@ netdrv_t* netdrv_init() { lf_print_error_and_exit("Falied to malloc netdrv_t."); } memset(drv, 0, sizeof(netdrv_t)); - drv->open = socket_open; + // drv->open = socket_open; drv->close = socket_close; // drv->read = socket_read; // drv->write = socket_write; @@ -37,58 +37,41 @@ netdrv_t* netdrv_init() { return drv; } -static socket_priv_t* get_priv(netdrv_t* drv) { - if (!drv) { - // lf_print_error_and_exit("Falied get socket_priv_t."); - // FIXME(Byeonggil): I commented out this because it shouldn't report error to send -1 port address. - return NULL; - } - return (socket_priv_t*)(drv + 1); -} - char* get_host_name(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = (socket_priv_t*)drv->priv; return priv->server_hostname; } int32_t get_my_port(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = (socket_priv_t*)drv->priv; return priv->port; } int32_t get_port(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = (socket_priv_t*)drv->priv; return (priv == NULL) ? -1 : priv->server_port; } struct in_addr* get_ip_addr(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = (socket_priv_t*)drv->priv; return &priv->server_ip_addr; } void set_host_name(netdrv_t* drv, const char* hostname) { - socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = (socket_priv_t*)drv->priv; memcpy(priv->server_hostname, hostname, INET_ADDRSTRLEN); } void set_port(netdrv_t* drv, int port) { - socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = (socket_priv_t*)drv->priv; priv->server_port = port; } void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { - socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = (socket_priv_t*)drv->priv; priv->server_ip_addr = ip_addr; } -void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) { - socket_priv_t* priv_clock = get_priv(clock_drv); - socket_priv_t* priv_rti = get_priv(rti_drv); - priv_clock->UDP_addr.sin_family = AF_INET; - priv_clock->UDP_addr.sin_port = htons(port_num); - priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; -} - // // create_real_time_tcp_socket_errexit // static int socket_open(netdrv_t* drv) { // if (!drv) { // return -1; // } -// socket_priv_t* priv = get_priv(drv); +// socket_priv_t* priv = (socket_priv_t*)drv->priv; // priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); // priv->proto = TCP; // if (priv->socket_descriptor < 0) { @@ -118,7 +101,7 @@ void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) // } void netdrv_free(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = (socket_priv_t*)drv->priv; // free(priv); // Already freed on socket close() free(drv); } @@ -127,7 +110,7 @@ static void socket_close(netdrv_t* drv) { if (!drv) { return; } - socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = (socket_priv_t*)drv->priv; if (priv->socket_descriptor > 0) { shutdown(priv->socket_descriptor, SHUT_RDWR); close(priv->socket_descriptor); @@ -135,9 +118,7 @@ static void socket_close(netdrv_t* drv) { } } - - -/** +/** * 1. initializes other side's netdrv. * 2. Establishes communication session. @@ -174,7 +155,7 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { } int netdrv_connect(netdrv_t* drv) { - socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = (socket_priv_t*)drv->priv; struct addrinfo hints; struct addrinfo* result; @@ -204,7 +185,7 @@ int netdrv_connect(netdrv_t* drv) { } ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { - socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = (socket_priv_t*)drv->priv; ssize_t bytes_read = recv(priv->socket_descriptor, result, 1, MSG_DONTWAIT | MSG_PEEK); if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) return 0; @@ -212,16 +193,8 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { return bytes_read; } -// Temporary function. -int write_to_netdrv_UDP(netdrv_t* drv, netdrv_t* target, size_t num_bytes, unsigned char* buffer, int flags) { - socket_priv_t* priv_drv = get_priv(drv); - socket_priv_t* priv_target = get_priv(target); - return sendto(priv_drv->socket_descriptor, buffer, num_bytes, flags, (struct sockaddr*)&priv_target->UDP_addr, - sizeof(priv_target->UDP_addr)); -} - int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { - socket_priv_t* priv = get_priv(drv); + socket_priv_t* priv = (socket_priv_t*)drv->priv; if (priv->socket_descriptor < 0) { // Socket is not open. errno = EBADF; @@ -440,95 +413,87 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* } } -static ssize_t read_UDP(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { - socket_priv_t* priv = get_priv(netdrv); - return read(priv->socket_descriptor, buffer, buffer_length); -} - // TODO: DONGHA: ADD buffer_length checking. // Returns the total bytes read. ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { - socket_priv_t* priv = get_priv(netdrv); - if (priv->proto == TCP) { - size_t bytes_to_read; // The bytes to read in future. - ssize_t bytes_read = 0; // The bytes that was read by a single read() function. - size_t total_bytes_read = 0; // The total bytes that have been read, and will be the return of the read_from netdrv. - int retry_count; - int state; - // Check if socket_descriptor is open. - if (priv->socket_descriptor < 0) { - // Socket is not open. - errno = EBADF; - return -1; - } - // First, check if there are remaining bytes. - // If there are remaining bytes, it reads as long as it can (buffer_length). - // Then it becomes KEEP_READING state. - if (netdrv->read_remaining_bytes > 0) { - bytes_to_read = (netdrv->read_remaining_bytes > buffer_length) ? buffer_length : netdrv->read_remaining_bytes; - state = KEEP_READING; - } else { - // If there are no left bytes to read, it reads the header byte. - bytes_to_read = 1; // read header - state = HEADER_READ; - } + socket_priv_t* priv = (socket_priv_t*)netdrv->priv; + + size_t bytes_to_read; // The bytes to read in future. + ssize_t bytes_read = 0; // The bytes that was read by a single read() function. + size_t total_bytes_read = 0; // The total bytes that have been read, and will be the return of the read_from netdrv. + int retry_count; + int state; + // Check if socket_descriptor is open. + if (priv->socket_descriptor < 0) { + // Socket is not open. + errno = EBADF; + return -1; + } + // First, check if there are remaining bytes. + // If there are remaining bytes, it reads as long as it can (buffer_length). + // Then it becomes KEEP_READING state. + if (netdrv->read_remaining_bytes > 0) { + bytes_to_read = (netdrv->read_remaining_bytes > buffer_length) ? buffer_length : netdrv->read_remaining_bytes; + state = KEEP_READING; + } else { + // If there are no left bytes to read, it reads the header byte. + bytes_to_read = 1; // read header + state = HEADER_READ; + } - for (;;) { - retry_count = 0; - while (bytes_to_read > 0) { - // TODO: Check buffer_length. - bytes_read = read(priv->socket_descriptor, buffer + total_bytes_read, bytes_to_read); - if (bytes_read < 0 && // If) Error has occurred, - retry_count++ < NUM_SOCKET_RETRIES && // there are left retry counts, - (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { // and the error code was these three, - // Print warning, sleep for a short time, and retry. - lf_print_warning("Reading from socket failed. Will try again."); - lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); - continue; - } else if (bytes_read <= 0) { - // An error occurred without those three error codes. - // https://stackoverflow.com/questions/42188128/does-reading-from-a-socket-wait-or-get-eof - // bytes_read == 0 means disconnected. - return -1; - } - bytes_to_read -= bytes_read; - total_bytes_read += bytes_read; + for (;;) { + retry_count = 0; + while (bytes_to_read > 0) { + // TODO: Check buffer_length. + bytes_read = read(priv->socket_descriptor, buffer + total_bytes_read, bytes_to_read); + if (bytes_read < 0 && // If) Error has occurred, + retry_count++ < NUM_SOCKET_RETRIES && // there are left retry counts, + (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { // and the error code was these three, + // Print warning, sleep for a short time, and retry. + lf_print_warning("Reading from socket failed. Will try again."); + lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); + continue; + } else if (bytes_read <= 0) { + // An error occurred without those three error codes. + // https://stackoverflow.com/questions/42188128/does-reading-from-a-socket-wait-or-get-eof + // bytes_read == 0 means disconnected. + return -1; } + bytes_to_read -= bytes_read; + total_bytes_read += bytes_read; + } + + switch (state) { + case HEADER_READ: + handle_header_read(netdrv, buffer, &bytes_to_read, &state); + break; - switch (state) { - case HEADER_READ: - handle_header_read(netdrv, buffer, &bytes_to_read, &state); - break; - - case READ_MSG_TYPE_FED_IDS:; - size_t federation_id_length = (size_t)buffer[1 + sizeof(uint16_t)]; - bytes_to_read = federation_id_length; - state = FINISH_READ; - break; - case READ_MSG_TYPE_NEIGHBOR_STRUCTURE:; - int num_upstream = extract_int32(buffer + 1); - int num_downstream = extract_int32(buffer + 1 + sizeof(int32_t)); - bytes_to_read = ((sizeof(uint16_t) + sizeof(int64_t)) * num_upstream) + (sizeof(uint16_t) * num_downstream); - state = FINISH_READ; - break; - case READ_MSG_TYPE_TAGGED_MESSAGE:; - size_t length = (size_t)extract_uint32(buffer + 1 + sizeof(uint16_t) + sizeof(uint16_t)); - if (length > buffer_length - total_bytes_read) { - bytes_to_read = buffer_length - total_bytes_read; - netdrv->read_remaining_bytes = length - bytes_to_read; - } else { - bytes_to_read = length; - } - state = FINISH_READ; - break; - case KEEP_READING: - netdrv->read_remaining_bytes -= total_bytes_read; - return total_bytes_read; - case FINISH_READ: - return total_bytes_read; + case READ_MSG_TYPE_FED_IDS:; + size_t federation_id_length = (size_t)buffer[1 + sizeof(uint16_t)]; + bytes_to_read = federation_id_length; + state = FINISH_READ; + break; + case READ_MSG_TYPE_NEIGHBOR_STRUCTURE:; + int num_upstream = extract_int32(buffer + 1); + int num_downstream = extract_int32(buffer + 1 + sizeof(int32_t)); + bytes_to_read = ((sizeof(uint16_t) + sizeof(int64_t)) * num_upstream) + (sizeof(uint16_t) * num_downstream); + state = FINISH_READ; + break; + case READ_MSG_TYPE_TAGGED_MESSAGE:; + size_t length = (size_t)extract_uint32(buffer + 1 + sizeof(uint16_t) + sizeof(uint16_t)); + if (length > buffer_length - total_bytes_read) { + bytes_to_read = buffer_length - total_bytes_read; + netdrv->read_remaining_bytes = length - bytes_to_read; + } else { + bytes_to_read = length; } + state = FINISH_READ; + break; + case KEEP_READING: + netdrv->read_remaining_bytes -= total_bytes_read; + return total_bytes_read; + case FINISH_READ: + return total_bytes_read; } - } else if (priv->proto == UDP) { - return read_UDP(netdrv, buffer, buffer_length); } } diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index 7a2ebf98e..b4092bdf5 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -87,13 +87,6 @@ int netdrv_write(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { return drv->write(drv, num_bytes, buffer); } -// void *netdrv_get_privdrv(netdrv_t *drv) { -// if (!drv) { -// return -1; -// } -// return drv->get_priv(drv); -// } - int read_from_socket(int socket, size_t num_bytes, unsigned char* buffer) { if (socket < 0) { // Socket is not open. diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index c1752337c..198c5375d 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -176,10 +176,6 @@ int create_clock_sync_server(uint16_t* clock_sync_port) { bzero((char*)&server_fd, sizeof(server_fd)); uint16_t port = RTI_DEFAULT_UDP_PORT; // Default UDP port. - // uint16_t specified_port = port; - // if (specified_port == 0) - // port = DEFAULT_PORT; - server_fd.sin_family = AF_INET; // IPv4 server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. // Convert the port number from host byte order to network byte order. diff --git a/include/core/federated/federate.h b/include/core/federated/federate.h index 4cceddc3e..ada27550b 100644 --- a/include/core/federated/federate.h +++ b/include/core/federated/federate.h @@ -252,7 +252,7 @@ void lf_connect_to_federate(uint16_t); * @brief Connect to the RTI at the specified host and port. * * This will return the socket descriptor for the connection. - * If port_number is 0, then start at DEFAULT_PORT and increment + * If port_number is 0, then start at RTI_DEFAULT_PORT and increment * the port number on each attempt. If an attempt fails, wait CONNECT_RETRY_INTERVAL * and try again. If it fails after CONNECT_MAX_RETRIES, the program exits. * If it succeeds, it sets the _fed.socket_TCP_RTI global variable to refer to diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h index c72e2b21b..2e6379845 100644 --- a/include/core/federated/network/lf_socket_support.h +++ b/include/core/federated/network/lf_socket_support.h @@ -11,7 +11,6 @@ struct in_addr* get_ip_addr(netdrv_t* drv); void set_host_name(netdrv_t* drv, const char* hostname); void set_port(netdrv_t* drv, int port); void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr); -void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num); void netdrv_free(netdrv_t* drv); @@ -28,6 +27,4 @@ int netdrv_connect(netdrv_t* drv); */ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result); -int write_to_netdrv_UDP(netdrv_t* drv, netdrv_t* target, size_t num_bytes, unsigned char* buffer, int flags); - #endif // LF_SOCKET_SUPPORT_H diff --git a/include/core/federated/network/net_common.h b/include/core/federated/network/net_common.h index 2a02cc66f..60cb581b6 100644 --- a/include/core/federated/network/net_common.h +++ b/include/core/federated/network/net_common.h @@ -39,7 +39,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * put into its code by the code generator (i.e., it attempts to * open a TCP connection). If an explicit port is given in the `at` clause * on the `federated reactor` statement, it will use that port. Otherwise, it will - * use DEFAULT_PORT. + * use RTI_DEFAULT_PORT. * * When it has successfully opened a TCP connection, the first message it sends * to the RTI is a MSG_TYPE_FED_IDS message, which contains the ID of this federate diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index d4198dbd2..b43a054ca 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -81,7 +81,6 @@ int netdrv_open(netdrv_t* drv); void netdrv_close(netdrv_t* drv); int netdrv_read(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); int netdrv_write(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); -// void * netdrv_get_privdrv(netdrv_t *drv); netdrv_t* netdrv_init(); diff --git a/include/core/federated/network/socket_common.h b/include/core/federated/network/socket_common.h index 0d1a3c8a4..7e68e017d 100644 --- a/include/core/federated/network/socket_common.h +++ b/include/core/federated/network/socket_common.h @@ -20,7 +20,7 @@ /** * Maximum number of port addresses that a federate will try to connect to the RTI on. - * If you are using automatic ports begining at DEFAULT_PORT, this puts an upper bound + * If you are using automatic ports begining at RTI_DEFAULT_PORT, this puts an upper bound * on the number of RTIs that can be running on the same host. */ #define MAX_NUM_PORT_ADDRESSES 16 @@ -51,8 +51,6 @@ #define DELAY_BETWEEN_SOCKET_RETRIES MSEC(100) -typedef enum { TCP, UDP } socket_type_t; - typedef struct socket_priv_t { int port; // my port number int socket_descriptor; From c61fafa8d9b634002bf67e1e170ebdc3541fde6f Mon Sep 17 00:00:00 2001 From: Chanhee Lee Date: Wed, 27 Mar 2024 17:57:52 -0700 Subject: [PATCH 112/262] Enable MQTT build --- core/federated/RTI/CMakeLists.txt | 1 + core/federated/RTI/rti_remote.c | 20 +-- core/federated/RTI/rti_remote.h | 4 +- core/federated/federate.c | 2 +- core/federated/network/CMakeLists.txt | 2 +- core/federated/network/lf_socket_support.c | 72 +++++----- core/federated/network/socket_common.c | 125 +++++++++--------- include/core/federated/network/net_util.h | 4 +- .../core/federated/network/socket_common.h | 5 +- 9 files changed, 122 insertions(+), 113 deletions(-) diff --git a/core/federated/RTI/CMakeLists.txt b/core/federated/RTI/CMakeLists.txt index 584cd636e..6057b00b2 100644 --- a/core/federated/RTI/CMakeLists.txt +++ b/core/federated/RTI/CMakeLists.txt @@ -61,6 +61,7 @@ add_executable( ${CoreLib}/clock.c ${CoreLib}/federated/network/net_util.c ${CoreLib}/federated/network/lf_socket_support.c + ${CoreLib}/federated/network/socket_common.c ${CoreLib}/utils/pqueue_base.c ${CoreLib}/utils/pqueue_tag.c ${CoreLib}/utils/pqueue.c diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 451f40801..0c5d1340e 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1394,11 +1394,12 @@ void lf_connect_to_federates(netdrv_t* rti_netdrv) { break; } } - if (rti_remote->final_port_UDP != UINT16_MAX && clock_sync_enabled) { - if (get_port(rti_remote->clock_netdrv) != UINT16_MAX && clock_sync_enabled) { - lf_thread_create(&rti_remote->clock_thread, clock_synchronization_thread, NULL); - } - } + // FIXME: Disabled for testing. + // if (rti_remote->final_port_UDP != UINT16_MAX && clock_sync_enabled) { + // if (get_port(rti_remote->clock_netdrv) != UINT16_MAX && clock_sync_enabled) { + // lf_thread_create(&rti_remote->clock_thread, clock_synchronization_thread, NULL); + // } + // } } } @@ -1440,12 +1441,13 @@ void initialize_federate(federate_info_t* fed, uint16_t id) { int32_t start_rti_server(uint16_t port) { _lf_initialize_clock(); // Create the RTI's netdriver. - int ret = create_server(rti_remote->rti_netdrv, RTI); + int ret = create_server(rti_remote->rti_netdrv, RTI, DEFAULT_PORT); lf_print("RTI: Listening for federates."); // Create the clocksync's netdriver. - if (rti_remote->clock_sync_global_status >= clock_sync_on) { - rti_remote->clock_sync_socket = create_clock_sync_server(&rti_remote->clock_sync_port); - } + // FIXME: Disabled for testing. + // if (rti_remote->clock_sync_global_status >= clock_sync_on) { + // rti_remote->clock_sync_socket = create_clock_sync_server(&rti_remote->clock_sync_port); + // } return ret; } diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index e71bcdbf9..06380e675 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -42,7 +42,7 @@ ///////////////////////////////////////////// //// Data structures -typedef enum socket_type_t { TCP, UDP } socket_type_t; +// typedef enum socket_type_t { TCP, UDP } socket_type_t; /** * Information about a federate known to the RTI, including its runtime state, @@ -181,7 +181,7 @@ extern int lf_critical_section_enter(environment_t* env); */ extern int lf_critical_section_exit(environment_t* env); -void create_net_server(netdrv_t* drv, netdrv_type_t netdrv_type); +// void create_net_server(netdrv_t* drv, netdrv_type_t netdrv_type); /** * Indicator that one or more federates have reported an error on resigning. diff --git a/core/federated/federate.c b/core/federated/federate.c index 6a012ec00..155becd55 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1926,7 +1926,7 @@ void lf_create_server(int specified_port) { LF_PRINT_LOG("Creating a socket server on port %d.", port); netdrv_t* my_netdrv = netdrv_init(); - create_server(my_netdrv, specified_port); + create_server(my_netdrv, RTI, specified_port); // my_netdrv->open(my_netdrv); // create_federate_server(my_netdrv, port, specified_port); diff --git a/core/federated/network/CMakeLists.txt b/core/federated/network/CMakeLists.txt index 48af24da5..a22ab6a31 100644 --- a/core/federated/network/CMakeLists.txt +++ b/core/federated/network/CMakeLists.txt @@ -1,4 +1,4 @@ -set(LF_NETWORK_FILES net_util.c lf_socket_support.c) +set(LF_NETWORK_FILES net_util.c lf_socket_support.c socket_common.c) list(TRANSFORM LF_NETWORK_FILES PREPEND federated/network/) list(APPEND REACTORC_SOURCES ${LF_NETWORK_FILES}) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index d1481d8c8..70e788a82 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -17,6 +17,9 @@ #include "net_common.h" #include "lf_socket_support.h" +static int socket_open(netdrv_t* drv); +static void socket_close(netdrv_t* drv); + netdrv_t* netdrv_init() { netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { @@ -83,39 +86,39 @@ void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; } -// // create_real_time_tcp_socket_errexit -// static int socket_open(netdrv_t* drv) { -// if (!drv) { -// return -1; -// } -// socket_priv_t* priv = get_priv(drv); -// priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); -// priv->proto = TCP; -// if (priv->socket_descriptor < 0) { -// lf_print_error_and_exit("Could not open TCP socket. Err=%d", priv->socket_descriptor); -// } -// // Disable Nagle's algorithm which bundles together small TCP messages to -// // reduce network traffic -// // TODO: Re-consider if we should do this, and whether disabling delayed ACKs -// // is enough. -// int flag = 1; -// int result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); - -// if (result < 0) { -// lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); -// } - -// // Disable delayed ACKs. Only possible on Linux -// #if defined(PLATFORM_Linux) -// result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); - -// if (result < 0) { -// lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); -// } -// #endif - -// return priv->socket_descriptor; -// } +// create_real_time_tcp_socket_errexit +static int socket_open(netdrv_t* drv) { + if (!drv) { + return -1; + } + socket_priv_t* priv = get_priv(drv); + priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + priv->proto = TCP; + if (priv->socket_descriptor < 0) { + lf_print_error_and_exit("Could not open TCP socket. Err=%d", priv->socket_descriptor); + } + // Disable Nagle's algorithm which bundles together small TCP messages to + // reduce network traffic + // TODO: Re-consider if we should do this, and whether disabling delayed ACKs + // is enough. + int flag = 1; + int result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } + +// Disable delayed ACKs. Only possible on Linux +#if defined(PLATFORM_Linux) + result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } +#endif + + return priv->socket_descriptor; +} void netdrv_free(netdrv_t* drv) { socket_priv_t* priv = get_priv(drv); @@ -156,7 +159,8 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { // Got a socket break; } else if (ret_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { - lf_print_error_and_exit("Failed to accept the socket. %s.", strerror(errno)); + lf_print_error_and_exit("Failed to accept the socket. %s. ret_priv->socket_descriptor = %d", + strerror(errno), ret_priv->socket_descriptor); } else { // Try again lf_print_warning("Failed to accept the socket. %s. Trying again.", strerror(errno)); diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index 7b9632be4..8b26d3919 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -71,7 +71,7 @@ static int create_real_time_tcp_socket_errexit() { #if defined(PLATFORM_Linux) // Disable delayed ACKs. Only possible on Linux - result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); + int result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); if (result < 0) { lf_print_error_system_failure("Failed to disable Nagle algorithm on socket server."); @@ -87,7 +87,7 @@ int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { // Federate always has a specified port. The RTI can get a specified port by user input. uint16_t specified_port = port; if (specified_port == 0 && server_type == RTI) { - port = RTI_DEFAULT_PORT; + port = DEFAULT_PORT; } // Create an IPv4 socket for TCP (not UDP) communication over IP (0). @@ -111,8 +111,8 @@ int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { if (specified_port == 0) { lf_print_warning("Failed to get port %d.", port); port++; - if (port >= RTI_DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) - port = RTI_DEFAULT_PORT; + if (port >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) + port = DEFAULT_PORT; lf_print_warning("Try again with port %d.", port); server_fd.sin_port = htons(port); // Do not sleep. @@ -149,64 +149,65 @@ int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { int create_clock_sync_server(uint16_t* clock_sync_port) { // Create UDP socket. int socket = -1; - socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - // Set the appropriate timeout time for the communications of the server - struct timeval timeout_time = - (struct timeval){.tv_sec = UDP_TIMEOUT_TIME / BILLION, .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000}; - if (socket < 0) { - lf_print_error_system_failure("Failed to create RTI socket."); - } - - // Set the option for this socket to reuse the same address - int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option - if (setsockopt(socket, SOL_SOCKET, SO_REUSEADDR, &true_variable, sizeof(int32_t)) < 0) { - lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno)); - } - // Set the timeout on the socket so that read and write operations don't block for too long - if (setsockopt(socket, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { - lf_print_error("RTI failed to set SO_RCVTIMEO option on the socket: %s.", strerror(errno)); - } - if (setsockopt(socket, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { - lf_print_error("RTI failed to set SO_SNDTIMEO option on the socket: %s.", strerror(errno)); - } - - // Server file descriptor. - struct sockaddr_in server_fd; - // Zero out the server address structure. - bzero((char*)&server_fd, sizeof(server_fd)); - - uint16_t port = RTI_DEFAULT_UDP_PORT; // Default UDP port. - // uint16_t specified_port = port; - // if (specified_port == 0) - // port = DEFAULT_PORT; - - server_fd.sin_family = AF_INET; // IPv4 - server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. - // Convert the port number from host byte order to network byte order. - server_fd.sin_port = htons(port); - - int result = bind(socket, (struct sockaddr*)&server_fd, sizeof(server_fd)); - - // Try repeatedly to bind to a port. If no specific port is specified, then - // increment the port number each time. - - int count = 1; - while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { - lf_print_warning("RTI failed to get port %d.", port); - port++; - if (port >= DEFAULT_UDP_PORT + MAX_NUM_PORT_ADDRESSES) - port = DEFAULT_UDP_PORT; - lf_print_warning("RTI will try again with port %d.", port); - server_fd.sin_port = htons(port); - result = bind(socket, (struct sockaddr*)&server_fd, sizeof(server_fd)); - } - if (result != 0) { - lf_print_error_and_exit("Failed to bind the RTI socket. Port %d is not available. ", port); - } - - // Update port number. - *clock_sync_port = port; - // No need to listen on the UDP socket + // FIXME: Disabled for testing. + // socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + // // Set the appropriate timeout time for the communications of the server + // struct timeval timeout_time = + // (struct timeval){.tv_sec = UDP_TIMEOUT_TIME / BILLION, .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000}; + // if (socket < 0) { + // lf_print_error_system_failure("Failed to create RTI socket."); + // } + + // // Set the option for this socket to reuse the same address + // int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option + // if (setsockopt(socket, SOL_SOCKET, SO_REUSEADDR, &true_variable, sizeof(int32_t)) < 0) { + // lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno)); + // } + // // Set the timeout on the socket so that read and write operations don't block for too long + // if (setsockopt(socket, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { + // lf_print_error("RTI failed to set SO_RCVTIMEO option on the socket: %s.", strerror(errno)); + // } + // if (setsockopt(socket, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { + // lf_print_error("RTI failed to set SO_SNDTIMEO option on the socket: %s.", strerror(errno)); + // } + + // // Server file descriptor. + // struct sockaddr_in server_fd; + // // Zero out the server address structure. + // bzero((char*)&server_fd, sizeof(server_fd)); + + // uint16_t port = RTI_DEFAULT_UDP_PORT; // Default UDP port. + // // uint16_t specified_port = port; + // // if (specified_port == 0) + // // port = DEFAULT_PORT; + + // server_fd.sin_family = AF_INET; // IPv4 + // server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. + // // Convert the port number from host byte order to network byte order. + // server_fd.sin_port = htons(port); + + // int result = bind(socket, (struct sockaddr*)&server_fd, sizeof(server_fd)); + + // // Try repeatedly to bind to a port. If no specific port is specified, then + // // increment the port number each time. + + // int count = 1; + // while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { + // lf_print_warning("RTI failed to get port %d.", port); + // port++; + // if (port >= DEFAULT_UDP_PORT + MAX_NUM_PORT_ADDRESSES) + // port = DEFAULT_UDP_PORT; + // lf_print_warning("RTI will try again with port %d.", port); + // server_fd.sin_port = htons(port); + // result = bind(socket, (struct sockaddr*)&server_fd, sizeof(server_fd)); + // } + // if (result != 0) { + // lf_print_error_and_exit("Failed to bind the RTI socket. Port %d is not available. ", port); + // } + + // // Update port number. + // *clock_sync_port = port; + // // No need to listen on the UDP socket return socket; } diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 2138aa8e9..53be56752 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -66,7 +66,7 @@ int host_is_big_endian(void); #ifdef FEDERATED -typedef enum netdrv_type_t { RTI, CLOCKSYNC } netdrv_type_t; +// typedef enum netdrv_type_t { RTI, CLOCKSYNC } netdrv_type_t; typedef struct netdrv_t { int (*open)(struct netdrv_t* drv); @@ -88,7 +88,7 @@ netdrv_t* netdrv_init(); typedef enum server_type_t { RTI, FED } server_type_t; // Port will be NULL on MQTT. -int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port); +// int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port); // Returns socket number of clock_sync_server. int create_clock_sync_server(uint16_t* clock_sync_port); diff --git a/include/core/federated/network/socket_common.h b/include/core/federated/network/socket_common.h index 0d1a3c8a4..eeb94d014 100644 --- a/include/core/federated/network/socket_common.h +++ b/include/core/federated/network/socket_common.h @@ -45,7 +45,7 @@ * for the RTI or on the command line, when the RTI starts up, it will attempt * to open a socket server on this port. */ -#define RTI_DEFAULT_PORT 15045u +#define DEFAULT_PORT 15045u #define RTI_DEFAULT_UDP_PORT 15061u @@ -56,7 +56,7 @@ typedef enum { TCP, UDP } socket_type_t; typedef struct socket_priv_t { int port; // my port number int socket_descriptor; -// int proto; + int proto; uint16_t user_specified_port; // The connected other side's info. @@ -72,4 +72,5 @@ typedef struct socket_priv_t { } socket_priv_t; socket_priv_t* socket_priv_init(); +int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port); #endif /* SOCKET_COMMON_H */ \ No newline at end of file From e36e41d46b71b09090541bd6442a399a35bd01fc Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 27 Mar 2024 18:45:55 -0700 Subject: [PATCH 113/262] All tests except FeedbackDelay5.lf works --- core/federated/RTI/rti_remote.c | 17 ++++++----- core/federated/federate.c | 2 +- core/federated/network/lf_socket_support.c | 35 +++++++++++----------- core/federated/network/socket_common.c | 22 +++++++------- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index cb79ae2cf..531c52d1d 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -773,7 +773,6 @@ void* clock_synchronization_thread(void* noargs) { int remaining_attempts = 5; while (remaining_attempts > 0) { remaining_attempts--; - // Read from the UDP socket ssize_t bytes_read = 0; do { @@ -783,7 +782,7 @@ void* clock_synchronization_thread(void* noargs) { } } while ((errno == EAGAIN || errno == EWOULDBLOCK) && bytes_read < (ssize_t)message_size); // If any errors occur, either discard the message or the clock sync round. - if (!read_failed) { + if (bytes_read == message_size) { if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T3) { int32_t fed_id_2 = extract_int32(&(buffer[1])); // Check that this message came from the correct federate. @@ -1252,7 +1251,7 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t* netdrv, uint16_t assert(fed_id > -1); assert(fed_id < 65536); LF_PRINT_DEBUG("RTI received T3 clock sync message from federate %d.", fed_id); - handle_physical_clock_sync_message(fed, TCP); + handle_physical_clock_sync_message(fed, NETDRV); } else { lf_print_error("Unexpected message %u from federate %d.", buffer[0], fed_id); send_reject(netdrv, UNEXPECTED_MESSAGE); @@ -1264,9 +1263,11 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t* netdrv, uint16_t if (rti_remote->clock_sync_global_status >= clock_sync_on) { // If no runtime clock sync, no need to set up the UDP port. // Initialize the UDP_addr field of the federate struct + // TODO: DONGHA - Need to know the ip_address of the federate. + // fed->UDP_addr.sin_family = AF_INET; fed->UDP_addr.sin_port = htons(federate_UDP_port_number); - fed->UDP_addr.sin_addr = fed->server_ip_addr; + fed->UDP_addr.sin_addr = *get_ip_addr(netdrv); } else { // Disable clock sync after initial round. fed->clock_synchronization_enabled = false; @@ -1404,7 +1405,7 @@ void lf_connect_to_federates(netdrv_t* rti_netdrv) { break; } } - if (rti_remote->final_port_UDP != UINT16_MAX && clock_sync_enabled) { + if (rti_remote->clock_sync_port != UINT16_MAX && clock_sync_enabled) { lf_thread_create(&rti_remote->clock_thread, clock_synchronization_thread, NULL); } } @@ -1447,11 +1448,11 @@ void initialize_federate(federate_info_t* fed, uint16_t id) { int32_t start_rti_server(uint16_t port) { _lf_initialize_clock(); // Create the RTI's netdriver. - int ret = create_server(rti_remote->rti_netdrv, RTI); + int ret = create_server(rti_remote->rti_netdrv, RTI, port); lf_print("RTI: Listening for federates."); // Create the clocksync's netdriver. if (rti_remote->clock_sync_global_status >= clock_sync_on) { - rti_remote->clock_sync_socket = create_clock_sync_server(&rti_remote->final_port_UDP); + rti_remote->clock_sync_socket = create_clock_sync_server(&rti_remote->clock_sync_port); } return ret; } @@ -1507,7 +1508,7 @@ void initialize_RTI(rti_remote_t* rti) { rti_remote->user_specified_port = 0; // rti_remote->final_port_TCP = 0; // rti_remote->socket_descriptor_TCP = -1; - rti_remote->final_port_UDP = UINT16_MAX; + rti_remote->clock_sync_port = UINT16_MAX; rti_remote->clock_sync_socket = -1; rti_remote->clock_sync_global_status = clock_sync_init; rti_remote->clock_sync_period_ns = MSEC(10); diff --git a/core/federated/federate.c b/core/federated/federate.c index e849229e8..9c5830d70 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1926,7 +1926,7 @@ void lf_create_server(int specified_port) { LF_PRINT_LOG("Creating a socket server on port %d.", port); netdrv_t* my_netdrv = netdrv_init(); - create_server(my_netdrv, specified_port); + create_server(my_netdrv, FED, specified_port); // my_netdrv->open(my_netdrv); // create_federate_server(my_netdrv, port, specified_port); diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 86be66f7a..97ab4bc89 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -17,6 +17,18 @@ #include "net_common.h" #include "lf_socket_support.h" +static void socket_close(netdrv_t* drv) { + if (!drv) { + return; + } + socket_priv_t* priv = (socket_priv_t*)drv->priv; + if (priv->socket_descriptor > 0) { + shutdown(priv->socket_descriptor, SHUT_RDWR); + close(priv->socket_descriptor); + priv->socket_descriptor = -1; + } +} + netdrv_t* netdrv_init() { netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { @@ -49,6 +61,7 @@ int32_t get_port(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; return (priv == NULL) ? -1 : priv->server_port; } +// struct in_addr* get_ip_addr(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; return &priv->server_ip_addr; @@ -106,18 +119,6 @@ void netdrv_free(netdrv_t* drv) { free(drv); } -static void socket_close(netdrv_t* drv) { - if (!drv) { - return; - } - socket_priv_t* priv = (socket_priv_t*)drv->priv; - if (priv->socket_descriptor > 0) { - shutdown(priv->socket_descriptor, SHUT_RDWR); - close(priv->socket_descriptor); - priv->socket_descriptor = -1; - } -} - /** * 1. initializes other side's netdrv. * 2. Establishes communication session. @@ -144,12 +145,12 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { continue; } } - // Assign the address information for federate. - // The IP address is stored here as an in_addr struct (in .server_ip_addr) that can be useful - // to create sockets and can be efficiently sent over the network. - // First, convert the sockaddr structure into a sockaddr_in that contains an internet address. + + // TODO: DONGHA + // Get the IP address of the other accepting client. This is used in two cases. + // 1) Decentralized coordination - handle_address_query() - Sends the port number and address of the federate. + // 2) Clock synchronization - send_physical_clock - Send through UDP. struct sockaddr_in* pV4_addr = (struct sockaddr_in*)&client_fd; - // Then extract the internet address (which is in IPv4 format) and assign it as the federate's socket server ret_priv->server_ip_addr = pV4_addr->sin_addr; return ret_netdrv; } diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index 198c5375d..860198c78 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -71,9 +71,7 @@ static int create_real_time_tcp_socket_errexit() { #if defined(PLATFORM_Linux) // Disable delayed ACKs. Only possible on Linux - result = setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); - - if (result < 0) { + if (setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int))< 0) { lf_print_error_system_failure("Failed to disable Nagle algorithm on socket server."); } #endif // Linux @@ -148,25 +146,25 @@ int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { // Returns clock sync UDP socket. int create_clock_sync_server(uint16_t* clock_sync_port) { // Create UDP socket. - int socket = -1; - socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + int socket_descriptor = -1; + socket_descriptor = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); // Set the appropriate timeout time for the communications of the server struct timeval timeout_time = (struct timeval){.tv_sec = UDP_TIMEOUT_TIME / BILLION, .tv_usec = (UDP_TIMEOUT_TIME % BILLION) / 1000}; - if (socket < 0) { + if (socket_descriptor < 0) { lf_print_error_system_failure("Failed to create RTI socket."); } // Set the option for this socket to reuse the same address int true_variable = 1; // setsockopt() requires a reference to the value assigned to an option - if (setsockopt(socket, SOL_SOCKET, SO_REUSEADDR, &true_variable, sizeof(int32_t)) < 0) { + if (setsockopt(socket_descriptor, SOL_SOCKET, SO_REUSEADDR, &true_variable, sizeof(int32_t)) < 0) { lf_print_error("RTI failed to set SO_REUSEADDR option on the socket: %s.", strerror(errno)); } // Set the timeout on the socket so that read and write operations don't block for too long - if (setsockopt(socket, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { + if (setsockopt(socket_descriptor, SOL_SOCKET, SO_RCVTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { lf_print_error("RTI failed to set SO_RCVTIMEO option on the socket: %s.", strerror(errno)); } - if (setsockopt(socket, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { + if (setsockopt(socket_descriptor, SOL_SOCKET, SO_SNDTIMEO, (const char*)&timeout_time, sizeof(timeout_time)) < 0) { lf_print_error("RTI failed to set SO_SNDTIMEO option on the socket: %s.", strerror(errno)); } @@ -181,7 +179,7 @@ int create_clock_sync_server(uint16_t* clock_sync_port) { // Convert the port number from host byte order to network byte order. server_fd.sin_port = htons(port); - int result = bind(socket, (struct sockaddr*)&server_fd, sizeof(server_fd)); + int result = bind(socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); // Try repeatedly to bind to a port. If no specific port is specified, then // increment the port number each time. @@ -194,7 +192,7 @@ int create_clock_sync_server(uint16_t* clock_sync_port) { port = RTI_DEFAULT_UDP_PORT; lf_print_warning("RTI will try again with port %d.", port); server_fd.sin_port = htons(port); - result = bind(socket, (struct sockaddr*)&server_fd, sizeof(server_fd)); + result = bind(socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); } if (result != 0) { lf_print_error_and_exit("Failed to bind the RTI socket. Port %d is not available. ", port); @@ -204,5 +202,5 @@ int create_clock_sync_server(uint16_t* clock_sync_port) { *clock_sync_port = port; // No need to listen on the UDP socket - return socket; + return socket_descriptor; } From 5640ec94a2b624996379f258a9be6682e11948e5 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 27 Mar 2024 19:14:09 -0700 Subject: [PATCH 114/262] Formatting federate.c --- core/federated/federate.c | 883 +++++++++++++++++++------------------- 1 file changed, 440 insertions(+), 443 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index 9c5830d70..a807a5b0e 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -94,7 +94,7 @@ federate_instance_t _fed = {// .socket_TCP_RTI = -1, .last_sent_NET = (tag_t){.time = NEVER, .microstep = 0u}, .min_delay_from_physical_action_to_federate_output = NEVER}; -//TODO: DONGHA: Need to change host and port. +// TODO: DONGHA: Need to change host and port. federation_metadata_t federation_metadata = { .federation_id = "Unidentified Federation", .rti_host = NULL, .rti_port = -1, .rti_user = NULL}; @@ -387,22 +387,22 @@ static trigger_handle_t schedule_message_received_from_network_locked(environmen * @param flag 0 if an EOF was received, -1 if a socket error occurred, 1 otherwise. */ static void close_inbound_netdrv(int fed_id, int flag) { - LF_MUTEX_LOCK(&netdrv_mutex); - if (_fed.netdrv_for_inbound_p2p_connections[fed_id] != NULL) { - // if (flag >= 0) { - // if (flag > 0) { - // shutdown(_fed.sockets_for_inbound_p2p_connections[fed_id], SHUT_RDWR); - // } else { - // // Have received EOF from the other end. Send EOF to the other end. - // shutdown(_fed.sockets_for_inbound_p2p_connections[fed_id], SHUT_WR); - // } - // } - // close(_fed.sockets_for_inbound_p2p_connections[fed_id]); - // _fed.sockets_for_inbound_p2p_connections[fed_id] = -1; - _fed.netdrv_for_inbound_p2p_connections[fed_id]->close(_fed.netdrv_for_inbound_p2p_connections[fed_id]); - _fed.netdrv_for_inbound_p2p_connections[fed_id] = NULL; - } - LF_MUTEX_UNLOCK(&netdrv_mutex); + LF_MUTEX_LOCK(&netdrv_mutex); + if (_fed.netdrv_for_inbound_p2p_connections[fed_id] != NULL) { + // if (flag >= 0) { + // if (flag > 0) { + // shutdown(_fed.sockets_for_inbound_p2p_connections[fed_id], SHUT_RDWR); + // } else { + // // Have received EOF from the other end. Send EOF to the other end. + // shutdown(_fed.sockets_for_inbound_p2p_connections[fed_id], SHUT_WR); + // } + // } + // close(_fed.sockets_for_inbound_p2p_connections[fed_id]); + // _fed.sockets_for_inbound_p2p_connections[fed_id] = -1; + _fed.netdrv_for_inbound_p2p_connections[fed_id]->close(_fed.netdrv_for_inbound_p2p_connections[fed_id]); + _fed.netdrv_for_inbound_p2p_connections[fed_id] = NULL; + } + LF_MUTEX_UNLOCK(&netdrv_mutex); } /** @@ -463,7 +463,7 @@ static int handle_message(netdrv_t* netdrv, int fed_id, unsigned char* buffer, s unsigned short federate_id; size_t length; extract_header(buffer, &port_id, &federate_id, &length); - size_t header_length = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); + size_t header_length = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); // Check if the message is intended for this federate assert(_lf_my_fed_id == federate_id); LF_PRINT_DEBUG("Receiving message to port %d of length %zu.", port_id, length); @@ -471,21 +471,22 @@ static int handle_message(netdrv_t* netdrv, int fed_id, unsigned char* buffer, s // Get the triggering action for the corresponding port lf_action_base_t* action = action_for_port(port_id); - // Read the payload. - // Allocate memory for the message contents. - unsigned char* message_contents = (unsigned char*)malloc(length); - memcpy(message_contents, buffer + header_length, bytes_read); - int buf_count = bytes_read; - while(netdrv->read_remaining_bytes > 0) { - ssize_t bytes_read_again = read_from_netdrv_close_on_error(netdrv, message_contents + buf_count, length - buf_count); - if (bytes_read_again <= 0) { - return -1; - } - buf_count += bytes_read_again; + // Read the payload. + // Allocate memory for the message contents. + unsigned char* message_contents = (unsigned char*)malloc(length); + memcpy(message_contents, buffer + header_length, bytes_read); + int buf_count = bytes_read; + while (netdrv->read_remaining_bytes > 0) { + ssize_t bytes_read_again = + read_from_netdrv_close_on_error(netdrv, message_contents + buf_count, length - buf_count); + if (bytes_read_again <= 0) { + return -1; } - // Trace the event when tracing is enabled - tracepoint_federate_from_federate(receive_P2P_MSG, _lf_my_fed_id, federate_id, NULL); - LF_PRINT_LOG("Message received by federate: %s. Length: %zu.", message_contents, length); + buf_count += bytes_read_again; + } + // Trace the event when tracing is enabled + tracepoint_federate_from_federate(receive_P2P_MSG, _lf_my_fed_id, federate_id, NULL); + LF_PRINT_LOG("Message received by federate: %s. Length: %zu.", message_contents, length); LF_PRINT_DEBUG("Calling schedule for message received on a physical connection."); lf_schedule_value(action, 0, message_contents, length); @@ -509,26 +510,26 @@ static int handle_message(netdrv_t* netdrv, int fed_id, unsigned char* buffer, s * @return 0 on successfully reading the message, -1 on failure (e.g. due to socket closed). */ static int handle_tagged_message(netdrv_t* netdrv, int fed_id, unsigned char* buffer, ssize_t bytes_read) { - // Environment is always the one corresponding to the top-level scheduling enclave. - environment_t *env; - _lf_get_environments(&env); - // Extract the header information. - unsigned short port_id; - unsigned short federate_id; - size_t length; - tag_t intended_tag; - extract_timed_header(buffer, &port_id, &federate_id, &length, &intended_tag); - size_t header_length = sizeof(uint16_t) + sizeof(uint16_t) - + sizeof(int32_t) + sizeof(instant_t) + sizeof(microstep_t); - // Trace the event when tracing is enabled - if (fed_id == -1) { - tracepoint_federate_from_rti(receive_TAGGED_MSG, _lf_my_fed_id, &intended_tag); - } else { - tracepoint_federate_from_federate(receive_P2P_TAGGED_MSG, _lf_my_fed_id, fed_id, &intended_tag); - } - // Check if the message is intended for this federate - assert(_lf_my_fed_id == federate_id); - LF_PRINT_DEBUG("Receiving message to port %d of length %zu.", port_id, length); + // Environment is always the one corresponding to the top-level scheduling enclave. + environment_t* env; + _lf_get_environments(&env); + // Extract the header information. + unsigned short port_id; + unsigned short federate_id; + size_t length; + tag_t intended_tag; + extract_timed_header(buffer, &port_id, &federate_id, &length, &intended_tag); + size_t header_length = + sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(instant_t) + sizeof(microstep_t); + // Trace the event when tracing is enabled + if (fed_id == -1) { + tracepoint_federate_from_rti(receive_TAGGED_MSG, _lf_my_fed_id, &intended_tag); + } else { + tracepoint_federate_from_federate(receive_P2P_TAGGED_MSG, _lf_my_fed_id, fed_id, &intended_tag); + } + // Check if the message is intended for this federate + assert(_lf_my_fed_id == federate_id); + LF_PRINT_DEBUG("Receiving message to port %d of length %zu.", port_id, length); // Get the triggering action for the corresponding port lf_action_base_t* action = action_for_port(port_id); @@ -556,20 +557,21 @@ static int handle_tagged_message(netdrv_t* netdrv, int fed_id, unsigned char* bu intended_tag.time - start_time, intended_tag.microstep, lf_time_logical_elapsed(env), env->current_tag.microstep); - // Read the payload. - // Allocate memory for the message contents. - unsigned char* message_contents = (unsigned char*)malloc(length); - memcpy(message_contents, buffer + header_length, bytes_read); - int buf_count = bytes_read; - while(netdrv->read_remaining_bytes > 0) { - ssize_t bytes_read_again = read_from_netdrv_close_on_error(netdrv, message_contents + buf_count, length - buf_count); - if (bytes_read_again <= 0) { -#ifdef FEDERATED_DECENTRALIZED - _lf_decrement_tag_barrier_locked(env); + // Read the payload. + // Allocate memory for the message contents. + unsigned char* message_contents = (unsigned char*)malloc(length); + memcpy(message_contents, buffer + header_length, bytes_read); + int buf_count = bytes_read; + while (netdrv->read_remaining_bytes > 0) { + ssize_t bytes_read_again = + read_from_netdrv_close_on_error(netdrv, message_contents + buf_count, length - buf_count); + if (bytes_read_again <= 0) { +#ifdef FEDERATED_DECENTRALIZED + _lf_decrement_tag_barrier_locked(env); #endif - return -1; - } - buf_count += bytes_read_again; + return -1; + } + buf_count += bytes_read_again; } // The following is only valid for string messages. @@ -672,11 +674,11 @@ static int handle_tagged_message(netdrv_t* netdrv, int fed_id, unsigned char* bu * @return 0 for success, -1 for failure to complete the read. */ static int handle_port_absent_message(unsigned char* buffer, int fed_id) { - // Extract the header information. - unsigned short port_id = extract_uint16(buffer); - // The next part of the message is the federate_id, but we don't need it. - // unsigned short federate_id = extract_uint16(&(buffer[sizeof(uint16_t)])); - tag_t intended_tag = extract_tag(&(buffer[sizeof(uint16_t)+sizeof(uint16_t)])); + // Extract the header information. + unsigned short port_id = extract_uint16(buffer); + // The next part of the message is the federate_id, but we don't need it. + // unsigned short federate_id = extract_uint16(&(buffer[sizeof(uint16_t)])); + tag_t intended_tag = extract_tag(&(buffer[sizeof(uint16_t) + sizeof(uint16_t)])); // Trace the event when tracing is enabled if (fed_id == -1) { @@ -718,73 +720,73 @@ static void* listen_to_federates(void* _args) { LF_PRINT_LOG("Listening to federate %d.", fed_id); // int* socket_id = &_fed.sockets_for_inbound_p2p_connections[fed_id]; - netdrv_t* netdrv = _fed.netdrv_for_inbound_p2p_connections[fed_id]; + netdrv_t* netdrv = _fed.netdrv_for_inbound_p2p_connections[fed_id]; // Buffer for incoming messages. // This does not constrain the message size // because the message will be put into malloc'd memory. unsigned char buffer[FED_COM_BUFFER_SIZE]; - // Listen for messages from the federate. - while (1) { - bool socket_closed = false; - // Read one byte to get the message type. - LF_PRINT_DEBUG("Waiting for a P2P message on netdrv"); - ssize_t bytes_read = read_from_netdrv_close_on_error(netdrv, buffer, FED_COM_BUFFER_SIZE); - if (bytes_read <= 0) { - // Socket has been closed. - lf_print("Socket from federate %d is closed.", fed_id); - // Stop listening to this federate. - socket_closed = true; - break; - } - LF_PRINT_DEBUG("Received a P2P message on netdrv of type %d.", buffer[0]); - bool bad_message = false; - switch (buffer[0]) { - case MSG_TYPE_P2P_MESSAGE: - LF_PRINT_LOG("Received untimed message from federate %d.", fed_id); - if (handle_message(netdrv, fed_id, buffer + 1, bytes_read - 1)) { - // Failed to complete the reading of a message on a physical connection. - lf_print_warning("Failed to complete reading of message on physical connection."); - socket_closed = true; - } - break; - case MSG_TYPE_P2P_TAGGED_MESSAGE: - LF_PRINT_LOG("Received tagged message from federate %d.", fed_id); - if (handle_tagged_message(netdrv, fed_id, buffer + 1, bytes_read - 1)) { - // P2P tagged messages are only used in decentralized coordination, and - // it is not a fatal error if the socket is closed before the whole message is read. - // But this thread should exit. - lf_print_warning("Failed to complete reading of tagged message."); - socket_closed = true; - } - break; - case MSG_TYPE_PORT_ABSENT: - LF_PRINT_LOG("Received port absent message from federate %d.", fed_id); - if (handle_port_absent_message(buffer + 1, fed_id)) { - // P2P tagged messages are only used in decentralized coordination, and - // it is not a fatal error if the socket is closed before the whole message is read. - // But this thread should exit. - lf_print_warning("Failed to complete reading of tagged message."); - socket_closed = true; - } - break; - default: - bad_message = true; - } - if (bad_message) { - lf_print_error("Received erroneous message type: %d. Closing the socket.", buffer[0]); - // Trace the event when tracing is enabled - tracepoint_federate_from_federate(receive_UNIDENTIFIED, _lf_my_fed_id, fed_id, NULL); - break; // while loop - } - if (socket_closed) { - // NOTE: For decentralized execution, once this socket is closed, we could - // update last known tags of all ports connected to the specified federate to FOREVER_TAG, - // which would eliminate the need to wait for STAA to assume an input is absent. - // However, at this time, we don't know which ports correspond to which upstream federates. - // The code generator would have to encode this information. Once that is done, - // we could call update_last_known_status_on_input_port with FOREVER_TAG. + // Listen for messages from the federate. + while (1) { + bool socket_closed = false; + // Read one byte to get the message type. + LF_PRINT_DEBUG("Waiting for a P2P message on netdrv"); + ssize_t bytes_read = read_from_netdrv_close_on_error(netdrv, buffer, FED_COM_BUFFER_SIZE); + if (bytes_read <= 0) { + // Socket has been closed. + lf_print("Socket from federate %d is closed.", fed_id); + // Stop listening to this federate. + socket_closed = true; + break; + } + LF_PRINT_DEBUG("Received a P2P message on netdrv of type %d.", buffer[0]); + bool bad_message = false; + switch (buffer[0]) { + case MSG_TYPE_P2P_MESSAGE: + LF_PRINT_LOG("Received untimed message from federate %d.", fed_id); + if (handle_message(netdrv, fed_id, buffer + 1, bytes_read - 1)) { + // Failed to complete the reading of a message on a physical connection. + lf_print_warning("Failed to complete reading of message on physical connection."); + socket_closed = true; + } + break; + case MSG_TYPE_P2P_TAGGED_MESSAGE: + LF_PRINT_LOG("Received tagged message from federate %d.", fed_id); + if (handle_tagged_message(netdrv, fed_id, buffer + 1, bytes_read - 1)) { + // P2P tagged messages are only used in decentralized coordination, and + // it is not a fatal error if the socket is closed before the whole message is read. + // But this thread should exit. + lf_print_warning("Failed to complete reading of tagged message."); + socket_closed = true; + } + break; + case MSG_TYPE_PORT_ABSENT: + LF_PRINT_LOG("Received port absent message from federate %d.", fed_id); + if (handle_port_absent_message(buffer + 1, fed_id)) { + // P2P tagged messages are only used in decentralized coordination, and + // it is not a fatal error if the socket is closed before the whole message is read. + // But this thread should exit. + lf_print_warning("Failed to complete reading of tagged message."); + socket_closed = true; + } + break; + default: + bad_message = true; + } + if (bad_message) { + lf_print_error("Received erroneous message type: %d. Closing the socket.", buffer[0]); + // Trace the event when tracing is enabled + tracepoint_federate_from_federate(receive_UNIDENTIFIED, _lf_my_fed_id, fed_id, NULL); + break; // while loop + } + if (socket_closed) { + // NOTE: For decentralized execution, once this socket is closed, we could + // update last known tags of all ports connected to the specified federate to FOREVER_TAG, + // which would eliminate the need to wait for STAA to assume an input is absent. + // However, at this time, we don't know which ports correspond to which upstream federates. + // The code generator would have to encode this information. Once that is done, + // we could call update_last_known_status_on_input_port with FOREVER_TAG. break; // while loop } @@ -800,34 +802,34 @@ static void* listen_to_federates(void* _args) { * federate, or -1 if the RTI (centralized coordination). * @param flag 0 if the socket has received EOF, 1 if not, -1 if abnormal termination. */ -//TODO: DONGHA: NEED TO FIX +// TODO: DONGHA: NEED TO FIX static void close_outbound_netdrv(int fed_id, int flag) { - assert (fed_id >= 0 && fed_id < NUMBER_OF_FEDERATES); - if (_lf_normal_termination) { - LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); - } - if (_fed.netdrv_for_outbound_p2p_connections[fed_id] != NULL) { - // // Close the socket by sending a FIN packet indicating that no further writes - // // are expected. Then read until we get an EOF indication. - // if (flag >= 0) { - // // SHUT_WR indicates no further outgoing messages. - // shutdown(_fed.sockets_for_outbound_p2p_connections[fed_id], SHUT_WR); - // if (flag > 0) { - // // Have not received EOF yet. read until we get an EOF or error indication. - // // This compensates for delayed ACKs and disabling of Nagles algorithm - // // by delaying exiting until the shutdown is complete. - // unsigned char message[32]; - // while (read(_fed.sockets_for_outbound_p2p_connections[fed_id], &message, 32) > 0); - // } - // } - // close(_fed.sockets_for_outbound_p2p_connections[fed_id]); - // _fed.sockets_for_outbound_p2p_connections[fed_id] = -1; - _fed.netdrv_for_outbound_p2p_connections[fed_id]->close(_fed.netdrv_for_outbound_p2p_connections[fed_id]); - _fed.netdrv_for_outbound_p2p_connections[fed_id] = NULL; - } - if (_lf_normal_termination) { - LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); - } + assert(fed_id >= 0 && fed_id < NUMBER_OF_FEDERATES); + if (_lf_normal_termination) { + LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); + } + if (_fed.netdrv_for_outbound_p2p_connections[fed_id] != NULL) { + // // Close the socket by sending a FIN packet indicating that no further writes + // // are expected. Then read until we get an EOF indication. + // if (flag >= 0) { + // // SHUT_WR indicates no further outgoing messages. + // shutdown(_fed.sockets_for_outbound_p2p_connections[fed_id], SHUT_WR); + // if (flag > 0) { + // // Have not received EOF yet. read until we get an EOF or error indication. + // // This compensates for delayed ACKs and disabling of Nagles algorithm + // // by delaying exiting until the shutdown is complete. + // unsigned char message[32]; + // while (read(_fed.sockets_for_outbound_p2p_connections[fed_id], &message, 32) > 0); + // } + // } + // close(_fed.sockets_for_outbound_p2p_connections[fed_id]); + // _fed.sockets_for_outbound_p2p_connections[fed_id] = -1; + _fed.netdrv_for_outbound_p2p_connections[fed_id]->close(_fed.netdrv_for_outbound_p2p_connections[fed_id]); + _fed.netdrv_for_outbound_p2p_connections[fed_id] = NULL; + } + if (_lf_normal_termination) { + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); + } } #ifdef FEDERATED_AUTHENTICATED @@ -967,7 +969,7 @@ static void handle_tag_advance_grant(unsigned char* buffer) { environment_t* env; _lf_get_environments(&env); - tag_t TAG = extract_tag(buffer); + tag_t TAG = extract_tag(buffer); // Trace the event when tracing is enabled tracepoint_federate_from_rti(receive_TAG, _lf_my_fed_id, &TAG); @@ -1170,10 +1172,10 @@ static void* update_ports_from_staa_offsets(void* args) { * last known tag for input ports. */ static void handle_provisional_tag_advance_grant(unsigned char* buffer) { - // Environment is always the one corresponding to the top-level scheduling enclave. - environment_t *env; - _lf_get_environments(&env); - tag_t PTAG = extract_tag(buffer); + // Environment is always the one corresponding to the top-level scheduling enclave. + environment_t* env; + _lf_get_environments(&env); + tag_t PTAG = extract_tag(buffer); // Trace the event when tracing is enabled tracepoint_federate_from_rti(receive_PTAG, _lf_my_fed_id, &PTAG); @@ -1265,7 +1267,7 @@ static void handle_provisional_tag_advance_grant(unsigned char* buffer) { * called in the environment for each enclave. */ static void handle_stop_granted_message(unsigned char* buffer) { - tag_t received_stop_tag = extract_tag(buffer); + tag_t received_stop_tag = extract_tag(buffer); // Trace the event when tracing is enabled tracepoint_federate_from_rti(receive_STOP_GRN, _lf_my_fed_id, &received_stop_tag); @@ -1304,7 +1306,7 @@ static void handle_stop_granted_message(unsigned char* buffer) { * Handle a MSG_TYPE_STOP_REQUEST message from the RTI. */ static void handle_stop_request_message(unsigned char* buffer) { - tag_t tag_to_stop = extract_tag(buffer); + tag_t tag_to_stop = extract_tag(buffer); // Trace the event when tracing is enabled tracepoint_federate_from_rti(receive_STOP_REQ, _lf_my_fed_id, &tag_to_stop); @@ -1430,75 +1432,74 @@ static void* listen_to_rti_TCP(void* args) { // because the message will be put into malloc'd memory. unsigned char buffer[FED_COM_BUFFER_SIZE]; - // Listen for messages from the federate. - while (1) { - // Read one byte to get the message type. - // This will exit if the read fails. - int bytes_read = read_from_netdrv(_fed.netdrv_to_rti, buffer, FED_COM_BUFFER_SIZE); - // if (read_failed < 0) { - // if (errno == ECONNRESET) { - // lf_print_error("Socket connection to the RTI was closed by the RTI without" - // " properly sending an EOF first. Considering this a soft error."); - // // FIXME: If this happens, possibly a new RTI must be elected. - // _fed.socket_TCP_RTI = -1; - // return NULL; - // } else { - // lf_print_error("Socket connection to the RTI has been broken with error %d: %s." - // " The RTI should close connections with an EOF first." - // " Considering this a soft error.", - // errno, - // strerror(errno)); - // // FIXME: If this happens, possibly a new RTI must be elected. - // _fed.socket_TCP_RTI = -1; - // return NULL; - // } - // } else if (read_failed > 0) { - // // EOF received. - // lf_print("Connection to the RTI closed with an EOF."); - // _fed.socket_TCP_RTI = -1; - if (bytes_read <= 0) { - return NULL; - } - switch (buffer[0]) { - case MSG_TYPE_TAGGED_MESSAGE: - if (handle_tagged_message(_fed.netdrv_to_rti, -1, buffer + 1, bytes_read - 1)) { - // Failures to complete the read of messages from the RTI are fatal. - lf_print_error_and_exit("Failed to complete the reading of a message from the RTI."); - } - break; - case MSG_TYPE_TAG_ADVANCE_GRANT: - handle_tag_advance_grant(buffer + 1); - break; - case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: - handle_provisional_tag_advance_grant(buffer + 1); - break; - case MSG_TYPE_STOP_REQUEST: - handle_stop_request_message(buffer + 1); - break; - case MSG_TYPE_STOP_GRANTED: - handle_stop_granted_message(buffer + 1); - break; - case MSG_TYPE_PORT_ABSENT: - if (handle_port_absent_message(buffer + 1, -1)) { - // Failures to complete the read of absent messages from the RTI are fatal. - lf_print_error_and_exit("Failed to complete the reading of an absent message from the RTI."); - } - break; - case MSG_TYPE_FAILED: - handle_rti_failed_message(); - break; - case MSG_TYPE_CLOCK_SYNC_T1: - case MSG_TYPE_CLOCK_SYNC_T4: - lf_print_error("Federate %d received unexpected clock sync message from RTI on TCP socket.", - _lf_my_fed_id); - break; - default: - lf_print_error_and_exit("Received from RTI an unrecognized TCP message type: %hhx.", buffer[0]); - // Trace the event when tracing is enabled - tracepoint_federate_from_rti(receive_UNIDENTIFIED, _lf_my_fed_id, NULL); - } + // Listen for messages from the federate. + while (1) { + // Read one byte to get the message type. + // This will exit if the read fails. + int bytes_read = read_from_netdrv(_fed.netdrv_to_rti, buffer, FED_COM_BUFFER_SIZE); + // if (read_failed < 0) { + // if (errno == ECONNRESET) { + // lf_print_error("Socket connection to the RTI was closed by the RTI without" + // " properly sending an EOF first. Considering this a soft error."); + // // FIXME: If this happens, possibly a new RTI must be elected. + // _fed.socket_TCP_RTI = -1; + // return NULL; + // } else { + // lf_print_error("Socket connection to the RTI has been broken with error %d: %s." + // " The RTI should close connections with an EOF first." + // " Considering this a soft error.", + // errno, + // strerror(errno)); + // // FIXME: If this happens, possibly a new RTI must be elected. + // _fed.socket_TCP_RTI = -1; + // return NULL; + // } + // } else if (read_failed > 0) { + // // EOF received. + // lf_print("Connection to the RTI closed with an EOF."); + // _fed.socket_TCP_RTI = -1; + if (bytes_read <= 0) { + return NULL; } - return NULL; + switch (buffer[0]) { + case MSG_TYPE_TAGGED_MESSAGE: + if (handle_tagged_message(_fed.netdrv_to_rti, -1, buffer + 1, bytes_read - 1)) { + // Failures to complete the read of messages from the RTI are fatal. + lf_print_error_and_exit("Failed to complete the reading of a message from the RTI."); + } + break; + case MSG_TYPE_TAG_ADVANCE_GRANT: + handle_tag_advance_grant(buffer + 1); + break; + case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: + handle_provisional_tag_advance_grant(buffer + 1); + break; + case MSG_TYPE_STOP_REQUEST: + handle_stop_request_message(buffer + 1); + break; + case MSG_TYPE_STOP_GRANTED: + handle_stop_granted_message(buffer + 1); + break; + case MSG_TYPE_PORT_ABSENT: + if (handle_port_absent_message(buffer + 1, -1)) { + // Failures to complete the read of absent messages from the RTI are fatal. + lf_print_error_and_exit("Failed to complete the reading of an absent message from the RTI."); + } + break; + case MSG_TYPE_FAILED: + handle_rti_failed_message(); + break; + case MSG_TYPE_CLOCK_SYNC_T1: + case MSG_TYPE_CLOCK_SYNC_T4: + lf_print_error("Federate %d received unexpected clock sync message from RTI on TCP socket.", _lf_my_fed_id); + break; + default: + lf_print_error_and_exit("Received from RTI an unrecognized TCP message type: %hhx.", buffer[0]); + // Trace the event when tracing is enabled + tracepoint_federate_from_rti(receive_UNIDENTIFIED, _lf_my_fed_id, NULL); + } + } + return NULL; } /** @@ -1625,21 +1626,21 @@ void lf_terminate_execution(environment_t* env) { ////////////////////////////////////////////////////////////////////////////////// // Public functions (declared in federate.h, in alphabetical order) -//TODO: DONGHA: Handling address queries must be changed. Just leaving port and ip_addr now. +// TODO: DONGHA: Handling address queries must be changed. Just leaving port and ip_addr now. void lf_connect_to_federate(uint16_t remote_federate_id) { int result = -1; int count_retries = 0; - // Ask the RTI for port number of the remote federate. - // The buffer is used for both sending and receiving replies. - // The size is what is needed for receiving replies. - unsigned char buffer[sizeof(int32_t) + sizeof(struct in_addr) + 1 ]; - int port = -1; - int count_tries = 0; - while (port == -1 && !_lf_termination_executed) { - buffer[0] = MSG_TYPE_ADDRESS_QUERY; - // NOTE: Sending messages in little endian. - encode_uint16(remote_federate_id, &(buffer[1])); + // Ask the RTI for port number of the remote federate. + // The buffer is used for both sending and receiving replies. + // The size is what is needed for receiving replies. + unsigned char buffer[sizeof(int32_t) + sizeof(struct in_addr) + 1]; + int port = -1; + int count_tries = 0; + while (port == -1 && !_lf_termination_executed) { + buffer[0] = MSG_TYPE_ADDRESS_QUERY; + // NOTE: Sending messages in little endian. + encode_uint16(remote_federate_id, &(buffer[1])); LF_PRINT_DEBUG("Sending address query for federate %d.", remote_federate_id); // Trace the event when tracing is enabled @@ -1651,7 +1652,7 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); // Read RTI's response. - //TODO: Fix two reads. + // TODO: Fix two reads. read_from_netdrv_fail_on_error(_fed.netdrv_to_rti, buffer, sizeof(int32_t) + sizeof(struct in_addr) + 1, NULL, "Failed to read the requested port number and IP address for federate %d from RTI.", remote_federate_id); @@ -1666,115 +1667,110 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { } port = extract_int32(&buffer[1]); - // A reply of -1 for the port means that the RTI does not know - // the port number of the remote federate, presumably because the - // remote federate has not yet sent an MSG_TYPE_ADDRESS_ADVERTISEMENT message to the RTI. - // Sleep for some time before retrying. - if (port == -1) { - if (count_tries++ >= CONNECT_MAX_RETRIES) { - lf_print_error_and_exit("TIMEOUT obtaining IP/port for federate %d from the RTI.", - remote_federate_id); - } - // Wait ADDRESS_QUERY_RETRY_INTERVAL nanoseconds. - lf_sleep(ADDRESS_QUERY_RETRY_INTERVAL); - } + // A reply of -1 for the port means that the RTI does not know + // the port number of the remote federate, presumably because the + // remote federate has not yet sent an MSG_TYPE_ADDRESS_ADVERTISEMENT message to the RTI. + // Sleep for some time before retrying. + if (port == -1) { + if (count_tries++ >= CONNECT_MAX_RETRIES) { + lf_print_error_and_exit("TIMEOUT obtaining IP/port for federate %d from the RTI.", remote_federate_id); + } + // Wait ADDRESS_QUERY_RETRY_INTERVAL nanoseconds. + lf_sleep(ADDRESS_QUERY_RETRY_INTERVAL); } - assert(port < 65536); - assert(port > 0); - uint16_t uport = (uint16_t)port; - - char hostname[INET_ADDRSTRLEN]; - inet_ntop(AF_INET, buffer + 1 + sizeof(int32_t), hostname, INET_ADDRSTRLEN); - LF_PRINT_LOG("Received address %s port %d for federate %d from RTI.", - hostname, uport, remote_federate_id); + } + assert(port < 65536); + assert(port > 0); + uint16_t uport = (uint16_t)port; - // Iterate until we either successfully connect or exceed the number of - // attempts given by CONNECT_MAX_RETRIES. - netdrv_t* netdrv = netdrv_init(); + char hostname[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, buffer + 1 + sizeof(int32_t), hostname, INET_ADDRSTRLEN); + LF_PRINT_LOG("Received address %s port %d for federate %d from RTI.", hostname, uport, remote_federate_id); + // Iterate until we either successfully connect or exceed the number of + // attempts given by CONNECT_MAX_RETRIES. + netdrv_t* netdrv = netdrv_init(); - while (result < 0 && !_lf_termination_executed) { - // Create an IPv4 socket for TCP (not UDP) communication over IP (0). - netdrv->open(netdrv); - set_host_name(netdrv, hostname); - set_port(netdrv, uport); - result = netdrv_connect(netdrv); + while (result < 0 && !_lf_termination_executed) { + // Create an IPv4 socket for TCP (not UDP) communication over IP (0). + netdrv->open(netdrv); + set_host_name(netdrv, hostname); + set_port(netdrv, uport); + result = netdrv_connect(netdrv); if (result != 0) { lf_print_error("Failed to connect to federate %d on port %d.", remote_federate_id, uport); - // Try again after some time if the connection failed. - // Note that this should not really happen since the remote federate should be - // accepting socket connections. But possibly it will be busy (in process of accepting - // another socket connection?). Hence, we retry. - count_retries++; - if (count_retries > CONNECT_MAX_RETRIES) { - // If the remote federate is not accepting the connection after CONNECT_MAX_RETRIES - // treat it as a soft error condition and return. - lf_print_error("Failed to connect to federate %d after %d retries. Giving up.", - remote_federate_id, CONNECT_MAX_RETRIES); - netdrv_free(netdrv); - return; - } - lf_print_warning("Could not connect to federate %d. Will try again every" PRINTF_TIME "nanoseconds.\n", - remote_federate_id, ADDRESS_QUERY_RETRY_INTERVAL); - - // Check whether the RTI is still there. - if (rti_failed()) { - netdrv_free(netdrv); - break; - } - netdrv->close(netdrv); - // Wait ADDRESS_QUERY_RETRY_INTERVAL nanoseconds. - lf_sleep(ADDRESS_QUERY_RETRY_INTERVAL); - } else { - // Connect was successful. - size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); - unsigned char *buffer = (unsigned char*) malloc(1 + sizeof(uint16_t) + 1 + federation_id_length); - buffer[0] = MSG_TYPE_P2P_SENDING_FED_ID; - if (_lf_my_fed_id > UINT16_MAX) { - // This error is very unlikely to occur. - lf_print_error_and_exit("Too many federates! More than %d.", UINT16_MAX); - } - encode_uint16((uint16_t)_lf_my_fed_id, (unsigned char*)&(buffer[1])); - buffer[1 + sizeof(uint16_t)] = (unsigned char)(federation_id_length & 0xff); - - memcpy(buffer + 2 + sizeof(uint16_t), (unsigned char*)federation_metadata.federation_id, federation_id_length); - // Trace the event when tracing is enabled - tracepoint_federate_to_federate(send_FED_ID, _lf_my_fed_id, remote_federate_id, NULL); - - // No need for a mutex because we have the only handle on the socket. - write_to_netdrv_fail_on_error(netdrv, 2 + sizeof(uint16_t) + federation_id_length, buffer, NULL, - "Failed to send fed_id and federation id to federate %d.", remote_federate_id); - - read_from_netdrv_fail_on_error(netdrv,(unsigned char*)buffer, 2, NULL, - "Failed to read MSG_TYPE_ACK from federate %d in response to sending fed_id.", - remote_federate_id); - if (buffer[0] != MSG_TYPE_ACK) { - // Get the error code. - lf_print_error("Received MSG_TYPE_REJECT message from remote federate (%d).", buffer[1]); - result = -1; - free(buffer); - continue; - } else { - lf_print("Connected to federate %d, port %d.", remote_federate_id, port); - // Trace the event when tracing is enabled - tracepoint_federate_to_federate(receive_ACK, _lf_my_fed_id, remote_federate_id, NULL); - free(buffer); + // Try again after some time if the connection failed. + // Note that this should not really happen since the remote federate should be + // accepting socket connections. But possibly it will be busy (in process of accepting + // another socket connection?). Hence, we retry. + count_retries++; + if (count_retries > CONNECT_MAX_RETRIES) { + // If the remote federate is not accepting the connection after CONNECT_MAX_RETRIES + // treat it as a soft error condition and return. + lf_print_error("Failed to connect to federate %d after %d retries. Giving up.", remote_federate_id, + CONNECT_MAX_RETRIES); + netdrv_free(netdrv); + return; + } + lf_print_warning("Could not connect to federate %d. Will try again every" PRINTF_TIME "nanoseconds.\n", + remote_federate_id, ADDRESS_QUERY_RETRY_INTERVAL); - } - } + // Check whether the RTI is still there. + if (rti_failed()) { + netdrv_free(netdrv); + break; + } + netdrv->close(netdrv); + // Wait ADDRESS_QUERY_RETRY_INTERVAL nanoseconds. + lf_sleep(ADDRESS_QUERY_RETRY_INTERVAL); + } else { + // Connect was successful. + size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); + unsigned char* buffer = (unsigned char*)malloc(1 + sizeof(uint16_t) + 1 + federation_id_length); + buffer[0] = MSG_TYPE_P2P_SENDING_FED_ID; + if (_lf_my_fed_id > UINT16_MAX) { + // This error is very unlikely to occur. + lf_print_error_and_exit("Too many federates! More than %d.", UINT16_MAX); + } + encode_uint16((uint16_t)_lf_my_fed_id, (unsigned char*)&(buffer[1])); + buffer[1 + sizeof(uint16_t)] = (unsigned char)(federation_id_length & 0xff); + + memcpy(buffer + 2 + sizeof(uint16_t), (unsigned char*)federation_metadata.federation_id, federation_id_length); + // Trace the event when tracing is enabled + tracepoint_federate_to_federate(send_FED_ID, _lf_my_fed_id, remote_federate_id, NULL); + + // No need for a mutex because we have the only handle on the socket. + write_to_netdrv_fail_on_error(netdrv, 2 + sizeof(uint16_t) + federation_id_length, buffer, NULL, + "Failed to send fed_id and federation id to federate %d.", remote_federate_id); + + read_from_netdrv_fail_on_error(netdrv, (unsigned char*)buffer, 2, NULL, + "Failed to read MSG_TYPE_ACK from federate %d in response to sending fed_id.", + remote_federate_id); + if (buffer[0] != MSG_TYPE_ACK) { + // Get the error code. + lf_print_error("Received MSG_TYPE_REJECT message from remote federate (%d).", buffer[1]); + result = -1; + free(buffer); + continue; + } else { + lf_print("Connected to federate %d, port %d.", remote_federate_id, port); + // Trace the event when tracing is enabled + tracepoint_federate_to_federate(receive_ACK, _lf_my_fed_id, remote_federate_id, NULL); + free(buffer); + } } - // Once we set this variable, then all future calls to close() on this - // socket ID should reset it to -1 within a critical section. - _fed.netdrv_for_outbound_p2p_connections[remote_federate_id] = netdrv; + } + // Once we set this variable, then all future calls to close() on this + // socket ID should reset it to -1 within a critical section. + _fed.netdrv_for_outbound_p2p_connections[remote_federate_id] = netdrv; } - void lf_connect_to_rti(const char* hostname, int port) { LF_PRINT_LOG("Connecting to the RTI."); - // TODO: DONGHA: Need to change these? + // TODO: DONGHA: Need to change these? // Override passed hostname and port if passed as runtime arguments. hostname = federation_metadata.rti_host ? federation_metadata.rti_host : hostname; port = federation_metadata.rti_port >= 0 ? federation_metadata.rti_port : port; @@ -1795,36 +1791,37 @@ void lf_connect_to_rti(const char* hostname, int port) { } // Initialize netdriver to rti. - _fed.netdrv_to_rti = netdrv_init(); // set memory. - _fed.netdrv_to_rti->open(_fed.netdrv_to_rti); // open netdriver. - set_host_name(_fed.netdrv_to_rti, hostname); - set_port(_fed.netdrv_to_rti, uport); - - // Connect - int result = -1; - int count_retries = 0; -//TODO: DONGHA: count_retries not being updated for the authentication process? - while (count_retries++ < CONNECT_MAX_RETRIES && !_lf_termination_executed) { - // TODO: DONGHA: Connecting phase. Let's just make a netdrv_connect() api first. - result = netdrv_connect(_fed.netdrv_to_rti); - if (result < 0) { - _fed.netdrv_to_rti->close(_fed.netdrv_to_rti); - netdrv_free(_fed.netdrv_to_rti); - _fed.netdrv_to_rti = netdrv_init(); - _fed.netdrv_to_rti->open(_fed.netdrv_to_rti); - set_host_name(_fed.netdrv_to_rti, hostname); - if (port == 0) { - uport++; - if (uport >= RTI_DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) uport = RTI_DEFAULT_PORT; - } - set_port(_fed.netdrv_to_rti, uport); - lf_sleep(CONNECT_RETRY_INTERVAL); - continue; // Connect failed. - } + _fed.netdrv_to_rti = netdrv_init(); // set memory. + _fed.netdrv_to_rti->open(_fed.netdrv_to_rti); // open netdriver. + set_host_name(_fed.netdrv_to_rti, hostname); + set_port(_fed.netdrv_to_rti, uport); + + // Connect + int result = -1; + int count_retries = 0; + // TODO: DONGHA: count_retries not being updated for the authentication process? + while (count_retries++ < CONNECT_MAX_RETRIES && !_lf_termination_executed) { + // TODO: DONGHA: Connecting phase. Let's just make a netdrv_connect() api first. + result = netdrv_connect(_fed.netdrv_to_rti); + if (result < 0) { + _fed.netdrv_to_rti->close(_fed.netdrv_to_rti); + netdrv_free(_fed.netdrv_to_rti); + _fed.netdrv_to_rti = netdrv_init(); + _fed.netdrv_to_rti->open(_fed.netdrv_to_rti); + set_host_name(_fed.netdrv_to_rti, hostname); + if (port == 0) { + uport++; + if (uport >= RTI_DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) + uport = RTI_DEFAULT_PORT; + } + set_port(_fed.netdrv_to_rti, uport); + lf_sleep(CONNECT_RETRY_INTERVAL); + continue; // Connect failed. + } - // Have connected to an RTI, but not sure it's the right RTI. - // Send a MSG_TYPE_FED_IDS message and wait for a reply. - // Notify the RTI of the ID of this federate and its federation. + // Have connected to an RTI, but not sure it's the right RTI. + // Send a MSG_TYPE_FED_IDS message and wait for a reply. + // Notify the RTI of the ID of this federate and its federation. #ifdef FEDERATED_AUTHENTICATED LF_PRINT_LOG("Connected to an RTI. Performing HMAC-based authentication using federation ID."); @@ -1840,27 +1837,27 @@ void lf_connect_to_rti(const char* hostname, int port) { #else LF_PRINT_LOG("Connected to an RTI. Sending federation ID for authentication."); #endif - // Send message_type + federate_ID + federation_id_length + federation_id - size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); - unsigned char *buffer = (unsigned char*) malloc(1 + sizeof(uint16_t) + 1 + federation_id_length); - buffer[0] = MSG_TYPE_FED_IDS; - // Next send the federate ID. - if (_lf_my_fed_id > UINT16_MAX) { - lf_print_error_and_exit("Too many federates! More than %d.", UINT16_MAX); - } - encode_uint16((uint16_t)_lf_my_fed_id, &buffer[1]); - // Next send the federation ID length. - // The federation ID is limited to 255 bytes. - buffer[1 + sizeof(uint16_t)] = (unsigned char)(federation_id_length & 0xff); - memcpy(buffer + 2 + sizeof(uint16_t), (unsigned char*)federation_metadata.federation_id, federation_id_length); - // Trace the event when tracing is enabled - tracepoint_federate_to_rti(send_FED_ID, _lf_my_fed_id, NULL); + // Send message_type + federate_ID + federation_id_length + federation_id + size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); + unsigned char* buffer = (unsigned char*)malloc(1 + sizeof(uint16_t) + 1 + federation_id_length); + buffer[0] = MSG_TYPE_FED_IDS; + // Next send the federate ID. + if (_lf_my_fed_id > UINT16_MAX) { + lf_print_error_and_exit("Too many federates! More than %d.", UINT16_MAX); + } + encode_uint16((uint16_t)_lf_my_fed_id, &buffer[1]); + // Next send the federation ID length. + // The federation ID is limited to 255 bytes. + buffer[1 + sizeof(uint16_t)] = (unsigned char)(federation_id_length & 0xff); + memcpy(buffer + 2 + sizeof(uint16_t), (unsigned char*)federation_metadata.federation_id, federation_id_length); + // Trace the event when tracing is enabled + tracepoint_federate_to_rti(send_FED_ID, _lf_my_fed_id, NULL); - // No need for a mutex here because no other threads are writing to this socket. - if (write_to_netdrv(_fed.netdrv_to_rti, 2 + sizeof(uint16_t) + federation_id_length, buffer) <= 0) { - continue; // Try again, possibly on a new port. - } - free(buffer); + // No need for a mutex here because no other threads are writing to this socket. + if (write_to_netdrv(_fed.netdrv_to_rti, 2 + sizeof(uint16_t) + federation_id_length, buffer) <= 0) { + continue; // Try again, possibly on a new port. + } + free(buffer); // Wait for a response. // The response will be MSG_TYPE_REJECT if the federation ID doesn't match. @@ -1870,34 +1867,34 @@ void lf_connect_to_rti(const char* hostname, int port) { LF_PRINT_DEBUG("Waiting for response to federation ID from the RTI."); - if (read_from_netdrv(_fed.netdrv_to_rti, response, 2) <= 0) { - continue; // Try again. - } - if (response[0] == MSG_TYPE_REJECT) { - // Trace the event when tracing is enabled - tracepoint_federate_from_rti(receive_REJECT, _lf_my_fed_id, NULL); - // Read one more byte to determine the cause of rejection. - unsigned char cause = response[1]; - if (cause == FEDERATION_ID_DOES_NOT_MATCH || cause == WRONG_SERVER) { - lf_print_warning("Connected to the wrong RTI on port %d. Will try again", uport); - continue; - } - } else if (response[0] == MSG_TYPE_ACK) { - // Trace the event when tracing is enabled - tracepoint_federate_from_rti(receive_ACK, _lf_my_fed_id, NULL); - LF_PRINT_LOG("Received acknowledgment from the RTI."); - break; - } else if (response[0] == MSG_TYPE_RESIGN) { - lf_print_warning("RTI on port %d resigned. Will try again", uport); - continue; - } else { - lf_print_warning("RTI on port %d gave unexpect response %u. Will try again", uport, response[0]); - continue; - } + if (read_from_netdrv(_fed.netdrv_to_rti, response, 2) <= 0) { + continue; // Try again. } - if (result < 0) { - lf_print_error_and_exit("Failed to connect to RTI after %d tries.", CONNECT_MAX_RETRIES); + if (response[0] == MSG_TYPE_REJECT) { + // Trace the event when tracing is enabled + tracepoint_federate_from_rti(receive_REJECT, _lf_my_fed_id, NULL); + // Read one more byte to determine the cause of rejection. + unsigned char cause = response[1]; + if (cause == FEDERATION_ID_DOES_NOT_MATCH || cause == WRONG_SERVER) { + lf_print_warning("Connected to the wrong RTI on port %d. Will try again", uport); + continue; + } + } else if (response[0] == MSG_TYPE_ACK) { + // Trace the event when tracing is enabled + tracepoint_federate_from_rti(receive_ACK, _lf_my_fed_id, NULL); + LF_PRINT_LOG("Received acknowledgment from the RTI."); + break; + } else if (response[0] == MSG_TYPE_RESIGN) { + lf_print_warning("RTI on port %d resigned. Will try again", uport); + continue; + } else { + lf_print_warning("RTI on port %d gave unexpect response %u. Will try again", uport, response[0]); + continue; } + } + if (result < 0) { + lf_print_error_and_exit("Failed to connect to RTI after %d tries.", CONNECT_MAX_RETRIES); + } // Call a generated (external) function that sends information // about connections between this federate and other federates @@ -1905,8 +1902,7 @@ void lf_connect_to_rti(const char* hostname, int port) { // @see MSG_TYPE_NEIGHBOR_STRUCTURE in net_common.h lf_send_neighbor_structure_to_RTI(_fed.netdrv_to_rti); - - //TODO: DONGHA: Handle UDP Clock sync. + // TODO: DONGHA: Handle UDP Clock sync. uint16_t udp_port = setup_clock_synchronization_with_rti(); // Write the returned port number to the RTI @@ -1919,19 +1915,19 @@ void lf_connect_to_rti(const char* hostname, int port) { lf_print("Connected to RTI at %s:%d.", hostname, uport); } -//TODO: DONGHA: NEED to make specified port work. +// TODO: DONGHA: NEED to make specified port work. void lf_create_server(int specified_port) { - assert(specified_port <= UINT16_MAX && specified_port >= 0); - uint16_t port = (uint16_t)specified_port; - LF_PRINT_LOG("Creating a socket server on port %d.", port); + assert(specified_port <= UINT16_MAX && specified_port >= 0); + uint16_t port = (uint16_t)specified_port; + LF_PRINT_LOG("Creating a socket server on port %d.", port); - netdrv_t* my_netdrv = netdrv_init(); - create_server(my_netdrv, FED, specified_port); - // my_netdrv->open(my_netdrv); - // create_federate_server(my_netdrv, port, specified_port); + netdrv_t* my_netdrv = netdrv_init(); + create_server(my_netdrv, FED, specified_port); + // my_netdrv->open(my_netdrv); + // create_federate_server(my_netdrv, port, specified_port); - //TODO: NEED to fix. - LF_PRINT_LOG("Server for communicating with other federates started using port %d.", get_my_port(my_netdrv)); + // TODO: NEED to fix. + LF_PRINT_LOG("Server for communicating with other federates started using port %d.", get_my_port(my_netdrv)); // Send the server port number to the RTI // on an MSG_TYPE_ADDRESS_ADVERTISEMENT message (@see net_common.h). @@ -1977,14 +1973,14 @@ void lf_enqueue_port_absent_reactions(environment_t* env) { } void* lf_handle_p2p_connections_from_federates(void* env_arg) { - assert(env_arg); - environment_t* env = (environment_t *) env_arg; - int received_federates = 0; - // Allocate memory to store thread IDs. - _fed.inbound_netdriv_listeners = (lf_thread_t*)calloc(_fed.number_of_inbound_p2p_connections, sizeof(lf_thread_t)); - while (received_federates < _fed.number_of_inbound_p2p_connections && !_lf_termination_executed) { - // Wait for an incoming connection request. - netdrv_t *client_fed_netdrv = establish_communication_session(_fed.my_netdrv); + assert(env_arg); + environment_t* env = (environment_t*)env_arg; + int received_federates = 0; + // Allocate memory to store thread IDs. + _fed.inbound_netdriv_listeners = (lf_thread_t*)calloc(_fed.number_of_inbound_p2p_connections, sizeof(lf_thread_t)); + while (received_federates < _fed.number_of_inbound_p2p_connections && !_lf_termination_executed) { + // Wait for an incoming connection request. + netdrv_t* client_fed_netdrv = establish_communication_session(_fed.my_netdrv); if (client_fed_netdrv == NULL) { if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) { @@ -2025,7 +2021,7 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { // char remote_federation_id[federation_id_length]; // bytes_read = read_from_netdrv(client_fed_netdrv, (unsigned char*)remote_federation_id, federation_id_length); if (bytes_read <= 0 || (strncmp(federation_metadata.federation_id, buffer + header_length, - strnlen(federation_metadata.federation_id, 255)) != 0)) { + strnlen(federation_metadata.federation_id, 255)) != 0)) { lf_print_warning("Received invalid federation ID. Closing socket."); if (bytes_read > 0) { unsigned char response[2]; @@ -2061,9 +2057,9 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { tracepoint_federate_to_federate(send_ACK, _lf_my_fed_id, remote_fed_id, NULL); LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); - write_to_netdrv_fail_on_error(_fed.netdrv_for_inbound_p2p_connections[remote_fed_id], 1, - (unsigned char*)&response, &lf_outbound_netdrv_mutex, - "Failed to write MSG_TYPE_ACK in response to federate %d.", remote_fed_id); + write_to_netdrv_fail_on_error(_fed.netdrv_for_inbound_p2p_connections[remote_fed_id], 1, (unsigned char*)&response, + &lf_outbound_netdrv_mutex, "Failed to write MSG_TYPE_ACK in response to federate %d.", + remote_fed_id); LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); // Start a thread to listen for incoming messages from other federates. @@ -2074,7 +2070,8 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { // Failed to create a listening thread. LF_MUTEX_LOCK(&netdrv_mutex); if (_fed.netdrv_for_inbound_p2p_connections[remote_fed_id] != NULL) { - _fed.netdrv_for_inbound_p2p_connections[remote_fed_id]->close(_fed.netdrv_for_inbound_p2p_connections[remote_fed_id]); + _fed.netdrv_for_inbound_p2p_connections[remote_fed_id]->close( + _fed.netdrv_for_inbound_p2p_connections[remote_fed_id]); _fed.netdrv_for_inbound_p2p_connections[remote_fed_id] = NULL; } LF_MUTEX_UNLOCK(&netdrv_mutex); @@ -2183,7 +2180,7 @@ int lf_send_message(int message_type, unsigned short port, unsigned short federa // Trace the event when tracing is enabled tracepoint_federate_to_federate(send_P2P_MSG, _lf_my_fed_id, federate, NULL); - //TODO: DONGHA: Need to fix in future. + // TODO: DONGHA: Need to fix in future. int bytes_written = write_to_netdrv_close_on_error(netdrv, header_length, header_buffer); if (bytes_written > 0) { // Header sent successfully. Send the body. @@ -2194,7 +2191,7 @@ int lf_send_message(int message_type, unsigned short port, unsigned short federa lf_print_warning("Failed to send message to %s. Dropping the message.", next_destination_str); } LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); - // TODO: DONGHA: Check result! + // TODO: DONGHA: Check result! return bytes_written; } @@ -2471,7 +2468,7 @@ int lf_send_tagged_message(environment_t* env, interval_t additional_delay, int LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); netdrv_t* netdrv; - // int* socket; + // int* socket; if (message_type == MSG_TYPE_P2P_TAGGED_MESSAGE) { netdrv = _fed.netdrv_for_outbound_p2p_connections[federate]; tracepoint_federate_to_federate(send_P2P_TAGGED_MSG, _lf_my_fed_id, federate, ¤t_message_intended_tag); @@ -2495,7 +2492,7 @@ int lf_send_tagged_message(environment_t* env, interval_t additional_delay, int } } LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); - //TODO: Check result + // TODO: Check result return bytes_written; } From 2e44179c449565932084815b44db1da110317178 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 27 Mar 2024 19:35:17 -0700 Subject: [PATCH 115/262] Fixed federate compile --- core/federated/network/CMakeLists.txt | 2 +- core/federated/network/lf_socket_support.c | 9 +++++---- core/federated/network/socket_common.c | 2 +- include/core/federated/network/socket_common.h | 4 ++++ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/core/federated/network/CMakeLists.txt b/core/federated/network/CMakeLists.txt index 48af24da5..a22ab6a31 100644 --- a/core/federated/network/CMakeLists.txt +++ b/core/federated/network/CMakeLists.txt @@ -1,4 +1,4 @@ -set(LF_NETWORK_FILES net_util.c lf_socket_support.c) +set(LF_NETWORK_FILES net_util.c lf_socket_support.c socket_common.c) list(TRANSFORM LF_NETWORK_FILES PREPEND federated/network/) list(APPEND REACTORC_SOURCES ${LF_NETWORK_FILES}) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 97ab4bc89..2f630287b 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -18,9 +18,6 @@ #include "lf_socket_support.h" static void socket_close(netdrv_t* drv) { - if (!drv) { - return; - } socket_priv_t* priv = (socket_priv_t*)drv->priv; if (priv->socket_descriptor > 0) { shutdown(priv->socket_descriptor, SHUT_RDWR); @@ -28,6 +25,10 @@ static void socket_close(netdrv_t* drv) { priv->socket_descriptor = -1; } } +static void socket_open(netdrv_t* drv) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + priv->socket_descriptor = create_real_time_tcp_socket_errexit(); +} netdrv_t* netdrv_init() { netdrv_t* drv = malloc(sizeof(netdrv_t)); @@ -35,7 +36,7 @@ netdrv_t* netdrv_init() { lf_print_error_and_exit("Falied to malloc netdrv_t."); } memset(drv, 0, sizeof(netdrv_t)); - // drv->open = socket_open; + drv->open = socket_open; drv->close = socket_close; // drv->read = socket_read; // drv->write = socket_write; diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index 860198c78..4ca443086 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -42,7 +42,7 @@ socket_priv_t* socket_priv_init() { * * @return The socket ID (a file descriptor). */ -static int create_real_time_tcp_socket_errexit() { +int create_real_time_tcp_socket_errexit() { // Timeout time for the communications of the server struct timeval timeout_time = {.tv_sec = TCP_TIMEOUT_TIME / BILLION, .tv_usec = (TCP_TIMEOUT_TIME % BILLION) / 1000}; int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); diff --git a/include/core/federated/network/socket_common.h b/include/core/federated/network/socket_common.h index 7e68e017d..67950ac12 100644 --- a/include/core/federated/network/socket_common.h +++ b/include/core/federated/network/socket_common.h @@ -70,4 +70,8 @@ typedef struct socket_priv_t { } socket_priv_t; socket_priv_t* socket_priv_init(); + +int create_real_time_tcp_socket_errexit(); + + #endif /* SOCKET_COMMON_H */ \ No newline at end of file From 4626b95ebbdec2cd4ee575eb0915c57a1f656181 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 28 Mar 2024 12:48:38 -0700 Subject: [PATCH 116/262] Fix merge conflicts --- core/federated/RTI/CMakeLists.txt | 43 ++++-- core/federated/RTI/main.c | 1 + core/federated/RTI/rti_remote.c | 4 +- core/federated/RTI/rti_remote.h | 2 +- core/federated/network/lf_mqtt_support.c | 30 +++- core/federated/network/lf_socket_support.c | 76 ++++++----- core/federated/network/net_util.c | 129 ------------------ .../core/federated/network/lf_mqtt_support.h | 4 + .../core/federated/network/socket_common.h | 2 +- 9 files changed, 103 insertions(+), 188 deletions(-) diff --git a/core/federated/RTI/CMakeLists.txt b/core/federated/RTI/CMakeLists.txt index 8958e058d..2aabbe39b 100644 --- a/core/federated/RTI/CMakeLists.txt +++ b/core/federated/RTI/CMakeLists.txt @@ -48,6 +48,15 @@ include_directories(${IncludeDir}/federated/network) include_directories(${IncludeDir}/modal_models) include_directories(${IncludeDir}/utils) +# # Option for enabling federate authentication by RTI. +# option(COMM_TYPE "Communication type between RTI and federate(s)." SOCKET) +# set(CommSrc lf_socket_support.c socket_common.c) +# IF(COMM_TYPE MATCHES SST) +# set(CommSrc lf_sst_support.c) +# ELSEIF(COMM_TYPE MATCHES MQTT) +# set(CommSrc lf_mqtt_support.c) +# ENDIF(COMM_TYPE MATCHES SST) + # Declare a new executable target and list all its sources add_executable( @@ -60,13 +69,26 @@ add_executable( ${CoreLib}/tag.c ${CoreLib}/clock.c ${CoreLib}/federated/network/net_util.c - ${CoreLib}/federated/network/lf_socket_support.c - ${CoreLib}/federated/network/socket_common.c + # ${CoreLib}/federated/network/${CommSrc} ${CoreLib}/utils/pqueue_base.c ${CoreLib}/utils/pqueue_tag.c ${CoreLib}/utils/pqueue.c ) -if (NOT DEFINED LOG_LEVEL) + +option(COMM_TYPE "Communication type between RTI and federate(s)." ON) + +# Option for enabling federate authentication by RTI. +set(NetDir ${CoreLib}/federated/network) +target_sources(RTI PUBLIC ${NetDir}/socket_common.c) +IF(COMM_TYPE MATCHES ON) + target_sources(RTI PUBLIC ${NetDir}/lf_socket_support.c) +ELSEIF(COMM_TYPE MATCHES SST) + target_sources(RTI PUBLIC ${NetDir}/lf_sst_support.c) +ELSEIF(COMM_TYPE MATCHES MQTT) + target_sources(RTI PUBLIC ${NetDir}/lf_mqtt_support.c) +ENDIF(COMM_TYPE MATCHES SOCKET) + +IF(NOT DEFINED LOG_LEVEL) set(LOG_LEVEL 0) ENDIF(NOT DEFINED LOG_LEVEL) @@ -130,17 +152,10 @@ IF(AUTH MATCHES ON) target_link_libraries(RTI OpenSSL::SSL) ENDIF(AUTH MATCHES ON) -# # Option for enabling federate authentication by RTI. -# option(SST "Federate authentication by SST-c-api is enabled." OFF) -# IF(SST MATCHES ON) -# add_compile_definitions(__RTI_SST__) -# # Find OpenSSL and link to it -# find_package(OpenSSL REQUIRED) -# target_link_libraries(RTI OpenSSL::SSL) -# add_subdirectory(../../../third_party/sst-c-api SSTLIB) -# target_link_libraries(RTI SSTLIB) -# target_sources(RTI PUBLICE ${CoreLib}/federated/network/lf_sst_support.c) -# ENDIF(SST MATCHES ON) +IF(COMM_TYPE MATCHES MQTT) + find_package(eclipse-paho-mqtt-c REQUIRED) + target_link_libraries(eclipse-paho-mqtt-c::paho-mqtt3as) +ENDIF(COMM_TYPE MATCHES MQTT) install( TARGETS RTI diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index 27548e35d..2dac49269 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -49,6 +49,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "rti_remote.h" #include "net_util.h" +#include "socket_common.h" #include // To trap ctrl-c and invoke a clean stop to save the trace file, if needed. #include diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 531c52d1d..53bf6caf6 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -27,7 +27,7 @@ */ #include "rti_remote.h" -// #include "net_util.h" +#include "net_util.h" #include // Global variables defined in tag.c: @@ -782,7 +782,7 @@ void* clock_synchronization_thread(void* noargs) { } } while ((errno == EAGAIN || errno == EWOULDBLOCK) && bytes_read < (ssize_t)message_size); // If any errors occur, either discard the message or the clock sync round. - if (bytes_read == message_size) { + if (!bytes_read) { if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T3) { int32_t fed_id_2 = extract_int32(&(buffer[1])); // Check that this message came from the correct federate. diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 37ef9635a..ae3b7052b 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -37,7 +37,7 @@ #define MAX_TIME_FOR_REPLY_TO_STOP_REQUEST SEC(30) // TODO: Need to be fixed later. -#include "lf_socket_support.h" +// #include "lf_socket_support.h" ///////////////////////////////////////////// //// Data structures diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index d5ffb999d..b84a818d5 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -1,3 +1,5 @@ +#include // IPPROTO_TCP, IPPROTO_UDP + #include "lf_mqtt_support.h" /** @@ -8,8 +10,22 @@ * * @return netdrv_t* */ -netdrv_t* netdrv_init() {} +netdrv_t* netdrv_init() { + // FIXME: Delete below. + printf("\n\t[MQTT PROTOCOL]\n\n"); +} + +char* get_host_name(netdrv_t* drv) {} + +int32_t get_port(netdrv_t* drv) {} + +struct in_addr* get_ip_addr(netdrv_t* drv) {} + +void set_host_name(netdrv_t* drv, const char* hostname) {} + +void set_port(netdrv_t* drv, int port) {} +void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) {} /** * @brief Create a server object @@ -45,20 +61,20 @@ netdrv_t* establish_communication_session(netdrv_t* netdrv) {} * @param buffer * @return int */ -int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); +int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) {} -int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); +int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) {} void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, - char* format, ...); + char* format, ...) {} -ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length); +ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) {} -ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); +ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) {} void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, - char* format, ...); \ No newline at end of file + char* format, ...) {} diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 2f630287b..a893535f5 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -80,39 +80,46 @@ void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { priv->server_ip_addr = ip_addr; } -// // create_real_time_tcp_socket_errexit -// static int socket_open(netdrv_t* drv) { -// if (!drv) { -// return -1; -// } -// socket_priv_t* priv = (socket_priv_t*)drv->priv; -// priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); -// priv->proto = TCP; -// if (priv->socket_descriptor < 0) { -// lf_print_error_and_exit("Could not open TCP socket. Err=%d", priv->socket_descriptor); -// } -// // Disable Nagle's algorithm which bundles together small TCP messages to -// // reduce network traffic -// // TODO: Re-consider if we should do this, and whether disabling delayed ACKs -// // is enough. -// int flag = 1; -// int result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); - -// if (result < 0) { -// lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); -// } - -// // Disable delayed ACKs. Only possible on Linux -// #if defined(PLATFORM_Linux) -// result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); - -// if (result < 0) { -// lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); -// } -// #endif - -// return priv->socket_descriptor; -// } +void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) { + socket_priv_t* priv_clock = (socket_priv_t*)(clock_drv); + socket_priv_t* priv_rti = (socket_priv_t*)(rti_drv); + priv_clock->UDP_addr.sin_family = AF_INET; + priv_clock->UDP_addr.sin_port = htons(port_num); + priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; +} + +// create_real_time_tcp_socket_errexit +static void socket_open(netdrv_t* drv) { + if (!drv) { + return -1; + } + socket_priv_t* priv = (socket_priv_t*)(drv); + priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (priv->socket_descriptor < 0) { + lf_print_error_and_exit("Could not open TCP socket. Err=%d", priv->socket_descriptor); + } + // Disable Nagle's algorithm which bundles together small TCP messages to + // reduce network traffic + // TODO: Re-consider if we should do this, and whether disabling delayed ACKs + // is enough. + int flag = 1; + int result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } + +// Disable delayed ACKs. Only possible on Linux +#if defined(PLATFORM_Linux) + result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); + + if (result < 0) { + lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); + } +#endif + + return priv->socket_descriptor; +} void netdrv_free(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; @@ -139,7 +146,8 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { // Got a socket break; } else if (ret_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { - lf_print_error_and_exit("Failed to accept the socket. %s.", strerror(errno)); + lf_print_error_and_exit("Failed to accept the socket. %s. ret_priv->socket_descriptor = %d", + strerror(errno), ret_priv->socket_descriptor); } else { // Try again lf_print_warning("Failed to accept the socket. %s. Trying again.", strerror(errno)); diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index b4092bdf5..c09ad22f6 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -87,135 +87,6 @@ int netdrv_write(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { return drv->write(drv, num_bytes, buffer); } -int read_from_socket(int socket, size_t num_bytes, unsigned char* buffer) { - if (socket < 0) { - // Socket is not open. - errno = EBADF; - return -1; - } - ssize_t bytes_read = 0; - int retry_count = 0; - while (bytes_read < (ssize_t)num_bytes) { - ssize_t more = read(socket, buffer + bytes_read, num_bytes - (size_t)bytes_read); - if (more < 0 && retry_count++ < NUM_SOCKET_RETRIES && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { - // Those error codes set by the socket indicates - // that we should try again (@see man errno). - lf_print_warning("Reading from socket failed. Will try again."); - lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); - continue; - } else if (more < 0) { - // A more serious error occurred. - return -1; - } else if (more == 0) { - // EOF received. - return 1; - } - bytes_read += more; - } - return 0; -} - -int read_from_socket_close_on_error(int* socket, size_t num_bytes, unsigned char* buffer) { - assert(socket); - int read_failed = read_from_socket(*socket, num_bytes, buffer); - if (read_failed) { - // Read failed. - // Socket has probably been closed from the other side. - // Shut down and close the socket from this side. - shutdown(*socket, SHUT_RDWR); - close(*socket); - // Mark the socket closed. - *socket = -1; - return -1; - } - return 0; -} - -void read_from_socket_fail_on_error(int* socket, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, - char* format, ...) { - va_list args; - assert(socket); - int read_failed = read_from_socket_close_on_error(socket, num_bytes, buffer); - if (read_failed) { - // Read failed. - if (mutex != NULL) { - LF_MUTEX_UNLOCK(mutex); - } - if (format != NULL) { - lf_print_error_system_failure(format, args); - } else { - lf_print_error_system_failure("Failed to read from socket."); - } - } -} - -ssize_t peek_from_socket(int socket, unsigned char* result) { - ssize_t bytes_read = recv(socket, result, 1, MSG_DONTWAIT | MSG_PEEK); - if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) - return 0; - else - return bytes_read; -} - -int write_to_socket(int socket, size_t num_bytes, unsigned char* buffer) { - if (socket < 0) { - // Socket is not open. - errno = EBADF; - return -1; - } - ssize_t bytes_written = 0; - va_list args; - while (bytes_written < (ssize_t)num_bytes) { - ssize_t more = write(socket, buffer + bytes_written, num_bytes - (size_t)bytes_written); - if (more <= 0 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { - // The error codes EAGAIN or EWOULDBLOCK indicate - // that we should try again (@see man errno). - // The error code EINTR means the system call was interrupted before completing. - LF_PRINT_DEBUG("Writing to socket was blocked. Will try again."); - lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); - continue; - } else if (more < 0) { - // A more serious error occurred. - return -1; - } - bytes_written += more; - } - return 0; -} - -int write_to_socket_close_on_error(int* socket, size_t num_bytes, unsigned char* buffer) { - assert(socket); - int result = write_to_socket(*socket, num_bytes, buffer); - if (result) { - // Write failed. - // Socket has probably been closed from the other side. - // Shut down and close the socket from this side. - shutdown(*socket, SHUT_RDWR); - close(*socket); - // Mark the socket closed. - *socket = -1; - } - return result; -} - -void write_to_socket_fail_on_error(int* socket, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, - char* format, ...) { - va_list args; - assert(socket); - int result = write_to_socket_close_on_error(socket, num_bytes, buffer); - if (result) { - // Write failed. - if (mutex != NULL) { - LF_MUTEX_UNLOCK(mutex); - } - if (format != NULL) { - lf_print_error_system_failure(format, args); - } else { - lf_print_error("Failed to write to socket. Closing it."); - } - } -} - #endif // FEDERATED // Below are more generally useful functions. diff --git a/include/core/federated/network/lf_mqtt_support.h b/include/core/federated/network/lf_mqtt_support.h index f8851c2cd..c85b304cf 100644 --- a/include/core/federated/network/lf_mqtt_support.h +++ b/include/core/federated/network/lf_mqtt_support.h @@ -1,6 +1,10 @@ #ifndef LF_MQTT_SUPPORT_H #define LF_MQTT_SUPPORT_H +#include + +#include "net_util.h" + typedef struct mqtt_priv_t { MQTTClient client; MQTTClient_connectOptions conn_opts; // = MQTTClient_connectOptions_initializer; diff --git a/include/core/federated/network/socket_common.h b/include/core/federated/network/socket_common.h index 67950ac12..99c137f6a 100644 --- a/include/core/federated/network/socket_common.h +++ b/include/core/federated/network/socket_common.h @@ -54,7 +54,7 @@ typedef struct socket_priv_t { int port; // my port number int socket_descriptor; -// int proto; + int proto; uint16_t user_specified_port; // The connected other side's info. From bc0e8649c959c83057d3ad1fc64032772154656e Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 28 Mar 2024 17:55:30 -0700 Subject: [PATCH 117/262] RTI now compiles selectively by COMM_TYPE keyword --- core/CMakeLists.txt | 13 +- core/federated/RTI/CMakeLists.txt | 43 ++--- core/federated/RTI/main.c | 4 +- core/federated/RTI/rti_remote.h | 2 + core/federated/network/CMakeLists.txt | 40 ++++- core/federated/network/lf_mqtt_support.c | 2 +- core/federated/network/lf_socket_support.c | 37 +--- core/federated/network/lf_sst_support.c | 2 +- core/federated/network/net_util.c | 35 ---- core/federated/network/socket_common.c | 8 +- core/utils/util.c | 3 - include/core/federated/network/CMakeLists.txt | 7 + .../federated/network/lf_socket_support.h | 30 ---- include/core/federated/network/net_util.h | 137 +-------------- include/core/federated/network/netdriver.h | 162 ++++++++++++++++++ .../core/federated/network/socket_common.h | 12 +- .../network/{ => type}/lf_mqtt_support.h | 2 - .../network/type/lf_socket_support.h | 8 + .../network/{ => type}/lf_sst_support.h | 1 - 19 files changed, 261 insertions(+), 287 deletions(-) create mode 100644 include/core/federated/network/CMakeLists.txt delete mode 100644 include/core/federated/network/lf_socket_support.h create mode 100644 include/core/federated/network/netdriver.h rename include/core/federated/network/{ => type}/lf_mqtt_support.h (94%) create mode 100644 include/core/federated/network/type/lf_socket_support.h rename include/core/federated/network/{ => type}/lf_sst_support.h (95%) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 8eec31eb8..3046982a2 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -25,12 +25,6 @@ endif() # Add the general sources to the list of REACTORC_SOURCES list(APPEND REACTORC_SOURCES ${GENERAL_SOURCES}) -# Add sources for either threaded or single-threaded runtime -if (DEFINED FEDERATED) - include(federated/CMakeLists.txt) - include(federated/network/CMakeLists.txt) -endif() - # Add sources for either threaded or single-threaded runtime if(DEFINED LF_SINGLE_THREADED) message(STATUS "Including sources for single-threaded runtime.") @@ -79,6 +73,13 @@ if (DEFINED LF_TRACE) target_link_libraries(reactor-c PRIVATE "${LF_TRACE_PLUGIN}") endif() +# Add sources for either threaded or single-threaded runtime +if (DEFINED FEDERATED) + include(federated/CMakeLists.txt) + include(federated/network/CMakeLists.txt) + target_link_libraries(reactor-c PUBLIC lf::low-level-platform-api) +endif() + include(${LF_ROOT}/version/api/CMakeLists.txt) target_link_libraries(reactor-c PUBLIC lf::version-api) diff --git a/core/federated/RTI/CMakeLists.txt b/core/federated/RTI/CMakeLists.txt index 2aabbe39b..4d44dd057 100644 --- a/core/federated/RTI/CMakeLists.txt +++ b/core/federated/RTI/CMakeLists.txt @@ -48,16 +48,6 @@ include_directories(${IncludeDir}/federated/network) include_directories(${IncludeDir}/modal_models) include_directories(${IncludeDir}/utils) -# # Option for enabling federate authentication by RTI. -# option(COMM_TYPE "Communication type between RTI and federate(s)." SOCKET) -# set(CommSrc lf_socket_support.c socket_common.c) -# IF(COMM_TYPE MATCHES SST) -# set(CommSrc lf_sst_support.c) -# ELSEIF(COMM_TYPE MATCHES MQTT) -# set(CommSrc lf_mqtt_support.c) -# ENDIF(COMM_TYPE MATCHES SST) - - # Declare a new executable target and list all its sources add_executable( RTI @@ -68,25 +58,15 @@ add_executable( ${CoreLib}/utils/util.c ${CoreLib}/tag.c ${CoreLib}/clock.c - ${CoreLib}/federated/network/net_util.c - # ${CoreLib}/federated/network/${CommSrc} ${CoreLib}/utils/pqueue_base.c ${CoreLib}/utils/pqueue_tag.c ${CoreLib}/utils/pqueue.c ) option(COMM_TYPE "Communication type between RTI and federate(s)." ON) - -# Option for enabling federate authentication by RTI. -set(NetDir ${CoreLib}/federated/network) -target_sources(RTI PUBLIC ${NetDir}/socket_common.c) IF(COMM_TYPE MATCHES ON) - target_sources(RTI PUBLIC ${NetDir}/lf_socket_support.c) -ELSEIF(COMM_TYPE MATCHES SST) - target_sources(RTI PUBLIC ${NetDir}/lf_sst_support.c) -ELSEIF(COMM_TYPE MATCHES MQTT) - target_sources(RTI PUBLIC ${NetDir}/lf_mqtt_support.c) -ENDIF(COMM_TYPE MATCHES SOCKET) + set(COMM_TYPE TCP) +ENDIF() IF(NOT DEFINED LOG_LEVEL) set(LOG_LEVEL 0) @@ -126,14 +106,22 @@ target_link_libraries(RTI lf::low-level-platform-impl) include(${LF_ROOT}/low_level_platform/api/CMakeLists.txt) target_link_libraries(RTI lf::low-level-platform-api) -# Set the STANDALONE_RTI flag to include the rti_remote and rti_common. -target_compile_definitions(RTI PUBLIC STANDALONE_RTI=1) - # Set FEDERATED to get federated compilation support target_compile_definitions(RTI PUBLIC FEDERATED=1) +include(${IncludeDir}/federated/network/CMakeLists.txt) +target_link_libraries(RTI lf::network-api) + +include(${CoreLib}/federated/network/CMakeLists.txt) +target_link_libraries(RTI lf::network-impl) + +# Set the STANDALONE_RTI flag to include the rti_remote and rti_common. +target_compile_definitions(RTI PUBLIC STANDALONE_RTI=1) + target_compile_definitions(RTI PUBLIC PLATFORM_${CMAKE_SYSTEM_NAME}) +target_compile_definitions(RTI PUBLIC COMM_TYPE_${COMM_TYPE}) + # Set RTI Tracing target_compile_definitions(RTI PUBLIC RTI_TRACE) @@ -152,11 +140,6 @@ IF(AUTH MATCHES ON) target_link_libraries(RTI OpenSSL::SSL) ENDIF(AUTH MATCHES ON) -IF(COMM_TYPE MATCHES MQTT) - find_package(eclipse-paho-mqtt-c REQUIRED) - target_link_libraries(eclipse-paho-mqtt-c::paho-mqtt3as) -ENDIF(COMM_TYPE MATCHES MQTT) - install( TARGETS RTI DESTINATION bin diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index 2dac49269..6f402a44a 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -48,8 +48,8 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "rti_remote.h" -#include "net_util.h" -#include "socket_common.h" +// #include "net_util.h" +// #include "socket_common.h" #include // To trap ctrl-c and invoke a clean stop to save the trace file, if needed. #include diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index ae3b7052b..5273206bf 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -25,6 +25,8 @@ #include "net_util.h" #include "rti_common.h" +#include "netdriver.h" + #ifdef __RTI_AUTH__ #include // For secure random number generation. #include // For HMAC authentication. diff --git a/core/federated/network/CMakeLists.txt b/core/federated/network/CMakeLists.txt index a22ab6a31..6bb1816a4 100644 --- a/core/federated/network/CMakeLists.txt +++ b/core/federated/network/CMakeLists.txt @@ -1,4 +1,38 @@ -set(LF_NETWORK_FILES net_util.c lf_socket_support.c socket_common.c) +# set(LF_NETWORK_FILES net_util.c lf_socket_support.c socket_common.c) + +# list(TRANSFORM LF_NETWORK_FILES PREPEND federated/network/) +# list(APPEND REACTORC_SOURCES ${LF_NETWORK_FILES}) + + +add_library(lf-network-impl STATIC) +add_library(lf::network-impl ALIAS lf-network-impl) + +target_link_libraries(lf-network-impl PRIVATE lf::network-api) +target_link_libraries(lf-network-impl PUBLIC lf-logging-api) +target_compile_definitions(lf-network-impl PUBLIC COMM_TYPE_${COMM_TYPE}) +target_compile_definitions(lf-network-impl PUBLIC FEDERATED=1) + +target_sources(lf-network-impl PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/net_util.c + ${CMAKE_CURRENT_LIST_DIR}/socket_common.c +) + +IF(COMM_TYPE MATCHES TCP) + target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lf_socket_support.c) +ELSEIF(COMM_TYPE MATCHES MQTT) + # $ git clone https://github.com/eclipse/paho.mqtt.c.git + # $ cd paho.mqtt.c.git + # $ mkdir build.paho; cd build.paho + # $ cmake -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_DOCUMENTATION=TRUE \ + # -DPAHO_BUILD_SAMPLES=TRUE ../ + # $ make + # $ sudo make install + # It will be installed in /usr/local/lib + target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lf_mqtt_support.c) + find_package(eclipse-paho-mqtt-c REQUIRED) + target_link_libraries(lf-network-impl eclipse-paho-mqtt-c::paho-mqtt3as) +ELSEIF(COMM_TYPE MATCHES SST) + target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lf_sst_support.c) +ENDIF() + -list(TRANSFORM LF_NETWORK_FILES PREPEND federated/network/) -list(APPEND REACTORC_SOURCES ${LF_NETWORK_FILES}) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index b84a818d5..35929df21 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -1,6 +1,6 @@ #include // IPPROTO_TCP, IPPROTO_UDP -#include "lf_mqtt_support.h" +#include "netdriver.h" /** * @brief diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index a893535f5..e96aaff41 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -15,7 +15,9 @@ #include "util.h" #include "net_common.h" -#include "lf_socket_support.h" +#include "net_util.h" +#include "netdriver.h" + static void socket_close(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; @@ -88,39 +90,6 @@ void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; } -// create_real_time_tcp_socket_errexit -static void socket_open(netdrv_t* drv) { - if (!drv) { - return -1; - } - socket_priv_t* priv = (socket_priv_t*)(drv); - priv->socket_descriptor = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (priv->socket_descriptor < 0) { - lf_print_error_and_exit("Could not open TCP socket. Err=%d", priv->socket_descriptor); - } - // Disable Nagle's algorithm which bundles together small TCP messages to - // reduce network traffic - // TODO: Re-consider if we should do this, and whether disabling delayed ACKs - // is enough. - int flag = 1; - int result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } - -// Disable delayed ACKs. Only possible on Linux -#if defined(PLATFORM_Linux) - result = setsockopt(priv->socket_descriptor, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)); - - if (result < 0) { - lf_print_error_and_exit("Failed to disable Nagle algorithm on socket server."); - } -#endif - - return priv->socket_descriptor; -} - void netdrv_free(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; // free(priv); // Already freed on socket close() diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index d2c85fa34..13fe2a71b 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -16,4 +16,4 @@ #include "util.h" #include "net_common.h" -#include "lf_sst_support.h" \ No newline at end of file +#include "netdriver.h" \ No newline at end of file diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index c09ad22f6..2a54746fa 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -47,46 +47,11 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Define socket functions only for federated execution. #ifdef FEDERATED -#include // Defines read(), write(), and close() #ifndef NUMBER_OF_FEDERATES #define NUMBER_OF_FEDERATES 1 #endif -/** Number of nanoseconds to sleep before retrying a socket read. */ -#define SOCKET_READ_RETRY_INTERVAL 1000000 - -// Mutex lock held while performing socket close operations. -// A deadlock can occur if two threads simulataneously attempt to close the same socket. -lf_mutex_t netdrv_mutex; - -int netdrv_open(netdrv_t* drv) { - if (!drv) { - return -1; - } - return drv->open(drv); -} -void netdrv_close(netdrv_t* drv) { - if (!drv) { - return; - } - drv->close(drv); -} - -int netdrv_read(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { - if (!drv) { - return -1; - } - return drv->read(drv, num_bytes, buffer); -} - -int netdrv_write(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { - if (!drv) { - return -1; - } - return drv->write(drv, num_bytes, buffer); -} - #endif // FEDERATED // Below are more generally useful functions. diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index 4ca443086..cb39962c6 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -15,7 +15,9 @@ #include "util.h" #include "net_common.h" -#include "socket_common.h" +#include "net_util.h" +#include "netdriver.h" +// #include "socket_common.h" socket_priv_t* socket_priv_init() { socket_priv_t* priv = malloc(sizeof(socket_priv_t)); @@ -71,7 +73,7 @@ int create_real_time_tcp_socket_errexit() { #if defined(PLATFORM_Linux) // Disable delayed ACKs. Only possible on Linux - if (setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int))< 0) { + if (setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, &flag, sizeof(int)) < 0) { lf_print_error_system_failure("Failed to disable Nagle algorithm on socket server."); } #endif // Linux @@ -173,7 +175,7 @@ int create_clock_sync_server(uint16_t* clock_sync_port) { // Zero out the server address structure. bzero((char*)&server_fd, sizeof(server_fd)); - uint16_t port = RTI_DEFAULT_UDP_PORT; // Default UDP port. + uint16_t port = RTI_DEFAULT_UDP_PORT; // Default UDP port. server_fd.sin_family = AF_INET; // IPv4 server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. // Convert the port number from host byte order to network byte order. diff --git a/core/utils/util.c b/core/utils/util.c index 554707edb..a0a9d1bd6 100644 --- a/core/utils/util.c +++ b/core/utils/util.c @@ -50,9 +50,6 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define NUMBER_OF_FEDERATES 1 #endif -/** Number of nanoseconds to sleep before retrying a socket read. */ -#define SOCKET_READ_RETRY_INTERVAL 1000000 - /** * The ID of this federate. For a non-federated execution, this will be -1. * For a federated execution, it will be assigned in the generated code. diff --git a/include/core/federated/network/CMakeLists.txt b/include/core/federated/network/CMakeLists.txt new file mode 100644 index 000000000..e8724427f --- /dev/null +++ b/include/core/federated/network/CMakeLists.txt @@ -0,0 +1,7 @@ +add_library(lf-network-api INTERFACE) +target_include_directories(lf-network-api INTERFACE ${CMAKE_CURRENT_LIST_DIR}) +add_library(lf::network-api ALIAS lf-network-api) +target_compile_definitions(lf-network-api INTERFACE COMM_TYPE_${COMM_TYPE}) +target_link_libraries(lf-network-api INTERFACE lf::tag-api) +# target_link_libraries(lf-network-api INTERFACE lf::low-level-platform-impl) +target_link_libraries(lf-network-api INTERFACE lf::low-level-platform-api) \ No newline at end of file diff --git a/include/core/federated/network/lf_socket_support.h b/include/core/federated/network/lf_socket_support.h deleted file mode 100644 index 2e6379845..000000000 --- a/include/core/federated/network/lf_socket_support.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef LF_SOCKET_SUPPORT_H -#define LF_SOCKET_SUPPORT_H - -#include "socket_common.h" - -char* get_host_name(netdrv_t* drv); -int32_t get_my_port(netdrv_t* drv); -int32_t get_port(netdrv_t* drv); -struct in_addr* get_ip_addr(netdrv_t* drv); - -void set_host_name(netdrv_t* drv, const char* hostname); -void set_port(netdrv_t* drv, int port); -void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr); - -void netdrv_free(netdrv_t* drv); - - -int netdrv_connect(netdrv_t* drv); - -/** - * Without blocking, peek at the specified socket and, if there is - * anything on the queue, put its first byte at the specified address and return 1. - * If there is nothing on the queue, return 0, and if an error occurs, - * return -1. - * @param socket The socket ID. - * @param result Pointer to where to put the first byte available on the socket. - */ -ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result); - -#endif // LF_SOCKET_SUPPORT_H diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index b43a054ca..aec47de52 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -51,10 +51,6 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "low_level_platform.h" #include "tag.h" -#define NUM_SOCKET_RETRIES 10 -// TODO: Copied at lf_socket_support.h. Erase after finished. -#define DELAY_BETWEEN_SOCKET_RETRIES MSEC(100) - #define HOST_LITTLE_ENDIAN 1 #define HOST_BIG_ENDIAN 2 @@ -64,134 +60,6 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ int host_is_big_endian(void); -#ifdef FEDERATED - -typedef enum netdrv_type_t { NETDRV, UDP } netdrv_type_t; - -typedef struct netdrv_t { - int (*open)(struct netdrv_t* drv); - void (*close)(struct netdrv_t* drv); - int (*read)(struct netdrv_t* drv, size_t num_bytes, unsigned char* buffer); - int (*write)(struct netdrv_t* drv, size_t num_bytes, unsigned char* buffer); - void* priv; - unsigned int read_remaining_bytes; -} netdrv_t; - -int netdrv_open(netdrv_t* drv); -void netdrv_close(netdrv_t* drv); -int netdrv_read(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); -int netdrv_write(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); - -netdrv_t* netdrv_init(); - -typedef enum server_type_t { RTI, FED } server_type_t; - -// Port will be NULL on MQTT. -int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port); - -// Returns socket number of clock_sync_server. -int create_clock_sync_server(uint16_t* clock_sync_port); - -netdrv_t* establish_communication_session(netdrv_t* netdrv); - -/** - * Write the specified number of bytes to the specified socket from the - * specified buffer. If an error occurs, return -1 and set errno to indicate - * the cause of the error. If the write succeeds, return 0. - * This function repeats the attempt until the specified number of bytes - * have been written or an error occurs. Specifically, errors EAGAIN, - * EWOULDBLOCK, and EINTR are not considered errors and instead trigger - * another attempt. A delay between attempts is given by - * DELAY_BETWEEN_SOCKET_RETRIES. - * @param socket The socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. - */ -int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); - -/** - * Write the specified number of bytes to the specified socket using write_to_socket - * and close the socket if an error occurs. If an error occurs, this will change the - * socket ID pointed to by the first argument to -1 and will return -1. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. - */ -int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); - -/** - * Write the specified number of bytes to the specified socket using - * write_to_socket_close_on_error and exit with an error code if an error occurs. - * If the mutex argument is non-NULL, release the mutex before exiting. If the - * format argument is non-null, then use it an any additional arguments to form - * the error message using printf conventions. Otherwise, print a generic error - * message. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @param mutex If non-NULL, the mutex to unlock before exiting. - * @param format A format string for error messages, followed by any number of - * fields that will be used to fill the format string as in printf, or NULL - * to print a generic error message. - */ -void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, - char* format, ...); - -/** - * Read the specified number of bytes from the specified socket into the specified buffer. - * If an error occurs during this reading, return -1 and set errno to indicate - * the cause of the error. If the read succeeds in reading the specified number of bytes, - * return 0. If an EOF occurs before reading the specified number of bytes, return 1. - * This function repeats the read attempt until the specified number of bytes - * have been read, an EOF is read, or an error occurs. Specifically, errors EAGAIN, - * EWOULDBLOCK, and EINTR are not considered errors and instead trigger - * another attempt. A delay between attempts is given by DELAY_BETWEEN_SOCKET_RETRIES. - * @param socket The socket ID. - * @param num_bytes The number of bytes to read. - * @param buffer The buffer into which to put the bytes. - * @return 0 for success, 1 for EOF, and -1 for an error. - */ -ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length); - -/** - * Read the specified number of bytes to the specified socket using read_from_socket - * and close the socket if an error occurs. If an error occurs, this will change the - * socket ID pointed to by the first argument to -1 and will return -1. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. - */ -ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); - -/** - * Read the specified number of bytes from the specified socket into the - * specified buffer. If a disconnect or an EOF occurs during this - * reading, then if format is non-null, report an error and exit. - * If the mutex argument is non-NULL, release the mutex before exiting. - * If format is null, then report the error, but do not exit. - * This function takes a formatted string and additional optional arguments - * similar to printf(format, ...) that is appended to the error messages. - * @param socket The socket ID. - * @param num_bytes The number of bytes to read. - * @param buffer The buffer into which to put the bytes. - * @param format A printf-style format string, followed by arguments to - * fill the string, or NULL to not exit with an error message. - * @return The number of bytes read, or 0 if an EOF is received, or - * a negative number for an error. - */ -void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, - char* format, ...); - -/** - * Mutex protecting socket close operations. - */ -extern lf_mutex_t netdrv_mutex; - -#endif // FEDERATED - /** * Write the specified data as a sequence of bytes starting * at the specified address. This encodes the data in little-endian @@ -295,6 +163,11 @@ uint32_t extract_uint32(unsigned char* bytes); #ifdef FEDERATED +/** + * Mutex protecting socket close operations. + */ +extern lf_mutex_t netdrv_mutex; + /** * Extract the core header information that all messages between * federates share. The core header information is two bytes with diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h new file mode 100644 index 000000000..3d742fe58 --- /dev/null +++ b/include/core/federated/network/netdriver.h @@ -0,0 +1,162 @@ +#ifndef NETDRIVER_H +#define NETDRIVER_H + +// TODO: Need federated keyword. +#ifdef FEDERATED + +#include "low_level_platform.h" + +#include "socket_common.h" + +#if defined(COMM_TYPE_MQTT) +#include "type/lf_mqtt_support.h" +#endif + +typedef enum netdrv_type_t { NETDRV, UDP } netdrv_type_t; + +typedef enum server_type_t { RTI, FED } server_type_t; + +typedef struct netdrv_t { + void (*open)(struct netdrv_t* drv); + void (*close)(struct netdrv_t* drv); + int (*read)(struct netdrv_t* drv, size_t num_bytes, unsigned char* buffer); + int (*write)(struct netdrv_t* drv, size_t num_bytes, unsigned char* buffer); + void* priv; + unsigned int read_remaining_bytes; +} netdrv_t; + +int netdrv_open(netdrv_t* drv); +void netdrv_close(netdrv_t* drv); +int netdrv_read(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); +int netdrv_write(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); + +netdrv_t* netdrv_init(); + +// Port will be NULL on MQTT. +int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port); + +// Returns socket number of clock_sync_server. +int create_clock_sync_server(uint16_t* clock_sync_port); + +netdrv_t* establish_communication_session(netdrv_t* netdrv); + +/** + * Write the specified number of bytes to the specified socket from the + * specified buffer. If an error occurs, return -1 and set errno to indicate + * the cause of the error. If the write succeeds, return 0. + * This function repeats the attempt until the specified number of bytes + * have been written or an error occurs. Specifically, errors EAGAIN, + * EWOULDBLOCK, and EINTR are not considered errors and instead trigger + * another attempt. A delay between attempts is given by + * DELAY_BETWEEN_SOCKET_RETRIES. + * @param socket The socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. + */ +int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); + +/** + * Write the specified number of bytes to the specified socket using write_to_socket + * and close the socket if an error occurs. If an error occurs, this will change the + * socket ID pointed to by the first argument to -1 and will return -1. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. + */ +int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); + +/** + * Write the specified number of bytes to the specified socket using + * write_to_socket_close_on_error and exit with an error code if an error occurs. + * If the mutex argument is non-NULL, release the mutex before exiting. If the + * format argument is non-null, then use it an any additional arguments to form + * the error message using printf conventions. Otherwise, print a generic error + * message. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @param mutex If non-NULL, the mutex to unlock before exiting. + * @param format A format string for error messages, followed by any number of + * fields that will be used to fill the format string as in printf, or NULL + * to print a generic error message. + */ +void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, + char* format, ...); + +/** + * Read the specified number of bytes from the specified socket into the specified buffer. + * If an error occurs during this reading, return -1 and set errno to indicate + * the cause of the error. If the read succeeds in reading the specified number of bytes, + * return 0. If an EOF occurs before reading the specified number of bytes, return 1. + * This function repeats the read attempt until the specified number of bytes + * have been read, an EOF is read, or an error occurs. Specifically, errors EAGAIN, + * EWOULDBLOCK, and EINTR are not considered errors and instead trigger + * another attempt. A delay between attempts is given by DELAY_BETWEEN_SOCKET_RETRIES. + * @param socket The socket ID. + * @param num_bytes The number of bytes to read. + * @param buffer The buffer into which to put the bytes. + * @return 0 for success, 1 for EOF, and -1 for an error. + */ +ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length); + +/** + * Read the specified number of bytes to the specified socket using read_from_socket + * and close the socket if an error occurs. If an error occurs, this will change the + * socket ID pointed to by the first argument to -1 and will return -1. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. + */ +ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); + +/** + * Read the specified number of bytes from the specified socket into the + * specified buffer. If a disconnect or an EOF occurs during this + * reading, then if format is non-null, report an error and exit. + * If the mutex argument is non-NULL, release the mutex before exiting. + * If format is null, then report the error, but do not exit. + * This function takes a formatted string and additional optional arguments + * similar to printf(format, ...) that is appended to the error messages. + * @param socket The socket ID. + * @param num_bytes The number of bytes to read. + * @param buffer The buffer into which to put the bytes. + * @param format A printf-style format string, followed by arguments to + * fill the string, or NULL to not exit with an error message. + * @return The number of bytes read, or 0 if an EOF is received, or + * a negative number for an error. + */ +void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, + char* format, ...); + +// Temporary ////////////////// +char* get_host_name(netdrv_t* drv); +int32_t get_my_port(netdrv_t* drv); +int32_t get_port(netdrv_t* drv); +struct in_addr* get_ip_addr(netdrv_t* drv); + +void set_host_name(netdrv_t* drv, const char* hostname); +void set_port(netdrv_t* drv, int port); +void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr); + +void netdrv_free(netdrv_t* drv); + +int netdrv_connect(netdrv_t* drv); + +/** + * Without blocking, peek at the specified socket and, if there is + * anything on the queue, put its first byte at the specified address and return 1. + * If there is nothing on the queue, return 0, and if an error occurs, + * return -1. + * @param socket The socket ID. + * @param result Pointer to where to put the first byte available on the socket. + */ +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result); + +//////////////////////////// + +#endif // FEDERATED + +#endif /* NETDRIVER_H */ diff --git a/include/core/federated/network/socket_common.h b/include/core/federated/network/socket_common.h index 99c137f6a..458966a32 100644 --- a/include/core/federated/network/socket_common.h +++ b/include/core/federated/network/socket_common.h @@ -1,11 +1,17 @@ #ifndef SOCKET_COMMON_H #define SOCKET_COMMON_H -#include "net_util.h" - #include // IPPROTO_TCP, IPPROTO_UDP #include // TCP_NODELAY +#if defined(COMM_TYPE_TCP) +#include "type/lf_socket_support.h" +#elif defined(COMM_TYPE_SST) +#include "type/lf_sst_support.h" +#endif + +#include "tag.h" + /** * The timeout time in ns for TCP operations. * Default value is 10 secs. @@ -49,8 +55,6 @@ #define RTI_DEFAULT_UDP_PORT 15061u -#define DELAY_BETWEEN_SOCKET_RETRIES MSEC(100) - typedef struct socket_priv_t { int port; // my port number int socket_descriptor; diff --git a/include/core/federated/network/lf_mqtt_support.h b/include/core/federated/network/type/lf_mqtt_support.h similarity index 94% rename from include/core/federated/network/lf_mqtt_support.h rename to include/core/federated/network/type/lf_mqtt_support.h index c85b304cf..bee81f231 100644 --- a/include/core/federated/network/lf_mqtt_support.h +++ b/include/core/federated/network/type/lf_mqtt_support.h @@ -3,8 +3,6 @@ #include -#include "net_util.h" - typedef struct mqtt_priv_t { MQTTClient client; MQTTClient_connectOptions conn_opts; // = MQTTClient_connectOptions_initializer; diff --git a/include/core/federated/network/type/lf_socket_support.h b/include/core/federated/network/type/lf_socket_support.h new file mode 100644 index 000000000..a5e15535b --- /dev/null +++ b/include/core/federated/network/type/lf_socket_support.h @@ -0,0 +1,8 @@ +#ifndef LF_SOCKET_SUPPORT_H +#define LF_SOCKET_SUPPORT_H + +#define NUM_SOCKET_RETRIES 10 + +#define DELAY_BETWEEN_SOCKET_RETRIES MSEC(100) + +#endif // LF_SOCKET_SUPPORT_H diff --git a/include/core/federated/network/lf_sst_support.h b/include/core/federated/network/type/lf_sst_support.h similarity index 95% rename from include/core/federated/network/lf_sst_support.h rename to include/core/federated/network/type/lf_sst_support.h index e3c627289..00be0f0ac 100644 --- a/include/core/federated/network/lf_sst_support.h +++ b/include/core/federated/network/type/lf_sst_support.h @@ -1,7 +1,6 @@ #ifndef LF_SST_SUPPORT_H #define LF_SST_SUPPORT_H -#include "socket_common.h" #include "c_api.h" typedef struct sst_socket_priv_t { socket_priv_t socket_priv; // Must be first variable. From 5f3f3d6806a039f5fee3131fb0a5d6647dc5ae97 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 28 Mar 2024 18:07:13 -0700 Subject: [PATCH 118/262] Add cmake to reactor-c cmake --- core/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 3046982a2..527042f71 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -94,6 +94,13 @@ include(${LF_ROOT}/low_level_platform/impl/CMakeLists.txt) target_link_libraries(reactor-c PUBLIC lf::low-level-platform-api) target_link_libraries(reactor-c PRIVATE lf::low-level-platform-impl) +include(${IncludeDir}/federated/network/CMakeLists.txt) +target_link_libraries(reactor-c lf::network-api) + +include(${CoreLib}/federated/network/CMakeLists.txt) +target_link_libraries(reactor-c lf::network-impl) + + include(${LF_ROOT}/platform/api/CMakeLists.txt) include(${LF_ROOT}/platform/impl/CMakeLists.txt) target_link_libraries(reactor-c PUBLIC lf::platform-api) From 6f8d8c1d20c101f36119eafcf3484a1833c763d6 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 28 Mar 2024 18:30:23 -0700 Subject: [PATCH 119/262] Start sst support --- core/federated/network/lf_sst_support.c | 68 +++++++++++++++---- core/federated/network/socket_common.c | 9 +-- .../federated/network/type/lf_sst_support.h | 6 +- 3 files changed, 58 insertions(+), 25 deletions(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 13fe2a71b..5cc1ee497 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -1,19 +1,57 @@ -#include /* htons */ -#include -#include /* IFNAMSIZ */ -#include -#include // IPPROTO_TCP, IPPROTO_UDP -#include // TCP_NODELAY -#include -#include -#include -#include -#include -#include -#include -#include + #include "util.h" #include "net_common.h" +#include "netdriver.h" + +static sst_priv_t* sst_priv_init() { + sst_priv_t* priv = malloc(sizeof(sst_priv_t)); + if (!priv) { + lf_print_error_and_exit("Falied to malloc sst_priv_t."); + } + memset(priv, 0, sizeof(sst_priv_t)); + priv->socket_priv = socket_priv_init(); + return priv; +} + +netdrv_t* netdrv_init() { + netdrv_t* drv = malloc(sizeof(netdrv_t)); + if (!drv) { + lf_print_error_and_exit("Falied to malloc netdrv_t."); + } + memset(drv, 0, sizeof(netdrv_t)); + drv->open = socket_open; + drv->close = socket_close; + // drv->read = socket_read; + // drv->write = socket_write; + drv->read_remaining_bytes = 0; + + // Initialize priv. + socket_priv_t* priv = sst_priv_init(); + + // Set drv->priv pointer to point the malloc'd priv. + drv->priv = (void*)priv; + return drv; +} + +// Port will be NULL on MQTT. +int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) {} + +// Returns socket number of clock_sync_server. +int create_clock_sync_server(uint16_t* clock_sync_port) {} + +netdrv_t* establish_communication_session(netdrv_t* netdrv) {} + +int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) {} + +int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) {} + +void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, + char* format, ...) {} + +ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) {} + +ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) {} -#include "netdriver.h" \ No newline at end of file +void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, + char* format, ...) {} diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index cb39962c6..a17d70248 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -22,19 +22,14 @@ socket_priv_t* socket_priv_init() { socket_priv_t* priv = malloc(sizeof(socket_priv_t)); if (!priv) { - lf_print_error_and_exit("Falied to malloc netdrv_t."); + lf_print_error_and_exit("Falied to malloc socket_priv_t."); } memset(priv, 0, sizeof(socket_priv_t)); - // TODO: Remove when it works. - // priv->port = 0; - // priv->socket_descriptor = 0; - // priv->user_specified_port = 0; - // priv->server_ip_addr.s_addr = 0; - // federate initialization strncpy(priv->server_hostname, "localhost", INET_ADDRSTRLEN); priv->server_port = -1; + return priv; } /** diff --git a/include/core/federated/network/type/lf_sst_support.h b/include/core/federated/network/type/lf_sst_support.h index 00be0f0ac..ea50601f3 100644 --- a/include/core/federated/network/type/lf_sst_support.h +++ b/include/core/federated/network/type/lf_sst_support.h @@ -2,8 +2,8 @@ #define LF_SST_SUPPORT_H #include "c_api.h" -typedef struct sst_socket_priv_t { - socket_priv_t socket_priv; // Must be first variable. +typedef struct sst_priv_t { + socket_priv_t* socket_priv; // Must be first variable. SST_ctx_t* sst_ctx; SST_session_ctx_t* session_ctx; @@ -17,7 +17,7 @@ typedef struct sst_socket_priv_t { // my_netdrv needs a sst_ctx, but not session_ctx; // netdrv_for_inbound_p2p_connections and outbound needs only session_ctx not sst_ctx. -} sst_socket_priv_t; +} sst_priv_t; #endif // LF_SST_SUPPORT_H From 2f009ef53dd10a7cbf9b9e8dae50159a3ae2e53d Mon Sep 17 00:00:00 2001 From: Chanhee Lee Date: Thu, 28 Mar 2024 20:21:03 -0700 Subject: [PATCH 120/262] Enable MQTT build --- core/federated/network/CMakeLists.txt | 38 ++++++++++-------------- core/federated/network/lf_mqtt_support.c | 38 +++++++++++++----------- 2 files changed, 36 insertions(+), 40 deletions(-) diff --git a/core/federated/network/CMakeLists.txt b/core/federated/network/CMakeLists.txt index 6bb1816a4..d8c1870b8 100644 --- a/core/federated/network/CMakeLists.txt +++ b/core/federated/network/CMakeLists.txt @@ -1,38 +1,32 @@ -# set(LF_NETWORK_FILES net_util.c lf_socket_support.c socket_common.c) - -# list(TRANSFORM LF_NETWORK_FILES PREPEND federated/network/) -# list(APPEND REACTORC_SOURCES ${LF_NETWORK_FILES}) - - add_library(lf-network-impl STATIC) add_library(lf::network-impl ALIAS lf-network-impl) +if(COMM_TYPE MATCHES MQTT) + # $ git clone https://github.com/eclipse/paho.mqtt.c.git + # $ cd paho.mqtt.c.git + # $ mkdir build.paho; cd build.paho + # $ cmake ../ + # $ make + # $ sudo make install + # It will be installed in /usr/local/lib + find_package(eclipse-paho-mqtt-c REQUIRED) + target_link_libraries(lf-network-impl PRIVATE lf::network-api eclipse-paho-mqtt-c::paho-mqtt3a eclipse-paho-mqtt-c::paho-mqtt3c) + target_link_libraries(lf-network-impl PUBLIC lf-logging-api) +else() + target_link_libraries(lf-network-impl PRIVATE lf::network-api) + target_link_libraries(lf-network-impl PUBLIC lf-logging-api) +endif() -target_link_libraries(lf-network-impl PRIVATE lf::network-api) -target_link_libraries(lf-network-impl PUBLIC lf-logging-api) target_compile_definitions(lf-network-impl PUBLIC COMM_TYPE_${COMM_TYPE}) target_compile_definitions(lf-network-impl PUBLIC FEDERATED=1) target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/net_util.c - ${CMAKE_CURRENT_LIST_DIR}/socket_common.c ) IF(COMM_TYPE MATCHES TCP) - target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lf_socket_support.c) + target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lf_socket_support.c ${CMAKE_CURRENT_LIST_DIR}/socket_common.c) ELSEIF(COMM_TYPE MATCHES MQTT) - # $ git clone https://github.com/eclipse/paho.mqtt.c.git - # $ cd paho.mqtt.c.git - # $ mkdir build.paho; cd build.paho - # $ cmake -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_DOCUMENTATION=TRUE \ - # -DPAHO_BUILD_SAMPLES=TRUE ../ - # $ make - # $ sudo make install - # It will be installed in /usr/local/lib target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lf_mqtt_support.c) - find_package(eclipse-paho-mqtt-c REQUIRED) - target_link_libraries(lf-network-impl eclipse-paho-mqtt-c::paho-mqtt3as) ELSEIF(COMM_TYPE MATCHES SST) target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lf_sst_support.c) ENDIF() - - diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 70d51ab3c..61195e04b 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -1,18 +1,18 @@ -#include // IPPROTO_TCP, IPPROTO_UDP +#include // IPPROTO_TCP, IPPROTO_UDP #include "netdriver.h" /** - * @brief + * @brief * Initializes structure of netdrv, and priv inside. * Allocate memory. * Check lf_socket_support.c for example. - * - * @return netdrv_t* + * + * @return netdrv_t* */ netdrv_t* netdrv_init() { - // FIXME: Delete below. - printf("\n\t[MQTT PROTOCOL]\n\n"); + // FIXME: Delete below. + printf("\n\t[MQTT PROTOCOL]\n\n"); } char* get_host_name(netdrv_t* drv) {} @@ -33,32 +33,32 @@ void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) {} * MQTTClient_connect() * RTI subscribes “{Federation_ID}_RTI†topic. * Check socket_common.c for example. It is a common function because also lf_sst_support.c will also use it. - * @param drv - * @param server_type + * @param drv + * @param server_type * @param port The port is NULL here. - * @return int + * @return int */ -int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { } +int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) {} /** - * @brief + * @brief * 1. Each federate publishes fed_id to {Federation_ID}_RTI * 2. fed_{n} subscribes to “{Federation_Id}_RTI_to_fed_{n}â€. * 3. RTI subscribes to “{Federation_Id}_fed_{n}_to_RTIâ€. * Check lf_socket_support.c for example. - * @param netdrv - * @return netdrv_t* + * @param netdrv + * @return netdrv_t* */ netdrv_t* establish_communication_session(netdrv_t* netdrv) {} /** * @brief Publish message. - * - * @param drv - * @param num_bytes - * @param buffer - * @return int + * + * @param drv + * @param num_bytes + * @param buffer + * @return int */ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) {} @@ -73,3 +73,5 @@ ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, si void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, char* format, ...) {} + +int create_clock_sync_server(uint16_t* clock_sync_port) {} From 3d526a0724a6dad9673aa4d53066944812dabc04 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 29 Mar 2024 09:49:25 -0700 Subject: [PATCH 121/262] Change reactor-c CMakelists.txt, Add network apis. --- core/CMakeLists.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 527042f71..72609ad9b 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -94,18 +94,17 @@ include(${LF_ROOT}/low_level_platform/impl/CMakeLists.txt) target_link_libraries(reactor-c PUBLIC lf::low-level-platform-api) target_link_libraries(reactor-c PRIVATE lf::low-level-platform-impl) +include(${LF_ROOT}/platform/api/CMakeLists.txt) +include(${LF_ROOT}/platform/impl/CMakeLists.txt) +target_link_libraries(reactor-c PUBLIC lf::platform-api) +target_link_libraries(reactor-c PRIVATE lf::platform-impl) + include(${IncludeDir}/federated/network/CMakeLists.txt) target_link_libraries(reactor-c lf::network-api) include(${CoreLib}/federated/network/CMakeLists.txt) target_link_libraries(reactor-c lf::network-impl) - -include(${LF_ROOT}/platform/api/CMakeLists.txt) -include(${LF_ROOT}/platform/impl/CMakeLists.txt) -target_link_libraries(reactor-c PUBLIC lf::platform-api) -target_link_libraries(reactor-c PRIVATE lf::platform-impl) - # Apply compile definitions to the reactor-c library. target_compile_definitions(reactor-c PUBLIC ${REACTORC_COMPILE_DEFS}) From 6643bb7ee7daedb657c9c9013f7aac96ac656690 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 29 Mar 2024 12:48:03 -0700 Subject: [PATCH 122/262] Comment out federated/network/CMakeLists.txt --- core/CMakeLists.txt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 72609ad9b..ab2ec0a9a 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -73,12 +73,12 @@ if (DEFINED LF_TRACE) target_link_libraries(reactor-c PRIVATE "${LF_TRACE_PLUGIN}") endif() -# Add sources for either threaded or single-threaded runtime -if (DEFINED FEDERATED) - include(federated/CMakeLists.txt) - include(federated/network/CMakeLists.txt) - target_link_libraries(reactor-c PUBLIC lf::low-level-platform-api) -endif() +# # Add sources for either threaded or single-threaded runtime +# if (DEFINED FEDERATED) +# include(federated/CMakeLists.txt) +# include(federated/network/CMakeLists.txt) +# target_link_libraries(reactor-c PUBLIC lf::low-level-platform-api) +# endif() include(${LF_ROOT}/version/api/CMakeLists.txt) target_link_libraries(reactor-c PUBLIC lf::version-api) @@ -99,6 +99,12 @@ include(${LF_ROOT}/platform/impl/CMakeLists.txt) target_link_libraries(reactor-c PUBLIC lf::platform-api) target_link_libraries(reactor-c PRIVATE lf::platform-impl) +message("reactor-c/core/CMakeLists.txt First") +option(COMM_TYPE "Communication type between RTI and federate(s)." ON) +IF(COMM_TYPE MATCHES ON) + set(COMM_TYPE TCP) +ENDIF() + include(${IncludeDir}/federated/network/CMakeLists.txt) target_link_libraries(reactor-c lf::network-api) From 0613db7a32ce28b0e8ba3ef418483b5897fef1ee Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 29 Mar 2024 13:07:49 -0700 Subject: [PATCH 123/262] Change path for core/Cmakelists.txt --- core/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index ab2ec0a9a..35816db8c 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -105,11 +105,11 @@ IF(COMM_TYPE MATCHES ON) set(COMM_TYPE TCP) ENDIF() -include(${IncludeDir}/federated/network/CMakeLists.txt) -target_link_libraries(reactor-c lf::network-api) +include(${LF_ROOT}/include/core/federated/network/CMakeLists.txt) +target_link_libraries(reactor-c PUBLIC lf::network-api) -include(${CoreLib}/federated/network/CMakeLists.txt) -target_link_libraries(reactor-c lf::network-impl) +include(${LF_ROOT}/core/federated/network/CMakeLists.txt) +target_link_libraries(reactor-c PRIVATE lf::network-impl) # Apply compile definitions to the reactor-c library. target_compile_definitions(reactor-c PUBLIC ${REACTORC_COMPILE_DEFS}) From 6840b651fb2c766fbcc60c89cb47125546e729c1 Mon Sep 17 00:00:00 2001 From: Chanhee Lee Date: Fri, 29 Mar 2024 13:22:42 -0700 Subject: [PATCH 124/262] Fix federate build --- core/CMakeLists.txt | 17 +++++++++-------- core/federated/network/CMakeLists.txt | 9 +++++---- core/federated/network/net_util.c | 2 +- include/core/federated/federate.h | 2 +- include/core/federated/network/CMakeLists.txt | 6 ++++-- include/core/federated/network/net_util.h | 1 + 6 files changed, 21 insertions(+), 16 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index ab2ec0a9a..c61decbb7 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -73,11 +73,12 @@ if (DEFINED LF_TRACE) target_link_libraries(reactor-c PRIVATE "${LF_TRACE_PLUGIN}") endif() -# # Add sources for either threaded or single-threaded runtime +# Add sources for either threaded or single-threaded runtime # if (DEFINED FEDERATED) -# include(federated/CMakeLists.txt) -# include(federated/network/CMakeLists.txt) -# target_link_libraries(reactor-c PUBLIC lf::low-level-platform-api) +# include(${LF_ROOT}/core/federated/CMakeLists.txt) +# include(${LF_ROOT}/core/federated/network/CMakeLists.txt) +# include(${LF_ROOT}/include/core/federated/network/CMakeLists.txt) +# target_link_libraries(reactor-c PUBLIC lf::network-api) # endif() include(${LF_ROOT}/version/api/CMakeLists.txt) @@ -105,11 +106,11 @@ IF(COMM_TYPE MATCHES ON) set(COMM_TYPE TCP) ENDIF() -include(${IncludeDir}/federated/network/CMakeLists.txt) -target_link_libraries(reactor-c lf::network-api) +include(${LF_ROOT}/include/core/federated/network/CMakeLists.txt) +target_link_libraries(reactor-c PUBLIC lf::network-api) -include(${CoreLib}/federated/network/CMakeLists.txt) -target_link_libraries(reactor-c lf::network-impl) +include(${LF_ROOT}/core/federated/network/CMakeLists.txt) +target_link_libraries(reactor-c PRIVATE lf::network-impl) # Apply compile definitions to the reactor-c library. target_compile_definitions(reactor-c PUBLIC ${REACTORC_COMPILE_DEFS}) diff --git a/core/federated/network/CMakeLists.txt b/core/federated/network/CMakeLists.txt index d8c1870b8..908818a4f 100644 --- a/core/federated/network/CMakeLists.txt +++ b/core/federated/network/CMakeLists.txt @@ -16,13 +16,9 @@ else() target_link_libraries(lf-network-impl PUBLIC lf-logging-api) endif() -target_compile_definitions(lf-network-impl PUBLIC COMM_TYPE_${COMM_TYPE}) -target_compile_definitions(lf-network-impl PUBLIC FEDERATED=1) - target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/net_util.c ) - IF(COMM_TYPE MATCHES TCP) target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lf_socket_support.c ${CMAKE_CURRENT_LIST_DIR}/socket_common.c) ELSEIF(COMM_TYPE MATCHES MQTT) @@ -30,3 +26,8 @@ ELSEIF(COMM_TYPE MATCHES MQTT) ELSEIF(COMM_TYPE MATCHES SST) target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lf_sst_support.c) ENDIF() + +target_include_directories(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include) + +target_compile_definitions(lf-network-impl PUBLIC COMM_TYPE_${COMM_TYPE}) +target_compile_definitions(lf-network-impl PUBLIC FEDERATED=1) diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index 2a54746fa..662a5c955 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -43,7 +43,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include // TCP_NODELAY #include "net_util.h" -#include "util.h" +// #include "util.h" // Define socket functions only for federated execution. #ifdef FEDERATED diff --git a/include/core/federated/federate.h b/include/core/federated/federate.h index ada27550b..c1968598f 100644 --- a/include/core/federated/federate.h +++ b/include/core/federated/federate.h @@ -20,7 +20,7 @@ #include "low_level_platform.h" // TODO: Need to be fixed later. -#include "lf_socket_support.h" +#include "netdriver.h" #ifndef ADVANCE_MESSAGE_INTERVAL #define ADVANCE_MESSAGE_INTERVAL MSEC(10) diff --git a/include/core/federated/network/CMakeLists.txt b/include/core/federated/network/CMakeLists.txt index e8724427f..6501ba198 100644 --- a/include/core/federated/network/CMakeLists.txt +++ b/include/core/federated/network/CMakeLists.txt @@ -1,7 +1,9 @@ add_library(lf-network-api INTERFACE) -target_include_directories(lf-network-api INTERFACE ${CMAKE_CURRENT_LIST_DIR}) add_library(lf::network-api ALIAS lf-network-api) +target_include_directories(lf-network-api INTERFACE ${CMAKE_CURRENT_LIST_DIR}) +target_include_directories(lf-network-api INTERFACE ${CMAKE_CURRENT_LIST_DIR}/../../utils) + target_compile_definitions(lf-network-api INTERFACE COMM_TYPE_${COMM_TYPE}) target_link_libraries(lf-network-api INTERFACE lf::tag-api) # target_link_libraries(lf-network-api INTERFACE lf::low-level-platform-impl) -target_link_libraries(lf-network-api INTERFACE lf::low-level-platform-api) \ No newline at end of file +target_link_libraries(lf-network-api INTERFACE lf::low-level-platform-api) diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index aec47de52..ac1a49721 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -50,6 +50,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "low_level_platform.h" #include "tag.h" +#include "util.h" #define HOST_LITTLE_ENDIAN 1 #define HOST_BIG_ENDIAN 2 From 51665b3e670ab93231181588112059c19362a0dc Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 29 Mar 2024 14:14:04 -0700 Subject: [PATCH 125/262] Change netdriver to drv in arguments --- core/federated/network/lf_mqtt_support.c | 2 +- include/core/federated/network/netdriver.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 61195e04b..e99664b96 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -67,7 +67,7 @@ int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...) {} -ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) {} +ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) {} ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) {} diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index 3d742fe58..9c5e6e991 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -99,7 +99,7 @@ void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha * @param buffer The buffer into which to put the bytes. * @return 0 for success, 1 for EOF, and -1 for an error. */ -ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length); +ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); /** * Read the specified number of bytes to the specified socket using read_from_socket From 79af83af8a377fc1546251bef41ccf49596afb86 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 29 Mar 2024 14:15:03 -0700 Subject: [PATCH 126/262] Move create server to lf_socket support.c && Move socket_open to socket_common.c --- core/federated/network/lf_socket_support.c | 123 ++++++++++++++---- core/federated/network/socket_common.c | 79 ++--------- .../core/federated/network/socket_common.h | 5 +- 3 files changed, 115 insertions(+), 92 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 4195cd7f7..c3672838e 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -18,37 +18,46 @@ #include "net_util.h" #include "netdriver.h" +// static void socket_close(netdrv_t* drv) { +// socket_priv_t* priv = (socket_priv_t*)drv->priv; +// if (priv->socket_descriptor > 0) { +// shutdown(priv->socket_descriptor, SHUT_RDWR); +// close(priv->socket_descriptor); +// priv->socket_descriptor = -1; +// } +// } +// static void socket_open(netdrv_t* drv) { +// socket_priv_t* priv = (socket_priv_t*)drv->priv; +// priv->socket_descriptor = create_real_time_tcp_socket_errexit(); +// } -static void socket_close(netdrv_t* drv) { +// static void socket_open(netdrv_t* drv); +// static void socket_close(netdrv_t* drv); + +void TCP_open(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; - if (priv->socket_descriptor > 0) { - shutdown(priv->socket_descriptor, SHUT_RDWR); - close(priv->socket_descriptor); - priv->socket_descriptor = -1; - } + TCP_socket_open(priv); } -static void socket_open(netdrv_t* drv) { + +void TCP_close(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; - priv->socket_descriptor = create_real_time_tcp_socket_errexit(); + TCP_socket_close(priv); } -static void socket_open(netdrv_t* drv); -static void socket_close(netdrv_t* drv); - netdrv_t* netdrv_init() { netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { lf_print_error_and_exit("Falied to malloc netdrv_t."); } memset(drv, 0, sizeof(netdrv_t)); - drv->open = socket_open; - drv->close = socket_close; + drv->open = TCP_open; + drv->close = TCP_close; // drv->read = socket_read; // drv->write = socket_write; drv->read_remaining_bytes = 0; // Initialize priv. - socket_priv_t* priv = socket_priv_init(); + socket_priv_t* priv = TCP_socket_priv_init(); // Set drv->priv pointer to point the malloc'd priv. drv->priv = (void*)priv; @@ -99,6 +108,70 @@ void netdrv_free(netdrv_t* drv) { free(drv); } +// This only creates TCP servers not UDP. +int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + // Federate always has a specified port. The RTI can get a specified port by user input. + uint16_t specified_port = port; + if (specified_port == 0 && server_type == RTI) { + port = DEFAULT_PORT; + } + + // Create an IPv4 socket for TCP (not UDP) communication over IP (0). + priv->socket_descriptor = create_real_time_tcp_socket_errexit(); + + // Server file descriptor. + struct sockaddr_in server_fd; + // Zero out the server address structure. + bzero((char*)&server_fd, sizeof(server_fd)); + + server_fd.sin_family = AF_INET; // IPv4 + server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. + // Convert the port number from host byte order to network byte order. + server_fd.sin_port = htons(port); + + int result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); + // Try repeatedly to bind to a port. + int count = 1; + + while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { + if (specified_port == 0) { + lf_print_warning("Failed to get port %d.", port); + port++; + if (port >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) + port = DEFAULT_PORT; + lf_print_warning("Try again with port %d.", port); + server_fd.sin_port = htons(port); + // Do not sleep. + } else { + lf_print("RTI failed to get port %d. Will try again.", port); + lf_sleep(PORT_BIND_RETRY_INTERVAL); + } + result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); + } + if (result != 0) { + lf_print_error_and_exit("Failed to bind the socket. Port %d is not available. ", port); + } + // Enable listening for socket connections. + // The second argument is the maximum number of queued socket requests, + // which according to the Mac man page is limited to 128. + listen(priv->socket_descriptor, 128); + + // Set the port into priv->port. + if (specified_port == 0 && server_type == FED) { + // Need to retrieve the port number assigned by the OS. + struct sockaddr_in assigned; + socklen_t addr_len = sizeof(assigned); + if (getsockname(priv->socket_descriptor, (struct sockaddr*)&assigned, &addr_len) < 0) { + lf_print_error_and_exit("Failed to retrieve assigned port number."); + } + priv->port = ntohs(assigned.sin_port); + } else { + priv->port = port; + } + return 1; +} + /** * 1. initializes other side's netdrv. * 2. Establishes communication session. @@ -118,8 +191,8 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { // Got a socket break; } else if (ret_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { - lf_print_error_and_exit("Failed to accept the socket. %s. ret_priv->socket_descriptor = %d", - strerror(errno), ret_priv->socket_descriptor); + lf_print_error_and_exit("Failed to accept the socket. %s. ret_priv->socket_descriptor = %d", strerror(errno), + ret_priv->socket_descriptor); } else { // Try again lf_print_warning("Failed to accept the socket. %s. Trying again.", strerror(errno)); @@ -266,7 +339,7 @@ typedef enum { FINISH_READ } read_state_t; -static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* bytes_to_read, int* state) { +static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int* state) { switch (buffer[0]) { case MSG_TYPE_REJECT: // 1 +1 *bytes_to_read = 1; @@ -397,12 +470,12 @@ static void handle_header_read(netdrv_t* netdrv, unsigned char* buffer, size_t* // TODO: DONGHA: ADD buffer_length checking. // Returns the total bytes read. -ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) { - socket_priv_t* priv = (socket_priv_t*)netdrv->priv; +ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; size_t bytes_to_read; // The bytes to read in future. ssize_t bytes_read = 0; // The bytes that was read by a single read() function. - size_t total_bytes_read = 0; // The total bytes that have been read, and will be the return of the read_from netdrv. + size_t total_bytes_read = 0; // The total bytes that have been read, and will be the return of the read_from drv. int retry_count; int state; // Check if socket_descriptor is open. @@ -414,8 +487,8 @@ ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_ // First, check if there are remaining bytes. // If there are remaining bytes, it reads as long as it can (buffer_length). // Then it becomes KEEP_READING state. - if (netdrv->read_remaining_bytes > 0) { - bytes_to_read = (netdrv->read_remaining_bytes > buffer_length) ? buffer_length : netdrv->read_remaining_bytes; + if (drv->read_remaining_bytes > 0) { + bytes_to_read = (drv->read_remaining_bytes > buffer_length) ? buffer_length : drv->read_remaining_bytes; state = KEEP_READING; } else { // If there are no left bytes to read, it reads the header byte. @@ -447,7 +520,7 @@ ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_ switch (state) { case HEADER_READ: - handle_header_read(netdrv, buffer, &bytes_to_read, &state); + handle_header_read(buffer, &bytes_to_read, &state); break; case READ_MSG_TYPE_FED_IDS:; @@ -465,14 +538,14 @@ ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_ size_t length = (size_t)extract_uint32(buffer + 1 + sizeof(uint16_t) + sizeof(uint16_t)); if (length > buffer_length - total_bytes_read) { bytes_to_read = buffer_length - total_bytes_read; - netdrv->read_remaining_bytes = length - bytes_to_read; + drv->read_remaining_bytes = length - bytes_to_read; } else { bytes_to_read = length; } state = FINISH_READ; break; case KEEP_READING: - netdrv->read_remaining_bytes -= total_bytes_read; + drv->read_remaining_bytes -= total_bytes_read; return total_bytes_read; case FINISH_READ: return total_bytes_read; diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index 47aea66ed..3119f752e 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -17,9 +17,8 @@ #include "net_common.h" #include "net_util.h" #include "netdriver.h" -// #include "socket_common.h" -socket_priv_t* socket_priv_init() { +socket_priv_t* TCP_socket_priv_init() { socket_priv_t* priv = malloc(sizeof(socket_priv_t)); if (!priv) { lf_print_error_and_exit("Falied to malloc socket_priv_t."); @@ -32,6 +31,18 @@ socket_priv_t* socket_priv_init() { return priv; } +void TCP_socket_open(socket_priv_t* priv) { + priv->socket_descriptor = create_real_time_tcp_socket_errexit(); +} + +void TCP_socket_close(socket_priv_t* priv) { + if (priv->socket_descriptor > 0) { + shutdown(priv->socket_descriptor, SHUT_RDWR); + close(priv->socket_descriptor); + priv->socket_descriptor = -1; + } +} + /** * @brief Create an IPv4 TCP socket with Nagle's algorithm disabled * (TCP_NODELAY) and Delayed ACKs disabled (TCP_QUICKACK). Exits application @@ -76,70 +87,6 @@ int create_real_time_tcp_socket_errexit() { return sock; } -// This only creates TCP servers not UDP. -int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { - socket_priv_t* priv = (socket_priv_t*)drv->priv; - // Federate always has a specified port. The RTI can get a specified port by user input. - uint16_t specified_port = port; - if (specified_port == 0 && server_type == RTI) { - port = DEFAULT_PORT; - } - - // Create an IPv4 socket for TCP (not UDP) communication over IP (0). - priv->socket_descriptor = create_real_time_tcp_socket_errexit(); - - // Server file descriptor. - struct sockaddr_in server_fd; - // Zero out the server address structure. - bzero((char*)&server_fd, sizeof(server_fd)); - - server_fd.sin_family = AF_INET; // IPv4 - server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. - // Convert the port number from host byte order to network byte order. - server_fd.sin_port = htons(port); - - int result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); - // Try repeatedly to bind to a port. - int count = 1; - - while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { - if (specified_port == 0) { - lf_print_warning("Failed to get port %d.", port); - port++; - if (port >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) - port = DEFAULT_PORT; - lf_print_warning("Try again with port %d.", port); - server_fd.sin_port = htons(port); - // Do not sleep. - } else { - lf_print("RTI failed to get port %d. Will try again.", port); - lf_sleep(PORT_BIND_RETRY_INTERVAL); - } - result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); - } - if (result != 0) { - lf_print_error_and_exit("Failed to bind the socket. Port %d is not available. ", port); - } - // Enable listening for socket connections. - // The second argument is the maximum number of queued socket requests, - // which according to the Mac man page is limited to 128. - listen(priv->socket_descriptor, 128); - - // Set the port into priv->port. - if (specified_port == 0 && server_type == FED) { - // Need to retrieve the port number assigned by the OS. - struct sockaddr_in assigned; - socklen_t addr_len = sizeof(assigned); - if (getsockname(priv->socket_descriptor, (struct sockaddr*)&assigned, &addr_len) < 0) { - lf_print_error_and_exit("Failed to retrieve assigned port number."); - } - priv->port = ntohs(assigned.sin_port); - } else { - priv->port = port; - } - return 1; -} - // Returns clock sync UDP socket. int create_clock_sync_server(uint16_t* clock_sync_port) { // Create UDP socket. diff --git a/include/core/federated/network/socket_common.h b/include/core/federated/network/socket_common.h index 50e66507a..267e4942a 100644 --- a/include/core/federated/network/socket_common.h +++ b/include/core/federated/network/socket_common.h @@ -73,7 +73,10 @@ typedef struct socket_priv_t { struct sockaddr_in UDP_addr; // The UDP address for the federate. } socket_priv_t; -socket_priv_t* socket_priv_init(); +socket_priv_t* TCP_socket_priv_init(); +void TCP_socket_close(socket_priv_t* priv); +void TCP_socket_open(socket_priv_t* priv); + int create_real_time_tcp_socket_errexit(); From adbc4f6e792f815c1e660306e0d635045180cddf Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 29 Mar 2024 14:45:52 -0700 Subject: [PATCH 127/262] Revert commented out parts --- core/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index c61decbb7..1abd0bd84 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -74,12 +74,12 @@ if (DEFINED LF_TRACE) endif() # Add sources for either threaded or single-threaded runtime -# if (DEFINED FEDERATED) -# include(${LF_ROOT}/core/federated/CMakeLists.txt) +if (DEFINED FEDERATED) + include(${LF_ROOT}/core/federated/CMakeLists.txt) # include(${LF_ROOT}/core/federated/network/CMakeLists.txt) # include(${LF_ROOT}/include/core/federated/network/CMakeLists.txt) # target_link_libraries(reactor-c PUBLIC lf::network-api) -# endif() +endif() include(${LF_ROOT}/version/api/CMakeLists.txt) target_link_libraries(reactor-c PUBLIC lf::version-api) From 0f4706b90835dbdd5df3ac10d8b382a013ab2bb8 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 29 Mar 2024 16:43:13 -0700 Subject: [PATCH 128/262] Make sst build work --- core/federated/network/CMakeLists.txt | 4 ++- core/federated/network/lf_sst_support.c | 34 ++++++++++++++----- core/federated/network/socket_common.c | 2 +- include/core/federated/network/netdriver.h | 6 +++- .../core/federated/network/socket_common.h | 6 ---- .../federated/network/type/lf_sst_support.h | 3 +- 6 files changed, 37 insertions(+), 18 deletions(-) diff --git a/core/federated/network/CMakeLists.txt b/core/federated/network/CMakeLists.txt index 908818a4f..a7b528967 100644 --- a/core/federated/network/CMakeLists.txt +++ b/core/federated/network/CMakeLists.txt @@ -18,12 +18,14 @@ endif() target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/net_util.c + ${CMAKE_CURRENT_LIST_DIR}/socket_common.c ) IF(COMM_TYPE MATCHES TCP) - target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lf_socket_support.c ${CMAKE_CURRENT_LIST_DIR}/socket_common.c) + target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lf_socket_support.c) ELSEIF(COMM_TYPE MATCHES MQTT) target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lf_mqtt_support.c) ELSEIF(COMM_TYPE MATCHES SST) + target_link_libraries(lf-network-impl PUBLIC SSTLIB) target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lf_sst_support.c) ENDIF() diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 5cc1ee497..d25a60d34 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -1,7 +1,6 @@ - - #include "util.h" #include "net_common.h" +#include "net_util.h" #include "netdriver.h" static sst_priv_t* sst_priv_init() { @@ -10,24 +9,41 @@ static sst_priv_t* sst_priv_init() { lf_print_error_and_exit("Falied to malloc sst_priv_t."); } memset(priv, 0, sizeof(sst_priv_t)); - priv->socket_priv = socket_priv_init(); + priv->socket_priv = TCP_socket_priv_init(); return priv; } +static void sst_open(netdrv_t* drv) { sst_priv_t* priv = (sst_priv_t*)drv->priv; } +static void sst_close(netdrv_t* drv) { + sst_priv_t* priv = (sst_priv_t*)drv->priv; + if (priv->socket_priv != NULL) { + TCP_socket_close(priv->socket_priv); + } else { + lf_print_error("Trying to close TCP socket not existing."); + } +} + +void netdrv_free(netdrv_t* drv) { + sst_priv_t* priv = (sst_priv_t*)drv->priv; + // free(priv); // Already freed on socket close() + free_SST_ctx_t(priv->sst_ctx); + free(drv); +} + netdrv_t* netdrv_init() { netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { lf_print_error_and_exit("Falied to malloc netdrv_t."); } memset(drv, 0, sizeof(netdrv_t)); - drv->open = socket_open; - drv->close = socket_close; + drv->open = sst_open; + drv->close = sst_close; // drv->read = socket_read; // drv->write = socket_write; drv->read_remaining_bytes = 0; // Initialize priv. - socket_priv_t* priv = sst_priv_init(); + sst_priv_t* priv = sst_priv_init(); // Set drv->priv pointer to point the malloc'd priv. drv->priv = (void*)priv; @@ -35,7 +51,9 @@ netdrv_t* netdrv_init() { } // Port will be NULL on MQTT. -int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) {} +int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { + sst_priv_t* priv = (sst_priv_t*)drv->priv; +} // Returns socket number of clock_sync_server. int create_clock_sync_server(uint16_t* clock_sync_port) {} @@ -49,7 +67,7 @@ int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...) {} -ssize_t read_from_netdrv(netdrv_t* netdrv, unsigned char* buffer, size_t buffer_length) {} +ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) {} ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) {} diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index 3119f752e..e8f2a25bc 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -16,7 +16,7 @@ #include "util.h" #include "net_common.h" #include "net_util.h" -#include "netdriver.h" +#include "socket_common.h" socket_priv_t* TCP_socket_priv_init() { socket_priv_t* priv = malloc(sizeof(socket_priv_t)); diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index 9c5e6e991..ca0916b45 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -8,8 +8,12 @@ #include "socket_common.h" -#if defined(COMM_TYPE_MQTT) +#if defined(COMM_TYPE_TCP) +#include "type/lf_socket_support.h" +#elif defined(COMM_TYPE_MQTT) #include "type/lf_mqtt_support.h" +#elif defined(COMM_TYPE_SST) +#include "type/lf_sst_support.h" #endif typedef enum netdrv_type_t { NETDRV, UDP } netdrv_type_t; diff --git a/include/core/federated/network/socket_common.h b/include/core/federated/network/socket_common.h index 267e4942a..6811f9092 100644 --- a/include/core/federated/network/socket_common.h +++ b/include/core/federated/network/socket_common.h @@ -4,12 +4,6 @@ #include // IPPROTO_TCP, IPPROTO_UDP #include // TCP_NODELAY -#if defined(COMM_TYPE_TCP) -#include "type/lf_socket_support.h" -#elif defined(COMM_TYPE_SST) -#include "type/lf_sst_support.h" -#endif - #include "tag.h" /** diff --git a/include/core/federated/network/type/lf_sst_support.h b/include/core/federated/network/type/lf_sst_support.h index ea50601f3..c857883b9 100644 --- a/include/core/federated/network/type/lf_sst_support.h +++ b/include/core/federated/network/type/lf_sst_support.h @@ -1,7 +1,8 @@ #ifndef LF_SST_SUPPORT_H #define LF_SST_SUPPORT_H -#include "c_api.h" +#include "socket_common.h" +#include "sst-c-api/c_api.h" typedef struct sst_priv_t { socket_priv_t* socket_priv; // Must be first variable. SST_ctx_t* sst_ctx; From 193c0964aaebc19697047bcd1181d9135071c326 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 29 Mar 2024 18:42:22 -0700 Subject: [PATCH 129/262] Remove server_type_t temporarily for compile... --- core/federated/RTI/main.c | 2 +- core/federated/RTI/rti_remote.c | 2 +- core/federated/federate.c | 8 +-- core/federated/network/lf_mqtt_support.c | 2 +- core/federated/network/lf_socket_support.c | 64 ++----------------- core/federated/network/socket_common.c | 63 ++++++++++++++++++ include/core/federated/network/netdriver.h | 5 +- .../core/federated/network/socket_common.h | 4 +- 8 files changed, 80 insertions(+), 70 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index 8814ec4ba..6f402a44a 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -124,7 +124,7 @@ void usage(int argc, const char* argv[]) { lf_print(" The number of federates in the federation that this RTI will control.\n"); lf_print(" -p, --port "); lf_print(" The port number to use for the RTI. Must be larger than 0 and smaller than %d. Default is %d.\n", - UINT16_MAX, DEFAULT_PORT); + UINT16_MAX, RTI_DEFAULT_PORT); lf_print(" -c, --clock_sync [off|init|on] [period ] [exchanges-per-interval ]"); lf_print(" The status of clock synchronization for this federate."); lf_print(" - off: Clock synchronization is off."); diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 53bf6caf6..0bb7c570e 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1448,7 +1448,7 @@ void initialize_federate(federate_info_t* fed, uint16_t id) { int32_t start_rti_server(uint16_t port) { _lf_initialize_clock(); // Create the RTI's netdriver. - int ret = create_server(rti_remote->rti_netdrv, RTI, port); + int ret = create_server(rti_remote->rti_netdrv, 0, port); // 0 for RTI lf_print("RTI: Listening for federates."); // Create the clocksync's netdriver. if (rti_remote->clock_sync_global_status >= clock_sync_on) { diff --git a/core/federated/federate.c b/core/federated/federate.c index b725573dc..f011fffcf 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1780,14 +1780,14 @@ void lf_connect_to_rti(const char* hostname, int port) { if (port < 0 || port > INT16_MAX) { lf_print_error("lf_connect_to_rti(): Specified port (%d) is out of range," " using the default port %d instead.", - port, DEFAULT_PORT); - uport = DEFAULT_PORT; + port, RTI_DEFAULT_PORT); + uport = RTI_DEFAULT_PORT; port = 0; // Mark so that increments occur between tries. } else { uport = (uint16_t)port; } if (uport == 0) { - uport = DEFAULT_PORT; + uport = RTI_DEFAULT_PORT; } // Initialize netdriver to rti. @@ -1922,7 +1922,7 @@ void lf_create_server(int specified_port) { LF_PRINT_LOG("Creating a socket server on port %d.", port); netdrv_t* my_netdrv = netdrv_init(); - create_server(my_netdrv, FED, specified_port); + create_server(my_netdrv, 1, specified_port); // 1 for FED // my_netdrv->open(my_netdrv); // create_federate_server(my_netdrv, port, specified_port); diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index e99664b96..9576a39ed 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -38,7 +38,7 @@ void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) {} * @param port The port is NULL here. * @return int */ -int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) {} +int create_server(netdrv_t* drv, int server_type, uint16_t port) {} /** * @brief diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index c3672838e..6fda7f914 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -89,6 +89,8 @@ void set_port(netdrv_t* drv, int port) { socket_priv_t* priv = (socket_priv_t*)drv->priv; priv->server_port = port; } + +// Unused. void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { socket_priv_t* priv = (socket_priv_t*)drv->priv; priv->server_ip_addr = ip_addr; @@ -109,67 +111,9 @@ void netdrv_free(netdrv_t* drv) { } // This only creates TCP servers not UDP. -int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { +int create_server(netdrv_t* drv, int server_type, uint16_t port) { socket_priv_t* priv = (socket_priv_t*)drv->priv; - // Federate always has a specified port. The RTI can get a specified port by user input. - uint16_t specified_port = port; - if (specified_port == 0 && server_type == RTI) { - port = DEFAULT_PORT; - } - - // Create an IPv4 socket for TCP (not UDP) communication over IP (0). - priv->socket_descriptor = create_real_time_tcp_socket_errexit(); - - // Server file descriptor. - struct sockaddr_in server_fd; - // Zero out the server address structure. - bzero((char*)&server_fd, sizeof(server_fd)); - - server_fd.sin_family = AF_INET; // IPv4 - server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. - // Convert the port number from host byte order to network byte order. - server_fd.sin_port = htons(port); - - int result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); - // Try repeatedly to bind to a port. - int count = 1; - - while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { - if (specified_port == 0) { - lf_print_warning("Failed to get port %d.", port); - port++; - if (port >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) - port = DEFAULT_PORT; - lf_print_warning("Try again with port %d.", port); - server_fd.sin_port = htons(port); - // Do not sleep. - } else { - lf_print("RTI failed to get port %d. Will try again.", port); - lf_sleep(PORT_BIND_RETRY_INTERVAL); - } - result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); - } - if (result != 0) { - lf_print_error_and_exit("Failed to bind the socket. Port %d is not available. ", port); - } - // Enable listening for socket connections. - // The second argument is the maximum number of queued socket requests, - // which according to the Mac man page is limited to 128. - listen(priv->socket_descriptor, 128); - - // Set the port into priv->port. - if (specified_port == 0 && server_type == FED) { - // Need to retrieve the port number assigned by the OS. - struct sockaddr_in assigned; - socklen_t addr_len = sizeof(assigned); - if (getsockname(priv->socket_descriptor, (struct sockaddr*)&assigned, &addr_len) < 0) { - lf_print_error_and_exit("Failed to retrieve assigned port number."); - } - priv->port = ntohs(assigned.sin_port); - } else { - priv->port = port; - } - return 1; + return create_TCP_server(priv, server_type, port); } /** diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index e8f2a25bc..93c25d946 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -87,6 +87,69 @@ int create_real_time_tcp_socket_errexit() { return sock; } +int create_TCP_server(socket_priv_t* priv, int server_type, uint16_t port) { + // Federate always has a specified port. The RTI can get a specified port by user input. + uint16_t specified_port = port; + if (specified_port == 0 && server_type == 0) { // 0 for RTI + port = RTI_DEFAULT_PORT; + } + + // Create an IPv4 socket for TCP (not UDP) communication over IP (0). + priv->socket_descriptor = create_real_time_tcp_socket_errexit(); + + // Server file descriptor. + struct sockaddr_in server_fd; + // Zero out the server address structure. + bzero((char*)&server_fd, sizeof(server_fd)); + + server_fd.sin_family = AF_INET; // IPv4 + server_fd.sin_addr.s_addr = INADDR_ANY; // All interfaces, 0.0.0.0. + // Convert the port number from host byte order to network byte order. + server_fd.sin_port = htons(port); + + int result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); + // Try repeatedly to bind to a port. + int count = 1; + + while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { + if (specified_port == 0) { + lf_print_warning("Failed to get port %d.", port); + port++; + if (port >= RTI_DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) + port = RTI_DEFAULT_PORT; + lf_print_warning("Try again with port %d.", port); + server_fd.sin_port = htons(port); + // Do not sleep. + } else { + lf_print("RTI failed to get port %d. Will try again.", port); + lf_sleep(PORT_BIND_RETRY_INTERVAL); + } + result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); + } + if (result != 0) { + lf_print_error_and_exit("Failed to bind the socket. Port %d is not available. ", port); + } + // Enable listening for socket connections. + // The second argument is the maximum number of queued socket requests, + // which according to the Mac man page is limited to 128. + listen(priv->socket_descriptor, 128); + + // Set the port into priv->port. + if (specified_port == 0 && server_type == 1) { // 1 for FED + // Need to retrieve the port number assigned by the OS. + struct sockaddr_in assigned; + socklen_t addr_len = sizeof(assigned); + if (getsockname(priv->socket_descriptor, (struct sockaddr*)&assigned, &addr_len) < 0) { + lf_print_error_and_exit("Failed to retrieve assigned port number."); + } + priv->port = ntohs(assigned.sin_port); + } else { + priv->port = port; + } + return 1; +} + + // Returns clock sync UDP socket. int create_clock_sync_server(uint16_t* clock_sync_port) { // Create UDP socket. diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index ca0916b45..220cedb53 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -18,7 +18,8 @@ typedef enum netdrv_type_t { NETDRV, UDP } netdrv_type_t; -typedef enum server_type_t { RTI, FED } server_type_t; +// Just doing 0 for RTI, 1 for FED +// typedef enum server_type_t { RTI, FED } server_type_t; typedef struct netdrv_t { void (*open)(struct netdrv_t* drv); @@ -37,7 +38,7 @@ int netdrv_write(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); netdrv_t* netdrv_init(); // Port will be NULL on MQTT. -int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port); +int create_server(netdrv_t* drv, int server_type, uint16_t port); // Returns socket number of clock_sync_server. int create_clock_sync_server(uint16_t* clock_sync_port); diff --git a/include/core/federated/network/socket_common.h b/include/core/federated/network/socket_common.h index 6811f9092..30d5085fe 100644 --- a/include/core/federated/network/socket_common.h +++ b/include/core/federated/network/socket_common.h @@ -45,7 +45,7 @@ * for the RTI or on the command line, when the RTI starts up, it will attempt * to open a socket server on this port. */ -#define DEFAULT_PORT 15045u +#define RTI_DEFAULT_PORT 15045u #define RTI_DEFAULT_UDP_PORT 15061u @@ -73,5 +73,7 @@ void TCP_socket_open(socket_priv_t* priv); int create_real_time_tcp_socket_errexit(); +// TODO: Check if it's fine to just use int. It's just an enum. Can't use server_type_t because not including netdriver.h +int create_TCP_server(socket_priv_t* priv, int server_type, uint16_t port); #endif /* SOCKET_COMMON_H */ \ No newline at end of file From aae595be28b9cd44a0d0364ae114c3fb2de4b147 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 29 Mar 2024 18:43:01 -0700 Subject: [PATCH 130/262] Add create_server and establish_communication_session for SST --- core/federated/RTI/c_client.config | 10 ++++ core/federated/network/lf_sst_support.c | 79 +++++++++++++++++++------ 2 files changed, 70 insertions(+), 19 deletions(-) create mode 100644 core/federated/RTI/c_client.config diff --git a/core/federated/RTI/c_client.config b/core/federated/RTI/c_client.config new file mode 100644 index 000000000..6d2112ce6 --- /dev/null +++ b/core/federated/RTI/c_client.config @@ -0,0 +1,10 @@ +entityInfo.name=net1.rti +entityInfo.purpose={"group":"Servers"} +entityInfo.number_key=1 +authInfo.pubkey.path=../../../../../../../../../../../../iotauth/entity/auth_certs/Auth101EntityCert.pem +entityInfo.privkey.path=../../../../../../../../../../../../iotauth/entity/credentials/keys/net1/Net1.RTIKey.pem +auth.ip.address=127.0.0.1 +auth.port.number=21900 +entity.server.ip.address=127.0.0.1 +entity.server.port.number=21100 +network.protocol=TCP \ No newline at end of file diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index d25a60d34..ce87ea96a 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -4,29 +4,29 @@ #include "netdriver.h" static sst_priv_t* sst_priv_init() { - sst_priv_t* priv = malloc(sizeof(sst_priv_t)); - if (!priv) { + sst_priv_t* sst_priv = malloc(sizeof(sst_priv_t)); + if (!sst_priv) { lf_print_error_and_exit("Falied to malloc sst_priv_t."); } - memset(priv, 0, sizeof(sst_priv_t)); - priv->socket_priv = TCP_socket_priv_init(); - return priv; + memset(sst_priv, 0, sizeof(sst_priv_t)); + sst_priv->socket_priv = TCP_socket_priv_init(); + return sst_priv; } -static void sst_open(netdrv_t* drv) { sst_priv_t* priv = (sst_priv_t*)drv->priv; } +static void sst_open(netdrv_t* drv) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; } static void sst_close(netdrv_t* drv) { - sst_priv_t* priv = (sst_priv_t*)drv->priv; - if (priv->socket_priv != NULL) { - TCP_socket_close(priv->socket_priv); + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + if (sst_priv->socket_priv != NULL) { + TCP_socket_close(sst_priv->socket_priv); } else { lf_print_error("Trying to close TCP socket not existing."); } } void netdrv_free(netdrv_t* drv) { - sst_priv_t* priv = (sst_priv_t*)drv->priv; + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; // free(priv); // Already freed on socket close() - free_SST_ctx_t(priv->sst_ctx); + free_SST_ctx_t(sst_priv->sst_ctx); free(drv); } @@ -43,22 +43,63 @@ netdrv_t* netdrv_init() { drv->read_remaining_bytes = 0; // Initialize priv. - sst_priv_t* priv = sst_priv_init(); + sst_priv_t* sst_priv = sst_priv_init(); // Set drv->priv pointer to point the malloc'd priv. - drv->priv = (void*)priv; + drv->priv = (void*)sst_priv; return drv; } -// Port will be NULL on MQTT. -int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { - sst_priv_t* priv = (sst_priv_t*)drv->priv; +char* get_host_name(netdrv_t* drv) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + return sst_priv->socket_priv->server_hostname; +} +int32_t get_my_port(netdrv_t* drv) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + return sst_priv->socket_priv->port; +} +int32_t get_port(netdrv_t* drv) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + return (sst_priv->socket_priv == NULL) ? -1 : sst_priv->socket_priv->server_port; +} +// +struct in_addr* get_ip_addr(netdrv_t* drv) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + return &sst_priv->socket_priv->server_ip_addr; +} +void set_host_name(netdrv_t* drv, const char* hostname) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + memcpy(sst_priv->socket_priv->server_hostname, hostname, INET_ADDRSTRLEN); +} +void set_port(netdrv_t* drv, int port) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + sst_priv->socket_priv->server_port = port; } -// Returns socket number of clock_sync_server. -int create_clock_sync_server(uint16_t* clock_sync_port) {} +// Unused. +void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + sst_priv->socket_priv->server_ip_addr = ip_addr; +} -netdrv_t* establish_communication_session(netdrv_t* netdrv) {} +// Port will be NULL on MQTT. +int create_server(netdrv_t* drv, int server_type, uint16_t port) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + SST_ctx_t* ctx = init_SST( + "/home/dongha/project/lingua-franca/core/src/main/resources/lib/c/reactor-c/core/federated/RTI/c_client.config"); + sst_priv->sst_ctx = ctx; + return create_TCP_server(sst_priv->socket_priv, server_type, port); +} + +netdrv_t* establish_communication_session(netdrv_t* netdrv) { + netdrv_t* ret_netdrv = netdrv_init(); + sst_priv_t* my_priv = (sst_priv_t*)my_netdrv->priv; + sst_priv_t* ret_priv = (sst_priv_t*)ret_netdrv->priv; + session_key_list_t *s_key_list = init_empty_session_key_list(); + SST_session_ctx_t* session_ctx = server_secure_comm_setup(my_priv->sst_ctx, my_priv->socket_priv.socket_descriptor, s_key_list); + free_session_key_list_t(s_key_list); + ret_priv->session_ctx = session_ctx; +} int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) {} From a628dcb231fa04a90d9f3a97dedbff9763e57f9a Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 29 Mar 2024 18:43:12 -0700 Subject: [PATCH 131/262] Remove gitmodules and sst-c-api --- .gitmodules | 3 --- third_party/sst-c-api | 1 - 2 files changed, 4 deletions(-) delete mode 100644 .gitmodules delete mode 160000 third_party/sst-c-api diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 993b21d4c..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "third_party/sst-c-api"] - path = third_party/sst-c-api - url = https://github.com/iotauth/sst-c-api.git diff --git a/third_party/sst-c-api b/third_party/sst-c-api deleted file mode 160000 index 47bb3aced..000000000 --- a/third_party/sst-c-api +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 47bb3aced2de6ebd56cf5982bca855e72dfb74ad From be7c1d182d3870a0b467834415a5ca0716b1f2f8 Mon Sep 17 00:00:00 2001 From: Chanhee Lee Date: Fri, 29 Mar 2024 20:43:31 -0700 Subject: [PATCH 132/262] Fix errors during lfc-dev build --- core/CMakeLists.txt | 14 ++++++-------- core/federated/clock-sync.c | 2 +- core/federated/federate.c | 4 ++-- core/federated/network/net_util.c | 2 ++ include/core/federated/clock-sync.h | 1 + 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 1abd0bd84..d0db3b83d 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -25,6 +25,12 @@ endif() # Add the general sources to the list of REACTORC_SOURCES list(APPEND REACTORC_SOURCES ${GENERAL_SOURCES}) +# Add sources for either threaded or single-threaded runtime +if (DEFINED FEDERATED) + include(federated/CMakeLists.txt) + # include(federated/network/CMakeLists.txt) +endif() + # Add sources for either threaded or single-threaded runtime if(DEFINED LF_SINGLE_THREADED) message(STATUS "Including sources for single-threaded runtime.") @@ -73,14 +79,6 @@ if (DEFINED LF_TRACE) target_link_libraries(reactor-c PRIVATE "${LF_TRACE_PLUGIN}") endif() -# Add sources for either threaded or single-threaded runtime -if (DEFINED FEDERATED) - include(${LF_ROOT}/core/federated/CMakeLists.txt) -# include(${LF_ROOT}/core/federated/network/CMakeLists.txt) -# include(${LF_ROOT}/include/core/federated/network/CMakeLists.txt) -# target_link_libraries(reactor-c PUBLIC lf::network-api) -endif() - include(${LF_ROOT}/version/api/CMakeLists.txt) target_link_libraries(reactor-c PUBLIC lf::version-api) diff --git a/core/federated/clock-sync.c b/core/federated/clock-sync.c index 2d82ecdbb..0ebfbf389 100644 --- a/core/federated/clock-sync.c +++ b/core/federated/clock-sync.c @@ -45,7 +45,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "util.h" // TODO: Temp include. -#include "lf_socket_support.h" +// #include "lf_socket_support.h" /** Offset calculated by the clock synchronization algorithm. */ interval_t _lf_clock_sync_offset = NSEC(0); diff --git a/core/federated/federate.c b/core/federated/federate.c index b725573dc..ce820839d 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1811,8 +1811,8 @@ void lf_connect_to_rti(const char* hostname, int port) { set_host_name(_fed.netdrv_to_rti, hostname); if (port == 0) { uport++; - if (uport >= RTI_DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) - uport = RTI_DEFAULT_PORT; + if (uport >= DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) + uport = DEFAULT_PORT; } set_port(_fed.netdrv_to_rti, uport); lf_sleep(CONNECT_RETRY_INTERVAL); diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index 662a5c955..939b26925 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -52,6 +52,8 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define NUMBER_OF_FEDERATES 1 #endif +lf_mutex_t netdrv_mutex; + #endif // FEDERATED // Below are more generally useful functions. diff --git a/include/core/federated/clock-sync.h b/include/core/federated/clock-sync.h index 95979671f..446b299cb 100644 --- a/include/core/federated/clock-sync.h +++ b/include/core/federated/clock-sync.h @@ -35,6 +35,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "low_level_platform.h" #include "net_util.h" +#include "netdriver.h" /** * Number of required clock sync T4 messages per synchronization From 39256a37716856f338f8df5407a3996ed374d7bc Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 31 Mar 2024 16:32:09 -0700 Subject: [PATCH 133/262] Minor fix on sst support.c --- core/federated/network/lf_sst_support.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index ce87ea96a..249d5bd37 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -91,12 +91,12 @@ int create_server(netdrv_t* drv, int server_type, uint16_t port) { return create_TCP_server(sst_priv->socket_priv, server_type, port); } -netdrv_t* establish_communication_session(netdrv_t* netdrv) { +netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { netdrv_t* ret_netdrv = netdrv_init(); sst_priv_t* my_priv = (sst_priv_t*)my_netdrv->priv; sst_priv_t* ret_priv = (sst_priv_t*)ret_netdrv->priv; session_key_list_t *s_key_list = init_empty_session_key_list(); - SST_session_ctx_t* session_ctx = server_secure_comm_setup(my_priv->sst_ctx, my_priv->socket_priv.socket_descriptor, s_key_list); + SST_session_ctx_t* session_ctx = server_secure_comm_setup(my_priv->sst_ctx, my_priv->socket_priv->socket_descriptor, s_key_list); free_session_key_list_t(s_key_list); ret_priv->session_ctx = session_ctx; } From 5816734f272b51e1999bcec13bac91bdaa522320 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 31 Mar 2024 16:32:21 -0700 Subject: [PATCH 134/262] Remove comments --- core/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index d0db3b83d..c439c3463 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -98,7 +98,6 @@ include(${LF_ROOT}/platform/impl/CMakeLists.txt) target_link_libraries(reactor-c PUBLIC lf::platform-api) target_link_libraries(reactor-c PRIVATE lf::platform-impl) -message("reactor-c/core/CMakeLists.txt First") option(COMM_TYPE "Communication type between RTI and federate(s)." ON) IF(COMM_TYPE MATCHES ON) set(COMM_TYPE TCP) From 969357900ae6a304df97ba8dbfe46b40e52bbfb1 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 31 Mar 2024 17:23:33 -0700 Subject: [PATCH 135/262] Fix handle clock sync warnings and errors. --- core/federated/clock-sync.c | 27 +++++++++++++++------------ include/core/federated/clock-sync.h | 4 ++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/core/federated/clock-sync.c b/core/federated/clock-sync.c index 0ebfbf389..ab0d88670 100644 --- a/core/federated/clock-sync.c +++ b/core/federated/clock-sync.c @@ -44,8 +44,6 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "net_util.h" #include "util.h" -// TODO: Temp include. -// #include "lf_socket_support.h" /** Offset calculated by the clock synchronization algorithm. */ interval_t _lf_clock_sync_offset = NSEC(0); @@ -231,7 +229,7 @@ void synchronize_initial_physical_clock_with_rti(netdrv_t* netdrv_to_rti) { // Handle the message and send a reply T3 message. // NOTE: No need to acquire the mutex lock during initialization because only // one thread is running. - if (handle_T1_clock_sync_message(buffer, netdrv_to_rti, receive_time) != 0) { + if (handle_T1_clock_sync_message(buffer, netdrv_to_rti, NETDRV, receive_time) != 0) { lf_print_error_and_exit("Initial clock sync: Failed to send T3 reply to RTI."); } @@ -246,7 +244,7 @@ void synchronize_initial_physical_clock_with_rti(netdrv_t* netdrv_to_rti) { } // Handle the message. - handle_T4_clock_sync_message(buffer, netdrv_to_rti, receive_time); + handle_T4_clock_sync_message(buffer, netdrv_to_rti, NETDRV, receive_time); } LF_PRINT_LOG("Finished initial clock synchronization with the RTI."); @@ -263,7 +261,7 @@ void synchronize_initial_physical_clock_with_rti(netdrv_t* netdrv_to_rti) { * @param t2 The physical time at which the T1 message was received. * @return 0 if T3 reply is successfully sent, -1 otherwise. */ -int handle_T1_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, instant_t t2) { +int handle_T1_clock_sync_message(unsigned char* buffer, void* netdrv_or_sock, netdrv_type_t netdrv_type, instant_t t2) { // Extract the payload instant_t t1 = extract_int64(&(buffer[1])); @@ -283,7 +281,13 @@ int handle_T1_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, instan // Write the reply to the socket. LF_PRINT_DEBUG("Sending T3 message to RTI."); - if (write_to_netdrv(netdrv, 1 + sizeof(int), reply_buffer) <= 0) { + int ret; + if (netdrv_type == NETDRV) { + ret = write_to_netdrv((netdrv_t*)netdrv_or_sock, 1 + sizeof(int), reply_buffer); + } else if (netdrv_type == UDP) { + ret = write(*(int*)netdrv_or_sock, reply_buffer, 1 + sizeof(int)); + } + if (ret <= 0) { lf_print_error("Clock sync: Failed to send T3 message to RTI."); return -1; } @@ -313,7 +317,7 @@ int handle_T1_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, instan */ // TODO: DONGHA: Need to check here... -void handle_T4_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, instant_t r4) { +void handle_T4_clock_sync_message(unsigned char* buffer, void* netdrv_or_sock, netdrv_type_t netdrv_type, instant_t r4) { // Increment the number of received T4 messages _lf_rti_socket_stat.received_T4_messages_in_current_sync_window++; @@ -347,11 +351,10 @@ void handle_T4_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, insta // If the socket is _lf_rti_socket_UDP, then // after sending T4, the RTI sends a "coded probe" message, // which can be used to filter out noise. - int socket = 0; // Makeshift. - if (socket == _lf_rti_socket_UDP) { + if (netdrv_type == UDP) { // Read the coded probe message. // We can reuse the same buffer. - int bytes_read = read_from_netdrv(netdrv, buffer, 1 + sizeof(instant_t)); + int bytes_read = read(*(int*)netdrv_or_sock, buffer, 1 + sizeof(instant_t)); instant_t r5 = lf_time_physical(); @@ -506,7 +509,7 @@ void* listen_to_rti_UDP_thread(void* args) { break; } connected = true; - if (handle_T1_clock_sync_message(buffer, _lf_rti_socket_UDP, receive_time) != 0) { + if (handle_T1_clock_sync_message(buffer, &_lf_rti_socket_UDP, UDP, receive_time) != 0) { // Failed to send T3 reply. Wait for the next T1. waiting_for_T1 = true; continue; @@ -519,7 +522,7 @@ void* listen_to_rti_UDP_thread(void* args) { continue; } } else if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T4) { - handle_T4_clock_sync_message(buffer, _lf_rti_socket_UDP, receive_time); + handle_T4_clock_sync_message(buffer, &_lf_rti_socket_UDP, UDP, receive_time); waiting_for_T1 = true; } else { lf_print_warning("Clock sync: Received from RTI an unexpected UDP message type: %u. " diff --git a/include/core/federated/clock-sync.h b/include/core/federated/clock-sync.h index 446b299cb..ac5a2185c 100644 --- a/include/core/federated/clock-sync.h +++ b/include/core/federated/clock-sync.h @@ -166,7 +166,7 @@ void synchronize_initial_physical_clock_with_rti(netdrv_t* netdrv_to_rti); * @param t2 The physical time at which the T1 message was received. * @return 0 if T3 reply is successfully sent, -1 otherwise. */ -int handle_T1_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, instant_t t2); +int handle_T1_clock_sync_message(unsigned char* buffer, void* netdrv_or_sock, netdrv_type_t netdrv_type, instant_t t2); /** * Handle a clock synchronization message T4 coming from the RTI. @@ -184,7 +184,7 @@ int handle_T1_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, instan * @param socket The socket (either _lf_rti_socket_TCP or _lf_rti_socket_UDP). * @param r4 The physical time at which this T4 message was received. */ -void handle_T4_clock_sync_message(unsigned char* buffer, netdrv_t* netdrv, instant_t r4); +void handle_T4_clock_sync_message(unsigned char* buffer, void* netdrv_or_sock, netdrv_type_t netdrv_type, instant_t r4); /** * Thread that listens for UDP inputs from the RTI. From 025b53e8d3dc7909dd62fa31564c279e30fe4fca Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 31 Mar 2024 17:23:54 -0700 Subject: [PATCH 136/262] Apply formatting --- core/federated/clock-sync.c | 88 ++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/core/federated/clock-sync.c b/core/federated/clock-sync.c index ab0d88670..089c50371 100644 --- a/core/federated/clock-sync.c +++ b/core/federated/clock-sync.c @@ -44,7 +44,6 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "net_util.h" #include "util.h" - /** Offset calculated by the clock synchronization algorithm. */ interval_t _lf_clock_sync_offset = NSEC(0); /** Offset used to test clock synchronization (clock sync should largely remove this offset). */ @@ -317,7 +316,8 @@ int handle_T1_clock_sync_message(unsigned char* buffer, void* netdrv_or_sock, ne */ // TODO: DONGHA: Need to check here... -void handle_T4_clock_sync_message(unsigned char* buffer, void* netdrv_or_sock, netdrv_type_t netdrv_type, instant_t r4) { +void handle_T4_clock_sync_message(unsigned char* buffer, void* netdrv_or_sock, netdrv_type_t netdrv_type, + instant_t r4) { // Increment the number of received T4 messages _lf_rti_socket_stat.received_T4_messages_in_current_sync_window++; @@ -391,58 +391,58 @@ void handle_T4_clock_sync_message(unsigned char* buffer, void* netdrv_or_sock, n // the clock sync adjustment. adjustment = estimated_clock_error / _LF_CLOCK_SYNC_ATTENUATION; } else { - // Use of TCP socket means we are in the startup phase, so - // rather than adjust the clock offset, we simply set it to the - // estimated error. - adjustment = estimated_clock_error; -} + // Use of TCP socket means we are in the startup phase, so + // rather than adjust the clock offset, we simply set it to the + // estimated error. + adjustment = estimated_clock_error; + } #ifdef _LF_CLOCK_SYNC_COLLECT_STATS // Enabled by default -// Update RTI's socket stats -update_socket_stat(&_lf_rti_socket_stat, network_round_trip_delay, estimated_clock_error); + // Update RTI's socket stats + update_socket_stat(&_lf_rti_socket_stat, network_round_trip_delay, estimated_clock_error); #endif -// FIXME: Enable alternative regression mechanism here. -LF_PRINT_DEBUG("Clock sync: Adjusting clock offset running average by " PRINTF_TIME ".", - adjustment / _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL); -// Calculate the running average -_lf_rti_socket_stat.history += adjustment / _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL; + // FIXME: Enable alternative regression mechanism here. + LF_PRINT_DEBUG("Clock sync: Adjusting clock offset running average by " PRINTF_TIME ".", + adjustment / _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL); + // Calculate the running average + _lf_rti_socket_stat.history += adjustment / _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL; -if (_lf_rti_socket_stat.received_T4_messages_in_current_sync_window >= _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL) { + if (_lf_rti_socket_stat.received_T4_messages_in_current_sync_window >= _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL) { - lf_stat_ll stats = {0, 0, 0, 0}; + lf_stat_ll stats = {0, 0, 0, 0}; #ifdef _LF_CLOCK_SYNC_COLLECT_STATS // Enabled by default - stats = calculate_socket_stat(&_lf_rti_socket_stat); - // Issue a warning if standard deviation is high in data - if (stats.standard_deviation >= CLOCK_SYNC_GUARD_BAND) { + stats = calculate_socket_stat(&_lf_rti_socket_stat); + // Issue a warning if standard deviation is high in data + if (stats.standard_deviation >= CLOCK_SYNC_GUARD_BAND) { + // Reset the stats + LF_PRINT_LOG("Clock sync: Large standard deviation detected in network delays (" PRINTF_TIME + ") for the current period." + " Clock synchronization offset might not be accurate.", + stats.standard_deviation); + reset_socket_stat(&_lf_rti_socket_stat); + return; + } +#endif + // The number of received T4 messages has reached _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL + // which means we can now adjust the clock offset. + // For the AVG algorithm, history is a running average and can be directly + // applied + adjust_lf_clock_sync_offset(_lf_rti_socket_stat.history); + // @note AVG and SD will be zero if collect-stats is set to false + LF_PRINT_LOG("Clock sync:" + " New offset: " PRINTF_TIME "." + " Round trip delay to RTI (now): " PRINTF_TIME "." + " (AVG): " PRINTF_TIME "." + " (SD): " PRINTF_TIME "." + " Local round trip delay: " PRINTF_TIME ".", + _lf_clock_sync_offset, network_round_trip_delay, stats.average, stats.standard_deviation, + _lf_rti_socket_stat.local_delay); // Reset the stats - LF_PRINT_LOG("Clock sync: Large standard deviation detected in network delays (" PRINTF_TIME - ") for the current period." - " Clock synchronization offset might not be accurate.", - stats.standard_deviation); reset_socket_stat(&_lf_rti_socket_stat); - return; + // Set the last instant at which the clocks were synchronized + _lf_last_clock_sync_instant = r4; } -#endif - // The number of received T4 messages has reached _LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL - // which means we can now adjust the clock offset. - // For the AVG algorithm, history is a running average and can be directly - // applied - adjust_lf_clock_sync_offset(_lf_rti_socket_stat.history); - // @note AVG and SD will be zero if collect-stats is set to false - LF_PRINT_LOG("Clock sync:" - " New offset: " PRINTF_TIME "." - " Round trip delay to RTI (now): " PRINTF_TIME "." - " (AVG): " PRINTF_TIME "." - " (SD): " PRINTF_TIME "." - " Local round trip delay: " PRINTF_TIME ".", - _lf_clock_sync_offset, network_round_trip_delay, stats.average, stats.standard_deviation, - _lf_rti_socket_stat.local_delay); - // Reset the stats - reset_socket_stat(&_lf_rti_socket_stat); - // Set the last instant at which the clocks were synchronized - _lf_last_clock_sync_instant = r4; -} } /** From 771958b08e5986e8a9852031be13bc8352b6be75 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 31 Mar 2024 17:47:41 -0700 Subject: [PATCH 137/262] Re-link lov-level-platform-impl to lf-network-api --- include/core/federated/network/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/core/federated/network/CMakeLists.txt b/include/core/federated/network/CMakeLists.txt index 6501ba198..596ca3dea 100644 --- a/include/core/federated/network/CMakeLists.txt +++ b/include/core/federated/network/CMakeLists.txt @@ -5,5 +5,5 @@ target_include_directories(lf-network-api INTERFACE ${CMAKE_CURRENT_LIST_DIR}/.. target_compile_definitions(lf-network-api INTERFACE COMM_TYPE_${COMM_TYPE}) target_link_libraries(lf-network-api INTERFACE lf::tag-api) -# target_link_libraries(lf-network-api INTERFACE lf::low-level-platform-impl) +target_link_libraries(lf-network-api INTERFACE lf::low-level-platform-impl) target_link_libraries(lf-network-api INTERFACE lf::low-level-platform-api) From 194c9cc9f6a91d46394ad1027332e2c3313ee01f Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 31 Mar 2024 17:52:32 -0700 Subject: [PATCH 138/262] Add skeleton for netdrv_connect, peek_from_netdrv at lf_socket_support.c & mqtt support.c --- core/federated/network/lf_mqtt_support.c | 8 ++++++++ core/federated/network/lf_sst_support.c | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 9576a39ed..857f7ce44 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -52,6 +52,14 @@ int create_server(netdrv_t* drv, int server_type, uint16_t port) {} */ netdrv_t* establish_communication_session(netdrv_t* netdrv) {} +int netdrv_connect(netdrv_t* drv) {} + +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} + +void netdrv_free(netdrv_t* drv) {} + +int32_t get_my_port(netdrv_t* drv) {} + /** * @brief Publish message. * diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 249d5bd37..081ccae25 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -101,6 +101,10 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { ret_priv->session_ctx = session_ctx; } +int netdrv_connect(netdrv_t* drv) {} + +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} + int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) {} int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) {} From 41ecd1fad57cb44d2407796ed5e038f122173c9b Mon Sep 17 00:00:00 2001 From: Chanhee Lee Date: Sun, 31 Mar 2024 17:57:32 -0700 Subject: [PATCH 139/262] Enable comm-type target property --- core/CMakeLists.txt | 11 ++++++----- core/federated/network/lf_mqtt_support.c | 10 +++++++++- core/federated/network/lf_socket_support.c | 1 + 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index d0db3b83d..47351cb3c 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -98,11 +98,11 @@ include(${LF_ROOT}/platform/impl/CMakeLists.txt) target_link_libraries(reactor-c PUBLIC lf::platform-api) target_link_libraries(reactor-c PRIVATE lf::platform-impl) -message("reactor-c/core/CMakeLists.txt First") -option(COMM_TYPE "Communication type between RTI and federate(s)." ON) -IF(COMM_TYPE MATCHES ON) - set(COMM_TYPE TCP) -ENDIF() +# message("reactor-c/core/CMakeLists.txt First") +# option(COMM_TYPE "Communication type between RTI and federate(s)." ON) +# IF(COMM_TYPE MATCHES ON) +# set(COMM_TYPE TCP) +# ENDIF() include(${LF_ROOT}/include/core/federated/network/CMakeLists.txt) target_link_libraries(reactor-c PUBLIC lf::network-api) @@ -178,6 +178,7 @@ define(_LF_CLOCK_SYNC_INITIAL) define(_LF_CLOCK_SYNC_ON) define(_LF_CLOCK_SYNC_PERIOD_NS) define(ADVANCE_MESSAGE_INTERVAL) +define(COMM_TYPE) define(EXECUTABLE_PREAMBLE) define(FEDERATED_CENTRALIZED) define(FEDERATED_DECENTRALIZED) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 9576a39ed..e0b25bb93 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -17,6 +17,8 @@ netdrv_t* netdrv_init() { char* get_host_name(netdrv_t* drv) {} +int32_t get_my_port(netdrv_t* drv) {} + int32_t get_port(netdrv_t* drv) {} struct in_addr* get_ip_addr(netdrv_t* drv) {} @@ -27,6 +29,8 @@ void set_port(netdrv_t* drv, int port) {} void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) {} +void netdrv_free(netdrv_t* drv) {} + /** * @brief Create a server object * Initializes MQTT client, and connects to broker. @@ -52,6 +56,10 @@ int create_server(netdrv_t* drv, int server_type, uint16_t port) {} */ netdrv_t* establish_communication_session(netdrv_t* netdrv) {} +int netdrv_connect(netdrv_t* drv) {} + +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} + /** * @brief Publish message. * @@ -74,4 +82,4 @@ ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, si void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, char* format, ...) {} -int create_clock_sync_server(uint16_t* clock_sync_port) {} +// int create_clock_sync_server(uint16_t* clock_sync_port) {} diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 6fda7f914..ab3419945 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -45,6 +45,7 @@ void TCP_close(netdrv_t* drv) { } netdrv_t* netdrv_init() { + printf("\n\t[TCP PROTOCOL]\n\n"); netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { lf_print_error_and_exit("Falied to malloc netdrv_t."); From 43ee9dfc035b32c4ca7099531d941f9bfa4c0010 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 31 Mar 2024 18:50:48 -0700 Subject: [PATCH 140/262] Revert reactor-c/core/CMakelists. --- core/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 47351cb3c..6be392b01 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -99,10 +99,10 @@ target_link_libraries(reactor-c PUBLIC lf::platform-api) target_link_libraries(reactor-c PRIVATE lf::platform-impl) # message("reactor-c/core/CMakeLists.txt First") -# option(COMM_TYPE "Communication type between RTI and federate(s)." ON) -# IF(COMM_TYPE MATCHES ON) -# set(COMM_TYPE TCP) -# ENDIF() +option(COMM_TYPE "Communication type between RTI and federate(s)." ON) +IF(COMM_TYPE MATCHES ON) + set(COMM_TYPE TCP) +ENDIF() include(${LF_ROOT}/include/core/federated/network/CMakeLists.txt) target_link_libraries(reactor-c PUBLIC lf::network-api) From 1831e9335a09974136435449bfff534019dff3c6 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 31 Mar 2024 18:50:59 -0700 Subject: [PATCH 141/262] Fix handle tagged_messages --- core/federated/federate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index f011fffcf..28ac2baf3 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -529,7 +529,7 @@ static int handle_tagged_message(netdrv_t* netdrv, int fed_id, unsigned char* bu } // Check if the message is intended for this federate assert(_lf_my_fed_id == federate_id); - LF_PRINT_DEBUG("Receiving message to port %d of length %zu.", port_id, length); + LF_PRINT_DEBUG("Receiving message to port %d of length %zu of bytes_read %zu.", port_id, length, bytes_read); // Get the triggering action for the corresponding port lf_action_base_t* action = action_for_port(port_id); @@ -560,8 +560,8 @@ static int handle_tagged_message(netdrv_t* netdrv, int fed_id, unsigned char* bu // Read the payload. // Allocate memory for the message contents. unsigned char* message_contents = (unsigned char*)malloc(length); - memcpy(message_contents, buffer + header_length, bytes_read); - int buf_count = bytes_read; + memcpy(message_contents, buffer + header_length, bytes_read - header_length); + int buf_count = bytes_read - header_length; while (netdrv->read_remaining_bytes > 0) { ssize_t bytes_read_again = read_from_netdrv_close_on_error(netdrv, message_contents + buf_count, length - buf_count); From 873283088d738bd7f63589b002e8032b0e1fad04 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 31 Mar 2024 19:44:38 -0700 Subject: [PATCH 142/262] Remove unused header includes in main.c --- core/federated/RTI/main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index 6f402a44a..3c6285819 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -48,8 +48,6 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "rti_remote.h" -// #include "net_util.h" -// #include "socket_common.h" #include // To trap ctrl-c and invoke a clean stop to save the trace file, if needed. #include From 45e49925c74a1e13eab8ba25064f56398b6a260a Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 1 Apr 2024 23:36:02 -0700 Subject: [PATCH 143/262] Minor fix --- core/federated/federate.c | 2 +- include/core/federated/federate.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index 28ac2baf3..463016364 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -529,7 +529,7 @@ static int handle_tagged_message(netdrv_t* netdrv, int fed_id, unsigned char* bu } // Check if the message is intended for this federate assert(_lf_my_fed_id == federate_id); - LF_PRINT_DEBUG("Receiving message to port %d of length %zu of bytes_read %zu.", port_id, length, bytes_read); + LF_PRINT_DEBUG("Receiving message to port %d of length %zu.", port_id, length); // Get the triggering action for the corresponding port lf_action_base_t* action = action_for_port(port_id); diff --git a/include/core/federated/federate.h b/include/core/federated/federate.h index c1968598f..289f99ca8 100644 --- a/include/core/federated/federate.h +++ b/include/core/federated/federate.h @@ -19,7 +19,6 @@ #include "environment.h" #include "low_level_platform.h" -// TODO: Need to be fixed later. #include "netdriver.h" #ifndef ADVANCE_MESSAGE_INTERVAL From 1e5e5c039837d94021f4a306877fa2817d369825 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 2 Apr 2024 16:19:23 -0700 Subject: [PATCH 144/262] Add SST configs --- core/federated/RTI/RTI.config | 10 ++++++++++ core/federated/network/fed1.config | 10 ++++++++++ core/federated/network/fed2.config | 10 ++++++++++ 3 files changed, 30 insertions(+) create mode 100644 core/federated/RTI/RTI.config create mode 100644 core/federated/network/fed1.config create mode 100644 core/federated/network/fed2.config diff --git a/core/federated/RTI/RTI.config b/core/federated/RTI/RTI.config new file mode 100644 index 000000000..a42942957 --- /dev/null +++ b/core/federated/RTI/RTI.config @@ -0,0 +1,10 @@ +entityInfo.name=net1.rti +entityInfo.purpose={"group":"Servers"} +entityInfo.number_key=1 +authInfo.pubkey.path=/home/dongha/project/iotauth/entity/auth_certs/Auth101EntityCert.pem +entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.RTIKey.pem +auth.ip.address=127.0.0.1 +auth.port.number=21900 +entity.server.ip.address=127.0.0.1 +entity.server.port.number=21100 +network.protocol=TCP \ No newline at end of file diff --git a/core/federated/network/fed1.config b/core/federated/network/fed1.config new file mode 100644 index 000000000..c48aefbdd --- /dev/null +++ b/core/federated/network/fed1.config @@ -0,0 +1,10 @@ +entityInfo.name=net1.fed_1 +entityInfo.purpose={"group":"Servers"} +entityInfo.number_key=1 +authInfo.pubkey.path=/home/dongha/project/iotauth/entity/auth_certs/Auth101EntityCert.pem +entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.Fed_1Key.pem +auth.ip.address=127.0.0.1 +auth.port.number=21900 +entity.server.ip.address=127.0.0.1 +entity.server.port.number=15045 +network.protocol=TCP \ No newline at end of file diff --git a/core/federated/network/fed2.config b/core/federated/network/fed2.config new file mode 100644 index 000000000..fe797321e --- /dev/null +++ b/core/federated/network/fed2.config @@ -0,0 +1,10 @@ +entityInfo.name=net1.fed_2 +entityInfo.purpose={"group":"Servers"} +entityInfo.number_key=1 +authInfo.pubkey.path=/home/dongha/project/iotauth/entity/auth_certs/Auth101EntityCert.pem +entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.Fed_2Key.pem +auth.ip.address=127.0.0.1 +auth.port.number=21900 +entity.server.ip.address=127.0.0.1 +entity.server.port.number=15045 +network.protocol=TCP \ No newline at end of file From b2b8eaa74d4892f5ded2f6f0e107e2c93239f36a Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 2 Apr 2024 16:30:57 -0700 Subject: [PATCH 145/262] Add set_specified_port() --- core/federated/network/lf_mqtt_support.c | 1 + core/federated/network/lf_socket_support.c | 38 +++++++++++++++------- include/core/federated/network/netdriver.h | 1 + 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index e0b25bb93..da15ab93b 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -26,6 +26,7 @@ struct in_addr* get_ip_addr(netdrv_t* drv) {} void set_host_name(netdrv_t* drv, const char* hostname) {} void set_port(netdrv_t* drv, int port) {} +void set_specified_port(netdrv_t* drv, int port) {} void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) {} diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index ab3419945..0df4beecb 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -90,6 +90,10 @@ void set_port(netdrv_t* drv, int port) { socket_priv_t* priv = (socket_priv_t*)drv->priv; priv->server_port = port; } +void set_specified_port(netdrv_t* drv, int port) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + priv->user_specified_port = port; +} // Unused. void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { @@ -168,18 +172,30 @@ int netdrv_connect(netdrv_t* drv) { hints.ai_next = NULL; hints.ai_flags = AI_NUMERICSERV; /* Allow only numeric port numbers */ - // Convert port number to string. - char str[6]; - sprintf(str, "%u", priv->server_port); - - // Get address structure matching hostname and hints criteria, and - // set port to the port number provided in str. There should only - // ever be one matching address structure, and we connect to that. - if (getaddrinfo(priv->server_hostname, (const char*)&str, &hints, &result)) { - lf_print_error_and_exit("No host matching given hostname: %s", priv->server_hostname); + int count_retries = 0; + int ret = -1; + while (count_retries++ < CONNECT_MAX_RETRIES) { + // Convert port number to string. + char str[6]; + sprintf(str, "%u", priv->server_port); + + // Get address structure matching hostname and hints criteria, and + // set port to the port number provided in str. There should only + // ever be one matching address structure, and we connect to that. + if (getaddrinfo(priv->server_hostname, (const char*)&str, &hints, &result)) { + lf_print_error_and_exit("No host matching given hostname: %s", priv->server_hostname); + } + ret = connect(priv->socket_descriptor, result->ai_addr, result->ai_addrlen); + if (ret < 0) { + lf_sleep(CONNECT_RETRY_INTERVAL); + if (priv->user_specified_port == 0) { + priv->server_port++; + } + continue; + } else { + break; + } } - - int ret = connect(priv->socket_descriptor, result->ai_addr, result->ai_addrlen); freeaddrinfo(result); return ret; } diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index d02de139a..d0b1dc08a 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -141,6 +141,7 @@ struct in_addr* get_ip_addr(netdrv_t* drv); void set_host_name(netdrv_t* drv, const char* hostname); void set_port(netdrv_t* drv, int port); +void set_specified_port(netdrv_t* drv, int port); void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr); void netdrv_free(netdrv_t* drv); From 5cf168a73811c391f54a961e0d1e6ea0b3e33034 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 2 Apr 2024 16:31:05 -0700 Subject: [PATCH 146/262] Minor fix --- core/federated/RTI/c_client.config | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 core/federated/RTI/c_client.config diff --git a/core/federated/RTI/c_client.config b/core/federated/RTI/c_client.config deleted file mode 100644 index 6d2112ce6..000000000 --- a/core/federated/RTI/c_client.config +++ /dev/null @@ -1,10 +0,0 @@ -entityInfo.name=net1.rti -entityInfo.purpose={"group":"Servers"} -entityInfo.number_key=1 -authInfo.pubkey.path=../../../../../../../../../../../../iotauth/entity/auth_certs/Auth101EntityCert.pem -entityInfo.privkey.path=../../../../../../../../../../../../iotauth/entity/credentials/keys/net1/Net1.RTIKey.pem -auth.ip.address=127.0.0.1 -auth.port.number=21900 -entity.server.ip.address=127.0.0.1 -entity.server.port.number=21100 -network.protocol=TCP \ No newline at end of file From 9d2d66d2dc7a8ca308b8b444414244aaa4bba231 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 2 Apr 2024 16:31:41 -0700 Subject: [PATCH 147/262] Change logic at lf_connect_to_rti --- core/federated/federate.c | 64 ++++++++++++++------------------------- 1 file changed, 23 insertions(+), 41 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index 463016364..5f7445069 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -77,22 +77,23 @@ int max_level_allowed_to_advance; * and the _fed global variable refers to that instance. */ -//TODO: DONGHA: Need to change socket_related. socket_TCP_RTI, server_socket, server_port -federate_instance_t _fed = {// .socket_TCP_RTI = -1, - .number_of_inbound_p2p_connections = 0, - .inbound_netdriv_listeners = NULL, - .number_of_outbound_p2p_connections = 0, - .inbound_p2p_handling_thread_id = 0, - .server_socket = -1, - .server_port = -1, - .last_TAG = {.time = NEVER, .microstep = 0u}, - .is_last_TAG_provisional = false, - .has_upstream = false, - .has_downstream = false, - .received_stop_request_from_rti = false, - .last_sent_LTC = (tag_t){.time = NEVER, .microstep = 0u}, - .last_sent_NET = (tag_t){.time = NEVER, .microstep = 0u}, - .min_delay_from_physical_action_to_federate_output = NEVER}; +// TODO: DONGHA: Need to change socket_related. socket_TCP_RTI, server_socket, server_port +federate_instance_t _fed = { + // .socket_TCP_RTI = -1, + .number_of_inbound_p2p_connections = 0, + .inbound_netdriv_listeners = NULL, + .number_of_outbound_p2p_connections = 0, + .inbound_p2p_handling_thread_id = 0, + .server_socket = -1, + .server_port = -1, + .last_TAG = {.time = NEVER, .microstep = 0u}, + .is_last_TAG_provisional = false, + .has_upstream = false, + .has_downstream = false, + .received_stop_request_from_rti = false, + .last_sent_LTC = (tag_t){.time = NEVER, .microstep = 0u}, + .last_sent_NET = (tag_t){.time = NEVER, .microstep = 0u}, + .min_delay_from_physical_action_to_federate_output = NEVER}; // TODO: DONGHA: Need to change host and port. federation_metadata_t federation_metadata = { @@ -1774,6 +1775,7 @@ void lf_connect_to_rti(const char* hostname, int port) { // Override passed hostname and port if passed as runtime arguments. hostname = federation_metadata.rti_host ? federation_metadata.rti_host : hostname; port = federation_metadata.rti_port >= 0 ? federation_metadata.rti_port : port; + set_specified_port(_fed.netdrv_to_rti, port); // Adjust the port. uint16_t uport = 0; @@ -1789,36 +1791,19 @@ void lf_connect_to_rti(const char* hostname, int port) { if (uport == 0) { uport = RTI_DEFAULT_PORT; } - + // Initialize netdriver to rti. _fed.netdrv_to_rti = netdrv_init(); // set memory. _fed.netdrv_to_rti->open(_fed.netdrv_to_rti); // open netdriver. set_host_name(_fed.netdrv_to_rti, hostname); set_port(_fed.netdrv_to_rti, uport); - // Connect - int result = -1; + if (netdrv_connect(_fed.netdrv_to_rti) < 0) { + lf_print_error_and_exit("Failed to connect() to RTI after %d tries.", CONNECT_MAX_RETRIES); + } + int count_retries = 0; - // TODO: DONGHA: count_retries not being updated for the authentication process? while (count_retries++ < CONNECT_MAX_RETRIES && !_lf_termination_executed) { - // TODO: DONGHA: Connecting phase. Let's just make a netdrv_connect() api first. - result = netdrv_connect(_fed.netdrv_to_rti); - if (result < 0) { - _fed.netdrv_to_rti->close(_fed.netdrv_to_rti); - netdrv_free(_fed.netdrv_to_rti); - _fed.netdrv_to_rti = netdrv_init(); - _fed.netdrv_to_rti->open(_fed.netdrv_to_rti); - set_host_name(_fed.netdrv_to_rti, hostname); - if (port == 0) { - uport++; - if (uport >= RTI_DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) - uport = RTI_DEFAULT_PORT; - } - set_port(_fed.netdrv_to_rti, uport); - lf_sleep(CONNECT_RETRY_INTERVAL); - continue; // Connect failed. - } - // Have connected to an RTI, but not sure it's the right RTI. // Send a MSG_TYPE_FED_IDS message and wait for a reply. // Notify the RTI of the ID of this federate and its federation. @@ -1892,9 +1877,6 @@ void lf_connect_to_rti(const char* hostname, int port) { continue; } } - if (result < 0) { - lf_print_error_and_exit("Failed to connect to RTI after %d tries.", CONNECT_MAX_RETRIES); - } // Call a generated (external) function that sends information // about connections between this federate and other federates From 9da6645dab3661cbf0f33180f5b0924016b71880 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 2 Apr 2024 16:37:11 -0700 Subject: [PATCH 148/262] Minor fix --- core/federated/federate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index 5f7445069..ea9bcdf1d 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1775,7 +1775,6 @@ void lf_connect_to_rti(const char* hostname, int port) { // Override passed hostname and port if passed as runtime arguments. hostname = federation_metadata.rti_host ? federation_metadata.rti_host : hostname; port = federation_metadata.rti_port >= 0 ? federation_metadata.rti_port : port; - set_specified_port(_fed.netdrv_to_rti, port); // Adjust the port. uint16_t uport = 0; @@ -1791,12 +1790,13 @@ void lf_connect_to_rti(const char* hostname, int port) { if (uport == 0) { uport = RTI_DEFAULT_PORT; } - + // Initialize netdriver to rti. _fed.netdrv_to_rti = netdrv_init(); // set memory. _fed.netdrv_to_rti->open(_fed.netdrv_to_rti); // open netdriver. set_host_name(_fed.netdrv_to_rti, hostname); set_port(_fed.netdrv_to_rti, uport); + set_specified_port(_fed.netdrv_to_rti, port); if (netdrv_connect(_fed.netdrv_to_rti) < 0) { lf_print_error_and_exit("Failed to connect() to RTI after %d tries.", CONNECT_MAX_RETRIES); From 3f3a125839958f38d5fb1757f151b22464e42d87 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 2 Apr 2024 16:52:25 -0700 Subject: [PATCH 149/262] Update sst support. establish comm, netdrv connect. Still needs fix --- core/federated/network/lf_sst_support.c | 55 +++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 081ccae25..2fb22786d 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -76,6 +76,11 @@ void set_port(netdrv_t* drv, int port) { sst_priv->socket_priv->server_port = port; } +void set_specified_port(netdrv_t* drv, int port) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + sst_priv->socket_priv->user_specified_port = port; +} + // Unused. void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; @@ -86,7 +91,7 @@ void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { int create_server(netdrv_t* drv, int server_type, uint16_t port) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; SST_ctx_t* ctx = init_SST( - "/home/dongha/project/lingua-franca/core/src/main/resources/lib/c/reactor-c/core/federated/RTI/c_client.config"); + "/home/dongha/project/lingua-franca/core/src/main/resources/lib/c/reactor-c/core/federated/RTI/RTI.config"); sst_priv->sst_ctx = ctx; return create_TCP_server(sst_priv->socket_priv, server_type, port); } @@ -95,13 +100,55 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { netdrv_t* ret_netdrv = netdrv_init(); sst_priv_t* my_priv = (sst_priv_t*)my_netdrv->priv; sst_priv_t* ret_priv = (sst_priv_t*)ret_netdrv->priv; - session_key_list_t *s_key_list = init_empty_session_key_list(); - SST_session_ctx_t* session_ctx = server_secure_comm_setup(my_priv->sst_ctx, my_priv->socket_priv->socket_descriptor, s_key_list); + + // Wait for an incoming connection request. + struct sockaddr client_fd; + uint32_t client_length = sizeof(client_fd); + // The following blocks until a client connects. + while (1) { + ret_priv->socket_priv->socket_descriptor = + accept(my_priv->socket_priv->socket_descriptor, &client_fd, &client_length); + if (ret_priv->socket_priv->socket_descriptor >= 0) { + // Got a socket + break; + } else if (ret_priv->socket_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { + lf_print_error_and_exit("Failed to accept the socket. %s. ret_priv->socket_priv->socket_descriptor = %d", + strerror(errno), ret_priv->socket_priv->socket_descriptor); + } else { + // Try again + lf_print_warning("Failed to accept the socket. %s. Trying again.", strerror(errno)); + continue; + } + } + + session_key_list_t* s_key_list = init_empty_session_key_list(); + SST_session_ctx_t* session_ctx = + server_secure_comm_setup(my_priv->sst_ctx, my_priv->socket_priv->socket_descriptor, s_key_list); free_session_key_list_t(s_key_list); ret_priv->session_ctx = session_ctx; + + // TODO: DONGHA + // Get the IP address of the other accepting client. This is used in two cases. + // 1) Decentralized coordination - handle_address_query() - Sends the port number and address of the federate. + // 2) Clock synchronization - send_physical_clock - Send through UDP. + struct sockaddr_in* pV4_addr = (struct sockaddr_in*)&client_fd; + ret_priv->socket_priv->server_ip_addr = pV4_addr->sin_addr; } -int netdrv_connect(netdrv_t* drv) {} +int netdrv_connect(netdrv_t* drv) { + char cwd[256]; + getcwd(cwd, sizeof(cwd)); + printf("Current working dir: %s\n", cwd); + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + unsigned char* config_path; + SST_ctx_t* ctx = init_SST( + "/home/dongha/project/lingua-franca/core/src/main/resources/lib/c/reactor-c/core/federated/network/fed1.config"); + session_key_list_t* s_key_list = get_session_key(ctx, NULL); + SST_session_ctx_t* session_ctx = secure_connect_to_server(&s_key_list->s_key[0], ctx); + sst_priv->sst_ctx = ctx; + sst_priv->session_ctx = session_ctx; + return 1; +} ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} From 8e8cda32fcaeb5e2d8f75b66a8a3f4d8d7c61fa5 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 3 Apr 2024 17:50:53 -0700 Subject: [PATCH 150/262] Minor fix --- core/federated/network/lf_sst_support.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 2fb22786d..2554183e1 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -13,7 +13,12 @@ static sst_priv_t* sst_priv_init() { return sst_priv; } -static void sst_open(netdrv_t* drv) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; } +static void sst_open(netdrv_t* drv) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + SST_ctx_t* ctx = init_SST( + "/home/dongha/project/lingua-franca/core/src/main/resources/lib/c/reactor-c/core/federated/network/fed1.config"); + sst_priv->sst_ctx = ctx; +} static void sst_close(netdrv_t* drv) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; if (sst_priv->socket_priv != NULL) { @@ -123,7 +128,7 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { session_key_list_t* s_key_list = init_empty_session_key_list(); SST_session_ctx_t* session_ctx = - server_secure_comm_setup(my_priv->sst_ctx, my_priv->socket_priv->socket_descriptor, s_key_list); + server_secure_comm_setup(my_priv->sst_ctx, ret_priv->socket_priv->socket_descriptor, s_key_list); free_session_key_list_t(s_key_list); ret_priv->session_ctx = session_ctx; @@ -136,16 +141,13 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { } int netdrv_connect(netdrv_t* drv) { - char cwd[256]; - getcwd(cwd, sizeof(cwd)); - printf("Current working dir: %s\n", cwd); + // char cwd[256]; + // getcwd(cwd, sizeof(cwd)); + // printf("Current working dir: %s\n", cwd); sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - unsigned char* config_path; - SST_ctx_t* ctx = init_SST( - "/home/dongha/project/lingua-franca/core/src/main/resources/lib/c/reactor-c/core/federated/network/fed1.config"); - session_key_list_t* s_key_list = get_session_key(ctx, NULL); - SST_session_ctx_t* session_ctx = secure_connect_to_server(&s_key_list->s_key[0], ctx); - sst_priv->sst_ctx = ctx; + session_key_list_t* s_key_list = get_session_key(sst_priv->sst_ctx, NULL); + // Does not increases RTI port number. + SST_session_ctx_t* session_ctx = secure_connect_to_server(&s_key_list->s_key[0], sst_priv->sst_ctx); sst_priv->session_ctx = session_ctx; return 1; } From cfbcd7c73d9b60e45ba49ce1f3f03bb9e6097f76 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 4 Apr 2024 16:54:31 -0700 Subject: [PATCH 151/262] Fix fed config --- core/federated/network/{fed1.config => fed_0.config} | 0 core/federated/network/{fed2.config => fed_1.config} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename core/federated/network/{fed1.config => fed_0.config} (100%) rename core/federated/network/{fed2.config => fed_1.config} (100%) diff --git a/core/federated/network/fed1.config b/core/federated/network/fed_0.config similarity index 100% rename from core/federated/network/fed1.config rename to core/federated/network/fed_0.config diff --git a/core/federated/network/fed2.config b/core/federated/network/fed_1.config similarity index 100% rename from core/federated/network/fed2.config rename to core/federated/network/fed_1.config From 26c4f4ae7f641b83e0d599dea9b0e52b66c55cba Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 4 Apr 2024 16:54:57 -0700 Subject: [PATCH 152/262] Fix fed_config --- core/federated/network/fed_0.config | 4 ++-- core/federated/network/fed_1.config | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/federated/network/fed_0.config b/core/federated/network/fed_0.config index c48aefbdd..055ee0b41 100644 --- a/core/federated/network/fed_0.config +++ b/core/federated/network/fed_0.config @@ -1,8 +1,8 @@ -entityInfo.name=net1.fed_1 +entityInfo.name=net1.fed_0 entityInfo.purpose={"group":"Servers"} entityInfo.number_key=1 authInfo.pubkey.path=/home/dongha/project/iotauth/entity/auth_certs/Auth101EntityCert.pem -entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.Fed_1Key.pem +entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.Fed_0Key.pem auth.ip.address=127.0.0.1 auth.port.number=21900 entity.server.ip.address=127.0.0.1 diff --git a/core/federated/network/fed_1.config b/core/federated/network/fed_1.config index fe797321e..c48aefbdd 100644 --- a/core/federated/network/fed_1.config +++ b/core/federated/network/fed_1.config @@ -1,8 +1,8 @@ -entityInfo.name=net1.fed_2 +entityInfo.name=net1.fed_1 entityInfo.purpose={"group":"Servers"} entityInfo.number_key=1 authInfo.pubkey.path=/home/dongha/project/iotauth/entity/auth_certs/Auth101EntityCert.pem -entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.Fed_2Key.pem +entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.Fed_1Key.pem auth.ip.address=127.0.0.1 auth.port.number=21900 entity.server.ip.address=127.0.0.1 From 8aa92a9a9ec26699e6eeba6179f6320d77fe2a24 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 4 Apr 2024 16:56:03 -0700 Subject: [PATCH 153/262] Fix netdrv->open to get federtate ID --- core/federated/network/lf_socket_support.c | 4 ++-- include/core/federated/network/netdriver.h | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 0df4beecb..bd87c1426 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -34,7 +34,8 @@ // static void socket_open(netdrv_t* drv); // static void socket_close(netdrv_t* drv); -void TCP_open(netdrv_t* drv) { +void TCP_open(netdrv_t* drv, int federate_id) { + drv->federate_id = federate_id; socket_priv_t* priv = (socket_priv_t*)drv->priv; TCP_socket_open(priv); } @@ -217,7 +218,6 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { return -1; } ssize_t bytes_written = 0; - va_list args; while (bytes_written < (ssize_t)num_bytes) { ssize_t more = write(priv->socket_descriptor, buffer + bytes_written, num_bytes - (size_t)bytes_written); if (more <= 0 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) { diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index d0b1dc08a..342894771 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -19,15 +19,16 @@ typedef enum netdrv_type_t { NETDRV, UDP } netdrv_type_t; // typedef enum server_type_t { RTI, FED } server_type_t; typedef struct netdrv_t { - void (*open)(struct netdrv_t* drv); + void (*open)(struct netdrv_t* drv, int federate_id); void (*close)(struct netdrv_t* drv); int (*read)(struct netdrv_t* drv, size_t num_bytes, unsigned char* buffer); int (*write)(struct netdrv_t* drv, size_t num_bytes, unsigned char* buffer); void* priv; unsigned int read_remaining_bytes; + int federate_id; } netdrv_t; -int netdrv_open(netdrv_t* drv); +int netdrv_open(netdrv_t* drv, int federate_id); void netdrv_close(netdrv_t* drv); int netdrv_read(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); int netdrv_write(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); @@ -54,7 +55,7 @@ netdrv_t* establish_communication_session(netdrv_t* netdrv); * @param socket The socket ID. * @param num_bytes The number of bytes to write. * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. + * @return The number of bytes written. */ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); From e7e3c27edc47f28440eb3bd56e3555e3e51db20c Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 4 Apr 2024 17:00:09 -0700 Subject: [PATCH 154/262] Change logic for federate's connect. --- core/federated/federate.c | 105 +++++++++++++------------------------- 1 file changed, 35 insertions(+), 70 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index ea9bcdf1d..e595dc692 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1691,78 +1691,43 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { // Iterate until we either successfully connect or exceed the number of // attempts given by CONNECT_MAX_RETRIES. netdrv_t* netdrv = netdrv_init(); + netdrv->open(netdrv, _lf_my_fed_id); + set_host_name(netdrv, hostname); + set_port(netdrv, uport); + result = netdrv_connect(netdrv); - while (result < 0 && !_lf_termination_executed) { - // Create an IPv4 socket for TCP (not UDP) communication over IP (0). - netdrv->open(netdrv); - set_host_name(netdrv, hostname); - set_port(netdrv, uport); - result = netdrv_connect(netdrv); - - if (result != 0) { - lf_print_error("Failed to connect to federate %d on port %d.", remote_federate_id, uport); - - // Try again after some time if the connection failed. - // Note that this should not really happen since the remote federate should be - // accepting socket connections. But possibly it will be busy (in process of accepting - // another socket connection?). Hence, we retry. - count_retries++; - if (count_retries > CONNECT_MAX_RETRIES) { - // If the remote federate is not accepting the connection after CONNECT_MAX_RETRIES - // treat it as a soft error condition and return. - lf_print_error("Failed to connect to federate %d after %d retries. Giving up.", remote_federate_id, - CONNECT_MAX_RETRIES); - netdrv_free(netdrv); - return; - } - lf_print_warning("Could not connect to federate %d. Will try again every" PRINTF_TIME "nanoseconds.\n", - remote_federate_id, ADDRESS_QUERY_RETRY_INTERVAL); - - // Check whether the RTI is still there. - if (rti_failed()) { - netdrv_free(netdrv); - break; - } - netdrv->close(netdrv); - // Wait ADDRESS_QUERY_RETRY_INTERVAL nanoseconds. - lf_sleep(ADDRESS_QUERY_RETRY_INTERVAL); - } else { - // Connect was successful. - size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); - unsigned char* buffer = (unsigned char*)malloc(1 + sizeof(uint16_t) + 1 + federation_id_length); - buffer[0] = MSG_TYPE_P2P_SENDING_FED_ID; - if (_lf_my_fed_id > UINT16_MAX) { - // This error is very unlikely to occur. - lf_print_error_and_exit("Too many federates! More than %d.", UINT16_MAX); - } - encode_uint16((uint16_t)_lf_my_fed_id, (unsigned char*)&(buffer[1])); - buffer[1 + sizeof(uint16_t)] = (unsigned char)(federation_id_length & 0xff); + // Connect was successful. + size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); + unsigned char* buf = (unsigned char*)malloc(1 + sizeof(uint16_t) + 1 + federation_id_length); + buf[0] = MSG_TYPE_P2P_SENDING_FED_ID; + if (_lf_my_fed_id > UINT16_MAX) { + // This error is very unlikely to occur. + lf_print_error_and_exit("Too many federates! More than %d.", UINT16_MAX); + } + encode_uint16((uint16_t)_lf_my_fed_id, (unsigned char*)&(buf[1])); + buf[1 + sizeof(uint16_t)] = (unsigned char)(federation_id_length & 0xff); - memcpy(buffer + 2 + sizeof(uint16_t), (unsigned char*)federation_metadata.federation_id, federation_id_length); - // Trace the event when tracing is enabled - tracepoint_federate_to_federate(send_FED_ID, _lf_my_fed_id, remote_federate_id, NULL); - - // No need for a mutex because we have the only handle on the socket. - write_to_netdrv_fail_on_error(netdrv, 2 + sizeof(uint16_t) + federation_id_length, buffer, NULL, - "Failed to send fed_id and federation id to federate %d.", remote_federate_id); - - read_from_netdrv_fail_on_error(netdrv, (unsigned char*)buffer, 2, NULL, - "Failed to read MSG_TYPE_ACK from federate %d in response to sending fed_id.", - remote_federate_id); - if (buffer[0] != MSG_TYPE_ACK) { - // Get the error code. - lf_print_error("Received MSG_TYPE_REJECT message from remote federate (%d).", buffer[1]); - result = -1; - free(buffer); - continue; - } else { - lf_print("Connected to federate %d, port %d.", remote_federate_id, port); - // Trace the event when tracing is enabled - tracepoint_federate_to_federate(receive_ACK, _lf_my_fed_id, remote_federate_id, NULL); - free(buffer); - } - } + memcpy(buf + 2 + sizeof(uint16_t), (unsigned char*)federation_metadata.federation_id, federation_id_length); + // Trace the event when tracing is enabled + tracepoint_federate_to_federate(send_FED_ID, _lf_my_fed_id, remote_federate_id, NULL); + + // No need for a mutex because we have the only handle on the socket. + write_to_netdrv_fail_on_error(netdrv, 2 + sizeof(uint16_t) + federation_id_length, buf, NULL, + "Failed to send fed_id and federation id to federate %d.", remote_federate_id); + + read_from_netdrv_fail_on_error(netdrv, (unsigned char*)buf, 2, NULL, + "Failed to read MSG_TYPE_ACK from federate %d in response to sending fed_id.", + remote_federate_id); + if (buf[0] != MSG_TYPE_ACK) { + // Get the error code. + lf_print_error_and_exit("Received MSG_TYPE_REJECT message from remote federate (%d).", buf[1]); + result = -1; + } else { + lf_print("Connected to federate %d, port %d.", remote_federate_id, port); + // Trace the event when tracing is enabled + tracepoint_federate_to_federate(receive_ACK, _lf_my_fed_id, remote_federate_id, NULL); } + free(buf); // Once we set this variable, then all future calls to close() on this // socket ID should reset it to -1 within a critical section. _fed.netdrv_for_outbound_p2p_connections[remote_federate_id] = netdrv; @@ -1793,7 +1758,7 @@ void lf_connect_to_rti(const char* hostname, int port) { // Initialize netdriver to rti. _fed.netdrv_to_rti = netdrv_init(); // set memory. - _fed.netdrv_to_rti->open(_fed.netdrv_to_rti); // open netdriver. + _fed.netdrv_to_rti->open(_fed.netdrv_to_rti, _lf_my_fed_id); // open netdriver. set_host_name(_fed.netdrv_to_rti, hostname); set_port(_fed.netdrv_to_rti, uport); set_specified_port(_fed.netdrv_to_rti, port); From 2fbb8dcc03bd7dda6ce7560d6ca73cea37315f2b Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 4 Apr 2024 17:00:47 -0700 Subject: [PATCH 155/262] Change sst_open, get federate ID. && Add read and write functions using SST. --- core/federated/network/lf_sst_support.c | 96 ++++++++++++++++++++++--- 1 file changed, 86 insertions(+), 10 deletions(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 2554183e1..cd45edd48 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -13,10 +13,16 @@ static sst_priv_t* sst_priv_init() { return sst_priv; } -static void sst_open(netdrv_t* drv) { +static void sst_open(netdrv_t* drv, int federate_id) { + drv->federate_id = federate_id; sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - SST_ctx_t* ctx = init_SST( - "/home/dongha/project/lingua-franca/core/src/main/resources/lib/c/reactor-c/core/federated/network/fed1.config"); + lf_print_error("federate_id: %d", federate_id); + unsigned char config_path[256]; + sprintf( + config_path, + "/home/dongha/project/lingua-franca/core/src/main/resources/lib/c/reactor-c/core/federated/network/fed_%d.config", + federate_id); + SST_ctx_t* ctx = init_SST(config_path); sst_priv->sst_ctx = ctx; } static void sst_close(netdrv_t* drv) { @@ -138,6 +144,7 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { // 2) Clock synchronization - send_physical_clock - Send through UDP. struct sockaddr_in* pV4_addr = (struct sockaddr_in*)&client_fd; ret_priv->socket_priv->server_ip_addr = pV4_addr->sin_addr; + return ret_netdrv; } int netdrv_connect(netdrv_t* drv) { @@ -147,6 +154,7 @@ int netdrv_connect(netdrv_t* drv) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; session_key_list_t* s_key_list = get_session_key(sst_priv->sst_ctx, NULL); // Does not increases RTI port number. + print_buf(s_key_list->s_key[0].key_id, 8); SST_session_ctx_t* session_ctx = secure_connect_to_server(&s_key_list->s_key[0], sst_priv->sst_ctx); sst_priv->session_ctx = session_ctx; return 1; @@ -154,16 +162,84 @@ int netdrv_connect(netdrv_t* drv) { ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} -int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) {} +int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + if(buffer[0] == MSG_TYPE_FAILED) { + // Just return. + return 0; + } + return send_secure_message(buffer, num_bytes, sst_priv->session_ctx); +} -int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) {} +int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { + int bytes_written = write_to_netdrv(drv, num_bytes, buffer); + if (bytes_written <= 0) { + // Write failed. + // Netdrv has probably been closed from the other side. + // Shut down and close the netdrv from this side. + drv->close(drv); + } + return bytes_written; +} void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, - char* format, ...) {} - -ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) {} + char* format, ...) { + va_list args; + int bytes_written = write_to_netdrv_close_on_error(drv, num_bytes, buffer); + if (bytes_written <= 0) { + // Write failed. + if (mutex != NULL) { + lf_mutex_unlock(mutex); + } + if (format != NULL) { + lf_print_error_system_failure(format, args); + } else { + lf_print_error("Failed to write to socket. Closing it."); + } + } +} -ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) {} +ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + unsigned char sst_buffer[1024]; + unsigned int bytes_read; + bytes_read = read(sst_priv->session_ctx->sock, sst_buffer, sizeof(sst_buffer)); + // TODO: DONGHA: Just for error checking. Remove in final. + if (bytes_read == sizeof(sst_buffer)) { + lf_print_error("It read as much as the buffer size... Be aware."); + } + unsigned int decrypted_buffer_length; + unsigned char* decrypted_buffer = + return_decrypted_buf(sst_buffer, bytes_read, &decrypted_buffer_length, sst_priv->session_ctx); + // Returned SEQ_NUM_BUFFER(8) + decrypted_buffer; + // Doing this because it should be freed. + memcpy(buffer, decrypted_buffer + 8, decrypted_buffer_length - 8); + free(decrypted_buffer); + return decrypted_buffer_length; +} + +ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); + if (bytes_read <= 0) { + drv->close(drv); + return -1; + } + return bytes_read; +} void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, - char* format, ...) {} + char* format, ...) { + va_list args; + ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); + if (bytes_read <= 0) { + // Read failed. + if (mutex != NULL) { + lf_mutex_unlock(mutex); + } + if (format != NULL) { + lf_print_error_system_failure(format, args); + } else { + lf_print_error_system_failure("Failed to read from netdrv."); + } + } +} From 1be65ef11fba0b18c9a9897f7997634a309b1cd5 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 4 Apr 2024 17:16:27 -0700 Subject: [PATCH 156/262] Minor fix --- core/federated/network/lf_sst_support.c | 1 - 1 file changed, 1 deletion(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index cd45edd48..03c48a743 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -16,7 +16,6 @@ static sst_priv_t* sst_priv_init() { static void sst_open(netdrv_t* drv, int federate_id) { drv->federate_id = federate_id; sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - lf_print_error("federate_id: %d", federate_id); unsigned char config_path[256]; sprintf( config_path, From f5150b98985a19ae303ca3882bd732ae833f3837 Mon Sep 17 00:00:00 2001 From: Hokeun Kim Date: Fri, 5 Apr 2024 11:14:54 -0700 Subject: [PATCH 157/262] Fix build issues on Mac --- core/federated/RTI/CMakeLists.txt | 6 ++++++ core/federated/RTI/rti_remote.c | 2 +- core/federated/network/lf_socket_support.c | 2 -- core/federated/network/socket_common.c | 2 -- include/core/federated/network/type/lf_sst_support.h | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/federated/RTI/CMakeLists.txt b/core/federated/RTI/CMakeLists.txt index 4d44dd057..b3c9f2db1 100644 --- a/core/federated/RTI/CMakeLists.txt +++ b/core/federated/RTI/CMakeLists.txt @@ -37,6 +37,10 @@ cmake_minimum_required(VERSION 3.12) project(RTI VERSION 1.0.0 LANGUAGES C) +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set(OPENSSL_ROOT_DIR "/usr/local/lib64") +endif() + set(CoreLib ../../../core) set(LF_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../..) @@ -47,6 +51,8 @@ include_directories(${IncludeDir}/federated) include_directories(${IncludeDir}/federated/network) include_directories(${IncludeDir}/modal_models) include_directories(${IncludeDir}/utils) +include_directories(/usr/local/include) + # Declare a new executable target and list all its sources add_executable( diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 0bb7c570e..1e81a574f 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1063,7 +1063,7 @@ static int32_t receive_and_check_fed_id_message(netdrv_t* netdrv) { tracepoint_rti_from_federate(receive_FED_ID, fed_id, NULL); } // Compare the received federation ID to mine. - if (strncmp(rti_remote->federation_id, buffer + 2 + sizeof(uint16_t), federation_id_length) != 0) { + if (strncmp(rti_remote->federation_id, (const char*)buffer + 2 + sizeof(uint16_t), federation_id_length) != 0) { // Federation IDs do not match. Send back a MSG_TYPE_REJECT message. lf_print_warning("Federate from another federation %s attempted to connect to RTI in federation %s.", buffer + 2 + sizeof(uint16_t), rti_remote->federation_id); diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index bd87c1426..e8b0de9e8 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -1,7 +1,5 @@ #include /* htons */ #include -#include /* IFNAMSIZ */ -#include #include // IPPROTO_TCP, IPPROTO_UDP #include // TCP_NODELAY #include diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index 93c25d946..f6740733d 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -1,7 +1,5 @@ #include /* htons */ #include -#include /* IFNAMSIZ */ -#include #include // IPPROTO_TCP, IPPROTO_UDP #include // TCP_NODELAY #include diff --git a/include/core/federated/network/type/lf_sst_support.h b/include/core/federated/network/type/lf_sst_support.h index c857883b9..2462c7afe 100644 --- a/include/core/federated/network/type/lf_sst_support.h +++ b/include/core/federated/network/type/lf_sst_support.h @@ -2,7 +2,7 @@ #define LF_SST_SUPPORT_H #include "socket_common.h" -#include "sst-c-api/c_api.h" +#include typedef struct sst_priv_t { socket_priv_t* socket_priv; // Must be first variable. SST_ctx_t* sst_ctx; From 3add41103951478e5f20a362dcce4344d8fe5a8d Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 5 Apr 2024 14:36:46 -0700 Subject: [PATCH 158/262] " Fix header includes" --- core/federated/network/lf_socket_support.c | 11 ++--------- core/federated/network/lf_sst_support.c | 15 +++++++++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index e8b0de9e8..711be72dd 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -1,15 +1,8 @@ -#include /* htons */ -#include -#include // IPPROTO_TCP, IPPROTO_UDP -#include // TCP_NODELAY -#include -#include #include #include #include -#include -#include -#include +#include +#include #include "util.h" #include "net_common.h" diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 03c48a743..4bfc45278 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -1,8 +1,14 @@ +#include +#include +#include +#include + #include "util.h" #include "net_common.h" #include "net_util.h" #include "netdriver.h" + static sst_priv_t* sst_priv_init() { sst_priv_t* sst_priv = malloc(sizeof(sst_priv_t)); if (!sst_priv) { @@ -153,7 +159,6 @@ int netdrv_connect(netdrv_t* drv) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; session_key_list_t* s_key_list = get_session_key(sst_priv->sst_ctx, NULL); // Does not increases RTI port number. - print_buf(s_key_list->s_key[0].key_id, 8); SST_session_ctx_t* session_ctx = secure_connect_to_server(&s_key_list->s_key[0], sst_priv->sst_ctx); sst_priv->session_ctx = session_ctx; return 1; @@ -163,7 +168,7 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - if(buffer[0] == MSG_TYPE_FAILED) { + if (buffer[0] == MSG_TYPE_FAILED) { // Just return. return 0; } @@ -201,8 +206,10 @@ void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; unsigned char sst_buffer[1024]; - unsigned int bytes_read; - bytes_read = read(sst_priv->session_ctx->sock, sst_buffer, sizeof(sst_buffer)); + unsigned int bytes_read = 0; + while (bytes_read <= 0) { + bytes_read = read(sst_priv->session_ctx->sock, sst_buffer, sizeof(sst_buffer)); + } // TODO: DONGHA: Just for error checking. Remove in final. if (bytes_read == sizeof(sst_buffer)) { lf_print_error("It read as much as the buffer size... Be aware."); From aedef8c630bb29d35af4162ef76cc93ab09b2219 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 5 Apr 2024 14:41:25 -0700 Subject: [PATCH 159/262] Add #include --- core/federated/network/lf_socket_support.c | 1 + core/federated/network/lf_sst_support.c | 1 + 2 files changed, 2 insertions(+) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 711be72dd..f9ff59bef 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -3,6 +3,7 @@ #include #include #include +#include #include "util.h" #include "net_common.h" diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 4bfc45278..af248a496 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "util.h" #include "net_common.h" From c4bf6a4cf22f56f0899dd71a1a168ddb0ad10ba1 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 5 Apr 2024 17:54:27 -0700 Subject: [PATCH 160/262] Fixed to read on mesasge based, not going over the next message. --- core/federated/network/lf_sst_support.c | 50 ++++++++++++++++++++----- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index af248a496..541cef2c0 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -9,7 +9,6 @@ #include "net_util.h" #include "netdriver.h" - static sst_priv_t* sst_priv_init() { sst_priv_t* sst_priv = malloc(sizeof(sst_priv_t)); if (!sst_priv) { @@ -165,7 +164,14 @@ int netdrv_connect(netdrv_t* drv) { return 1; } -ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { + // sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + // ssize_t bytes_read = recv(sst_priv->session_ctx->sock, result, 1, MSG_DONTWAIT | MSG_PEEK); + // if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) + // return 0; + // else + // return bytes_read; +} int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; @@ -204,17 +210,41 @@ void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha } } +static void var_length_int_to_num(unsigned char* buf, unsigned int buf_length, unsigned int* num, + unsigned int* var_len_int_buf_size) { + *num = 0; + *var_len_int_buf_size = 0; + for (int i = 0; i < buf_length; i++) { + *num |= (buf[i] & 127) << (7 * i); + if ((buf[i] & 128) == 0) { + *var_len_int_buf_size = i + 1; + break; + } + } +} + ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; unsigned char sst_buffer[1024]; - unsigned int bytes_read = 0; - while (bytes_read <= 0) { - bytes_read = read(sst_priv->session_ctx->sock, sst_buffer, sizeof(sst_buffer)); - } - // TODO: DONGHA: Just for error checking. Remove in final. - if (bytes_read == sizeof(sst_buffer)) { - lf_print_error("It read as much as the buffer size... Be aware."); + ssize_t bytes_read = 0; + unsigned int temp_length = 10; + + // Read 10 bytes first. + bytes_read = read(sst_priv->session_ctx->sock, sst_buffer, temp_length); + unsigned int payload_length; // Length of the payload of SST. + unsigned int var_length_buf_size; + // This fills payload_length and var_length_buf_size. + var_length_int_to_num(sst_buffer + sizeof(unsigned char), bytes_read, &payload_length, &var_length_buf_size); + unsigned int bytes_to_read = payload_length - (temp_length - (sizeof(unsigned char) + var_length_buf_size)); + + unsigned int second_read = 0; + unsigned int more = 0; + while (second_read != bytes_to_read) { + more = read(sst_priv->session_ctx->sock, sst_buffer + temp_length, bytes_to_read); + second_read += more; + bytes_read += second_read; } + unsigned int decrypted_buffer_length; unsigned char* decrypted_buffer = return_decrypted_buf(sst_buffer, bytes_read, &decrypted_buffer_length, sst_priv->session_ctx); @@ -237,7 +267,6 @@ ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, si void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, char* format, ...) { va_list args; - ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); if (bytes_read <= 0) { // Read failed. if (mutex != NULL) { @@ -250,3 +279,4 @@ void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t } } } + From 5d649efb6fd9c0e16f6e71283c1620036bc8409a Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 5 Apr 2024 17:56:27 -0700 Subject: [PATCH 161/262] Minor fix --- core/federated/network/lf_sst_support.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 541cef2c0..8f1119114 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -267,6 +267,7 @@ ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, si void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, char* format, ...) { va_list args; + ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); if (bytes_read <= 0) { // Read failed. if (mutex != NULL) { From d89f8f3fbef2544762ca840715a4fcb54644624c Mon Sep 17 00:00:00 2001 From: Hokeun Kim Date: Fri, 5 Apr 2024 19:49:30 -0700 Subject: [PATCH 162/262] Fix call to undeclared function write; ISO C99 and later do not support implicit function declarations for write and read functions --- core/federated/clock-sync.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/federated/clock-sync.c b/core/federated/clock-sync.c index 089c50371..44b53fe10 100644 --- a/core/federated/clock-sync.c +++ b/core/federated/clock-sync.c @@ -37,6 +37,7 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include "low_level_platform.h" #include "clock-sync.h" From 0fba8c68a6c9b44669b4799bbf871bb41866a118 Mon Sep 17 00:00:00 2001 From: Hokeun Kim Date: Fri, 5 Apr 2024 19:51:53 -0700 Subject: [PATCH 163/262] Fix fatal error: sst-c-api/c_api.h file not found by adding include_directories(/usr/local/include) --- core/CMakeLists.txt | 7 +++++++ core/federated/network/CMakeLists.txt | 2 ++ 2 files changed, 9 insertions(+) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 51ca062e4..31509127a 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -122,6 +122,7 @@ target_include_directories(reactor-c PUBLIC ../include/core/modal_models) target_include_directories(reactor-c PUBLIC ../include/core/threaded) target_include_directories(reactor-c PUBLIC ../include/core/utils) target_include_directories(reactor-c PUBLIC federated/RTI/) +target_include_directories(reactor-c PUBLIC /usr/local/include) if (APPLE) SET(CMAKE_C_ARCHIVE_CREATE " Scr ") @@ -139,6 +140,12 @@ if(DEFINED FEDERATED_AUTHENTICATED) target_link_libraries(reactor-c PUBLIC OpenSSL::SSL) endif() +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set(OPENSSL_ROOT_DIR "/usr/local/lib64") +endif() + +set(OPENSSL_ROOT_DIR "/usr/local/lib64") + if(DEFINED _LF_CLOCK_SYNC_ON) find_library(MATH_LIBRARY m) if(MATH_LIBRARY) diff --git a/core/federated/network/CMakeLists.txt b/core/federated/network/CMakeLists.txt index 92edc94d7..85f003362 100644 --- a/core/federated/network/CMakeLists.txt +++ b/core/federated/network/CMakeLists.txt @@ -16,6 +16,8 @@ else() target_link_libraries(lf-network-impl PUBLIC lf-logging-api) endif() +include_directories(/usr/local/include) + target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/net_util.c ${CMAKE_CURRENT_LIST_DIR}/socket_common.c From b3dc2fc15bdc38ddaf0bcfeac83507512a38b2e6 Mon Sep 17 00:00:00 2001 From: Hokeun Kim Date: Fri, 5 Apr 2024 19:52:23 -0700 Subject: [PATCH 164/262] Fix fatal error: sst-c-api/c_api.h file not found b y adding include_directories(/usr/local/include) --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a916023f..91e22f0ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,7 @@ include_directories(${CMAKE_SOURCE_DIR}/include/core/platform) include_directories(${CMAKE_SOURCE_DIR}/include/core/threaded) include_directories(${CMAKE_SOURCE_DIR}/include/core/utils) include_directories(${CMAKE_SOURCE_DIR}/include/api) +include_directories(/usr/local/include) enable_testing() add_subdirectory(${Test}) From 543617d180d0a532022433002f23dc5abe67ac4c Mon Sep 17 00:00:00 2001 From: Hokeun Kim Date: Fri, 5 Apr 2024 20:04:11 -0700 Subject: [PATCH 165/262] Fix compiler warnings --- core/federated/network/lf_sst_support.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 8f1119114..daecda6dc 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -22,12 +22,12 @@ static sst_priv_t* sst_priv_init() { static void sst_open(netdrv_t* drv, int federate_id) { drv->federate_id = federate_id; sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - unsigned char config_path[256]; + char config_path[256]; sprintf( config_path, "/home/dongha/project/lingua-franca/core/src/main/resources/lib/c/reactor-c/core/federated/network/fed_%d.config", federate_id); - SST_ctx_t* ctx = init_SST(config_path); + SST_ctx_t* ctx = init_SST((const char*)config_path); sst_priv->sst_ctx = ctx; } static void sst_close(netdrv_t* drv) { @@ -166,11 +166,12 @@ int netdrv_connect(netdrv_t* drv) { ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { // sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - // ssize_t bytes_read = recv(sst_priv->session_ctx->sock, result, 1, MSG_DONTWAIT | MSG_PEEK); + // ssize_t bytes_read = recv(sst_priv->session_ctx->sock, lf_sst_support.cresult, 1, MSG_DONTWAIT | MSG_PEEK); // if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) // return 0; // else // return bytes_read; + return 0; } int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { From 491a6710f42cd94ea1d7e3213981dc9e6791cd57 Mon Sep 17 00:00:00 2001 From: Hokeun Kim Date: Fri, 5 Apr 2024 21:06:30 -0700 Subject: [PATCH 166/262] Fix error: passing 'unsigned char *' to parameter of type 'char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Werror,-Wpointer-sign] --- core/federated/network/lf_sst_support.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index daecda6dc..eeec32229 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -180,7 +180,7 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { // Just return. return 0; } - return send_secure_message(buffer, num_bytes, sst_priv->session_ctx); + return send_secure_message((char*)buffer, num_bytes, sst_priv->session_ctx); } int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { From 4680193ea17b90c7b2a4b7e7e23f2cbf22059f95 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 6 Apr 2024 11:38:42 -0700 Subject: [PATCH 167/262] Minor fix - remove commented out functions --- core/federated/federate.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index e595dc692..ce76c7ba8 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1870,8 +1870,6 @@ void lf_create_server(int specified_port) { netdrv_t* my_netdrv = netdrv_init(); create_server(my_netdrv, 1, specified_port); // 1 for FED - // my_netdrv->open(my_netdrv); - // create_federate_server(my_netdrv, port, specified_port); // TODO: NEED to fix. LF_PRINT_LOG("Server for communicating with other federates started using port %d.", get_my_port(my_netdrv)); From e842d32c1d22761494388965f6dcabe54250e155 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 6 Apr 2024 11:43:34 -0700 Subject: [PATCH 168/262] Get federate's sst config path as command line --- core/federated/network/lf_sst_support.c | 26 ++++++++++++++----- core/reactor_common.c | 16 ++++++++++++ .../federated/network/type/lf_sst_support.h | 2 ++ 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index eeec32229..09521b269 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -9,6 +9,10 @@ #include "net_util.h" #include "netdriver.h" +const char* sst_config_path; + +void lf_set_sst_config_path(const char* config_path) { sst_config_path = config_path; } + static sst_priv_t* sst_priv_init() { sst_priv_t* sst_priv = malloc(sizeof(sst_priv_t)); if (!sst_priv) { @@ -20,14 +24,24 @@ static sst_priv_t* sst_priv_init() { } static void sst_open(netdrv_t* drv, int federate_id) { + char cwd[1024]; + // Get the current working directory + if (getcwd(cwd, sizeof(cwd)) != NULL) { + lf_print_error("Current working directory: %s\n", cwd); + } else { + perror("getcwd"); + return 1; + } drv->federate_id = federate_id; sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - char config_path[256]; - sprintf( - config_path, - "/home/dongha/project/lingua-franca/core/src/main/resources/lib/c/reactor-c/core/federated/network/fed_%d.config", - federate_id); - SST_ctx_t* ctx = init_SST((const char*)config_path); + // char config_path[256]; + // sprintf( + // config_path, + // "/home/dongha/project/lingua-franca/core/src/main/resources/lib/c/reactor-c/core/federated/network/fed_%d.config", + // federate_id); + // SST_ctx_t* ctx = init_SST((const char*)config_path); + SST_ctx_t* ctx = init_SST((const char*)sst_config_path); + sst_priv->sst_ctx = ctx; } static void sst_close(netdrv_t* drv) { diff --git a/core/reactor_common.c b/core/reactor_common.c index 6fc3d3824..81c16164a 100644 --- a/core/reactor_common.c +++ b/core/reactor_common.c @@ -35,6 +35,8 @@ #include "environment.h" #include "reactor_common.h" +#include "netdriver.h" + #if !defined(LF_SINGLE_THREADED) #include "watchdog.h" #endif @@ -1003,6 +1005,9 @@ void usage(int argc, const char* argv[]) { printf(" -l\n"); printf(" Send stdout to individual log files for each federate.\n\n"); #endif +#ifdef COMM_TYPE_SST + printf(" -c, --config_path \n"); +#endif printf("Command given:\n"); for (int i = 0; i < argc; i++) { @@ -1151,6 +1156,17 @@ int process_args(int argc, const char* argv[]) { return 0; } } +#endif +#ifdef COMM_TYPE_SST + else if (strcmp(arg, "-c") == 0 || strcmp(arg, "--config_path") == 0) { + if (argc < i + 1) { + lf_print_error("--config_path needs a string argument."); + usage(argc, argv); + return 0; + } + const char* fid = argv[i++]; + lf_set_sst_config_path(fid); + } #endif else if (strcmp(arg, "--ros-args") == 0) { // FIXME: Ignore ROS arguments for now diff --git a/include/core/federated/network/type/lf_sst_support.h b/include/core/federated/network/type/lf_sst_support.h index 2462c7afe..50d1849e1 100644 --- a/include/core/federated/network/type/lf_sst_support.h +++ b/include/core/federated/network/type/lf_sst_support.h @@ -20,5 +20,7 @@ typedef struct sst_priv_t { } sst_priv_t; +void lf_set_sst_config_path(const char* config_path); + #endif // LF_SST_SUPPORT_H From 542dd1be5b05196e9aab22f14d5aeacd78abd76f Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 6 Apr 2024 12:43:28 -0700 Subject: [PATCH 169/262] Change federate config name --- .../federated/network/{fed_0.config => federate__fed1.config} | 4 ++-- .../federated/network/{fed_1.config => federate__fed2.config} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename core/federated/network/{fed_0.config => federate__fed1.config} (52%) rename core/federated/network/{fed_1.config => federate__fed2.config} (52%) diff --git a/core/federated/network/fed_0.config b/core/federated/network/federate__fed1.config similarity index 52% rename from core/federated/network/fed_0.config rename to core/federated/network/federate__fed1.config index 055ee0b41..4bf2578c0 100644 --- a/core/federated/network/fed_0.config +++ b/core/federated/network/federate__fed1.config @@ -1,8 +1,8 @@ entityInfo.name=net1.fed_0 entityInfo.purpose={"group":"Servers"} entityInfo.number_key=1 -authInfo.pubkey.path=/home/dongha/project/iotauth/entity/auth_certs/Auth101EntityCert.pem -entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.Fed_0Key.pem +authInfo.pubkey.path=../../../../../../../../../iotauth/entity/auth_certs/Auth101EntityCert.pem +entityInfo.privkey.path=../../../../../../../../../iotauth/entity/credentials/keys/net1/Net1.Fed_0Key.pem auth.ip.address=127.0.0.1 auth.port.number=21900 entity.server.ip.address=127.0.0.1 diff --git a/core/federated/network/fed_1.config b/core/federated/network/federate__fed2.config similarity index 52% rename from core/federated/network/fed_1.config rename to core/federated/network/federate__fed2.config index c48aefbdd..b28b64927 100644 --- a/core/federated/network/fed_1.config +++ b/core/federated/network/federate__fed2.config @@ -1,8 +1,8 @@ entityInfo.name=net1.fed_1 entityInfo.purpose={"group":"Servers"} entityInfo.number_key=1 -authInfo.pubkey.path=/home/dongha/project/iotauth/entity/auth_certs/Auth101EntityCert.pem -entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.Fed_1Key.pem +authInfo.pubkey.path=../../../../../../../../../../iotauth/entity/auth_certs/Auth101EntityCert.pem +entityInfo.privkey.path=../../../../../../../../../../iotauth/entity/credentials/keys/net1/Net1.Fed_1Key.pem auth.ip.address=127.0.0.1 auth.port.number=21900 entity.server.ip.address=127.0.0.1 From 06284daf69f12a3be5090fd31587a6c3843ec38e Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 6 Apr 2024 20:41:15 -0700 Subject: [PATCH 170/262] Add --sst options to federate --- core/federated/network/lf_sst_support.c | 19 +++---------------- core/reactor_common.c | 6 +++--- .../federated/network/type/lf_sst_support.h | 1 + 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 09521b269..8530e93a5 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -10,8 +10,10 @@ #include "netdriver.h" const char* sst_config_path; +const char* RTI_config_path; void lf_set_sst_config_path(const char* config_path) { sst_config_path = config_path; } +void lf_set_rti_sst_config_path(const char* config_path) { RTI_config_path = config_path; } static sst_priv_t* sst_priv_init() { sst_priv_t* sst_priv = malloc(sizeof(sst_priv_t)); @@ -24,22 +26,8 @@ static sst_priv_t* sst_priv_init() { } static void sst_open(netdrv_t* drv, int federate_id) { - char cwd[1024]; - // Get the current working directory - if (getcwd(cwd, sizeof(cwd)) != NULL) { - lf_print_error("Current working directory: %s\n", cwd); - } else { - perror("getcwd"); - return 1; - } drv->federate_id = federate_id; sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - // char config_path[256]; - // sprintf( - // config_path, - // "/home/dongha/project/lingua-franca/core/src/main/resources/lib/c/reactor-c/core/federated/network/fed_%d.config", - // federate_id); - // SST_ctx_t* ctx = init_SST((const char*)config_path); SST_ctx_t* ctx = init_SST((const char*)sst_config_path); sst_priv->sst_ctx = ctx; @@ -120,8 +108,7 @@ void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { // Port will be NULL on MQTT. int create_server(netdrv_t* drv, int server_type, uint16_t port) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - SST_ctx_t* ctx = init_SST( - "/home/dongha/project/lingua-franca/core/src/main/resources/lib/c/reactor-c/core/federated/RTI/RTI.config"); + SST_ctx_t* ctx = init_SST(RTI_config_path); sst_priv->sst_ctx = ctx; return create_TCP_server(sst_priv->socket_priv, server_type, port); } diff --git a/core/reactor_common.c b/core/reactor_common.c index 81c16164a..037b6d220 100644 --- a/core/reactor_common.c +++ b/core/reactor_common.c @@ -1006,7 +1006,7 @@ void usage(int argc, const char* argv[]) { printf(" Send stdout to individual log files for each federate.\n\n"); #endif #ifdef COMM_TYPE_SST - printf(" -c, --config_path \n"); + printf(" -sst, --sst \n"); #endif printf("Command given:\n"); @@ -1158,9 +1158,9 @@ int process_args(int argc, const char* argv[]) { } #endif #ifdef COMM_TYPE_SST - else if (strcmp(arg, "-c") == 0 || strcmp(arg, "--config_path") == 0) { + else if (strcmp(arg, "-sst") == 0 || strcmp(arg, "--sst") == 0) { if (argc < i + 1) { - lf_print_error("--config_path needs a string argument."); + lf_print_error("--sst needs a string argument."); usage(argc, argv); return 0; } diff --git a/include/core/federated/network/type/lf_sst_support.h b/include/core/federated/network/type/lf_sst_support.h index 50d1849e1..a8f7b4ce5 100644 --- a/include/core/federated/network/type/lf_sst_support.h +++ b/include/core/federated/network/type/lf_sst_support.h @@ -21,6 +21,7 @@ typedef struct sst_priv_t { } sst_priv_t; void lf_set_sst_config_path(const char* config_path); +void lf_set_rti_sst_config_path(const char* config_path); #endif // LF_SST_SUPPORT_H From 6667bc089f85de988cf9dba44ac1b5b250ae4f24 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 6 Apr 2024 20:41:25 -0700 Subject: [PATCH 171/262] Add SSTskeleton.config --- core/federated/network/SSTskeleton.config | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 core/federated/network/SSTskeleton.config diff --git a/core/federated/network/SSTskeleton.config b/core/federated/network/SSTskeleton.config new file mode 100644 index 000000000..e1ad2266e --- /dev/null +++ b/core/federated/network/SSTskeleton.config @@ -0,0 +1,10 @@ +entityInfo.name=net1. +entityInfo.purpose={"group":"Servers"} +entityInfo.number_key=1 +authInfo.pubkey.path= +entityInfo.privkey.path= +auth.ip.address=127.0.0.1 +auth.port.number=21900 +entity.server.ip.address=127.0.0.1 +entity.server.port.number=15045 +network.protocol=TCP \ No newline at end of file From a4153b1c7c7bba754f769c1b8c630bc8c9ee7283 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 6 Apr 2024 20:41:39 -0700 Subject: [PATCH 172/262] Minor fix -remove unneeded configs. --- core/federated/network/federate__fed1.config | 10 ---------- core/federated/network/federate__fed2.config | 10 ---------- 2 files changed, 20 deletions(-) delete mode 100644 core/federated/network/federate__fed1.config delete mode 100644 core/federated/network/federate__fed2.config diff --git a/core/federated/network/federate__fed1.config b/core/federated/network/federate__fed1.config deleted file mode 100644 index 4bf2578c0..000000000 --- a/core/federated/network/federate__fed1.config +++ /dev/null @@ -1,10 +0,0 @@ -entityInfo.name=net1.fed_0 -entityInfo.purpose={"group":"Servers"} -entityInfo.number_key=1 -authInfo.pubkey.path=../../../../../../../../../iotauth/entity/auth_certs/Auth101EntityCert.pem -entityInfo.privkey.path=../../../../../../../../../iotauth/entity/credentials/keys/net1/Net1.Fed_0Key.pem -auth.ip.address=127.0.0.1 -auth.port.number=21900 -entity.server.ip.address=127.0.0.1 -entity.server.port.number=15045 -network.protocol=TCP \ No newline at end of file diff --git a/core/federated/network/federate__fed2.config b/core/federated/network/federate__fed2.config deleted file mode 100644 index b28b64927..000000000 --- a/core/federated/network/federate__fed2.config +++ /dev/null @@ -1,10 +0,0 @@ -entityInfo.name=net1.fed_1 -entityInfo.purpose={"group":"Servers"} -entityInfo.number_key=1 -authInfo.pubkey.path=../../../../../../../../../../iotauth/entity/auth_certs/Auth101EntityCert.pem -entityInfo.privkey.path=../../../../../../../../../../iotauth/entity/credentials/keys/net1/Net1.Fed_1Key.pem -auth.ip.address=127.0.0.1 -auth.port.number=21900 -entity.server.ip.address=127.0.0.1 -entity.server.port.number=15045 -network.protocol=TCP \ No newline at end of file From c634add78535d4a28a7d0b27bf40f7f360d9c100 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 6 Apr 2024 20:55:53 -0700 Subject: [PATCH 173/262] Warning fix --- core/tag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tag.c b/core/tag.c index b45b67acc..442f8320e 100644 --- a/core/tag.c +++ b/core/tag.c @@ -194,7 +194,7 @@ size_t lf_readable_time(char* buffer, instant_t time) { } size_t printed = lf_comma_separated_time(buffer, time); buffer += printed; - snprintf(buffer, 3, " %s", units); + snprintf(buffer, 4, " %s", units); buffer += strlen(units) + 1; } return (buffer - original_buffer); From 4a7a07b6f211334d9ac6213b796badce44ae19c0 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 6 Apr 2024 20:56:24 -0700 Subject: [PATCH 174/262] Add RTI options to get -sst as sstconfig path. --- core/federated/RTI/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index 3c6285819..7813627d2 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -135,6 +135,7 @@ void usage(int argc, const char* argv[]) { lf_print(" clock sync attempt (default is 10). Applies to 'init' and 'on'.\n"); lf_print(" -a, --auth Turn on HMAC authentication options.\n"); lf_print(" -t, --tracing Turn on tracing.\n"); + lf_print(" -sst, --sst SST config path for RTI.\n"); lf_print("Command given:"); for (int i = 0; i < argc; i++) { @@ -261,6 +262,15 @@ int process_args(int argc, const char* argv[]) { return 0; #endif rti.authentication_enabled = true; + } else if (strcmp(argv[i], "-sst") == 0 || strcmp(argv[i], "--sst") == 0) { +#ifndef COMM_TYPE_SST + lf_print_error("--sst requires the RTI to be built with the --DCOMM_TYPE=SST option."); + usage(argc, argv); + return 0; +#else + i++; + lf_set_rti_sst_config_path(argv[i]); +#endif } else if (strcmp(argv[i], "-t") == 0 || strcmp(argv[i], "--tracing") == 0) { rti.base.tracing_enabled = true; } else if (strcmp(argv[i], " ") == 0) { From 6d687d6716001225b8d6125433b9f03894def987 Mon Sep 17 00:00:00 2001 From: Hokeun Kim Date: Mon, 8 Apr 2024 10:14:24 -0700 Subject: [PATCH 175/262] Fix a function not returnning anything --- core/federated/network/lf_sst_support.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 8530e93a5..c7898155d 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -139,6 +139,7 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { } session_key_list_t* s_key_list = init_empty_session_key_list(); + printf("hokeun lf_support 1: %d\n", s_key_list->num_key); SST_session_ctx_t* session_ctx = server_secure_comm_setup(my_priv->sst_ctx, ret_priv->socket_priv->socket_descriptor, s_key_list); free_session_key_list_t(s_key_list); From 4ce35260c1e4d5db1b4735ac63c4b1fb077c6323 Mon Sep 17 00:00:00 2001 From: Hokeun Kim Date: Mon, 8 Apr 2024 10:17:00 -0700 Subject: [PATCH 176/262] Revert wrong commit --- core/federated/network/lf_sst_support.c | 1 - 1 file changed, 1 deletion(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index c7898155d..8530e93a5 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -139,7 +139,6 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { } session_key_list_t* s_key_list = init_empty_session_key_list(); - printf("hokeun lf_support 1: %d\n", s_key_list->num_key); SST_session_ctx_t* session_ctx = server_secure_comm_setup(my_priv->sst_ctx, ret_priv->socket_priv->socket_descriptor, s_key_list); free_session_key_list_t(s_key_list); From baf5723e24bc5db6a926490f46f2289ad531c4a6 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 8 Apr 2024 14:54:14 -0700 Subject: [PATCH 177/262] Add mqtt netdrv_init() --- core/federated/network/lf_mqtt_support.c | 28 +++++++++++++++++-- .../federated/network/type/lf_mqtt_support.h | 5 ++-- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index da15ab93b..23659ada6 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -1,7 +1,14 @@ -#include // IPPROTO_TCP, IPPROTO_UDP - #include "netdriver.h" +static MQTT_priv_t* MQTT_priv_init() { + MQTT_priv_t* MQTT_priv = malloc(sizeof(MQTT_priv_t)); + if (!MQTT_priv) { + lf_print_error_and_exit("Falied to malloc MQTT_priv_t."); + } + memset(MQTT_priv, 0, sizeof(MQTT_priv_t)); + return MQTT_priv; +} + /** * @brief * Initializes structure of netdrv, and priv inside. @@ -13,6 +20,23 @@ netdrv_t* netdrv_init() { // FIXME: Delete below. printf("\n\t[MQTT PROTOCOL]\n\n"); + netdrv_t* drv = malloc(sizeof(netdrv_t)); + if (!drv) { + lf_print_error_and_exit("Falied to malloc netdrv_t."); + } + memset(drv, 0, sizeof(netdrv_t)); + drv->open = MQTT_open; + drv->close = MQTT_close; + // drv->read = socket_read; + // drv->write = socket_write; + drv->read_remaining_bytes = 0; + + // Initialize priv. + MQTT_priv_t* priv = MQTT_priv_init(); + + // Set drv->priv pointer to point the malloc'd priv. + drv->priv = (void*)priv; + return drv; } char* get_host_name(netdrv_t* drv) {} diff --git a/include/core/federated/network/type/lf_mqtt_support.h b/include/core/federated/network/type/lf_mqtt_support.h index bee81f231..755affae8 100644 --- a/include/core/federated/network/type/lf_mqtt_support.h +++ b/include/core/federated/network/type/lf_mqtt_support.h @@ -3,12 +3,13 @@ #include -typedef struct mqtt_priv_t { +typedef struct MQTT_priv_t { MQTTClient client; MQTTClient_connectOptions conn_opts; // = MQTTClient_connectOptions_initializer; MQTTClient_message pubmsg; //= MQTTClient_message_initializer; MQTTClient_deliveryToken token; + int QOS; const char* topic_name; -} mqtt_priv_t; +} MQTT_priv_t; #endif // LF_MQTT_SUPPORT_H From 2d2bce94992fbdf0aabd17022d49d5269f3bdbfb Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 8 Apr 2024 15:49:27 -0700 Subject: [PATCH 178/262] Change netdrv_init() to get federate id and federation id. --- core/federated/RTI/rti_remote.c | 8 +++++--- core/federated/federate.c | 10 +++++----- core/federated/network/lf_mqtt_support.c | 8 ++++++-- core/federated/network/lf_socket_support.c | 10 ++++++---- core/federated/network/lf_sst_support.c | 7 +++---- include/core/federated/network/netdriver.h | 5 +++-- 6 files changed, 28 insertions(+), 20 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 1e81a574f..0f899612e 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1094,6 +1094,7 @@ static int32_t receive_and_check_fed_id_message(netdrv_t* netdrv) { } } federate_info_t* fed = GET_FED_INFO(fed_id); + netdrv->federate_id = (int) fed_id; fed->fed_netdrv = netdrv; // TODO: Make this work for only TCP. @@ -1497,9 +1498,6 @@ void initialize_RTI(rti_remote_t* rti) { initialize_rti_common(&rti_remote->base); rti_remote->base.mutex = &rti_mutex; - // TODO: How to make this compile dependent? When should the options be determined? - rti_remote->rti_netdrv = netdrv_init(); - // federation_rti related initializations rti_remote->max_start_time = 0LL; rti_remote->num_feds_proposed_start = 0; @@ -1516,6 +1514,10 @@ void initialize_RTI(rti_remote_t* rti) { rti_remote->authentication_enabled = false; rti_remote->base.tracing_enabled = false; rti_remote->stop_in_progress = false; + + // TODO: How to make this compile dependent? When should the options be determined? + // -1 for RTI ID. + rti_remote->rti_netdrv = netdrv_init(-1, rti_remote->federation_id); } void free_scheduling_nodes(scheduling_node_t** scheduling_nodes, uint16_t number_of_scheduling_nodes) { diff --git a/core/federated/federate.c b/core/federated/federate.c index ce76c7ba8..b57616156 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1690,8 +1690,8 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { // Iterate until we either successfully connect or exceed the number of // attempts given by CONNECT_MAX_RETRIES. - netdrv_t* netdrv = netdrv_init(); - netdrv->open(netdrv, _lf_my_fed_id); + netdrv_t* netdrv = netdrv_init(_lf_my_fed_id, federation_metadata.federation_id); + netdrv->open(netdrv); set_host_name(netdrv, hostname); set_port(netdrv, uport); result = netdrv_connect(netdrv); @@ -1757,8 +1757,8 @@ void lf_connect_to_rti(const char* hostname, int port) { } // Initialize netdriver to rti. - _fed.netdrv_to_rti = netdrv_init(); // set memory. - _fed.netdrv_to_rti->open(_fed.netdrv_to_rti, _lf_my_fed_id); // open netdriver. + _fed.netdrv_to_rti = netdrv_init(_lf_my_fed_id, federation_metadata.federation_id); // set memory. + _fed.netdrv_to_rti->open(_fed.netdrv_to_rti); // open netdriver. set_host_name(_fed.netdrv_to_rti, hostname); set_port(_fed.netdrv_to_rti, uport); set_specified_port(_fed.netdrv_to_rti, port); @@ -1868,7 +1868,7 @@ void lf_create_server(int specified_port) { uint16_t port = (uint16_t)specified_port; LF_PRINT_LOG("Creating a socket server on port %d.", port); - netdrv_t* my_netdrv = netdrv_init(); + netdrv_t* my_netdrv = netdrv_init(_lf_my_fed_id, federation_metadata.federation_id); create_server(my_netdrv, 1, specified_port); // 1 for FED // TODO: NEED to fix. diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 23659ada6..af417f467 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -17,7 +17,7 @@ static MQTT_priv_t* MQTT_priv_init() { * * @return netdrv_t* */ -netdrv_t* netdrv_init() { +netdrv_t* netdrv_init(int federate_id, const char* federation_id) { // FIXME: Delete below. printf("\n\t[MQTT PROTOCOL]\n\n"); netdrv_t* drv = malloc(sizeof(netdrv_t)); @@ -30,6 +30,8 @@ netdrv_t* netdrv_init() { // drv->read = socket_read; // drv->write = socket_write; drv->read_remaining_bytes = 0; + drv->federate_id = federate_id; + drv->federation_id = federation_id; // Initialize priv. MQTT_priv_t* priv = MQTT_priv_init(); @@ -67,7 +69,9 @@ void netdrv_free(netdrv_t* drv) {} * @param port The port is NULL here. * @return int */ -int create_server(netdrv_t* drv, int server_type, uint16_t port) {} +int create_server(netdrv_t* drv, int server_type, uint16_t port) { + +} /** * @brief diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index f9ff59bef..abda2f4ca 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -26,8 +26,7 @@ // static void socket_open(netdrv_t* drv); // static void socket_close(netdrv_t* drv); -void TCP_open(netdrv_t* drv, int federate_id) { - drv->federate_id = federate_id; +void TCP_open(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; TCP_socket_open(priv); } @@ -37,7 +36,7 @@ void TCP_close(netdrv_t* drv) { TCP_socket_close(priv); } -netdrv_t* netdrv_init() { +netdrv_t* netdrv_init(int federate_id, const char* federation_id) { printf("\n\t[TCP PROTOCOL]\n\n"); netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { @@ -49,6 +48,8 @@ netdrv_t* netdrv_init() { // drv->read = socket_read; // drv->write = socket_write; drv->read_remaining_bytes = 0; + drv->federate_id = federate_id; + drv->federation_id = federation_id; // Initialize priv. socket_priv_t* priv = TCP_socket_priv_init(); @@ -120,7 +121,8 @@ int create_server(netdrv_t* drv, int server_type, uint16_t port) { **/ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { - netdrv_t* ret_netdrv = netdrv_init(); + // -2 is for uninitialized value. + netdrv_t* ret_netdrv = netdrv_init(-2, my_netdrv->federation_id); socket_priv_t* my_priv = (socket_priv_t*)my_netdrv->priv; socket_priv_t* ret_priv = (socket_priv_t*)ret_netdrv->priv; // Wait for an incoming connection request. diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 8530e93a5..8c7b000f2 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -25,8 +25,7 @@ static sst_priv_t* sst_priv_init() { return sst_priv; } -static void sst_open(netdrv_t* drv, int federate_id) { - drv->federate_id = federate_id; +static void sst_open(netdrv_t* drv) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; SST_ctx_t* ctx = init_SST((const char*)sst_config_path); @@ -48,7 +47,7 @@ void netdrv_free(netdrv_t* drv) { free(drv); } -netdrv_t* netdrv_init() { +netdrv_t* netdrv_init(int federate_id, const char* federation_id) { netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { lf_print_error_and_exit("Falied to malloc netdrv_t."); @@ -114,7 +113,7 @@ int create_server(netdrv_t* drv, int server_type, uint16_t port) { } netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { - netdrv_t* ret_netdrv = netdrv_init(); + netdrv_t* ret_netdrv = netdrv_init(-2, my_netdrv->federation_id); sst_priv_t* my_priv = (sst_priv_t*)my_netdrv->priv; sst_priv_t* ret_priv = (sst_priv_t*)ret_netdrv->priv; diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index 342894771..0f9df3818 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -19,13 +19,14 @@ typedef enum netdrv_type_t { NETDRV, UDP } netdrv_type_t; // typedef enum server_type_t { RTI, FED } server_type_t; typedef struct netdrv_t { - void (*open)(struct netdrv_t* drv, int federate_id); + void (*open)(struct netdrv_t* drv); void (*close)(struct netdrv_t* drv); int (*read)(struct netdrv_t* drv, size_t num_bytes, unsigned char* buffer); int (*write)(struct netdrv_t* drv, size_t num_bytes, unsigned char* buffer); void* priv; unsigned int read_remaining_bytes; int federate_id; + const char* federation_id; } netdrv_t; int netdrv_open(netdrv_t* drv, int federate_id); @@ -33,7 +34,7 @@ void netdrv_close(netdrv_t* drv); int netdrv_read(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); int netdrv_write(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); -netdrv_t* netdrv_init(); +netdrv_t* netdrv_init(int federate_id, const char* federation_id); // Port will be NULL on MQTT. int create_server(netdrv_t* drv, int server_type, uint16_t port); From 91781d212a07040f4f1feb567cdd35dfd737401a Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 8 Apr 2024 16:35:04 -0700 Subject: [PATCH 179/262] Remove type/ header from each support. files. --- include/core/federated/network/CMakeLists.txt | 1 + include/core/federated/network/netdriver.h | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/core/federated/network/CMakeLists.txt b/include/core/federated/network/CMakeLists.txt index 6dbb5f9bb..7b071d6f6 100644 --- a/include/core/federated/network/CMakeLists.txt +++ b/include/core/federated/network/CMakeLists.txt @@ -1,6 +1,7 @@ add_library(lf-network-api INTERFACE) add_library(lf::network-api ALIAS lf-network-api) target_include_directories(lf-network-api INTERFACE ${CMAKE_CURRENT_LIST_DIR}) +target_include_directories(lf-network-api INTERFACE ${CMAKE_CURRENT_LIST_DIR}/type) target_include_directories(lf-network-api INTERFACE ${CMAKE_CURRENT_LIST_DIR}/../../utils) target_compile_definitions(lf-network-api INTERFACE COMM_TYPE_${COMM_TYPE}) diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index 0f9df3818..0de6edd71 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -6,11 +6,11 @@ #include "socket_common.h" #if defined(COMM_TYPE_TCP) -#include "type/lf_socket_support.h" +#include "lf_socket_support.h" #elif defined(COMM_TYPE_MQTT) -#include "type/lf_mqtt_support.h" +#include "lf_mqtt_support.h" #elif defined(COMM_TYPE_SST) -#include "type/lf_sst_support.h" +#include "lf_sst_support.h" #endif typedef enum netdrv_type_t { NETDRV, UDP } netdrv_type_t; From 13e4b7f484fc505965ae1bb33b651187b9646c73 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 8 Apr 2024 16:35:28 -0700 Subject: [PATCH 180/262] Add each support.h headers to the c files. --- core/federated/network/lf_mqtt_support.c | 12 ++++++++++++ core/federated/network/lf_sst_support.c | 1 + 2 files changed, 13 insertions(+) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index af417f467..7921c5957 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -1,4 +1,5 @@ #include "netdriver.h" +#include "lf_mqtt_support.h" static MQTT_priv_t* MQTT_priv_init() { MQTT_priv_t* MQTT_priv = malloc(sizeof(MQTT_priv_t)); @@ -70,7 +71,18 @@ void netdrv_free(netdrv_t* drv) {} * @return int */ int create_server(netdrv_t* drv, int server_type, uint16_t port) { + MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; + if ((MQTTClient_create(&MQTT_priv->client, ADDRESS, CLIENTID, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { + lf_print_error_and_exit("Failed to create client, return code %d\n", rc); + exit(EXIT_FAILURE); + } + conn_opts.keepAliveInterval = 20; + conn_opts.cleansession = 1; + if ((rc = MQTTClient_connect(client, &conn_opts)) != MQTTCLIENT_SUCCESS) { + printf("Failed to connect, return code %d\n", rc); + exit(EXIT_FAILURE); + } } /** diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 8c7b000f2..153254740 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -8,6 +8,7 @@ #include "net_common.h" #include "net_util.h" #include "netdriver.h" +#include "lf_sst_support.h" const char* sst_config_path; const char* RTI_config_path; From 82a450c4659be505768734dba674f169ee9264b0 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 8 Apr 2024 16:35:51 -0700 Subject: [PATCH 181/262] Add address, qos, timeout values. --- include/core/federated/network/type/lf_mqtt_support.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/core/federated/network/type/lf_mqtt_support.h b/include/core/federated/network/type/lf_mqtt_support.h index 755affae8..fb6279771 100644 --- a/include/core/federated/network/type/lf_mqtt_support.h +++ b/include/core/federated/network/type/lf_mqtt_support.h @@ -3,12 +3,15 @@ #include +#define ADDRESS "tcp://mqtt.eclipseprojects.io:1883" +#define QOS 2 +#define TIMEOUT 10000L + typedef struct MQTT_priv_t { MQTTClient client; MQTTClient_connectOptions conn_opts; // = MQTTClient_connectOptions_initializer; MQTTClient_message pubmsg; //= MQTTClient_message_initializer; MQTTClient_deliveryToken token; - int QOS; const char* topic_name; } MQTT_priv_t; From 049220730e7e6bd12eb67e313547b79bd46541d1 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 8 Apr 2024 16:37:09 -0700 Subject: [PATCH 182/262] Move qos address, timeout values to .c file. --- core/federated/network/lf_mqtt_support.c | 4 ++++ include/core/federated/network/type/lf_mqtt_support.h | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 7921c5957..ce483c4d2 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -1,6 +1,10 @@ #include "netdriver.h" #include "lf_mqtt_support.h" +#define ADDRESS "tcp://mqtt.eclipseprojects.io:1883" +#define QOS 2 +#define TIMEOUT 10000L + static MQTT_priv_t* MQTT_priv_init() { MQTT_priv_t* MQTT_priv = malloc(sizeof(MQTT_priv_t)); if (!MQTT_priv) { diff --git a/include/core/federated/network/type/lf_mqtt_support.h b/include/core/federated/network/type/lf_mqtt_support.h index fb6279771..e2fee6496 100644 --- a/include/core/federated/network/type/lf_mqtt_support.h +++ b/include/core/federated/network/type/lf_mqtt_support.h @@ -3,10 +3,6 @@ #include -#define ADDRESS "tcp://mqtt.eclipseprojects.io:1883" -#define QOS 2 -#define TIMEOUT 10000L - typedef struct MQTT_priv_t { MQTTClient client; MQTTClient_connectOptions conn_opts; // = MQTTClient_connectOptions_initializer; From 6995ca3ea31ce23b0a0b2b2619c94afd255c0d8a Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 8 Apr 2024 18:21:53 -0700 Subject: [PATCH 183/262] Add create server and read to mqtt support. --- core/federated/network/lf_mqtt_support.c | 81 ++++++++++++++++--- .../federated/network/type/lf_mqtt_support.h | 1 + 2 files changed, 70 insertions(+), 12 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index ce483c4d2..513e87c4d 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -1,9 +1,17 @@ +#include +#include + +#include "util.h" +#include "net_common.h" +#include "net_util.h" #include "netdriver.h" #include "lf_mqtt_support.h" -#define ADDRESS "tcp://mqtt.eclipseprojects.io:1883" -#define QOS 2 -#define TIMEOUT 10000L +// #include + +#define ADDRESS "tcp://mqtt.eclipseprojects.io:1883" +#define QOS 2 +#define TIMEOUT 10000L static MQTT_priv_t* MQTT_priv_init() { MQTT_priv_t* MQTT_priv = malloc(sizeof(MQTT_priv_t)); @@ -11,9 +19,37 @@ static MQTT_priv_t* MQTT_priv_init() { lf_print_error_and_exit("Falied to malloc MQTT_priv_t."); } memset(MQTT_priv, 0, sizeof(MQTT_priv_t)); + MQTTClient_connectOptions conn_opts = MQTTClient_connectOptions_initializer; + memcpy(&MQTT_priv->conn_opts, &conn_opts, sizeof(MQTTClient_connectOptions)); + MQTTClient_message pubmsg = MQTTClient_message_initializer; + memcpy(&MQTT_priv->pubmsg, &pubmsg, sizeof(MQTTClient_message)); return MQTT_priv; } +static const char* create_topic_federation_id_rti(const char* federation_id) { + // Determine the maximum length of the resulting string + int max_length = snprintf(NULL, 0, "%s_RTI", federation_id) + 1; // +1 for null terminator + + // Allocate memory for the resulting string + char* result = (char*)malloc(max_length); + if (result == NULL) { + lf_print_error_and_exit("Falied to malloc."); + return NULL; + } + + // Format the string using snprintf + snprintf(result, max_length, "%s_RTI", federation_id); + + return (const char*) result; +} + +static void set_client_id(MQTT_priv_t* MQTT_priv, int id) { + if (id == -1) { + strcat(MQTT_priv->client_id, "RTI"); + } + sprintf(MQTT_priv->client_id, "%d", id); +} + /** * @brief * Initializes structure of netdrv, and priv inside. @@ -30,8 +66,8 @@ netdrv_t* netdrv_init(int federate_id, const char* federation_id) { lf_print_error_and_exit("Falied to malloc netdrv_t."); } memset(drv, 0, sizeof(netdrv_t)); - drv->open = MQTT_open; - drv->close = MQTT_close; + // drv->open = MQTT_open; + // drv->close = MQTT_close; // drv->read = socket_read; // drv->write = socket_write; drv->read_remaining_bytes = 0; @@ -67,8 +103,8 @@ void netdrv_free(netdrv_t* drv) {} * @brief Create a server object * Initializes MQTT client, and connects to broker. * MQTTClient_connect() - * RTI subscribes “{Federation_ID}_RTI†topic. - * Check socket_common.c for example. It is a common function because also lf_sst_support.c will also use it. + * RTI subscribes “{Federation_ID}_RTI†topic. This should be done here, because the establish_communication_session + * loops. Check socket_common.c for example. It is a common function because also lf_sst_support.c will also use it. * @param drv * @param server_type * @param port The port is NULL here. @@ -76,17 +112,25 @@ void netdrv_free(netdrv_t* drv) {} */ int create_server(netdrv_t* drv, int server_type, uint16_t port) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; - if ((MQTTClient_create(&MQTT_priv->client, ADDRESS, CLIENTID, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { + set_client_id(MQTT_priv, drv->federate_id); + int rc; + if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != + MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to create client, return code %d\n", rc); exit(EXIT_FAILURE); } - conn_opts.keepAliveInterval = 20; - conn_opts.cleansession = 1; - if ((rc = MQTTClient_connect(client, &conn_opts)) != MQTTCLIENT_SUCCESS) { + MQTT_priv->conn_opts.keepAliveInterval = 20; + MQTT_priv->conn_opts.cleansession = 1; + if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { printf("Failed to connect, return code %d\n", rc); exit(EXIT_FAILURE); } + const char* topic = create_topic_federation_id_rti(drv->federation_id); + if ((rc = MQTTClient_subscribe(MQTT_priv->client, topic, QOS)) != MQTTCLIENT_SUCCESS) { + printf("Failed to subscribe, return code %d\n", rc); + rc = EXIT_FAILURE; + } } /** @@ -120,7 +164,20 @@ int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...) {} -ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) {} +ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; + char* topicName = NULL; + int topicLen; + MQTTClient_message* message = NULL; + int rc; + if ((rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 1000000)) != MQTTCLIENT_SUCCESS) { + MQTTClient_free(topicName); + MQTTClient_freeMessage(&message); + lf_print_error_and_exit("Failed to receive message, return code %d\n", rc); + } + MQTTClient_free(topicName); + MQTTClient_freeMessage(&message); +} ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) {} diff --git a/include/core/federated/network/type/lf_mqtt_support.h b/include/core/federated/network/type/lf_mqtt_support.h index e2fee6496..3d66bf3dc 100644 --- a/include/core/federated/network/type/lf_mqtt_support.h +++ b/include/core/federated/network/type/lf_mqtt_support.h @@ -9,6 +9,7 @@ typedef struct MQTT_priv_t { MQTTClient_message pubmsg; //= MQTTClient_message_initializer; MQTTClient_deliveryToken token; const char* topic_name; + char client_id[20]; } MQTT_priv_t; #endif // LF_MQTT_SUPPORT_H From 769772c70ac760c8c05d22cf2964c8cc4b640a03 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 8 Apr 2024 23:03:33 -0700 Subject: [PATCH 184/262] Minor fix --- core/federated/network/lf_sst_support.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 153254740..17c8a1275 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -154,9 +154,6 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { } int netdrv_connect(netdrv_t* drv) { - // char cwd[256]; - // getcwd(cwd, sizeof(cwd)); - // printf("Current working dir: %s\n", cwd); sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; session_key_list_t* s_key_list = get_session_key(sst_priv->sst_ctx, NULL); // Does not increases RTI port number. From d22b32e52661f5cc0ee03222fa0538a309bf1396 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 8 Apr 2024 23:04:17 -0700 Subject: [PATCH 185/262] Implement mqtt support. Almost working.... --- core/federated/RTI/rti_remote.c | 4 +--- core/federated/network/CMakeLists.txt | 3 +++ include/core/federated/network/type/lf_mqtt_support.h | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 0f899612e..8ee5f93c0 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1448,6 +1448,7 @@ void initialize_federate(federate_info_t* fed, uint16_t id) { int32_t start_rti_server(uint16_t port) { _lf_initialize_clock(); + rti_remote->rti_netdrv = netdrv_init(-1, rti_remote->federation_id); // Create the RTI's netdriver. int ret = create_server(rti_remote->rti_netdrv, 0, port); // 0 for RTI lf_print("RTI: Listening for federates."); @@ -1515,9 +1516,6 @@ void initialize_RTI(rti_remote_t* rti) { rti_remote->base.tracing_enabled = false; rti_remote->stop_in_progress = false; - // TODO: How to make this compile dependent? When should the options be determined? - // -1 for RTI ID. - rti_remote->rti_netdrv = netdrv_init(-1, rti_remote->federation_id); } void free_scheduling_nodes(scheduling_node_t** scheduling_nodes, uint16_t number_of_scheduling_nodes) { diff --git a/core/federated/network/CMakeLists.txt b/core/federated/network/CMakeLists.txt index 85f003362..fe285df31 100644 --- a/core/federated/network/CMakeLists.txt +++ b/core/federated/network/CMakeLists.txt @@ -11,6 +11,9 @@ if(COMM_TYPE MATCHES MQTT) find_package(eclipse-paho-mqtt-c REQUIRED) target_link_libraries(lf-network-impl PRIVATE lf::network-api eclipse-paho-mqtt-c::paho-mqtt3a eclipse-paho-mqtt-c::paho-mqtt3c) target_link_libraries(lf-network-impl PUBLIC lf-logging-api) + # $ apt-get install libssl-dev + find_package(OpenSSL REQUIRED) + target_link_libraries(lf-network-impl PUBLIC OpenSSL::SSL) else() target_link_libraries(lf-network-impl PRIVATE lf::network-api) target_link_libraries(lf-network-impl PUBLIC lf-logging-api) diff --git a/include/core/federated/network/type/lf_mqtt_support.h b/include/core/federated/network/type/lf_mqtt_support.h index 3d66bf3dc..9b9a377f4 100644 --- a/include/core/federated/network/type/lf_mqtt_support.h +++ b/include/core/federated/network/type/lf_mqtt_support.h @@ -6,8 +6,6 @@ typedef struct MQTT_priv_t { MQTTClient client; MQTTClient_connectOptions conn_opts; // = MQTTClient_connectOptions_initializer; - MQTTClient_message pubmsg; //= MQTTClient_message_initializer; - MQTTClient_deliveryToken token; const char* topic_name; char client_id[20]; } MQTT_priv_t; From 65329b752110078ecc7a93f1eeb69cf64c3772da Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 8 Apr 2024 23:04:49 -0700 Subject: [PATCH 186/262] Implement read, write, connect... so on... --- core/federated/network/lf_mqtt_support.c | 263 ++++++++++++++++++++--- 1 file changed, 236 insertions(+), 27 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 513e87c4d..b1bf0f40e 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -1,5 +1,6 @@ #include #include +#include #include "util.h" #include "net_common.h" @@ -21,12 +22,10 @@ static MQTT_priv_t* MQTT_priv_init() { memset(MQTT_priv, 0, sizeof(MQTT_priv_t)); MQTTClient_connectOptions conn_opts = MQTTClient_connectOptions_initializer; memcpy(&MQTT_priv->conn_opts, &conn_opts, sizeof(MQTTClient_connectOptions)); - MQTTClient_message pubmsg = MQTTClient_message_initializer; - memcpy(&MQTT_priv->pubmsg, &pubmsg, sizeof(MQTTClient_message)); return MQTT_priv; } -static const char* create_topic_federation_id_rti(const char* federation_id) { +static char* create_topic_federation_id_rti(const char* federation_id) { // Determine the maximum length of the resulting string int max_length = snprintf(NULL, 0, "%s_RTI", federation_id) + 1; // +1 for null terminator @@ -40,7 +39,73 @@ static const char* create_topic_federation_id_rti(const char* federation_id) { // Format the string using snprintf snprintf(result, max_length, "%s_RTI", federation_id); - return (const char*) result; + return result; +} + +static char* create_topic_federation_id_fed_id_to_rti(const char* federation_id, uint16_t fed_id) { + // Determine the maximum length of the resulting string + int max_length = snprintf(NULL, 0, "%s_fed_%d_to_RTI", federation_id, fed_id) + 1; // +1 for null terminator + + // Allocate memory for the resulting string + char* result = (char*)malloc(max_length); + if (result == NULL) { + lf_print_error_and_exit("Falied to malloc."); + return NULL; + } + + // Format the string using snprintf + snprintf(result, max_length, "%s_fed_%d_to_RTI", federation_id, fed_id); + + return result; +} + +static char* create_topic_federation_id_rti_to_fed_id(const char* federation_id, uint16_t fed_id) { + // Determine the maximum length of the resulting string + int max_length = snprintf(NULL, 0, "%s_RTI_to_fed_%d", federation_id, fed_id) + 1; // +1 for null terminator + + // Allocate memory for the resulting string + char* result = (char*)malloc(max_length); + if (result == NULL) { + lf_print_error_and_exit("Falied to malloc."); + return NULL; + } + + // Format the string using snprintf + snprintf(result, max_length, "%s_RTI_to_fed_%d", federation_id, fed_id); + + return result; +} + +// Function to encode data as Base64 using OpenSSL's EVP_EncodeBlock() +static char* base64_encode(const unsigned char* input, int input_len, int* output_len) { + // Calculate the maximum possible length of the Base64 encoded data + int max_encoded_len = (((input_len + 2) / 3) * 4) + 1; // +1 for null terminator + + // Allocate memory for the Base64 encoded data + char* encoded_data = (char*)malloc(max_encoded_len); + if (encoded_data == NULL) { + *output_len = 0; + return NULL; // Memory allocation failed + } + + // Encode the input data as Base64 + *output_len = EVP_EncodeBlock((unsigned char*)encoded_data, input, input_len); + return encoded_data; +} + +// Function to encode data as Base64 using OpenSSL's EVP_DecodeBlock() +static unsigned char* base64_decode(const unsigned char* input, int input_len, int* output_len) { + // Allocate memory for the output buffer + unsigned char* output = (unsigned char*)malloc(input_len); + if (output == NULL) { + return NULL; // Memory allocation failed + } + + // Decode the Base64 data + // TODO: DONGHA This can have errors, because this may add 0bit paddings. + *output_len = EVP_DecodeBlock(output, input, input_len); + + return output; } static void set_client_id(MQTT_priv_t* MQTT_priv, int id) { @@ -50,6 +115,29 @@ static void set_client_id(MQTT_priv_t* MQTT_priv, int id) { sprintf(MQTT_priv->client_id, "%d", id); } +/** + * @brief Federate connects to broker. + * + * @param drv + */ +static void MQTT_open(netdrv_t* drv) { + MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; + set_client_id(MQTT_priv, drv->federate_id); + int rc; + if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != + MQTTCLIENT_SUCCESS) { + lf_print_error_and_exit("Failed to create client, return code %d\n", rc); + exit(EXIT_FAILURE); + } + + MQTT_priv->conn_opts.keepAliveInterval = 20; + MQTT_priv->conn_opts.cleansession = 1; + if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + lf_print_error_and_exit("Failed to connect, return code %d\n", rc); + } +} +static void MQTT_close(netdrv_t* drv) {} + /** * @brief * Initializes structure of netdrv, and priv inside. @@ -59,15 +147,13 @@ static void set_client_id(MQTT_priv_t* MQTT_priv, int id) { * @return netdrv_t* */ netdrv_t* netdrv_init(int federate_id, const char* federation_id) { - // FIXME: Delete below. - printf("\n\t[MQTT PROTOCOL]\n\n"); netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { lf_print_error_and_exit("Falied to malloc netdrv_t."); } memset(drv, 0, sizeof(netdrv_t)); - // drv->open = MQTT_open; - // drv->close = MQTT_close; + drv->open = MQTT_open; + drv->close = MQTT_close; // drv->read = socket_read; // drv->write = socket_write; drv->read_remaining_bytes = 0; @@ -82,6 +168,12 @@ netdrv_t* netdrv_init(int federate_id, const char* federation_id) { return drv; } +void netdrv_free(netdrv_t* drv) { + MQTT_priv_t* priv = (MQTT_priv_t*)drv->priv; + // free(priv); // Already freed on socket close() + free(drv); +} + char* get_host_name(netdrv_t* drv) {} int32_t get_my_port(netdrv_t* drv) {} @@ -97,8 +189,6 @@ void set_specified_port(netdrv_t* drv, int port) {} void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) {} -void netdrv_free(netdrv_t* drv) {} - /** * @brief Create a server object * Initializes MQTT client, and connects to broker. @@ -123,14 +213,15 @@ int create_server(netdrv_t* drv, int server_type, uint16_t port) { MQTT_priv->conn_opts.keepAliveInterval = 20; MQTT_priv->conn_opts.cleansession = 1; if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { - printf("Failed to connect, return code %d\n", rc); - exit(EXIT_FAILURE); + lf_print_error_and_exit("Failed to connect, return code %d\n", rc); } - const char* topic = create_topic_federation_id_rti(drv->federation_id); - if ((rc = MQTTClient_subscribe(MQTT_priv->client, topic, QOS)) != MQTTCLIENT_SUCCESS) { - printf("Failed to subscribe, return code %d\n", rc); - rc = EXIT_FAILURE; + MQTT_priv->topic_name = (const char*) create_topic_federation_id_rti(drv->federation_id); + if ((rc = MQTTClient_subscribe(MQTT_priv->client, MQTT_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { + lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); } + LF_PRINT_LOG("Subscribing on topic %s.", MQTT_priv->topic_name); + + return 1; } /** @@ -143,9 +234,58 @@ int create_server(netdrv_t* drv, int server_type, uint16_t port) { * @param netdrv * @return netdrv_t* */ -netdrv_t* establish_communication_session(netdrv_t* netdrv) {} +netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { + netdrv_t* ret_netdrv = netdrv_init(-2, my_netdrv->federation_id); + // MQTT_priv_t* my_priv = (MQTT_priv_t*)my_netdrv->priv; + MQTT_priv_t* ret_priv = (MQTT_priv_t*)ret_netdrv->priv; + unsigned char buffer[sizeof(uint16_t)]; + read_from_netdrv_fail_on_error(my_netdrv, buffer, sizeof(uint16_t), NULL, "MQTT receive failed."); + uint16_t fed_id = extract_uint16(buffer + 1); + ret_netdrv->federate_id = (int)fed_id; + + set_client_id(ret_priv, ret_netdrv->federate_id); + int rc; + if ((rc = MQTTClient_create(&ret_priv->client, ADDRESS, ret_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != + MQTTCLIENT_SUCCESS) { + lf_print_error_and_exit("Failed to create client, return code %d\n", rc); + } + + ret_priv->conn_opts.keepAliveInterval = 20; + ret_priv->conn_opts.cleansession = 1; + if ((rc = MQTTClient_connect(ret_priv->client, &ret_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + lf_print_error_and_exit("Failed to connect, return code %d\n", rc); + } + + ret_priv->topic_name = (const char*) create_topic_federation_id_fed_id_to_rti(ret_netdrv->federation_id, fed_id); + if ((rc = MQTTClient_subscribe(ret_priv->client, ret_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { + lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); + } + LF_PRINT_LOG("Subscribing on topic %s.", ret_priv->topic_name); + + return ret_netdrv; +} +/** + * @brief Federate publishes it's federate ID to "{Federation_ID}_RTI", then subscribes to + * "{Federation_ID}_RTI_to_fed{fed_id}" + * + * @param drv + * @return int + */ +int netdrv_connect(netdrv_t* drv) { + MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; + int rc; + MQTT_priv->topic_name = (const char*) create_topic_federation_id_rti(drv->federation_id); + unsigned char buffer[sizeof(uint16_t)]; + encode_uint16((uint16_t)drv->federate_id, buffer); + uint16_t fed_id = extract_uint16(buffer + 1); + write_to_netdrv_fail_on_error(drv, sizeof(uint16_t), buffer, NULL, "Failed to write federate_id_to RTI for connection through MQTT."); + MQTT_priv->topic_name = (const char*) create_topic_federation_id_rti_to_fed_id(drv->federation_id, drv->federate_id); + if ((rc = MQTTClient_subscribe(MQTT_priv->client, MQTT_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { + lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); + } + LF_PRINT_LOG("Subscribing on topic %s.", MQTT_priv->topic_name); -int netdrv_connect(netdrv_t* drv) {} +} ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} @@ -157,12 +297,53 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} * @param buffer * @return int */ -int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) {} +int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { + MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; + MQTTClient_message pubmsg = MQTTClient_message_initializer; + MQTTClient_deliveryToken token; + int rc; + pubmsg.payload = (void *) base64_encode(buffer, num_bytes, &pubmsg.payloadlen); + // pubmsg.payload = buffer; + // pubmsg.payloadlen = num_bytes; + pubmsg.qos = QOS; + pubmsg.retained = 0; + // pubmsg.payloadlen does not include null terminator. Only characters. + if ((rc = MQTTClient_publishMessage(MQTT_priv->client, MQTT_priv->topic_name, &pubmsg, &token)) != MQTTCLIENT_SUCCESS) { + lf_print_error_and_exit("Failed to publish message, return code %d\n", rc); + } + LF_PRINT_LOG("Message publishing on topic %s is %.*s", MQTT_priv->topic_name, pubmsg.payloadlen, (char*)(pubmsg.payload)); + rc = MQTTClient_waitForCompletion(MQTT_priv->client, token, TIMEOUT); + free(pubmsg.payload); + return 1; +} -int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) {} +int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { + int bytes_written = write_to_netdrv(drv, num_bytes, buffer); + if (bytes_written <= 0) { + // Write failed. + // Netdrv has probably been closed from the other side. + // Shut down and close the netdrv from this side. + drv->close(drv); + } + return bytes_written; +} void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, - char* format, ...) {} + char* format, ...) { + va_list args; + int bytes_written = write_to_netdrv_close_on_error(drv, num_bytes, buffer); + if (bytes_written <= 0) { + // Write failed. + if (mutex != NULL) { + lf_mutex_unlock(mutex); + } + if (format != NULL) { + lf_print_error_system_failure(format, args); + } else { + lf_print_error("Failed to write to socket. Closing it."); + } + } +} ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; @@ -171,17 +352,45 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len MQTTClient_message* message = NULL; int rc; if ((rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 1000000)) != MQTTCLIENT_SUCCESS) { - MQTTClient_free(topicName); - MQTTClient_freeMessage(&message); lf_print_error_and_exit("Failed to receive message, return code %d\n", rc); } + int decoded_length; + unsigned char * decoded = base64_decode(message->payload, message->payloadlen, &decoded_length); + if (buffer_length < decoded_length) { + lf_print_error("Buffer to read is too short."); + return -1; + } + LF_PRINT_LOG("Message received on topic %s is %.*s", topicName, message->payloadlen, (char*)(message->payload)); + + memcpy(buffer, decoded, decoded_length); + free(decoded); MQTTClient_free(topicName); MQTTClient_freeMessage(&message); + return 1; } -ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) {} +ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); + if (bytes_read <= 0) { + drv->close(drv); + return -1; + } + return bytes_read; +} void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, - char* format, ...) {} - -// int create_clock_sync_server(uint16_t* clock_sync_port) {} + char* format, ...) { + va_list args; + ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); + if (bytes_read <= 0) { + // Read failed. + if (mutex != NULL) { + lf_mutex_unlock(mutex); + } + if (format != NULL) { + lf_print_error_system_failure(format, args); + } else { + lf_print_error_system_failure("Failed to read from netdrv."); + } + } +} From 17bd2724db23de7b26185ea9bc98a90de8505c76 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 9 Apr 2024 15:15:37 -0700 Subject: [PATCH 187/262] Add mqtt join and ack messages --- include/core/federated/network/net_common.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/core/federated/network/net_common.h b/include/core/federated/network/net_common.h index 60cb581b6..4512ba4bb 100644 --- a/include/core/federated/network/net_common.h +++ b/include/core/federated/network/net_common.h @@ -634,6 +634,10 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define MSG_TYPE_FAILED 25 +#define MSG_TYPE_MQTT_JOIN 26 + +#define MSG_TYPE_MQTT_JOIN_ACK 27 + ///////////////////////////////////////////// //// Rejection codes From fd431d4ba00dc98cd1968ad70a7a7aef16c00f4f Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 9 Apr 2024 15:15:57 -0700 Subject: [PATCH 188/262] Fix bugs and add mqtt join and ack protocols. --- core/federated/network/lf_mqtt_support.c | 182 ++++++++++++++--------- 1 file changed, 114 insertions(+), 68 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index b1bf0f40e..d95c69880 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -14,6 +14,8 @@ #define QOS 2 #define TIMEOUT 10000L +static void MQTT_open(netdrv_t* drv); + static MQTT_priv_t* MQTT_priv_init() { MQTT_priv_t* MQTT_priv = malloc(sizeof(MQTT_priv_t)); if (!MQTT_priv) { @@ -78,64 +80,50 @@ static char* create_topic_federation_id_rti_to_fed_id(const char* federation_id, // Function to encode data as Base64 using OpenSSL's EVP_EncodeBlock() static char* base64_encode(const unsigned char* input, int input_len, int* output_len) { - // Calculate the maximum possible length of the Base64 encoded data - int max_encoded_len = (((input_len + 2) / 3) * 4) + 1; // +1 for null terminator - - // Allocate memory for the Base64 encoded data - char* encoded_data = (char*)malloc(max_encoded_len); - if (encoded_data == NULL) { - *output_len = 0; - return NULL; // Memory allocation failed - } + // Calculate the maximum possible length of the Base64 encoded data + int max_encoded_len = (((input_len + 2) / 3) * 4) + 1; // +1 for null terminator + + // Allocate memory for the Base64 encoded data + char* encoded_data = (char*)malloc(max_encoded_len); + if (encoded_data == NULL) { + *output_len = 0; + return NULL; // Memory allocation failed + } - // Encode the input data as Base64 - *output_len = EVP_EncodeBlock((unsigned char*)encoded_data, input, input_len); - return encoded_data; + // Encode the input data as Base64 + *output_len = EVP_EncodeBlock((unsigned char*)encoded_data, input, input_len); + return encoded_data; } // Function to encode data as Base64 using OpenSSL's EVP_DecodeBlock() static unsigned char* base64_decode(const unsigned char* input, int input_len, int* output_len) { - // Allocate memory for the output buffer - unsigned char* output = (unsigned char*)malloc(input_len); - if (output == NULL) { - return NULL; // Memory allocation failed - } + // Allocate memory for the output buffer + unsigned char* output = (unsigned char*)malloc(input_len); + if (output == NULL) { + return NULL; // Memory allocation failed + } - // Decode the Base64 data - // TODO: DONGHA This can have errors, because this may add 0bit paddings. - *output_len = EVP_DecodeBlock(output, input, input_len); + // Decode the Base64 data + // TODO: DONGHA This can have errors, because this may add 0bit paddings. + *output_len = EVP_DecodeBlock(output, input, input_len); - return output; + return output; } -static void set_client_id(MQTT_priv_t* MQTT_priv, int id) { - if (id == -1) { - strcat(MQTT_priv->client_id, "RTI"); +static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id) { + if (my_id == -1 && client_id == -1) { + strcat(MQTT_priv->client_id, "RTI_RTI"); + } else if (my_id == -1) { + sprintf(MQTT_priv->client_id, "RTI_%d", client_id); + } else { + sprintf(MQTT_priv->client_id, "fed%d_fed%d", my_id, client_id); } - sprintf(MQTT_priv->client_id, "%d", id); } -/** - * @brief Federate connects to broker. - * - * @param drv - */ -static void MQTT_open(netdrv_t* drv) { - MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; - set_client_id(MQTT_priv, drv->federate_id); - int rc; - if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != - MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to create client, return code %d\n", rc); - exit(EXIT_FAILURE); - } - - MQTT_priv->conn_opts.keepAliveInterval = 20; - MQTT_priv->conn_opts.cleansession = 1; - if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to connect, return code %d\n", rc); - } +static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id) { + sprintf(MQTT_priv->client_id, "%d", client_id); } + static void MQTT_close(netdrv_t* drv) {} /** @@ -202,7 +190,8 @@ void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) {} */ int create_server(netdrv_t* drv, int server_type, uint16_t port) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; - set_client_id(MQTT_priv, drv->federate_id); + // If RTI calls this, it will be -1. If federate server calls, it will be it's federate ID. + set_MQTTServer_id(MQTT_priv, drv->federate_id, drv->federate_id); int rc; if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { @@ -215,7 +204,7 @@ int create_server(netdrv_t* drv, int server_type, uint16_t port) { if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to connect, return code %d\n", rc); } - MQTT_priv->topic_name = (const char*) create_topic_federation_id_rti(drv->federation_id); + MQTT_priv->topic_name = (const char*)create_topic_federation_id_rti(drv->federation_id); if ((rc = MQTTClient_subscribe(MQTT_priv->client, MQTT_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); } @@ -238,15 +227,18 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { netdrv_t* ret_netdrv = netdrv_init(-2, my_netdrv->federation_id); // MQTT_priv_t* my_priv = (MQTT_priv_t*)my_netdrv->priv; MQTT_priv_t* ret_priv = (MQTT_priv_t*)ret_netdrv->priv; - unsigned char buffer[sizeof(uint16_t)]; - read_from_netdrv_fail_on_error(my_netdrv, buffer, sizeof(uint16_t), NULL, "MQTT receive failed."); + unsigned char buffer[1 + sizeof(uint16_t)]; + read_from_netdrv_fail_on_error(my_netdrv, buffer, 1 + sizeof(uint16_t), NULL, "MQTT receive failed."); + if (buffer[0] != MSG_TYPE_MQTT_JOIN) { + lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_JOIN."); + } uint16_t fed_id = extract_uint16(buffer + 1); ret_netdrv->federate_id = (int)fed_id; - set_client_id(ret_priv, ret_netdrv->federate_id); + set_MQTTServer_id(ret_priv, my_netdrv->federate_id, ret_netdrv->federate_id); int rc; if ((rc = MQTTClient_create(&ret_priv->client, ADDRESS, ret_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != - MQTTCLIENT_SUCCESS) { + MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to create client, return code %d\n", rc); } @@ -256,14 +248,42 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { lf_print_error_and_exit("Failed to connect, return code %d\n", rc); } - ret_priv->topic_name = (const char*) create_topic_federation_id_fed_id_to_rti(ret_netdrv->federation_id, fed_id); - if ((rc = MQTTClient_subscribe(ret_priv->client, ret_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { + char* topic_to_subscribe = create_topic_federation_id_fed_id_to_rti(ret_netdrv->federation_id, fed_id); + if ((rc = MQTTClient_subscribe(ret_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); } - LF_PRINT_LOG("Subscribing on topic %s.", ret_priv->topic_name); + LF_PRINT_LOG("Subscribing on topic %s.", topic_to_subscribe); + free(topic_to_subscribe); + + ret_priv->topic_name = (const char*) create_topic_federation_id_rti_to_fed_id(ret_netdrv->federation_id, fed_id); + buffer[0] = MSG_TYPE_MQTT_JOIN_ACK; + encode_uint16((uint16_t)ret_netdrv->federate_id, buffer + 1); + write_to_netdrv_fail_on_error(ret_netdrv, 1 + sizeof(uint16_t), buffer, NULL, "Failed to send MSG_TYPE_MQTT_JOIN_ACK to federate %d", ret_netdrv->federate_id); return ret_netdrv; } + +/** + * @brief Federate connects to broker. + * + * @param drv + */ +static void MQTT_open(netdrv_t* drv) { + MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; + set_MQTTClient_id(MQTT_priv, drv->federate_id); + int rc; + if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != + MQTTCLIENT_SUCCESS) { + lf_print_error_and_exit("Failed to create client, return code %d\n", rc); + exit(EXIT_FAILURE); + } + + MQTT_priv->conn_opts.keepAliveInterval = 20; + MQTT_priv->conn_opts.cleansession = 1; + if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + lf_print_error_and_exit("Failed to connect, return code %d\n", rc); + } +} /** * @brief Federate publishes it's federate ID to "{Federation_ID}_RTI", then subscribes to * "{Federation_ID}_RTI_to_fed{fed_id}" @@ -274,17 +294,29 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { int netdrv_connect(netdrv_t* drv) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; int rc; - MQTT_priv->topic_name = (const char*) create_topic_federation_id_rti(drv->federation_id); - unsigned char buffer[sizeof(uint16_t)]; - encode_uint16((uint16_t)drv->federate_id, buffer); - uint16_t fed_id = extract_uint16(buffer + 1); - write_to_netdrv_fail_on_error(drv, sizeof(uint16_t), buffer, NULL, "Failed to write federate_id_to RTI for connection through MQTT."); - MQTT_priv->topic_name = (const char*) create_topic_federation_id_rti_to_fed_id(drv->federation_id, drv->federate_id); - if ((rc = MQTTClient_subscribe(MQTT_priv->client, MQTT_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { + MQTT_priv->topic_name = (const char*)create_topic_federation_id_rti(drv->federation_id); + unsigned char buffer[1 + sizeof(uint16_t)]; + buffer[0] = MSG_TYPE_MQTT_JOIN; + lf_print_log("Federate_id: %d", drv->federate_id); + encode_uint16((uint16_t)drv->federate_id, buffer + 1); + write_to_netdrv_fail_on_error(drv, 1 + sizeof(uint16_t), buffer, NULL, + "Failed to write federate_id_to RTI for connection through MQTT."); + free((char*)MQTT_priv->topic_name); + char* topic_to_subscribe = create_topic_federation_id_rti_to_fed_id(drv->federation_id, drv->federate_id); + if ((rc = MQTTClient_subscribe(MQTT_priv->client, (const char*) topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); } - LF_PRINT_LOG("Subscribing on topic %s.", MQTT_priv->topic_name); - + LF_PRINT_LOG("Subscribing on topic %s.", topic_to_subscribe); + free(topic_to_subscribe); + MQTT_priv->topic_name = (const char*) create_topic_federation_id_fed_id_to_rti(drv->federation_id, drv->federate_id); + read_from_netdrv_fail_on_error(drv, buffer, 1 + sizeof(uint16_t), NULL, "Failed to read MSG_TYPE_MQTT_JOIN_ACK."); + if (buffer[0] != MSG_TYPE_MQTT_JOIN_ACK) { + lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_JOIN_ACK."); + } + uint16_t temp_fed_id = extract_uint16(buffer + 1); + if(drv->federate_id != temp_fed_id) { + lf_print_error_and_exit("Wrong federate id. Received %d\n", temp_fed_id); + } } ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} @@ -302,16 +334,23 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { MQTTClient_message pubmsg = MQTTClient_message_initializer; MQTTClient_deliveryToken token; int rc; - pubmsg.payload = (void *) base64_encode(buffer, num_bytes, &pubmsg.payloadlen); + pubmsg.payload = (void*)base64_encode(buffer, num_bytes, &pubmsg.payloadlen); // pubmsg.payload = buffer; // pubmsg.payloadlen = num_bytes; pubmsg.qos = QOS; pubmsg.retained = 0; + + // TESTING + lf_print_log("num_bytes: %ld", num_bytes); + // int decoded_length; + // unsigned char* decoded = base64_decode(pubmsg.payload, pubmsg.payloadlen, &decoded_length); // pubmsg.payloadlen does not include null terminator. Only characters. - if ((rc = MQTTClient_publishMessage(MQTT_priv->client, MQTT_priv->topic_name, &pubmsg, &token)) != MQTTCLIENT_SUCCESS) { + if ((rc = MQTTClient_publishMessage(MQTT_priv->client, MQTT_priv->topic_name, &pubmsg, &token)) != + MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to publish message, return code %d\n", rc); } - LF_PRINT_LOG("Message publishing on topic %s is %.*s", MQTT_priv->topic_name, pubmsg.payloadlen, (char*)(pubmsg.payload)); + // LF_PRINT_LOG("Message publishing on topic %s is %.*s", MQTT_priv->topic_name, pubmsg.payloadlen, + // (char*)(pubmsg.payload)); rc = MQTTClient_waitForCompletion(MQTT_priv->client, token, TIMEOUT); free(pubmsg.payload); return 1; @@ -355,12 +394,19 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len lf_print_error_and_exit("Failed to receive message, return code %d\n", rc); } int decoded_length; - unsigned char * decoded = base64_decode(message->payload, message->payloadlen, &decoded_length); + unsigned char* decoded = base64_decode(message->payload, message->payloadlen, &decoded_length); + lf_print_log("decoded_length: %d", decoded_length); + if (decoded_length == buffer_length + 1) { + decoded_length --; + lf_print_log("decoded_length -- : %d", decoded_length); + } + + if (buffer_length < decoded_length) { lf_print_error("Buffer to read is too short."); return -1; } - LF_PRINT_LOG("Message received on topic %s is %.*s", topicName, message->payloadlen, (char*)(message->payload)); + // LF_PRINT_LOG("Message received on topic %s is %.*s", topicName, message->payloadlen, (char*)(message->payload)); memcpy(buffer, decoded, decoded_length); free(decoded); From 7a789cb729b3e9fdd79dfef960c5ea4aef77c33c Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 9 Apr 2024 16:07:19 -0700 Subject: [PATCH 189/262] Remove function pointers of open and close. --- core/federated/RTI/rti_remote.c | 20 +++++++------ core/federated/federate.c | 17 ++++++----- core/federated/network/lf_mqtt_support.c | 16 ++++------- core/federated/network/lf_socket_support.c | 33 +++++----------------- core/federated/network/lf_sst_support.c | 12 +++----- include/core/federated/network/netdriver.h | 13 ++++----- 6 files changed, 40 insertions(+), 71 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 8ee5f93c0..fb9dd43b8 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -847,7 +847,7 @@ static void handle_federate_failed(federate_info_t* my_fed) { my_fed->enclave.next_event = FOREVER_TAG; // Shutdown and close netdriver. - my_fed->fed_netdrv->close(my_fed->fed_netdrv); + close_netdrv(my_fed->fed_netdrv); // Check downstream federates to see whether they should now be granted a TAG. // To handle cycles, need to create a boolean array to keep @@ -904,7 +904,7 @@ static void handle_federate_resign(federate_info_t* my_fed) { // // We can now safely close the socket. // close(my_fed->socket); // from unistd.h - my_fed->fed_netdrv->close(my_fed->fed_netdrv); + close_netdrv(my_fed->fed_netdrv); // Check downstream federates to see whether they should now be granted a TAG. // To handle cycles, need to create a boolean array to keep @@ -982,7 +982,7 @@ void* federate_info_thread_TCP(void* fed) { // Nothing more to do. Close the socket and exit. // Prevent multiple threads from closing the same socket at the same time. LF_MUTEX_LOCK(&rti_mutex); - my_fed->fed_netdrv->close(my_fed->fed_netdrv); + close_netdrv(my_fed->fed_netdrv); LF_MUTEX_UNLOCK(&rti_mutex); return NULL; } @@ -998,7 +998,7 @@ void send_reject(netdrv_t* netdrv, unsigned char error_code) { lf_print_warning("RTI failed to write MSG_TYPE_REJECT message on the socket."); } // Shutdown and close the netdrv. - netdrv->close(netdrv); + close_netdrv(netdrv); LF_MUTEX_UNLOCK(&rti_mutex); } @@ -1105,7 +1105,8 @@ static int32_t receive_and_check_fed_id_message(netdrv_t* netdrv) { // TODO: NEED TO FIX HERE! inet_ntop(AF_INET, get_ip_addr(fed->fed_netdrv), str, INET_ADDRSTRLEN); - strncpy(get_host_name(fed->fed_netdrv), str, INET_ADDRSTRLEN); + // strncpy(get_host_name(fed->fed_netdrv), str, INET_ADDRSTRLEN); + set_host_name(fed->fed_netdrv, str); LF_PRINT_DEBUG("RTI got address %s from federate %d.", get_host_name(fed->fed_netdrv), fed_id); #endif @@ -1122,7 +1123,7 @@ static int32_t receive_and_check_fed_id_message(netdrv_t* netdrv) { tracepoint_rti_to_federate(send_ACK, fed_id, NULL); } LF_MUTEX_LOCK(&rti_mutex); - if (write_to_netdrv_close_on_error(netdrv, 1, &ack_message) <= 0) { + if (write_to_netdrv_close_on_error(fed->fed_netdrv, 1, &ack_message) <= 0) { LF_MUTEX_UNLOCK(&rti_mutex); lf_print_error("RTI failed to write MSG_TYPE_ACK message to federate %d.", fed_id); return -1; @@ -1367,7 +1368,8 @@ void lf_connect_to_federates(netdrv_t* rti_netdrv) { if (!authenticate_federate(fed_netdrv)) { lf_print_warning("RTI failed to authenticate the incoming federate."); - fed_netdrv->close(fed_netdrv); + close_netdrv(fed_netdrv); + // Ignore the federate that failed authentication. i--; continue; @@ -1434,7 +1436,7 @@ void* respond_to_erroneous_connections(void* nothing) { lf_print_warning("RTI failed to write FEDERATION_ID_DOES_NOT_MATCH to erroneous incoming connection."); } // Close the netdriver. - fed_netdrv->close(fed_netdrv); + close_netdrv(fed_netdrv); } return NULL; } @@ -1485,7 +1487,7 @@ void wait_for_federates(netdrv_t* netdrv) { rti_remote->all_federates_exited = true; - netdrv->close(netdrv); + close_netdrv(netdrv); } void initialize_RTI(rti_remote_t* rti) { diff --git a/core/federated/federate.c b/core/federated/federate.c index b57616156..e0bbef732 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -400,7 +400,7 @@ static void close_inbound_netdrv(int fed_id, int flag) { // } // close(_fed.sockets_for_inbound_p2p_connections[fed_id]); // _fed.sockets_for_inbound_p2p_connections[fed_id] = -1; - _fed.netdrv_for_inbound_p2p_connections[fed_id]->close(_fed.netdrv_for_inbound_p2p_connections[fed_id]); + close_netdrv(_fed.netdrv_for_inbound_p2p_connections[fed_id]); _fed.netdrv_for_inbound_p2p_connections[fed_id] = NULL; } LF_MUTEX_UNLOCK(&netdrv_mutex); @@ -825,7 +825,7 @@ static void close_outbound_netdrv(int fed_id, int flag) { // } // close(_fed.sockets_for_outbound_p2p_connections[fed_id]); // _fed.sockets_for_outbound_p2p_connections[fed_id] = -1; - _fed.netdrv_for_outbound_p2p_connections[fed_id]->close(_fed.netdrv_for_outbound_p2p_connections[fed_id]); + close_netdrv(_fed.netdrv_for_outbound_p2p_connections[fed_id]); _fed.netdrv_for_outbound_p2p_connections[fed_id] = NULL; } if (_lf_normal_termination) { @@ -1691,7 +1691,7 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { // Iterate until we either successfully connect or exceed the number of // attempts given by CONNECT_MAX_RETRIES. netdrv_t* netdrv = netdrv_init(_lf_my_fed_id, federation_metadata.federation_id); - netdrv->open(netdrv); + create_client(netdrv); set_host_name(netdrv, hostname); set_port(netdrv, uport); result = netdrv_connect(netdrv); @@ -1758,7 +1758,7 @@ void lf_connect_to_rti(const char* hostname, int port) { // Initialize netdriver to rti. _fed.netdrv_to_rti = netdrv_init(_lf_my_fed_id, federation_metadata.federation_id); // set memory. - _fed.netdrv_to_rti->open(_fed.netdrv_to_rti); // open netdriver. + create_client(_fed.netdrv_to_rti); set_host_name(_fed.netdrv_to_rti, hostname); set_port(_fed.netdrv_to_rti, uport); set_specified_port(_fed.netdrv_to_rti, port); @@ -1780,7 +1780,7 @@ void lf_connect_to_rti(const char* hostname, int port) { continue; // Try again with a new port. } else { // No point in trying again because it will be the same port. - _fed.netdrv_to_rti->close(_fed.netdrv_to_rti); + close_netdrv(_fed.netdrv_to_rti); lf_print_error_and_exit("Authentication failed."); } } @@ -1957,7 +1957,7 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { // Ignore errors on this response. write_to_netdrv(client_fed_netdrv, 2, response); } - client_fed_netdrv->close(client_fed_netdrv); + close_netdrv(client_fed_netdrv); continue; } @@ -1977,7 +1977,7 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { // Ignore errors on this response. write_to_netdrv(client_fed_netdrv, 2, response); } - client_fed_netdrv->close(client_fed_netdrv); + close_netdrv(client_fed_netdrv); continue; } @@ -2015,8 +2015,7 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { // Failed to create a listening thread. LF_MUTEX_LOCK(&netdrv_mutex); if (_fed.netdrv_for_inbound_p2p_connections[remote_fed_id] != NULL) { - _fed.netdrv_for_inbound_p2p_connections[remote_fed_id]->close( - _fed.netdrv_for_inbound_p2p_connections[remote_fed_id]); + close_netdrv(_fed.netdrv_for_inbound_p2p_connections[remote_fed_id]); _fed.netdrv_for_inbound_p2p_connections[remote_fed_id] = NULL; } LF_MUTEX_UNLOCK(&netdrv_mutex); diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index d95c69880..98c3b2fae 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -14,7 +14,8 @@ #define QOS 2 #define TIMEOUT 10000L -static void MQTT_open(netdrv_t* drv); + +void close_netdrv(netdrv_t* drv) {} static MQTT_priv_t* MQTT_priv_init() { MQTT_priv_t* MQTT_priv = malloc(sizeof(MQTT_priv_t)); @@ -124,7 +125,6 @@ static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id) { sprintf(MQTT_priv->client_id, "%d", client_id); } -static void MQTT_close(netdrv_t* drv) {} /** * @brief @@ -140,10 +140,6 @@ netdrv_t* netdrv_init(int federate_id, const char* federation_id) { lf_print_error_and_exit("Falied to malloc netdrv_t."); } memset(drv, 0, sizeof(netdrv_t)); - drv->open = MQTT_open; - drv->close = MQTT_close; - // drv->read = socket_read; - // drv->write = socket_write; drv->read_remaining_bytes = 0; drv->federate_id = federate_id; drv->federation_id = federation_id; @@ -268,7 +264,7 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { * * @param drv */ -static void MQTT_open(netdrv_t* drv) { +void create_client(netdrv_t* drv) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; set_MQTTClient_id(MQTT_priv, drv->federate_id); int rc; @@ -335,8 +331,6 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { MQTTClient_deliveryToken token; int rc; pubmsg.payload = (void*)base64_encode(buffer, num_bytes, &pubmsg.payloadlen); - // pubmsg.payload = buffer; - // pubmsg.payloadlen = num_bytes; pubmsg.qos = QOS; pubmsg.retained = 0; @@ -362,7 +356,7 @@ int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha // Write failed. // Netdrv has probably been closed from the other side. // Shut down and close the netdrv from this side. - drv->close(drv); + close_netdrv(drv); } return bytes_written; } @@ -418,7 +412,7 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); if (bytes_read <= 0) { - drv->close(drv); + close_netdrv(drv); return -1; } return bytes_read; diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index abda2f4ca..30acb8c6f 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -10,28 +10,7 @@ #include "net_util.h" #include "netdriver.h" -// static void socket_close(netdrv_t* drv) { -// socket_priv_t* priv = (socket_priv_t*)drv->priv; -// if (priv->socket_descriptor > 0) { -// shutdown(priv->socket_descriptor, SHUT_RDWR); -// close(priv->socket_descriptor); -// priv->socket_descriptor = -1; -// } -// } -// static void socket_open(netdrv_t* drv) { -// socket_priv_t* priv = (socket_priv_t*)drv->priv; -// priv->socket_descriptor = create_real_time_tcp_socket_errexit(); -// } - -// static void socket_open(netdrv_t* drv); -// static void socket_close(netdrv_t* drv); - -void TCP_open(netdrv_t* drv) { - socket_priv_t* priv = (socket_priv_t*)drv->priv; - TCP_socket_open(priv); -} - -void TCP_close(netdrv_t* drv) { +void close_netdrv(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; TCP_socket_close(priv); } @@ -43,8 +22,6 @@ netdrv_t* netdrv_init(int federate_id, const char* federation_id) { lf_print_error_and_exit("Falied to malloc netdrv_t."); } memset(drv, 0, sizeof(netdrv_t)); - drv->open = TCP_open; - drv->close = TCP_close; // drv->read = socket_read; // drv->write = socket_write; drv->read_remaining_bytes = 0; @@ -115,6 +92,10 @@ int create_server(netdrv_t* drv, int server_type, uint16_t port) { return create_TCP_server(priv, server_type, port); } +void create_client(netdrv_t* drv) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + TCP_socket_open(priv); +} /** * 1. initializes other side's netdrv. * 2. Establishes communication session. @@ -236,7 +217,7 @@ int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha // Write failed. // Netdrv has probably been closed from the other side. // Shut down and close the netdrv from this side. - drv->close(drv); + close_netdrv(drv); } return bytes_written; } @@ -261,7 +242,7 @@ void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); if (bytes_read <= 0) { - drv->close(drv); + close_netdrv(drv); return -1; } return bytes_read; diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 17c8a1275..d07e02edf 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -26,13 +26,13 @@ static sst_priv_t* sst_priv_init() { return sst_priv; } -static void sst_open(netdrv_t* drv) { +void create_client(netdrv_t* drv) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; SST_ctx_t* ctx = init_SST((const char*)sst_config_path); sst_priv->sst_ctx = ctx; } -static void sst_close(netdrv_t* drv) { +void close_netdrv(netdrv_t* drv) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; if (sst_priv->socket_priv != NULL) { TCP_socket_close(sst_priv->socket_priv); @@ -54,10 +54,6 @@ netdrv_t* netdrv_init(int federate_id, const char* federation_id) { lf_print_error_and_exit("Falied to malloc netdrv_t."); } memset(drv, 0, sizeof(netdrv_t)); - drv->open = sst_open; - drv->close = sst_close; - // drv->read = socket_read; - // drv->write = socket_write; drv->read_remaining_bytes = 0; // Initialize priv. @@ -187,7 +183,7 @@ int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha // Write failed. // Netdrv has probably been closed from the other side. // Shut down and close the netdrv from this side. - drv->close(drv); + close_netdrv(drv); } return bytes_written; } @@ -257,7 +253,7 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); if (bytes_read <= 0) { - drv->close(drv); + close_netdrv(drv); return -1; } return bytes_read; diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index 0de6edd71..fce3e8b11 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -19,26 +19,23 @@ typedef enum netdrv_type_t { NETDRV, UDP } netdrv_type_t; // typedef enum server_type_t { RTI, FED } server_type_t; typedef struct netdrv_t { - void (*open)(struct netdrv_t* drv); - void (*close)(struct netdrv_t* drv); - int (*read)(struct netdrv_t* drv, size_t num_bytes, unsigned char* buffer); - int (*write)(struct netdrv_t* drv, size_t num_bytes, unsigned char* buffer); void* priv; unsigned int read_remaining_bytes; int federate_id; const char* federation_id; } netdrv_t; -int netdrv_open(netdrv_t* drv, int federate_id); -void netdrv_close(netdrv_t* drv); -int netdrv_read(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); -int netdrv_write(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); + +void close_netdrv(netdrv_t* drv); netdrv_t* netdrv_init(int federate_id, const char* federation_id); // Port will be NULL on MQTT. int create_server(netdrv_t* drv, int server_type, uint16_t port); + +void create_client(netdrv_t* drv); + // Returns socket number of clock_sync_server. int create_clock_sync_server(uint16_t* clock_sync_port); From 5832b512dbeccc8946ddad0ad14ba8ab9bfd7467 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 9 Apr 2024 16:41:45 -0700 Subject: [PATCH 190/262] Reorganize code and change some names. --- core/federated/RTI/rti_remote.c | 2 +- core/federated/federate.c | 10 +- core/federated/network/lf_mqtt_support.c | 273 ++++++++++----------- core/federated/network/lf_socket_support.c | 265 ++++++++++++-------- core/federated/network/lf_sst_support.c | 147 ++++++----- include/core/federated/network/netdriver.h | 132 ++++------ 6 files changed, 425 insertions(+), 404 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index fb9dd43b8..5946d52b7 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1450,7 +1450,7 @@ void initialize_federate(federate_info_t* fed, uint16_t id) { int32_t start_rti_server(uint16_t port) { _lf_initialize_clock(); - rti_remote->rti_netdrv = netdrv_init(-1, rti_remote->federation_id); + rti_remote->rti_netdrv = initialize_netdrv(-1, rti_remote->federation_id); // Create the RTI's netdriver. int ret = create_server(rti_remote->rti_netdrv, 0, port); // 0 for RTI lf_print("RTI: Listening for federates."); diff --git a/core/federated/federate.c b/core/federated/federate.c index e0bbef732..f8c6da471 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1690,11 +1690,11 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { // Iterate until we either successfully connect or exceed the number of // attempts given by CONNECT_MAX_RETRIES. - netdrv_t* netdrv = netdrv_init(_lf_my_fed_id, federation_metadata.federation_id); + netdrv_t* netdrv = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); create_client(netdrv); set_host_name(netdrv, hostname); set_port(netdrv, uport); - result = netdrv_connect(netdrv); + result = connect_to_netdrv(netdrv); // Connect was successful. size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); @@ -1757,13 +1757,13 @@ void lf_connect_to_rti(const char* hostname, int port) { } // Initialize netdriver to rti. - _fed.netdrv_to_rti = netdrv_init(_lf_my_fed_id, federation_metadata.federation_id); // set memory. + _fed.netdrv_to_rti = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); // set memory. create_client(_fed.netdrv_to_rti); set_host_name(_fed.netdrv_to_rti, hostname); set_port(_fed.netdrv_to_rti, uport); set_specified_port(_fed.netdrv_to_rti, port); - if (netdrv_connect(_fed.netdrv_to_rti) < 0) { + if (connect_to_netdrv(_fed.netdrv_to_rti) < 0) { lf_print_error_and_exit("Failed to connect() to RTI after %d tries.", CONNECT_MAX_RETRIES); } @@ -1868,7 +1868,7 @@ void lf_create_server(int specified_port) { uint16_t port = (uint16_t)specified_port; LF_PRINT_LOG("Creating a socket server on port %d.", port); - netdrv_t* my_netdrv = netdrv_init(_lf_my_fed_id, federation_metadata.federation_id); + netdrv_t* my_netdrv = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); create_server(my_netdrv, 1, specified_port); // 1 for FED // TODO: NEED to fix. diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 98c3b2fae..685a2faaf 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -14,118 +14,6 @@ #define QOS 2 #define TIMEOUT 10000L - -void close_netdrv(netdrv_t* drv) {} - -static MQTT_priv_t* MQTT_priv_init() { - MQTT_priv_t* MQTT_priv = malloc(sizeof(MQTT_priv_t)); - if (!MQTT_priv) { - lf_print_error_and_exit("Falied to malloc MQTT_priv_t."); - } - memset(MQTT_priv, 0, sizeof(MQTT_priv_t)); - MQTTClient_connectOptions conn_opts = MQTTClient_connectOptions_initializer; - memcpy(&MQTT_priv->conn_opts, &conn_opts, sizeof(MQTTClient_connectOptions)); - return MQTT_priv; -} - -static char* create_topic_federation_id_rti(const char* federation_id) { - // Determine the maximum length of the resulting string - int max_length = snprintf(NULL, 0, "%s_RTI", federation_id) + 1; // +1 for null terminator - - // Allocate memory for the resulting string - char* result = (char*)malloc(max_length); - if (result == NULL) { - lf_print_error_and_exit("Falied to malloc."); - return NULL; - } - - // Format the string using snprintf - snprintf(result, max_length, "%s_RTI", federation_id); - - return result; -} - -static char* create_topic_federation_id_fed_id_to_rti(const char* federation_id, uint16_t fed_id) { - // Determine the maximum length of the resulting string - int max_length = snprintf(NULL, 0, "%s_fed_%d_to_RTI", federation_id, fed_id) + 1; // +1 for null terminator - - // Allocate memory for the resulting string - char* result = (char*)malloc(max_length); - if (result == NULL) { - lf_print_error_and_exit("Falied to malloc."); - return NULL; - } - - // Format the string using snprintf - snprintf(result, max_length, "%s_fed_%d_to_RTI", federation_id, fed_id); - - return result; -} - -static char* create_topic_federation_id_rti_to_fed_id(const char* federation_id, uint16_t fed_id) { - // Determine the maximum length of the resulting string - int max_length = snprintf(NULL, 0, "%s_RTI_to_fed_%d", federation_id, fed_id) + 1; // +1 for null terminator - - // Allocate memory for the resulting string - char* result = (char*)malloc(max_length); - if (result == NULL) { - lf_print_error_and_exit("Falied to malloc."); - return NULL; - } - - // Format the string using snprintf - snprintf(result, max_length, "%s_RTI_to_fed_%d", federation_id, fed_id); - - return result; -} - -// Function to encode data as Base64 using OpenSSL's EVP_EncodeBlock() -static char* base64_encode(const unsigned char* input, int input_len, int* output_len) { - // Calculate the maximum possible length of the Base64 encoded data - int max_encoded_len = (((input_len + 2) / 3) * 4) + 1; // +1 for null terminator - - // Allocate memory for the Base64 encoded data - char* encoded_data = (char*)malloc(max_encoded_len); - if (encoded_data == NULL) { - *output_len = 0; - return NULL; // Memory allocation failed - } - - // Encode the input data as Base64 - *output_len = EVP_EncodeBlock((unsigned char*)encoded_data, input, input_len); - return encoded_data; -} - -// Function to encode data as Base64 using OpenSSL's EVP_DecodeBlock() -static unsigned char* base64_decode(const unsigned char* input, int input_len, int* output_len) { - // Allocate memory for the output buffer - unsigned char* output = (unsigned char*)malloc(input_len); - if (output == NULL) { - return NULL; // Memory allocation failed - } - - // Decode the Base64 data - // TODO: DONGHA This can have errors, because this may add 0bit paddings. - *output_len = EVP_DecodeBlock(output, input, input_len); - - return output; -} - -static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id) { - if (my_id == -1 && client_id == -1) { - strcat(MQTT_priv->client_id, "RTI_RTI"); - } else if (my_id == -1) { - sprintf(MQTT_priv->client_id, "RTI_%d", client_id); - } else { - sprintf(MQTT_priv->client_id, "fed%d_fed%d", my_id, client_id); - } -} - -static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id) { - sprintf(MQTT_priv->client_id, "%d", client_id); -} - - /** * @brief * Initializes structure of netdrv, and priv inside. @@ -134,7 +22,7 @@ static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id) { * * @return netdrv_t* */ -netdrv_t* netdrv_init(int federate_id, const char* federation_id) { +netdrv_t* initialize_netdrv(int federate_id, const char* federation_id) { netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { lf_print_error_and_exit("Falied to malloc netdrv_t."); @@ -152,26 +40,7 @@ netdrv_t* netdrv_init(int federate_id, const char* federation_id) { return drv; } -void netdrv_free(netdrv_t* drv) { - MQTT_priv_t* priv = (MQTT_priv_t*)drv->priv; - // free(priv); // Already freed on socket close() - free(drv); -} - -char* get_host_name(netdrv_t* drv) {} - -int32_t get_my_port(netdrv_t* drv) {} - -int32_t get_port(netdrv_t* drv) {} - -struct in_addr* get_ip_addr(netdrv_t* drv) {} - -void set_host_name(netdrv_t* drv, const char* hostname) {} - -void set_port(netdrv_t* drv, int port) {} -void set_specified_port(netdrv_t* drv, int port) {} - -void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) {} +void close_netdrv(netdrv_t* drv) {} /** * @brief Create a server object @@ -220,7 +89,7 @@ int create_server(netdrv_t* drv, int server_type, uint16_t port) { * @return netdrv_t* */ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { - netdrv_t* ret_netdrv = netdrv_init(-2, my_netdrv->federation_id); + netdrv_t* ret_netdrv = initialize_netdrv(-2, my_netdrv->federation_id); // MQTT_priv_t* my_priv = (MQTT_priv_t*)my_netdrv->priv; MQTT_priv_t* ret_priv = (MQTT_priv_t*)ret_netdrv->priv; unsigned char buffer[1 + sizeof(uint16_t)]; @@ -234,7 +103,7 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { set_MQTTServer_id(ret_priv, my_netdrv->federate_id, ret_netdrv->federate_id); int rc; if ((rc = MQTTClient_create(&ret_priv->client, ADDRESS, ret_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != - MQTTCLIENT_SUCCESS) { + MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to create client, return code %d\n", rc); } @@ -251,10 +120,11 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { LF_PRINT_LOG("Subscribing on topic %s.", topic_to_subscribe); free(topic_to_subscribe); - ret_priv->topic_name = (const char*) create_topic_federation_id_rti_to_fed_id(ret_netdrv->federation_id, fed_id); + ret_priv->topic_name = (const char*)create_topic_federation_id_rti_to_fed_id(ret_netdrv->federation_id, fed_id); buffer[0] = MSG_TYPE_MQTT_JOIN_ACK; encode_uint16((uint16_t)ret_netdrv->federate_id, buffer + 1); - write_to_netdrv_fail_on_error(ret_netdrv, 1 + sizeof(uint16_t), buffer, NULL, "Failed to send MSG_TYPE_MQTT_JOIN_ACK to federate %d", ret_netdrv->federate_id); + write_to_netdrv_fail_on_error(ret_netdrv, 1 + sizeof(uint16_t), buffer, NULL, + "Failed to send MSG_TYPE_MQTT_JOIN_ACK to federate %d", ret_netdrv->federate_id); return ret_netdrv; } @@ -287,7 +157,7 @@ void create_client(netdrv_t* drv) { * @param drv * @return int */ -int netdrv_connect(netdrv_t* drv) { +int connect_to_netdrv(netdrv_t* drv) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; int rc; MQTT_priv->topic_name = (const char*)create_topic_federation_id_rti(drv->federation_id); @@ -299,24 +169,22 @@ int netdrv_connect(netdrv_t* drv) { "Failed to write federate_id_to RTI for connection through MQTT."); free((char*)MQTT_priv->topic_name); char* topic_to_subscribe = create_topic_federation_id_rti_to_fed_id(drv->federation_id, drv->federate_id); - if ((rc = MQTTClient_subscribe(MQTT_priv->client, (const char*) topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { + if ((rc = MQTTClient_subscribe(MQTT_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); } LF_PRINT_LOG("Subscribing on topic %s.", topic_to_subscribe); free(topic_to_subscribe); - MQTT_priv->topic_name = (const char*) create_topic_federation_id_fed_id_to_rti(drv->federation_id, drv->federate_id); + MQTT_priv->topic_name = (const char*)create_topic_federation_id_fed_id_to_rti(drv->federation_id, drv->federate_id); read_from_netdrv_fail_on_error(drv, buffer, 1 + sizeof(uint16_t), NULL, "Failed to read MSG_TYPE_MQTT_JOIN_ACK."); if (buffer[0] != MSG_TYPE_MQTT_JOIN_ACK) { lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_JOIN_ACK."); } uint16_t temp_fed_id = extract_uint16(buffer + 1); - if(drv->federate_id != temp_fed_id) { + if (drv->federate_id != temp_fed_id) { lf_print_error_and_exit("Wrong federate id. Received %d\n", temp_fed_id); } } -ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} - /** * @brief Publish message. * @@ -391,10 +259,9 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len unsigned char* decoded = base64_decode(message->payload, message->payloadlen, &decoded_length); lf_print_log("decoded_length: %d", decoded_length); if (decoded_length == buffer_length + 1) { - decoded_length --; + decoded_length--; lf_print_log("decoded_length -- : %d", decoded_length); } - if (buffer_length < decoded_length) { lf_print_error("Buffer to read is too short."); @@ -434,3 +301,119 @@ void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t } } } + +static MQTT_priv_t* MQTT_priv_init() { + MQTT_priv_t* MQTT_priv = malloc(sizeof(MQTT_priv_t)); + if (!MQTT_priv) { + lf_print_error_and_exit("Falied to malloc MQTT_priv_t."); + } + memset(MQTT_priv, 0, sizeof(MQTT_priv_t)); + MQTTClient_connectOptions conn_opts = MQTTClient_connectOptions_initializer; + memcpy(&MQTT_priv->conn_opts, &conn_opts, sizeof(MQTTClient_connectOptions)); + return MQTT_priv; +} + +static char* create_topic_federation_id_rti(const char* federation_id) { + // Determine the maximum length of the resulting string + int max_length = snprintf(NULL, 0, "%s_RTI", federation_id) + 1; // +1 for null terminator + + // Allocate memory for the resulting string + char* result = (char*)malloc(max_length); + if (result == NULL) { + lf_print_error_and_exit("Falied to malloc."); + return NULL; + } + + // Format the string using snprintf + snprintf(result, max_length, "%s_RTI", federation_id); + + return result; +} + +static char* create_topic_federation_id_fed_id_to_rti(const char* federation_id, uint16_t fed_id) { + // Determine the maximum length of the resulting string + int max_length = snprintf(NULL, 0, "%s_fed_%d_to_RTI", federation_id, fed_id) + 1; // +1 for null terminator + + // Allocate memory for the resulting string + char* result = (char*)malloc(max_length); + if (result == NULL) { + lf_print_error_and_exit("Falied to malloc."); + return NULL; + } + + // Format the string using snprintf + snprintf(result, max_length, "%s_fed_%d_to_RTI", federation_id, fed_id); + + return result; +} + +static char* create_topic_federation_id_rti_to_fed_id(const char* federation_id, uint16_t fed_id) { + // Determine the maximum length of the resulting string + int max_length = snprintf(NULL, 0, "%s_RTI_to_fed_%d", federation_id, fed_id) + 1; // +1 for null terminator + + // Allocate memory for the resulting string + char* result = (char*)malloc(max_length); + if (result == NULL) { + lf_print_error_and_exit("Falied to malloc."); + return NULL; + } + + // Format the string using snprintf + snprintf(result, max_length, "%s_RTI_to_fed_%d", federation_id, fed_id); + + return result; +} + +// Function to encode data as Base64 using OpenSSL's EVP_EncodeBlock() +static char* base64_encode(const unsigned char* input, int input_len, int* output_len) { + // Calculate the maximum possible length of the Base64 encoded data + int max_encoded_len = (((input_len + 2) / 3) * 4) + 1; // +1 for null terminator + + // Allocate memory for the Base64 encoded data + char* encoded_data = (char*)malloc(max_encoded_len); + if (encoded_data == NULL) { + *output_len = 0; + return NULL; // Memory allocation failed + } + + // Encode the input data as Base64 + *output_len = EVP_EncodeBlock((unsigned char*)encoded_data, input, input_len); + return encoded_data; +} + +// Function to encode data as Base64 using OpenSSL's EVP_DecodeBlock() +static unsigned char* base64_decode(const unsigned char* input, int input_len, int* output_len) { + // Allocate memory for the output buffer + unsigned char* output = (unsigned char*)malloc(input_len); + if (output == NULL) { + return NULL; // Memory allocation failed + } + + // Decode the Base64 data + // TODO: DONGHA This can have errors, because this may add 0bit paddings. + *output_len = EVP_DecodeBlock(output, input, input_len); + + return output; +} + +static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id) { + if (my_id == -1 && client_id == -1) { + strcat(MQTT_priv->client_id, "RTI_RTI"); + } else if (my_id == -1) { + sprintf(MQTT_priv->client_id, "RTI_%d", client_id); + } else { + sprintf(MQTT_priv->client_id, "fed%d_fed%d", my_id, client_id); + } +} + +static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id) { sprintf(MQTT_priv->client_id, "%d", client_id); } + +char* get_host_name(netdrv_t* drv) {} +int32_t get_my_port(netdrv_t* drv) {} +int32_t get_port(netdrv_t* drv) {} +struct in_addr* get_ip_addr(netdrv_t* drv) {} +void set_host_name(netdrv_t* drv, const char* hostname) {} +void set_port(netdrv_t* drv, int port) {} +void set_specified_port(netdrv_t* drv, int port) {} +void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) {} +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 30acb8c6f..8f8a75af0 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -10,12 +10,7 @@ #include "net_util.h" #include "netdriver.h" -void close_netdrv(netdrv_t* drv) { - socket_priv_t* priv = (socket_priv_t*)drv->priv; - TCP_socket_close(priv); -} - -netdrv_t* netdrv_init(int federate_id, const char* federation_id) { +netdrv_t* initialize_netdrv(int federate_id, const char* federation_id) { printf("\n\t[TCP PROTOCOL]\n\n"); netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { @@ -36,54 +31,9 @@ netdrv_t* netdrv_init(int federate_id, const char* federation_id) { return drv; } -char* get_host_name(netdrv_t* drv) { - socket_priv_t* priv = (socket_priv_t*)drv->priv; - return priv->server_hostname; -} -int32_t get_my_port(netdrv_t* drv) { - socket_priv_t* priv = (socket_priv_t*)drv->priv; - return priv->port; -} -int32_t get_port(netdrv_t* drv) { - socket_priv_t* priv = (socket_priv_t*)drv->priv; - return (priv == NULL) ? -1 : priv->server_port; -} -// -struct in_addr* get_ip_addr(netdrv_t* drv) { - socket_priv_t* priv = (socket_priv_t*)drv->priv; - return &priv->server_ip_addr; -} -void set_host_name(netdrv_t* drv, const char* hostname) { - socket_priv_t* priv = (socket_priv_t*)drv->priv; - memcpy(priv->server_hostname, hostname, INET_ADDRSTRLEN); -} -void set_port(netdrv_t* drv, int port) { - socket_priv_t* priv = (socket_priv_t*)drv->priv; - priv->server_port = port; -} -void set_specified_port(netdrv_t* drv, int port) { - socket_priv_t* priv = (socket_priv_t*)drv->priv; - priv->user_specified_port = port; -} - -// Unused. -void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { - socket_priv_t* priv = (socket_priv_t*)drv->priv; - priv->server_ip_addr = ip_addr; -} - -void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) { - socket_priv_t* priv_clock = (socket_priv_t*)(clock_drv); - socket_priv_t* priv_rti = (socket_priv_t*)(rti_drv); - priv_clock->UDP_addr.sin_family = AF_INET; - priv_clock->UDP_addr.sin_port = htons(port_num); - priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; -} - -void netdrv_free(netdrv_t* drv) { +void close_netdrv(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; - // free(priv); // Already freed on socket close() - free(drv); + TCP_socket_close(priv); } // This only creates TCP servers not UDP. @@ -92,10 +42,6 @@ int create_server(netdrv_t* drv, int server_type, uint16_t port) { return create_TCP_server(priv, server_type, port); } -void create_client(netdrv_t* drv) { - socket_priv_t* priv = (socket_priv_t*)drv->priv; - TCP_socket_open(priv); -} /** * 1. initializes other side's netdrv. * 2. Establishes communication session. @@ -103,7 +49,7 @@ void create_client(netdrv_t* drv) { **/ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { // -2 is for uninitialized value. - netdrv_t* ret_netdrv = netdrv_init(-2, my_netdrv->federation_id); + netdrv_t* ret_netdrv = initialize_netdrv(-2, my_netdrv->federation_id); socket_priv_t* my_priv = (socket_priv_t*)my_netdrv->priv; socket_priv_t* ret_priv = (socket_priv_t*)ret_netdrv->priv; // Wait for an incoming connection request. @@ -134,7 +80,12 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { return ret_netdrv; } -int netdrv_connect(netdrv_t* drv) { +void create_client(netdrv_t* drv) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + TCP_socket_open(priv); +} + +int connect_to_netdrv(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; struct addrinfo hints; @@ -176,14 +127,21 @@ int netdrv_connect(netdrv_t* drv) { return ret; } -ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { - socket_priv_t* priv = (socket_priv_t*)drv->priv; - ssize_t bytes_read = recv(priv->socket_descriptor, result, 1, MSG_DONTWAIT | MSG_PEEK); - if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) - return 0; - else - return bytes_read; -} + +/** + * Write the specified number of bytes to the specified socket from the + * specified buffer. If an error occurs, return -1 and set errno to indicate + * the cause of the error. If the write succeeds, return 0. + * This function repeats the attempt until the specified number of bytes + * have been written or an error occurs. Specifically, errors EAGAIN, + * EWOULDBLOCK, and EINTR are not considered errors and instead trigger + * another attempt. A delay between attempts is given by + * DELAY_BETWEEN_SOCKET_RETRIES. + * @param socket The socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return The number of bytes written. + */ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { socket_priv_t* priv = (socket_priv_t*)drv->priv; @@ -210,7 +168,15 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { } return bytes_written; } - +/** + * Write the specified number of bytes to the specified socket using write_to_socket + * and close the socket if an error occurs. If an error occurs, this will change the + * socket ID pointed to by the first argument to -1 and will return -1. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. + */ int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { int bytes_written = write_to_netdrv(drv, num_bytes, buffer); if (bytes_written <= 0) { @@ -222,6 +188,21 @@ int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha return bytes_written; } +/** + * Write the specified number of bytes to the specified socket using + * write_to_socket_close_on_error and exit with an error code if an error occurs. + * If the mutex argument is non-NULL, release the mutex before exiting. If the + * format argument is non-null, then use it an any additional arguments to form + * the error message using printf conventions. Otherwise, print a generic error + * message. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @param mutex If non-NULL, the mutex to unlock before exiting. + * @param format A format string for error messages, followed by any number of + * fields that will be used to fill the format string as in printf, or NULL + * to print a generic error message. + */ void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...) { va_list args; @@ -238,33 +219,8 @@ void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha } } } -// TODO: Fix return. -ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { - ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); - if (bytes_read <= 0) { - close_netdrv(drv); - return -1; - } - return bytes_read; -} -// TODO: FIX return -void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, - char* format, ...) { - va_list args; - ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); - if (bytes_read <= 0) { - // Read failed. - if (mutex != NULL) { - lf_mutex_unlock(mutex); - } - if (format != NULL) { - lf_print_error_system_failure(format, args); - } else { - lf_print_error_system_failure("Failed to read from netdrv."); - } - } -} + typedef enum { HEADER_READ, @@ -404,8 +360,20 @@ static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int } } -// TODO: DONGHA: ADD buffer_length checking. -// Returns the total bytes read. +/** + * Read the specified number of bytes from the specified socket into the specified buffer. + * If an error occurs during this reading, return -1 and set errno to indicate + * the cause of the error. If the read succeeds in reading the specified number of bytes, + * return 0. If an EOF occurs before reading the specified number of bytes, return 1. + * This function repeats the read attempt until the specified number of bytes + * have been read, an EOF is read, or an error occurs. Specifically, errors EAGAIN, + * EWOULDBLOCK, and EINTR are not considered errors and instead trigger + * another attempt. A delay between attempts is given by DELAY_BETWEEN_SOCKET_RETRIES. + * @param socket The socket ID. + * @param num_bytes The number of bytes to read. + * @param buffer The buffer into which to put the bytes. + * @return 0 for success, 1 for EOF, and -1 for an error. + */ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { socket_priv_t* priv = (socket_priv_t*)drv->priv; @@ -488,3 +456,108 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len } } } + +/** + * Read the specified number of bytes to the specified socket using read_from_socket + * and close the socket if an error occurs. If an error occurs, this will change the + * socket ID pointed to by the first argument to -1 and will return -1. + * @param socket Pointer to the socket ID. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. + */ +ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); + if (bytes_read <= 0) { + close_netdrv(drv); + return -1; + } + return bytes_read; +} + +/** + * Read the specified number of bytes from the specified socket into the + * specified buffer. If a disconnect or an EOF occurs during this + * reading, then if format is non-null, report an error and exit. + * If the mutex argument is non-NULL, release the mutex before exiting. + * If format is null, then report the error, but do not exit. + * This function takes a formatted string and additional optional arguments + * similar to printf(format, ...) that is appended to the error messages. + * @param socket The socket ID. + * @param num_bytes The number of bytes to read. + * @param buffer The buffer into which to put the bytes. + * @param format A printf-style format string, followed by arguments to + * fill the string, or NULL to not exit with an error message. + * @return The number of bytes read, or 0 if an EOF is received, or + * a negative number for an error. + */ +void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, + char* format, ...) { + va_list args; + ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); + if (bytes_read <= 0) { + // Read failed. + if (mutex != NULL) { + lf_mutex_unlock(mutex); + } + if (format != NULL) { + lf_print_error_system_failure(format, args); + } else { + lf_print_error_system_failure("Failed to read from netdrv."); + } + } +} + +char* get_host_name(netdrv_t* drv) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + return priv->server_hostname; +} +int32_t get_my_port(netdrv_t* drv) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + return priv->port; +} +int32_t get_port(netdrv_t* drv) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + return (priv == NULL) ? -1 : priv->server_port; +} +// +struct in_addr* get_ip_addr(netdrv_t* drv) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + return &priv->server_ip_addr; +} +void set_host_name(netdrv_t* drv, const char* hostname) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + memcpy(priv->server_hostname, hostname, INET_ADDRSTRLEN); +} +void set_port(netdrv_t* drv, int port) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + priv->server_port = port; +} +void set_specified_port(netdrv_t* drv, int port) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + priv->user_specified_port = port; +} + +// Unused. +void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + priv->server_ip_addr = ip_addr; +} + +void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) { + socket_priv_t* priv_clock = (socket_priv_t*)(clock_drv); + socket_priv_t* priv_rti = (socket_priv_t*)(rti_drv); + priv_clock->UDP_addr.sin_family = AF_INET; + priv_clock->UDP_addr.sin_port = htons(port_num); + priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; +} + + +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { + socket_priv_t* priv = (socket_priv_t*)drv->priv; + ssize_t bytes_read = recv(priv->socket_descriptor, result, 1, MSG_DONTWAIT | MSG_PEEK); + if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) + return 0; + else + return bytes_read; +} diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index d07e02edf..aad99a051 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -13,42 +13,7 @@ const char* sst_config_path; const char* RTI_config_path; -void lf_set_sst_config_path(const char* config_path) { sst_config_path = config_path; } -void lf_set_rti_sst_config_path(const char* config_path) { RTI_config_path = config_path; } - -static sst_priv_t* sst_priv_init() { - sst_priv_t* sst_priv = malloc(sizeof(sst_priv_t)); - if (!sst_priv) { - lf_print_error_and_exit("Falied to malloc sst_priv_t."); - } - memset(sst_priv, 0, sizeof(sst_priv_t)); - sst_priv->socket_priv = TCP_socket_priv_init(); - return sst_priv; -} - -void create_client(netdrv_t* drv) { - sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - SST_ctx_t* ctx = init_SST((const char*)sst_config_path); - - sst_priv->sst_ctx = ctx; -} -void close_netdrv(netdrv_t* drv) { - sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - if (sst_priv->socket_priv != NULL) { - TCP_socket_close(sst_priv->socket_priv); - } else { - lf_print_error("Trying to close TCP socket not existing."); - } -} - -void netdrv_free(netdrv_t* drv) { - sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - // free(priv); // Already freed on socket close() - free_SST_ctx_t(sst_priv->sst_ctx); - free(drv); -} - -netdrv_t* netdrv_init(int federate_id, const char* federation_id) { +netdrv_t* initialize_netdrv(int federate_id, const char* federation_id) { netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { lf_print_error_and_exit("Falied to malloc netdrv_t."); @@ -63,42 +28,13 @@ netdrv_t* netdrv_init(int federate_id, const char* federation_id) { drv->priv = (void*)sst_priv; return drv; } - -char* get_host_name(netdrv_t* drv) { - sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - return sst_priv->socket_priv->server_hostname; -} -int32_t get_my_port(netdrv_t* drv) { - sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - return sst_priv->socket_priv->port; -} -int32_t get_port(netdrv_t* drv) { - sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - return (sst_priv->socket_priv == NULL) ? -1 : sst_priv->socket_priv->server_port; -} -// -struct in_addr* get_ip_addr(netdrv_t* drv) { - sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - return &sst_priv->socket_priv->server_ip_addr; -} -void set_host_name(netdrv_t* drv, const char* hostname) { - sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - memcpy(sst_priv->socket_priv->server_hostname, hostname, INET_ADDRSTRLEN); -} -void set_port(netdrv_t* drv, int port) { - sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - sst_priv->socket_priv->server_port = port; -} - -void set_specified_port(netdrv_t* drv, int port) { - sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - sst_priv->socket_priv->user_specified_port = port; -} - -// Unused. -void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { +void close_netdrv(netdrv_t* drv) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - sst_priv->socket_priv->server_ip_addr = ip_addr; + if (sst_priv->socket_priv != NULL) { + TCP_socket_close(sst_priv->socket_priv); + } else { + lf_print_error("Trying to close TCP socket not existing."); + } } // Port will be NULL on MQTT. @@ -110,7 +46,7 @@ int create_server(netdrv_t* drv, int server_type, uint16_t port) { } netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { - netdrv_t* ret_netdrv = netdrv_init(-2, my_netdrv->federation_id); + netdrv_t* ret_netdrv = initialize_netdrv(-2, my_netdrv->federation_id); sst_priv_t* my_priv = (sst_priv_t*)my_netdrv->priv; sst_priv_t* ret_priv = (sst_priv_t*)ret_netdrv->priv; @@ -149,7 +85,14 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { return ret_netdrv; } -int netdrv_connect(netdrv_t* drv) { +void create_client(netdrv_t* drv) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + SST_ctx_t* ctx = init_SST((const char*)sst_config_path); + + sst_priv->sst_ctx = ctx; +} + +int connect_to_netdrv(netdrv_t* drv) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; session_key_list_t* s_key_list = get_session_key(sst_priv->sst_ctx, NULL); // Does not increases RTI port number. @@ -158,6 +101,63 @@ int netdrv_connect(netdrv_t* drv) { return 1; } +void lf_set_sst_config_path(const char* config_path) { sst_config_path = config_path; } +void lf_set_rti_sst_config_path(const char* config_path) { RTI_config_path = config_path; } + +static sst_priv_t* sst_priv_init() { + sst_priv_t* sst_priv = malloc(sizeof(sst_priv_t)); + if (!sst_priv) { + lf_print_error_and_exit("Falied to malloc sst_priv_t."); + } + memset(sst_priv, 0, sizeof(sst_priv_t)); + sst_priv->socket_priv = TCP_socket_priv_init(); + return sst_priv; +} + +void netdrv_free(netdrv_t* drv) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + // free(priv); // Already freed on socket close() + free_SST_ctx_t(sst_priv->sst_ctx); + free(drv); +} + +char* get_host_name(netdrv_t* drv) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + return sst_priv->socket_priv->server_hostname; +} +int32_t get_my_port(netdrv_t* drv) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + return sst_priv->socket_priv->port; +} +int32_t get_port(netdrv_t* drv) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + return (sst_priv->socket_priv == NULL) ? -1 : sst_priv->socket_priv->server_port; +} +// +struct in_addr* get_ip_addr(netdrv_t* drv) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + return &sst_priv->socket_priv->server_ip_addr; +} +void set_host_name(netdrv_t* drv, const char* hostname) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + memcpy(sst_priv->socket_priv->server_hostname, hostname, INET_ADDRSTRLEN); +} +void set_port(netdrv_t* drv, int port) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + sst_priv->socket_priv->server_port = port; +} + +void set_specified_port(netdrv_t* drv, int port) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + sst_priv->socket_priv->user_specified_port = port; +} + +// Unused. +void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + sst_priv->socket_priv->server_ip_addr = ip_addr; +} + ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { // sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; // ssize_t bytes_read = recv(sst_priv->session_ctx->sock, lf_sst_support.cresult, 1, MSG_DONTWAIT | MSG_PEEK); @@ -275,4 +275,3 @@ void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t } } } - diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index fce3e8b11..b0d35a9a2 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -25,110 +25,75 @@ typedef struct netdrv_t { const char* federation_id; } netdrv_t; +/** + * @brief Allocate memory for the netdriver, and save the federate_id, and federation_id used for the netdriver. + * + * @param federate_id + * @param federation_id + * @return netdrv_t* + */ +netdrv_t* initialize_netdrv(int federate_id, const char* federation_id); +/** + * @brief Close connections, and free allocated memory. + * + * @param drv + */ void close_netdrv(netdrv_t* drv); -netdrv_t* netdrv_init(int federate_id, const char* federation_id); // Port will be NULL on MQTT. +/** + * @brief Create a netdriver server. This is such as a server socket which accepts connections. However this is only the creation of the server netdriver. + * + * @param drv + * @param server_type + * @param port + * @return int + */ int create_server(netdrv_t* drv, int server_type, uint16_t port); - -void create_client(netdrv_t* drv); - -// Returns socket number of clock_sync_server. -int create_clock_sync_server(uint16_t* clock_sync_port); - +/** + * @brief Creates a communications session. + * + * @param netdrv + * @return netdrv_t* + */ netdrv_t* establish_communication_session(netdrv_t* netdrv); /** - * Write the specified number of bytes to the specified socket from the - * specified buffer. If an error occurs, return -1 and set errno to indicate - * the cause of the error. If the write succeeds, return 0. - * This function repeats the attempt until the specified number of bytes - * have been written or an error occurs. Specifically, errors EAGAIN, - * EWOULDBLOCK, and EINTR are not considered errors and instead trigger - * another attempt. A delay between attempts is given by - * DELAY_BETWEEN_SOCKET_RETRIES. - * @param socket The socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return The number of bytes written. + * @brief Create a netdriver client. + * + * @param drv */ -int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); +void create_client(netdrv_t* drv); /** - * Write the specified number of bytes to the specified socket using write_to_socket - * and close the socket if an error occurs. If an error occurs, this will change the - * socket ID pointed to by the first argument to -1 and will return -1. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. + * @brief Request connect to the target server. + * + * @param drv + * @return int */ +int connect_to_netdrv(netdrv_t* drv); + + + +int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); + + int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); -/** - * Write the specified number of bytes to the specified socket using - * write_to_socket_close_on_error and exit with an error code if an error occurs. - * If the mutex argument is non-NULL, release the mutex before exiting. If the - * format argument is non-null, then use it an any additional arguments to form - * the error message using printf conventions. Otherwise, print a generic error - * message. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @param mutex If non-NULL, the mutex to unlock before exiting. - * @param format A format string for error messages, followed by any number of - * fields that will be used to fill the format string as in printf, or NULL - * to print a generic error message. - */ + void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...); -/** - * Read the specified number of bytes from the specified socket into the specified buffer. - * If an error occurs during this reading, return -1 and set errno to indicate - * the cause of the error. If the read succeeds in reading the specified number of bytes, - * return 0. If an EOF occurs before reading the specified number of bytes, return 1. - * This function repeats the read attempt until the specified number of bytes - * have been read, an EOF is read, or an error occurs. Specifically, errors EAGAIN, - * EWOULDBLOCK, and EINTR are not considered errors and instead trigger - * another attempt. A delay between attempts is given by DELAY_BETWEEN_SOCKET_RETRIES. - * @param socket The socket ID. - * @param num_bytes The number of bytes to read. - * @param buffer The buffer into which to put the bytes. - * @return 0 for success, 1 for EOF, and -1 for an error. - */ + ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); -/** - * Read the specified number of bytes to the specified socket using read_from_socket - * and close the socket if an error occurs. If an error occurs, this will change the - * socket ID pointed to by the first argument to -1 and will return -1. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. - */ + ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); -/** - * Read the specified number of bytes from the specified socket into the - * specified buffer. If a disconnect or an EOF occurs during this - * reading, then if format is non-null, report an error and exit. - * If the mutex argument is non-NULL, release the mutex before exiting. - * If format is null, then report the error, but do not exit. - * This function takes a formatted string and additional optional arguments - * similar to printf(format, ...) that is appended to the error messages. - * @param socket The socket ID. - * @param num_bytes The number of bytes to read. - * @param buffer The buffer into which to put the bytes. - * @param format A printf-style format string, followed by arguments to - * fill the string, or NULL to not exit with an error message. - * @return The number of bytes read, or 0 if an EOF is received, or - * a negative number for an error. - */ + void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, char* format, ...); @@ -143,9 +108,10 @@ void set_port(netdrv_t* drv, int port); void set_specified_port(netdrv_t* drv, int port); void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr); -void netdrv_free(netdrv_t* drv); +// Returns socket number of clock_sync_server. +int create_clock_sync_server(uint16_t* clock_sync_port); + -int netdrv_connect(netdrv_t* drv); /** * Without blocking, peek at the specified socket and, if there is From 9818da8bf22841acc37feeff381c151ad7996f85 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 9 Apr 2024 16:51:35 -0700 Subject: [PATCH 191/262] Add netdriver.c to take out common functions of the read and write close and fail on errors. --- core/federated/network/CMakeLists.txt | 1 + core/federated/network/lf_mqtt_support.c | 54 ----------- core/federated/network/lf_socket_support.c | 99 ------------------- core/federated/network/netdriver.c | 107 +++++++++++++++++++++ 4 files changed, 108 insertions(+), 153 deletions(-) create mode 100644 core/federated/network/netdriver.c diff --git a/core/federated/network/CMakeLists.txt b/core/federated/network/CMakeLists.txt index fe285df31..9faa09173 100644 --- a/core/federated/network/CMakeLists.txt +++ b/core/federated/network/CMakeLists.txt @@ -23,6 +23,7 @@ include_directories(/usr/local/include) target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/net_util.c + ${CMAKE_CURRENT_LIST_DIR}/netdriver.c ${CMAKE_CURRENT_LIST_DIR}/socket_common.c ) IF(COMM_TYPE MATCHES TCP) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 685a2faaf..27f37105c 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -218,34 +218,6 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { return 1; } -int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { - int bytes_written = write_to_netdrv(drv, num_bytes, buffer); - if (bytes_written <= 0) { - // Write failed. - // Netdrv has probably been closed from the other side. - // Shut down and close the netdrv from this side. - close_netdrv(drv); - } - return bytes_written; -} - -void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, - char* format, ...) { - va_list args; - int bytes_written = write_to_netdrv_close_on_error(drv, num_bytes, buffer); - if (bytes_written <= 0) { - // Write failed. - if (mutex != NULL) { - lf_mutex_unlock(mutex); - } - if (format != NULL) { - lf_print_error_system_failure(format, args); - } else { - lf_print_error("Failed to write to socket. Closing it."); - } - } -} - ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; char* topicName = NULL; @@ -276,32 +248,6 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len return 1; } -ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { - ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); - if (bytes_read <= 0) { - close_netdrv(drv); - return -1; - } - return bytes_read; -} - -void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, - char* format, ...) { - va_list args; - ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); - if (bytes_read <= 0) { - // Read failed. - if (mutex != NULL) { - lf_mutex_unlock(mutex); - } - if (format != NULL) { - lf_print_error_system_failure(format, args); - } else { - lf_print_error_system_failure("Failed to read from netdrv."); - } - } -} - static MQTT_priv_t* MQTT_priv_init() { MQTT_priv_t* MQTT_priv = malloc(sizeof(MQTT_priv_t)); if (!MQTT_priv) { diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 8f8a75af0..2692cbbed 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -168,57 +168,7 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { } return bytes_written; } -/** - * Write the specified number of bytes to the specified socket using write_to_socket - * and close the socket if an error occurs. If an error occurs, this will change the - * socket ID pointed to by the first argument to -1 and will return -1. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. - */ -int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { - int bytes_written = write_to_netdrv(drv, num_bytes, buffer); - if (bytes_written <= 0) { - // Write failed. - // Netdrv has probably been closed from the other side. - // Shut down and close the netdrv from this side. - close_netdrv(drv); - } - return bytes_written; -} -/** - * Write the specified number of bytes to the specified socket using - * write_to_socket_close_on_error and exit with an error code if an error occurs. - * If the mutex argument is non-NULL, release the mutex before exiting. If the - * format argument is non-null, then use it an any additional arguments to form - * the error message using printf conventions. Otherwise, print a generic error - * message. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @param mutex If non-NULL, the mutex to unlock before exiting. - * @param format A format string for error messages, followed by any number of - * fields that will be used to fill the format string as in printf, or NULL - * to print a generic error message. - */ -void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, - char* format, ...) { - va_list args; - int bytes_written = write_to_netdrv_close_on_error(drv, num_bytes, buffer); - if (bytes_written <= 0) { - // Write failed. - if (mutex != NULL) { - lf_mutex_unlock(mutex); - } - if (format != NULL) { - lf_print_error_system_failure(format, args); - } else { - lf_print_error("Failed to write to socket. Closing it."); - } - } -} @@ -457,56 +407,7 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len } } -/** - * Read the specified number of bytes to the specified socket using read_from_socket - * and close the socket if an error occurs. If an error occurs, this will change the - * socket ID pointed to by the first argument to -1 and will return -1. - * @param socket Pointer to the socket ID. - * @param num_bytes The number of bytes to write. - * @param buffer The buffer from which to get the bytes. - * @return 0 for success, -1 for failure. - */ -ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { - ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); - if (bytes_read <= 0) { - close_netdrv(drv); - return -1; - } - return bytes_read; -} -/** - * Read the specified number of bytes from the specified socket into the - * specified buffer. If a disconnect or an EOF occurs during this - * reading, then if format is non-null, report an error and exit. - * If the mutex argument is non-NULL, release the mutex before exiting. - * If format is null, then report the error, but do not exit. - * This function takes a formatted string and additional optional arguments - * similar to printf(format, ...) that is appended to the error messages. - * @param socket The socket ID. - * @param num_bytes The number of bytes to read. - * @param buffer The buffer into which to put the bytes. - * @param format A printf-style format string, followed by arguments to - * fill the string, or NULL to not exit with an error message. - * @return The number of bytes read, or 0 if an EOF is received, or - * a negative number for an error. - */ -void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, - char* format, ...) { - va_list args; - ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); - if (bytes_read <= 0) { - // Read failed. - if (mutex != NULL) { - lf_mutex_unlock(mutex); - } - if (format != NULL) { - lf_print_error_system_failure(format, args); - } else { - lf_print_error_system_failure("Failed to read from netdrv."); - } - } -} char* get_host_name(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; diff --git a/core/federated/network/netdriver.c b/core/federated/network/netdriver.c new file mode 100644 index 000000000..ff3c56b61 --- /dev/null +++ b/core/federated/network/netdriver.c @@ -0,0 +1,107 @@ +#include + +#include "netdriver.h" +#include "util.h" + +/** + * Write the specified number of bytes to the specified netdriver using write_to_netdriver + * and close the netdriver if an error occurs. If an error occurs, this will change the + * netdriver pointed to by the first argument to -1 and will return -1. + * @param netdriver Pointer to the netdriver. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. + */ +int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { + int bytes_written = write_to_netdrv(drv, num_bytes, buffer); + if (bytes_written <= 0) { + // Write failed. + // Netdrv has probably been closed from the other side. + // Shut down and close the netdrv from this side. + close_netdrv(drv); + } + return bytes_written; +} + +/** + * Write the specified number of bytes to the specified netdriver using + * write_to_netdriver_close_on_error and exit with an error code if an error occurs. + * If the mutex argument is non-NULL, release the mutex before exiting. If the + * format argument is non-null, then use it an any additional arguments to form + * the error message using printf conventions. Otherwise, print a generic error + * message. + * @param drv Pointer to the netdriver. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @param mutex If non-NULL, the mutex to unlock before exiting. + * @param format A format string for error messages, followed by any number of + * fields that will be used to fill the format string as in printf, or NULL + * to print a generic error message. + */ +void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, + char* format, ...) { + va_list args; + int bytes_written = write_to_netdrv_close_on_error(drv, num_bytes, buffer); + if (bytes_written <= 0) { + // Write failed. + if (mutex != NULL) { + lf_mutex_unlock(mutex); + } + if (format != NULL) { + lf_print_error_system_failure(format, args); + } else { + lf_print_error("Failed to write to netdriver. Closing it."); + } + } +} + +/** + * Read the specified number of bytes to the specified netdriver using read_from_netdriver + * and close the netdriver if an error occurs. If an error occurs, this will change the + * netdriver pointed to by the first argument to -1 and will return -1. + * @param netdriver Pointer to the netdriver. + * @param num_bytes The number of bytes to write. + * @param buffer The buffer from which to get the bytes. + * @return 0 for success, -1 for failure. + */ +ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); + if (bytes_read <= 0) { + close_netdrv(drv); + return -1; + } + return bytes_read; +} + +/** + * Read the specified number of bytes from the specified netdriver into the + * specified buffer. If a disconnect or an EOF occurs during this + * reading, then if format is non-null, report an error and exit. + * If the mutex argument is non-NULL, release the mutex before exiting. + * If format is null, then report the error, but do not exit. + * This function takes a formatted string and additional optional arguments + * similar to printf(format, ...) that is appended to the error messages. + * @param netdriver The netdriver. + * @param num_bytes The number of bytes to read. + * @param buffer The buffer into which to put the bytes. + * @param format A printf-style format string, followed by arguments to + * fill the string, or NULL to not exit with an error message. + * @return The number of bytes read, or 0 if an EOF is received, or + * a negative number for an error. + */ +void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, + char* format, ...) { + va_list args; + ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); + if (bytes_read <= 0) { + // Read failed. + if (mutex != NULL) { + lf_mutex_unlock(mutex); + } + if (format != NULL) { + lf_print_error_system_failure(format, args); + } else { + lf_print_error_system_failure("Failed to read from netdrv."); + } + } +} From e435ca21699dc998e335181e047b0717dae44b21 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 9 Apr 2024 16:51:49 -0700 Subject: [PATCH 192/262] Reorganize sst support.c --- core/federated/network/lf_sst_support.c | 161 ++++++++---------------- 1 file changed, 53 insertions(+), 108 deletions(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index aad99a051..fe0e4f937 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -13,6 +13,10 @@ const char* sst_config_path; const char* RTI_config_path; +static sst_priv_t* sst_priv_init(); +static void var_length_int_to_num(unsigned char* buf, unsigned int buf_length, unsigned int* num, + unsigned int* var_len_int_buf_size); + netdrv_t* initialize_netdrv(int federate_id, const char* federation_id) { netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { @@ -101,6 +105,48 @@ int connect_to_netdrv(netdrv_t* drv) { return 1; } +int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + if (buffer[0] == MSG_TYPE_FAILED) { + // Just return. + return 0; + } + return send_secure_message((char*)buffer, num_bytes, sst_priv->session_ctx); +} + +ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; + unsigned char sst_buffer[1024]; + ssize_t bytes_read = 0; + unsigned int temp_length = 10; + + // Read 10 bytes first. + bytes_read = read(sst_priv->session_ctx->sock, sst_buffer, temp_length); + unsigned int payload_length; // Length of the payload of SST. + unsigned int var_length_buf_size; + // This fills payload_length and var_length_buf_size. + var_length_int_to_num(sst_buffer + sizeof(unsigned char), bytes_read, &payload_length, &var_length_buf_size); + unsigned int bytes_to_read = payload_length - (temp_length - (sizeof(unsigned char) + var_length_buf_size)); + + unsigned int second_read = 0; + unsigned int more = 0; + while (second_read != bytes_to_read) { + more = read(sst_priv->session_ctx->sock, sst_buffer + temp_length, bytes_to_read); + second_read += more; + bytes_read += second_read; + } + + unsigned int decrypted_buffer_length; + unsigned char* decrypted_buffer = + return_decrypted_buf(sst_buffer, bytes_read, &decrypted_buffer_length, sst_priv->session_ctx); + // Returned SEQ_NUM_BUFFER(8) + decrypted_buffer; + // Doing this because it should be freed. + memcpy(buffer, decrypted_buffer + 8, decrypted_buffer_length - 8); + free(decrypted_buffer); + return decrypted_buffer_length; +} + + void lf_set_sst_config_path(const char* config_path) { sst_config_path = config_path; } void lf_set_rti_sst_config_path(const char* config_path) { RTI_config_path = config_path; } @@ -114,12 +160,12 @@ static sst_priv_t* sst_priv_init() { return sst_priv; } -void netdrv_free(netdrv_t* drv) { - sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - // free(priv); // Already freed on socket close() - free_SST_ctx_t(sst_priv->sst_ctx); - free(drv); -} +// void netdrv_free(netdrv_t* drv) { +// sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; +// // free(priv); // Already freed on socket close() +// free_SST_ctx_t(sst_priv->sst_ctx); +// free(drv); +// } char* get_host_name(netdrv_t* drv) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; @@ -158,52 +204,8 @@ void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { sst_priv->socket_priv->server_ip_addr = ip_addr; } -ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { - // sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - // ssize_t bytes_read = recv(sst_priv->session_ctx->sock, lf_sst_support.cresult, 1, MSG_DONTWAIT | MSG_PEEK); - // if (bytes_read < 0 && (errno == EAGAIN || errno == EWOULDBLOCK)) - // return 0; - // else - // return bytes_read; - return 0; -} - -int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { - sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - if (buffer[0] == MSG_TYPE_FAILED) { - // Just return. - return 0; - } - return send_secure_message((char*)buffer, num_bytes, sst_priv->session_ctx); -} - -int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { - int bytes_written = write_to_netdrv(drv, num_bytes, buffer); - if (bytes_written <= 0) { - // Write failed. - // Netdrv has probably been closed from the other side. - // Shut down and close the netdrv from this side. - close_netdrv(drv); - } - return bytes_written; -} +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} -void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, - char* format, ...) { - va_list args; - int bytes_written = write_to_netdrv_close_on_error(drv, num_bytes, buffer); - if (bytes_written <= 0) { - // Write failed. - if (mutex != NULL) { - lf_mutex_unlock(mutex); - } - if (format != NULL) { - lf_print_error_system_failure(format, args); - } else { - lf_print_error("Failed to write to socket. Closing it."); - } - } -} static void var_length_int_to_num(unsigned char* buf, unsigned int buf_length, unsigned int* num, unsigned int* var_len_int_buf_size) { @@ -218,60 +220,3 @@ static void var_length_int_to_num(unsigned char* buf, unsigned int buf_length, u } } -ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { - sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; - unsigned char sst_buffer[1024]; - ssize_t bytes_read = 0; - unsigned int temp_length = 10; - - // Read 10 bytes first. - bytes_read = read(sst_priv->session_ctx->sock, sst_buffer, temp_length); - unsigned int payload_length; // Length of the payload of SST. - unsigned int var_length_buf_size; - // This fills payload_length and var_length_buf_size. - var_length_int_to_num(sst_buffer + sizeof(unsigned char), bytes_read, &payload_length, &var_length_buf_size); - unsigned int bytes_to_read = payload_length - (temp_length - (sizeof(unsigned char) + var_length_buf_size)); - - unsigned int second_read = 0; - unsigned int more = 0; - while (second_read != bytes_to_read) { - more = read(sst_priv->session_ctx->sock, sst_buffer + temp_length, bytes_to_read); - second_read += more; - bytes_read += second_read; - } - - unsigned int decrypted_buffer_length; - unsigned char* decrypted_buffer = - return_decrypted_buf(sst_buffer, bytes_read, &decrypted_buffer_length, sst_priv->session_ctx); - // Returned SEQ_NUM_BUFFER(8) + decrypted_buffer; - // Doing this because it should be freed. - memcpy(buffer, decrypted_buffer + 8, decrypted_buffer_length - 8); - free(decrypted_buffer); - return decrypted_buffer_length; -} - -ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { - ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); - if (bytes_read <= 0) { - close_netdrv(drv); - return -1; - } - return bytes_read; -} - -void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, - char* format, ...) { - va_list args; - ssize_t bytes_read = read_from_netdrv_close_on_error(drv, buffer, buffer_length); - if (bytes_read <= 0) { - // Read failed. - if (mutex != NULL) { - lf_mutex_unlock(mutex); - } - if (format != NULL) { - lf_print_error_system_failure(format, args); - } else { - lf_print_error_system_failure("Failed to read from netdrv."); - } - } -} From b08aee7d9afa4c29f96e02c9f101869ee7272a28 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 9 Apr 2024 16:55:03 -0700 Subject: [PATCH 193/262] Reorganize --- core/federated/network/lf_mqtt_support.c | 22 +- core/federated/network/lf_socket_support.c | 285 ++++++++++----------- core/federated/network/lf_sst_support.c | 29 +-- 3 files changed, 166 insertions(+), 170 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 27f37105c..01edd7476 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -248,6 +248,18 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len return 1; } +char* get_host_name(netdrv_t* drv) {} +int32_t get_my_port(netdrv_t* drv) {} +int32_t get_port(netdrv_t* drv) {} +struct in_addr* get_ip_addr(netdrv_t* drv) {} +void set_host_name(netdrv_t* drv, const char* hostname) {} +void set_port(netdrv_t* drv, int port) {} +void set_specified_port(netdrv_t* drv, int port) {} +void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) {} +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} + +// ------------------Helper Functions------------------ // + static MQTT_priv_t* MQTT_priv_init() { MQTT_priv_t* MQTT_priv = malloc(sizeof(MQTT_priv_t)); if (!MQTT_priv) { @@ -353,13 +365,3 @@ static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id) } static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id) { sprintf(MQTT_priv->client_id, "%d", client_id); } - -char* get_host_name(netdrv_t* drv) {} -int32_t get_my_port(netdrv_t* drv) {} -int32_t get_port(netdrv_t* drv) {} -struct in_addr* get_ip_addr(netdrv_t* drv) {} -void set_host_name(netdrv_t* drv, const char* hostname) {} -void set_port(netdrv_t* drv, int port) {} -void set_specified_port(netdrv_t* drv, int port) {} -void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) {} -ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 2692cbbed..845dd67e5 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -127,7 +127,6 @@ int connect_to_netdrv(netdrv_t* drv) { return ret; } - /** * Write the specified number of bytes to the specified socket from the * specified buffer. If an error occurs, return -1 and set errno to indicate @@ -169,147 +168,6 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { return bytes_written; } - - - -typedef enum { - HEADER_READ, - READ_MSG_TYPE_FED_IDS, - READ_MSG_TYPE_NEIGHBOR_STRUCTURE, - READ_MSG_TYPE_TAGGED_MESSAGE, - KEEP_READING, - FINISH_READ -} read_state_t; - -static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int* state) { - switch (buffer[0]) { - case MSG_TYPE_REJECT: // 1 +1 - *bytes_to_read = 1; - *state = FINISH_READ; - break; - case MSG_TYPE_ACK: // 1 - *bytes_to_read = 0; - *state = FINISH_READ; - break; - case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 - *bytes_to_read = sizeof(uint16_t); - *state = FINISH_READ; - break; - case MSG_TYPE_FED_IDS: // 1 + sizeof(uint16_t) + 1 + federation_id - *bytes_to_read = sizeof(uint16_t) + 1; - *state = READ_MSG_TYPE_FED_IDS; - break; - case MSG_TYPE_FED_NONCE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) - *bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; - *state = FINISH_READ; - break; - case MSG_TYPE_RTI_RESPONSE: // 1 + NONCE_LENGTH(8) + SHA256_HMAC_LENGTH(32) - *bytes_to_read = NONCE_LENGTH + SHA256_HMAC_LENGTH; - *state = FINISH_READ; - break; - case MSG_TYPE_FED_RESPONSE: // 1 + SHA256_HMAC_LENGTH(32) - *bytes_to_read = SHA256_HMAC_LENGTH; - *state = FINISH_READ; - break; - case MSG_TYPE_TIMESTAMP: // 1+sizeof(int64_t) - *bytes_to_read = sizeof(int64_t); - *state = FINISH_READ; - break; - case MSG_TYPE_RESIGN: - *bytes_to_read = 0; - *state = FINISH_READ; - break; - case MSG_TYPE_TAGGED_MESSAGE: - *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); - *state = READ_MSG_TYPE_TAGGED_MESSAGE; - break; - case MSG_TYPE_NEXT_EVENT_TAG: - *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_TAG_ADVANCE_GRANT: - *bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); - *state = FINISH_READ; - break; - case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: - *bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); - *state = FINISH_READ; - break; - case MSG_TYPE_LATEST_TAG_COMPLETE: - *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_STOP_REQUEST: - *bytes_to_read = MSG_TYPE_STOP_REQUEST_LENGTH - 1; - *state = FINISH_READ; - break; - case MSG_TYPE_STOP_REQUEST_REPLY: - *bytes_to_read = MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1; - *state = FINISH_READ; - break; - case MSG_TYPE_STOP_GRANTED: - *bytes_to_read = MSG_TYPE_STOP_GRANTED_LENGTH - 1; - *state = FINISH_READ; - break; - case MSG_TYPE_ADDRESS_QUERY: - *bytes_to_read = sizeof(uint16_t); - *state = FINISH_READ; - break; - case MSG_TYPE_ADDRESS_QUERY_REPLY: - *bytes_to_read = sizeof(int32_t) + sizeof(struct in_addr); - *state = FINISH_READ; - break; - case MSG_TYPE_ADDRESS_ADVERTISEMENT: - *bytes_to_read = sizeof(int32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_P2P_SENDING_FED_ID: // 1 /////////TODO: CHECK!!!!!!! - *bytes_to_read = sizeof(uint16_t) + 1; - *state = READ_MSG_TYPE_FED_IDS; - break; - case MSG_TYPE_P2P_MESSAGE: - *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); - *state = READ_MSG_TYPE_TAGGED_MESSAGE; - break; - case MSG_TYPE_P2P_TAGGED_MESSAGE: - *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(instant_t) + sizeof(microstep_t); - *state = READ_MSG_TYPE_TAGGED_MESSAGE; - break; - case MSG_TYPE_CLOCK_SYNC_T1: - *bytes_to_read = sizeof(instant_t); - *state = FINISH_READ; - break; - case MSG_TYPE_CLOCK_SYNC_T3: - *bytes_to_read = sizeof(int32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_CLOCK_SYNC_T4: - *bytes_to_read = sizeof(instant_t); - *state = FINISH_READ; - break; - case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: - *bytes_to_read = sizeof(int64_t); - *state = FINISH_READ; - break; - case MSG_TYPE_PORT_ABSENT: - *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); - *state = FINISH_READ; - break; - case MSG_TYPE_NEIGHBOR_STRUCTURE: - *bytes_to_read = MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1; - *state = READ_MSG_TYPE_NEIGHBOR_STRUCTURE; - break; - case MSG_TYPE_FAILED: - *bytes_to_read = 0; - *state = FINISH_READ; - default: - *bytes_to_read = 0; - // Error handling? - *state = FINISH_READ; - lf_print_error_system_failure("Undefined message header. Terminating system."); - } -} - /** * Read the specified number of bytes from the specified socket into the specified buffer. * If an error occurs during this reading, return -1 and set errno to indicate @@ -407,8 +265,6 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len } } - - char* get_host_name(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; return priv->server_hostname; @@ -453,7 +309,6 @@ void set_clock_netdrv(netdrv_t* clock_drv, netdrv_t* rti_drv, uint16_t port_num) priv_clock->UDP_addr.sin_addr = priv_rti->server_ip_addr; } - ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { socket_priv_t* priv = (socket_priv_t*)drv->priv; ssize_t bytes_read = recv(priv->socket_descriptor, result, 1, MSG_DONTWAIT | MSG_PEEK); @@ -462,3 +317,143 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { else return bytes_read; } + +// ------------------Helper Functions------------------ // + +typedef enum { + HEADER_READ, + READ_MSG_TYPE_FED_IDS, + READ_MSG_TYPE_NEIGHBOR_STRUCTURE, + READ_MSG_TYPE_TAGGED_MESSAGE, + KEEP_READING, + FINISH_READ +} read_state_t; + +static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int* state) { + switch (buffer[0]) { + case MSG_TYPE_REJECT: // 1 +1 + *bytes_to_read = 1; + *state = FINISH_READ; + break; + case MSG_TYPE_ACK: // 1 + *bytes_to_read = 0; + *state = FINISH_READ; + break; + case MSG_TYPE_UDP_PORT: // 1 + sizeof(uint16_t) = 3 + *bytes_to_read = sizeof(uint16_t); + *state = FINISH_READ; + break; + case MSG_TYPE_FED_IDS: // 1 + sizeof(uint16_t) + 1 + federation_id + *bytes_to_read = sizeof(uint16_t) + 1; + *state = READ_MSG_TYPE_FED_IDS; + break; + case MSG_TYPE_FED_NONCE: // 1 + sizeof(uint16_t) + NONCE_LENGTH(8) + *bytes_to_read = sizeof(uint16_t) + NONCE_LENGTH; + *state = FINISH_READ; + break; + case MSG_TYPE_RTI_RESPONSE: // 1 + NONCE_LENGTH(8) + SHA256_HMAC_LENGTH(32) + *bytes_to_read = NONCE_LENGTH + SHA256_HMAC_LENGTH; + *state = FINISH_READ; + break; + case MSG_TYPE_FED_RESPONSE: // 1 + SHA256_HMAC_LENGTH(32) + *bytes_to_read = SHA256_HMAC_LENGTH; + *state = FINISH_READ; + break; + case MSG_TYPE_TIMESTAMP: // 1+sizeof(int64_t) + *bytes_to_read = sizeof(int64_t); + *state = FINISH_READ; + break; + case MSG_TYPE_RESIGN: + *bytes_to_read = 0; + *state = FINISH_READ; + break; + case MSG_TYPE_TAGGED_MESSAGE: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(int64_t) + sizeof(uint32_t); + *state = READ_MSG_TYPE_TAGGED_MESSAGE; + break; + case MSG_TYPE_NEXT_EVENT_TAG: + *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_TAG_ADVANCE_GRANT: + *bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); + *state = FINISH_READ; + break; + case MSG_TYPE_PROVISIONAL_TAG_ADVANCE_GRANT: + *bytes_to_read = sizeof(instant_t) + sizeof(microstep_t); + *state = FINISH_READ; + break; + case MSG_TYPE_LATEST_TAG_COMPLETE: + *bytes_to_read = sizeof(int64_t) + sizeof(uint32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_STOP_REQUEST: + *bytes_to_read = MSG_TYPE_STOP_REQUEST_LENGTH - 1; + *state = FINISH_READ; + break; + case MSG_TYPE_STOP_REQUEST_REPLY: + *bytes_to_read = MSG_TYPE_STOP_REQUEST_REPLY_LENGTH - 1; + *state = FINISH_READ; + break; + case MSG_TYPE_STOP_GRANTED: + *bytes_to_read = MSG_TYPE_STOP_GRANTED_LENGTH - 1; + *state = FINISH_READ; + break; + case MSG_TYPE_ADDRESS_QUERY: + *bytes_to_read = sizeof(uint16_t); + *state = FINISH_READ; + break; + case MSG_TYPE_ADDRESS_QUERY_REPLY: + *bytes_to_read = sizeof(int32_t) + sizeof(struct in_addr); + *state = FINISH_READ; + break; + case MSG_TYPE_ADDRESS_ADVERTISEMENT: + *bytes_to_read = sizeof(int32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_P2P_SENDING_FED_ID: // 1 /////////TODO: CHECK!!!!!!! + *bytes_to_read = sizeof(uint16_t) + 1; + *state = READ_MSG_TYPE_FED_IDS; + break; + case MSG_TYPE_P2P_MESSAGE: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); + *state = READ_MSG_TYPE_TAGGED_MESSAGE; + break; + case MSG_TYPE_P2P_TAGGED_MESSAGE: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t) + sizeof(instant_t) + sizeof(microstep_t); + *state = READ_MSG_TYPE_TAGGED_MESSAGE; + break; + case MSG_TYPE_CLOCK_SYNC_T1: + *bytes_to_read = sizeof(instant_t); + *state = FINISH_READ; + break; + case MSG_TYPE_CLOCK_SYNC_T3: + *bytes_to_read = sizeof(int32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_CLOCK_SYNC_T4: + *bytes_to_read = sizeof(instant_t); + *state = FINISH_READ; + break; + case MSG_TYPE_CLOCK_SYNC_CODED_PROBE: + *bytes_to_read = sizeof(int64_t); + *state = FINISH_READ; + break; + case MSG_TYPE_PORT_ABSENT: + *bytes_to_read = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int64_t) + sizeof(uint32_t); + *state = FINISH_READ; + break; + case MSG_TYPE_NEIGHBOR_STRUCTURE: + *bytes_to_read = MSG_TYPE_NEIGHBOR_STRUCTURE_HEADER_SIZE - 1; + *state = READ_MSG_TYPE_NEIGHBOR_STRUCTURE; + break; + case MSG_TYPE_FAILED: + *bytes_to_read = 0; + *state = FINISH_READ; + default: + *bytes_to_read = 0; + // Error handling? + *state = FINISH_READ; + lf_print_error_system_failure("Undefined message header. Terminating system."); + } +} diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index fe0e4f937..a6ee59e1e 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -146,20 +146,6 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len return decrypted_buffer_length; } - -void lf_set_sst_config_path(const char* config_path) { sst_config_path = config_path; } -void lf_set_rti_sst_config_path(const char* config_path) { RTI_config_path = config_path; } - -static sst_priv_t* sst_priv_init() { - sst_priv_t* sst_priv = malloc(sizeof(sst_priv_t)); - if (!sst_priv) { - lf_print_error_and_exit("Falied to malloc sst_priv_t."); - } - memset(sst_priv, 0, sizeof(sst_priv_t)); - sst_priv->socket_priv = TCP_socket_priv_init(); - return sst_priv; -} - // void netdrv_free(netdrv_t* drv) { // sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; // // free(priv); // Already freed on socket close() @@ -206,6 +192,20 @@ void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} +// ------------------Helper Functions------------------ // + +void lf_set_sst_config_path(const char* config_path) { sst_config_path = config_path; } +void lf_set_rti_sst_config_path(const char* config_path) { RTI_config_path = config_path; } + +static sst_priv_t* sst_priv_init() { + sst_priv_t* sst_priv = malloc(sizeof(sst_priv_t)); + if (!sst_priv) { + lf_print_error_and_exit("Falied to malloc sst_priv_t."); + } + memset(sst_priv, 0, sizeof(sst_priv_t)); + sst_priv->socket_priv = TCP_socket_priv_init(); + return sst_priv; +} static void var_length_int_to_num(unsigned char* buf, unsigned int buf_length, unsigned int* num, unsigned int* var_len_int_buf_size) { @@ -219,4 +219,3 @@ static void var_length_int_to_num(unsigned char* buf, unsigned int buf_length, u } } } - From 1b08f0fd9c93b0016e7614f7d7f10fbcef29175f Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 9 Apr 2024 16:56:49 -0700 Subject: [PATCH 194/262] Reorganize --- core/federated/network/lf_socket_support.c | 11 ++--------- .../core/federated/network/type/lf_socket_support.h | 9 +++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 845dd67e5..8a2af8d98 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -10,6 +10,8 @@ #include "net_util.h" #include "netdriver.h" +static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int* state); + netdrv_t* initialize_netdrv(int federate_id, const char* federation_id) { printf("\n\t[TCP PROTOCOL]\n\n"); netdrv_t* drv = malloc(sizeof(netdrv_t)); @@ -320,15 +322,6 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { // ------------------Helper Functions------------------ // -typedef enum { - HEADER_READ, - READ_MSG_TYPE_FED_IDS, - READ_MSG_TYPE_NEIGHBOR_STRUCTURE, - READ_MSG_TYPE_TAGGED_MESSAGE, - KEEP_READING, - FINISH_READ -} read_state_t; - static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int* state) { switch (buffer[0]) { case MSG_TYPE_REJECT: // 1 +1 diff --git a/include/core/federated/network/type/lf_socket_support.h b/include/core/federated/network/type/lf_socket_support.h index a5e15535b..84f758754 100644 --- a/include/core/federated/network/type/lf_socket_support.h +++ b/include/core/federated/network/type/lf_socket_support.h @@ -5,4 +5,13 @@ #define DELAY_BETWEEN_SOCKET_RETRIES MSEC(100) +typedef enum { + HEADER_READ, + READ_MSG_TYPE_FED_IDS, + READ_MSG_TYPE_NEIGHBOR_STRUCTURE, + READ_MSG_TYPE_TAGGED_MESSAGE, + KEEP_READING, + FINISH_READ +} read_state_t; + #endif // LF_SOCKET_SUPPORT_H From d1444a9a0fc57b3a0b23e062008d10207651eda8 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 9 Apr 2024 18:24:50 -0700 Subject: [PATCH 195/262] Minor fix --- core/federated/network/lf_mqtt_support.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 01edd7476..342fcd743 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -14,6 +14,15 @@ #define QOS 2 #define TIMEOUT 10000L +static MQTT_priv_t* MQTT_priv_init(); +static char* create_topic_federation_id_rti(const char* federation_id); +static char* create_topic_federation_id_fed_id_to_rti(const char* federation_id, uint16_t fed_id); +static char* create_topic_federation_id_rti_to_fed_id(const char* federation_id, uint16_t fed_id); +static char* base64_encode(const unsigned char* input, int input_len, int* output_len); +static unsigned char* base64_decode(const unsigned char* input, int input_len, int* output_len); +static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id); +static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id); + /** * @brief * Initializes structure of netdrv, and priv inside. From 2aac754f66f214ac1ffcbad1bdc22399dbd50857 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 27 Apr 2024 15:11:42 -0700 Subject: [PATCH 196/262] Fix mqtt support. Remove base64 encoding decoding and it's libraries. --- core/CMakeLists.txt | 1 - core/federated/network/CMakeLists.txt | 4 +- core/federated/network/lf_mqtt_support.c | 124 +++++++++++--------- include/core/federated/network/net_common.h | 4 +- 4 files changed, 72 insertions(+), 61 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 31509127a..0514878c7 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -28,7 +28,6 @@ list(APPEND REACTORC_SOURCES ${GENERAL_SOURCES}) # Add sources for either threaded or single-threaded runtime if (DEFINED FEDERATED) include(federated/CMakeLists.txt) - # include(federated/network/CMakeLists.txt) endif() # Add sources for either threaded or single-threaded runtime diff --git a/core/federated/network/CMakeLists.txt b/core/federated/network/CMakeLists.txt index 9faa09173..468b8f1d5 100644 --- a/core/federated/network/CMakeLists.txt +++ b/core/federated/network/CMakeLists.txt @@ -12,8 +12,8 @@ if(COMM_TYPE MATCHES MQTT) target_link_libraries(lf-network-impl PRIVATE lf::network-api eclipse-paho-mqtt-c::paho-mqtt3a eclipse-paho-mqtt-c::paho-mqtt3c) target_link_libraries(lf-network-impl PUBLIC lf-logging-api) # $ apt-get install libssl-dev - find_package(OpenSSL REQUIRED) - target_link_libraries(lf-network-impl PUBLIC OpenSSL::SSL) + # find_package(OpenSSL REQUIRED) + # target_link_libraries(lf-network-impl PUBLIC OpenSSL::SSL) else() target_link_libraries(lf-network-impl PRIVATE lf::network-api) target_link_libraries(lf-network-impl PUBLIC lf-logging-api) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 342fcd743..a3e6b9109 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -1,6 +1,6 @@ #include #include -#include +// #include #include "util.h" #include "net_common.h" @@ -18,8 +18,8 @@ static MQTT_priv_t* MQTT_priv_init(); static char* create_topic_federation_id_rti(const char* federation_id); static char* create_topic_federation_id_fed_id_to_rti(const char* federation_id, uint16_t fed_id); static char* create_topic_federation_id_rti_to_fed_id(const char* federation_id, uint16_t fed_id); -static char* base64_encode(const unsigned char* input, int input_len, int* output_len); -static unsigned char* base64_decode(const unsigned char* input, int input_len, int* output_len); +// static char* base64_encode(const unsigned char* input, int input_len, int* output_len); +// static unsigned char* base64_decode(const unsigned char* input, int input_len, int* output_len); static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id); static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id); @@ -130,11 +130,14 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { free(topic_to_subscribe); ret_priv->topic_name = (const char*)create_topic_federation_id_rti_to_fed_id(ret_netdrv->federation_id, fed_id); - buffer[0] = MSG_TYPE_MQTT_JOIN_ACK; + buffer[0] = MSG_TYPE_MQTT_ACCEPT; encode_uint16((uint16_t)ret_netdrv->federate_id, buffer + 1); write_to_netdrv_fail_on_error(ret_netdrv, 1 + sizeof(uint16_t), buffer, NULL, - "Failed to send MSG_TYPE_MQTT_JOIN_ACK to federate %d", ret_netdrv->federate_id); - + "Failed to send MSG_TYPE_MQTT_ACCEPT to federate %d", ret_netdrv->federate_id); + read_from_netdrv_fail_on_error(ret_netdrv, buffer, 1, NULL, "MQTT receive failed."); + if (buffer[0] != MSG_TYPE_MQTT_ACCEPT_ACK) { + lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_ACCEPT_ACK."); + } return ret_netdrv; } @@ -184,14 +187,17 @@ int connect_to_netdrv(netdrv_t* drv) { LF_PRINT_LOG("Subscribing on topic %s.", topic_to_subscribe); free(topic_to_subscribe); MQTT_priv->topic_name = (const char*)create_topic_federation_id_fed_id_to_rti(drv->federation_id, drv->federate_id); - read_from_netdrv_fail_on_error(drv, buffer, 1 + sizeof(uint16_t), NULL, "Failed to read MSG_TYPE_MQTT_JOIN_ACK."); - if (buffer[0] != MSG_TYPE_MQTT_JOIN_ACK) { - lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_JOIN_ACK."); + read_from_netdrv_fail_on_error(drv, buffer, 1 + sizeof(uint16_t), NULL, "Failed to read MSG_TYPE_MQTT_ACCEPT."); + if (buffer[0] != MSG_TYPE_MQTT_ACCEPT) { + lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_ACCEPT."); } uint16_t temp_fed_id = extract_uint16(buffer + 1); if (drv->federate_id != temp_fed_id) { lf_print_error_and_exit("Wrong federate id. Received %d\n", temp_fed_id); } + buffer[0] = MSG_TYPE_MQTT_ACCEPT_ACK; + write_to_netdrv_fail_on_error(drv, 1, buffer, NULL, + "Failed to write MSG_TYPE_MQTT_ACCEPT_ACK_to RTI for connection through MQTT."); } /** @@ -207,7 +213,9 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { MQTTClient_message pubmsg = MQTTClient_message_initializer; MQTTClient_deliveryToken token; int rc; - pubmsg.payload = (void*)base64_encode(buffer, num_bytes, &pubmsg.payloadlen); + // pubmsg.payload = (void*)base64_encode(buffer, num_bytes, &pubmsg.payloadlen); + pubmsg.payload = (void*) buffer; + pubmsg.payloadlen = num_bytes; pubmsg.qos = QOS; pubmsg.retained = 0; @@ -223,7 +231,7 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { // LF_PRINT_LOG("Message publishing on topic %s is %.*s", MQTT_priv->topic_name, pubmsg.payloadlen, // (char*)(pubmsg.payload)); rc = MQTTClient_waitForCompletion(MQTT_priv->client, token, TIMEOUT); - free(pubmsg.payload); + // free(pubmsg.payload); return 1; } @@ -236,22 +244,24 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len if ((rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 1000000)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to receive message, return code %d\n", rc); } - int decoded_length; - unsigned char* decoded = base64_decode(message->payload, message->payloadlen, &decoded_length); - lf_print_log("decoded_length: %d", decoded_length); - if (decoded_length == buffer_length + 1) { - decoded_length--; - lf_print_log("decoded_length -- : %d", decoded_length); - } - - if (buffer_length < decoded_length) { - lf_print_error("Buffer to read is too short."); - return -1; - } - // LF_PRINT_LOG("Message received on topic %s is %.*s", topicName, message->payloadlen, (char*)(message->payload)); - - memcpy(buffer, decoded, decoded_length); - free(decoded); + // int decoded_length; + // unsigned char* decoded = base64_decode(message->payload, message->payloadlen, &decoded_length); + // lf_print_log("decoded_length: %d", decoded_length); + // if (decoded_length == buffer_length + 1) { + // decoded_length--; + // lf_print_log("decoded_length -- : %d", decoded_length); + // } + + // if (buffer_length < decoded_length) { + // lf_print_error("Buffer to read is too short."); + // return -1; + // } + // // LF_PRINT_LOG("Message received on topic %s is %.*s", topicName, message->payloadlen, (char*)(message->payload)); + + // memcpy(buffer, decoded, decoded_length); + // free(decoded); + + memcpy(buffer, (unsigned char *)message->payload, message->payloadlen); MQTTClient_free(topicName); MQTTClient_freeMessage(&message); return 1; @@ -332,36 +342,36 @@ static char* create_topic_federation_id_rti_to_fed_id(const char* federation_id, } // Function to encode data as Base64 using OpenSSL's EVP_EncodeBlock() -static char* base64_encode(const unsigned char* input, int input_len, int* output_len) { - // Calculate the maximum possible length of the Base64 encoded data - int max_encoded_len = (((input_len + 2) / 3) * 4) + 1; // +1 for null terminator - - // Allocate memory for the Base64 encoded data - char* encoded_data = (char*)malloc(max_encoded_len); - if (encoded_data == NULL) { - *output_len = 0; - return NULL; // Memory allocation failed - } - - // Encode the input data as Base64 - *output_len = EVP_EncodeBlock((unsigned char*)encoded_data, input, input_len); - return encoded_data; -} - -// Function to encode data as Base64 using OpenSSL's EVP_DecodeBlock() -static unsigned char* base64_decode(const unsigned char* input, int input_len, int* output_len) { - // Allocate memory for the output buffer - unsigned char* output = (unsigned char*)malloc(input_len); - if (output == NULL) { - return NULL; // Memory allocation failed - } - - // Decode the Base64 data - // TODO: DONGHA This can have errors, because this may add 0bit paddings. - *output_len = EVP_DecodeBlock(output, input, input_len); - - return output; -} +// static char* base64_encode(const unsigned char* input, int input_len, int* output_len) { +// // Calculate the maximum possible length of the Base64 encoded data +// int max_encoded_len = (((input_len + 2) / 3) * 4) + 1; // +1 for null terminator + +// // Allocate memory for the Base64 encoded data +// char* encoded_data = (char*)malloc(max_encoded_len); +// if (encoded_data == NULL) { +// *output_len = 0; +// return NULL; // Memory allocation failed +// } + +// // Encode the input data as Base64 +// *output_len = EVP_EncodeBlock((unsigned char*)encoded_data, input, input_len); +// return encoded_data; +// } + +// // Function to encode data as Base64 using OpenSSL's EVP_DecodeBlock() +// static unsigned char* base64_decode(const unsigned char* input, int input_len, int* output_len) { +// // Allocate memory for the output buffer +// unsigned char* output = (unsigned char*)malloc(input_len); +// if (output == NULL) { +// return NULL; // Memory allocation failed +// } + +// // Decode the Base64 data +// // TODO: DONGHA This can have errors, because this may add 0bit paddings. +// *output_len = EVP_DecodeBlock(output, input, input_len); + +// return output; +// } static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id) { if (my_id == -1 && client_id == -1) { diff --git a/include/core/federated/network/net_common.h b/include/core/federated/network/net_common.h index 4512ba4bb..1eb5bf827 100644 --- a/include/core/federated/network/net_common.h +++ b/include/core/federated/network/net_common.h @@ -636,7 +636,9 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define MSG_TYPE_MQTT_JOIN 26 -#define MSG_TYPE_MQTT_JOIN_ACK 27 +#define MSG_TYPE_MQTT_ACCEPT 27 + +#define MSG_TYPE_MQTT_ACCEPT_ACK 28 ///////////////////////////////////////////// //// Rejection codes From 822530bef2e95618ff973925f7b11836e7c00f6c Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 27 Apr 2024 15:42:45 -0700 Subject: [PATCH 197/262] Fix read to return 0 on connection lost. --- core/federated/network/lf_sst_support.c | 10 ++++++++++ include/core/federated/network/netdriver.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index a6ee59e1e..5a8e83c46 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -120,8 +120,18 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len ssize_t bytes_read = 0; unsigned int temp_length = 10; + if (sst_priv->session_ctx->sock < 0) { + return -1; + } + // Read 10 bytes first. bytes_read = read(sst_priv->session_ctx->sock, sst_buffer, temp_length); + if (bytes_read == 0) { + // Connection closed. + return 0; + } else if (bytes_read < 0 && errno != EAGAIN && errno != EWOULDBLOCK) { + // Add retry. + } unsigned int payload_length; // Length of the payload of SST. unsigned int var_length_buf_size; // This fills payload_length and var_length_buf_size. diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index b0d35a9a2..bce567bdd 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -87,7 +87,7 @@ int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...); - +// Return 0 when connection lost. -1 on error. > 0 bytes read. ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); From 3422b8119f866a9c1a02b78b9d20f5b4daf25e1e Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 27 Apr 2024 18:34:18 -0700 Subject: [PATCH 198/262] Fix rti config --- core/federated/RTI/RTI.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/federated/RTI/RTI.config b/core/federated/RTI/RTI.config index a42942957..5b601544c 100644 --- a/core/federated/RTI/RTI.config +++ b/core/federated/RTI/RTI.config @@ -2,7 +2,7 @@ entityInfo.name=net1.rti entityInfo.purpose={"group":"Servers"} entityInfo.number_key=1 authInfo.pubkey.path=/home/dongha/project/iotauth/entity/auth_certs/Auth101EntityCert.pem -entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.RTIKey.pem +entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.rtiKey.pem auth.ip.address=127.0.0.1 auth.port.number=21900 entity.server.ip.address=127.0.0.1 From 2691170cc84c32312518b95e283b7e36d1b08955 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 27 Apr 2024 18:35:47 -0700 Subject: [PATCH 199/262] Add skeleton for openssl_required definition. --- core/federated/RTI/rti_remote.c | 4 ++++ core/federated/RTI/rti_remote.h | 4 ++++ core/federated/federate.c | 21 ++++++++++++++------- core/federated/network/CMakeLists.txt | 1 + core/reactor_common.c | 4 ++++ 5 files changed, 27 insertions(+), 7 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 5946d52b7..6fb757cc1 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1518,6 +1518,10 @@ void initialize_RTI(rti_remote_t* rti) { rti_remote->base.tracing_enabled = false; rti_remote->stop_in_progress = false; +// #ifdef OPENSSL_REQUIRED +// OPENSSL_init_crypto(OPENSSL_INIT_NO_ATEXIT, NULL); +// #endif + } void free_scheduling_nodes(scheduling_node_t** scheduling_nodes, uint16_t number_of_scheduling_nodes) { diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 5273206bf..5b7162b32 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -32,6 +32,10 @@ #include // For HMAC authentication. #endif +// #ifdef OPENSSL_REQUIRED +// #include +// #endif + #include "lf_types.h" #include "pqueue_tag.h" diff --git a/core/federated/federate.c b/core/federated/federate.c index f8c6da471..1036c55d2 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1394,10 +1394,10 @@ static void send_resign_signal(environment_t* env) { size_t bytes_to_write = 1; unsigned char buffer[bytes_to_write]; buffer[0] = MSG_TYPE_RESIGN; - LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); + // LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); write_to_netdrv_fail_on_error(_fed.netdrv_to_rti, bytes_to_write, &(buffer[0]), &lf_outbound_netdrv_mutex, "Failed to send MSG_TYPE_RESIGN."); - LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); + // LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); LF_PRINT_LOG("Resigned."); } @@ -2421,11 +2421,18 @@ int lf_send_tagged_message(environment_t* env, interval_t additional_delay, int tracepoint_federate_to_rti(send_TAGGED_MSG, _lf_my_fed_id, ¤t_message_intended_tag); } - int bytes_written = write_to_netdrv_close_on_error(netdrv, header_length, header_buffer); - if (bytes_written > 0) { - // Header sent successfully. Send the body. - bytes_written = write_to_netdrv_close_on_error(netdrv, length, message); - } + +//TODO: THIS IS ONLY TEMPORARY... NEED TO FIX!! + size_t sender_length = length + header_length; + unsigned char *sender = malloc(sender_length); + memcpy(sender, header_buffer, header_length); + memcpy(sender + header_length, message, length); + // int bytes_written = write_to_netdrv_close_on_error(netdrv, header_length, header_buffer); + // if (bytes_written > 0) { + // // Header sent successfully. Send the body. + // bytes_written = write_to_netdrv_close_on_error(netdrv, length, message); + // } + int bytes_written = write_to_netdrv_close_on_error(netdrv, sender_length, sender); if (bytes_written <= 0) { // Message did not send. Handling depends on message type. if (message_type == MSG_TYPE_P2P_TAGGED_MESSAGE) { diff --git a/core/federated/network/CMakeLists.txt b/core/federated/network/CMakeLists.txt index 468b8f1d5..b7239a997 100644 --- a/core/federated/network/CMakeLists.txt +++ b/core/federated/network/CMakeLists.txt @@ -33,6 +33,7 @@ ELSEIF(COMM_TYPE MATCHES MQTT) ELSEIF(COMM_TYPE MATCHES SST) target_link_libraries(lf-network-impl PUBLIC SSTLIB) target_sources(lf-network-impl PUBLIC ${CMAKE_CURRENT_LIST_DIR}/lf_sst_support.c) + # add_compile_definitions(OPENSSL_REQUIRED) ENDIF() target_compile_definitions(lf-network-impl PUBLIC COMM_TYPE_${COMM_TYPE}) diff --git a/core/reactor_common.c b/core/reactor_common.c index 037b6d220..6dfa1ee68 100644 --- a/core/reactor_common.c +++ b/core/reactor_common.c @@ -36,6 +36,10 @@ #include "reactor_common.h" #include "netdriver.h" +// #ifdef OPENSSL_REQUIRED +// #include +// #endif + #if !defined(LF_SINGLE_THREADED) #include "watchdog.h" From e13376b0593b85831a61174a5f739597d754a8dc Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 27 Apr 2024 18:36:05 -0700 Subject: [PATCH 200/262] Add temporary configs. --- core/federated/network/temp__d.config | 10 ++++++++++ core/federated/network/temp__s.config | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 core/federated/network/temp__d.config create mode 100644 core/federated/network/temp__s.config diff --git a/core/federated/network/temp__d.config b/core/federated/network/temp__d.config new file mode 100644 index 000000000..fe544d8fb --- /dev/null +++ b/core/federated/network/temp__d.config @@ -0,0 +1,10 @@ +entityInfo.name=net1.federate__d +entityInfo.purpose={"group":"Servers"} +entityInfo.number_key=1 +authInfo.pubkey.path=/home/dongha/project/iotauth/entity/auth_certs/Auth101EntityCert.pem +entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.federate__dKey.pem +auth.ip.address=127.0.0.1 +auth.port.number=21900 +entity.server.ip.address=127.0.0.1 +entity.server.port.number=15045 +network.protocol=TCP \ No newline at end of file diff --git a/core/federated/network/temp__s.config b/core/federated/network/temp__s.config new file mode 100644 index 000000000..7e2d28964 --- /dev/null +++ b/core/federated/network/temp__s.config @@ -0,0 +1,10 @@ +entityInfo.name=net1.federate__s +entityInfo.purpose={"group":"Servers"} +entityInfo.number_key=1 +authInfo.pubkey.path=/home/dongha/project/iotauth/entity/auth_certs/Auth101EntityCert.pem +entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.federate__sKey.pem +auth.ip.address=127.0.0.1 +auth.port.number=21900 +entity.server.ip.address=127.0.0.1 +entity.server.port.number=15045 +network.protocol=TCP \ No newline at end of file From a14801b0fa9b1ddd5e6c079bc696759c6d709532 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 27 Apr 2024 20:12:25 -0700 Subject: [PATCH 201/262] Make a common connect to socket function. --- core/federated/network/lf_socket_support.c | 37 +---------------- core/federated/network/lf_sst_support.c | 7 +++- core/federated/network/socket_common.c | 41 +++++++++++++++++++ .../core/federated/network/socket_common.h | 2 + 4 files changed, 50 insertions(+), 37 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 8a2af8d98..fb7c500cc 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -90,42 +90,7 @@ void create_client(netdrv_t* drv) { int connect_to_netdrv(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; - struct addrinfo hints; - struct addrinfo* result; - - memset(&hints, 0, sizeof(hints)); - hints.ai_family = AF_INET; /* Allow IPv4 */ - hints.ai_socktype = SOCK_STREAM; /* Stream socket */ - hints.ai_protocol = IPPROTO_TCP; /* TCP protocol */ - hints.ai_addr = NULL; - hints.ai_next = NULL; - hints.ai_flags = AI_NUMERICSERV; /* Allow only numeric port numbers */ - - int count_retries = 0; - int ret = -1; - while (count_retries++ < CONNECT_MAX_RETRIES) { - // Convert port number to string. - char str[6]; - sprintf(str, "%u", priv->server_port); - - // Get address structure matching hostname and hints criteria, and - // set port to the port number provided in str. There should only - // ever be one matching address structure, and we connect to that. - if (getaddrinfo(priv->server_hostname, (const char*)&str, &hints, &result)) { - lf_print_error_and_exit("No host matching given hostname: %s", priv->server_hostname); - } - ret = connect(priv->socket_descriptor, result->ai_addr, result->ai_addrlen); - if (ret < 0) { - lf_sleep(CONNECT_RETRY_INTERVAL); - if (priv->user_specified_port == 0) { - priv->server_port++; - } - continue; - } else { - break; - } - } - freeaddrinfo(result); + int ret = connect_to_socket(priv->socket_descriptor, priv->server_hostname, priv->server_port, priv->user_specified_port); return ret; } diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 5a8e83c46..fe913836c 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -100,7 +100,12 @@ int connect_to_netdrv(netdrv_t* drv) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; session_key_list_t* s_key_list = get_session_key(sst_priv->sst_ctx, NULL); // Does not increases RTI port number. - SST_session_ctx_t* session_ctx = secure_connect_to_server(&s_key_list->s_key[0], sst_priv->sst_ctx); + int sock = create_real_time_tcp_socket_errexit(); + int ret = connect_to_socket(sock, sst_priv->sst_ctx->config->entity_server_ip_addr, atoi(sst_priv->sst_ctx->config->entity_server_port_num), 0); // Not supporting user_specified_port yet. + if (ret != 0) { + return ret; + } + SST_session_ctx_t *session_ctx = secure_connect_to_server_with_socket(&s_key_list->s_key[0], sst_priv->sst_ctx, sock); sst_priv->session_ctx = session_ctx; return 1; } diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index f6740733d..e91a13c89 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -209,3 +209,44 @@ int create_clock_sync_server(uint16_t* clock_sync_port) { return socket_descriptor; } + +int connect_to_socket(int sock, char* hostname, int port, uint16_t user_specified_port){ + struct addrinfo hints; + struct addrinfo* result; + int ret = -1; + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_INET; /* Allow IPv4 */ + hints.ai_socktype = SOCK_STREAM; /* Stream socket */ + hints.ai_protocol = IPPROTO_TCP; /* TCP protocol */ + hints.ai_addr = NULL; + hints.ai_next = NULL; + hints.ai_flags = AI_NUMERICSERV; /* Allow only numeric port numbers */ + + int count_retries = 0; + while (count_retries++ < CONNECT_MAX_RETRIES) { + // Convert port number to string. + char str[6]; + sprintf(str, "%u", port); + + // Get address structure matching hostname and hints criteria, and + // set port to the port number provided in str. There should only + // ever be one matching address structure, and we connect to that. + if (getaddrinfo(hostname, (const char*)&str, &hints, &result)) { + lf_print_error_and_exit("No host matching given hostname: %s", hostname); + } + ret = connect(sock, result->ai_addr, result->ai_addrlen); + if (ret < 0) { + lf_sleep(CONNECT_RETRY_INTERVAL); + if (user_specified_port == 0) { + port++; + } + continue; + } else { + break; + } + } + freeaddrinfo(result); + return ret; +} + diff --git a/include/core/federated/network/socket_common.h b/include/core/federated/network/socket_common.h index 30d5085fe..772d45fe7 100644 --- a/include/core/federated/network/socket_common.h +++ b/include/core/federated/network/socket_common.h @@ -76,4 +76,6 @@ int create_real_time_tcp_socket_errexit(); // TODO: Check if it's fine to just use int. It's just an enum. Can't use server_type_t because not including netdriver.h int create_TCP_server(socket_priv_t* priv, int server_type, uint16_t port); +int connect_to_socket(int sock, char* hostname, int port, uint16_t user_specified_port); + #endif /* SOCKET_COMMON_H */ \ No newline at end of file From e959a67e7e32e4dfd760a140a376f110c57fbec3 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 27 Apr 2024 20:29:01 -0700 Subject: [PATCH 202/262] Minor fix --- core/federated/network/lf_sst_support.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index fe913836c..89dfecb64 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -105,7 +105,7 @@ int connect_to_netdrv(netdrv_t* drv) { if (ret != 0) { return ret; } - SST_session_ctx_t *session_ctx = secure_connect_to_server_with_socket(&s_key_list->s_key[0], sst_priv->sst_ctx, sock); + SST_session_ctx_t *session_ctx = secure_connect_to_server_with_socket(&s_key_list->s_key[0], sock); sst_priv->session_ctx = session_ctx; return 1; } From 862febdd96a3b6f717e88fd4c9e4be19262b2c0d Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 28 Apr 2024 12:06:15 -0700 Subject: [PATCH 203/262] Fix conflicts --- include/core/federated/network/net_common.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/core/federated/network/net_common.h b/include/core/federated/network/net_common.h index 8771710e9..a4b63bc22 100644 --- a/include/core/federated/network/net_common.h +++ b/include/core/federated/network/net_common.h @@ -191,6 +191,15 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define CONNECT_RETRY_INTERVAL MSEC(500) + +//TODO: NEED TO ERASE!!! CHECK CONFLICTS. +/** + * Bound on the number of retries to connect to the RTI. + * A federate will retry every CONNECT_RETRY_INTERVAL seconds + * this many times before giving up. + */ +#define CONNECT_MAX_RETRIES 100 + /** * Bound on the number of retries to connect to the RTI. * A federate will retry every CONNECT_RETRY_INTERVAL seconds until From 873dd8d6823320db961c0fe010ec51a964b36c01 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 28 Apr 2024 12:46:13 -0700 Subject: [PATCH 204/262] Fix unsused variable errors. --- core/federated/clock-sync.c | 2 +- core/federated/federate.c | 21 ++++++--- core/federated/network/lf_mqtt_support.c | 54 ++++++++++++++++++---- core/federated/network/lf_socket_support.c | 1 + core/federated/network/lf_sst_support.c | 11 ++++- 5 files changed, 69 insertions(+), 20 deletions(-) diff --git a/core/federated/clock-sync.c b/core/federated/clock-sync.c index 9869c5164..436ab7b44 100644 --- a/core/federated/clock-sync.c +++ b/core/federated/clock-sync.c @@ -284,7 +284,7 @@ int handle_T1_clock_sync_message(unsigned char* buffer, void* netdrv_or_sock, ne // Write the reply to the socket. LF_PRINT_DEBUG("Sending T3 message to RTI."); - int ret; + int ret = -1; if (netdrv_type == NETDRV) { ret = write_to_netdrv((netdrv_t*)netdrv_or_sock, 1 + sizeof(int), reply_buffer); } else if (netdrv_type == UDP) { diff --git a/core/federated/federate.c b/core/federated/federate.c index f156cd61d..edfb8991d 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -390,14 +390,14 @@ static trigger_handle_t schedule_message_received_from_network_locked(environmen static void close_inbound_netdrv(int fed_id, int flag) { LF_MUTEX_LOCK(&netdrv_mutex); if (_fed.netdrv_for_inbound_p2p_connections[fed_id] != NULL) { - // if (flag >= 0) { + if (flag >= 0) { // if (flag > 0) { // shutdown(_fed.sockets_for_inbound_p2p_connections[fed_id], SHUT_RDWR); // } else { // // Have received EOF from the other end. Send EOF to the other end. // shutdown(_fed.sockets_for_inbound_p2p_connections[fed_id], SHUT_WR); // } - // } + } // close(_fed.sockets_for_inbound_p2p_connections[fed_id]); // _fed.sockets_for_inbound_p2p_connections[fed_id] = -1; close_netdrv(_fed.netdrv_for_inbound_p2p_connections[fed_id]); @@ -463,6 +463,8 @@ static int handle_message(netdrv_t* netdrv, int fed_id, unsigned char* buffer, s unsigned short port_id; unsigned short federate_id; size_t length; + //TODO: JUST FOR COMPILER. + if(fed_id==0){} extract_header(buffer, &port_id, &federate_id, &length); size_t header_length = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); // Check if the message is intended for this federate @@ -812,7 +814,7 @@ static void close_outbound_netdrv(int fed_id, int flag) { if (_fed.netdrv_for_outbound_p2p_connections[fed_id] != NULL) { // // Close the socket by sending a FIN packet indicating that no further writes // // are expected. Then read until we get an EOF indication. - // if (flag >= 0) { + if (flag >= 0) { // // SHUT_WR indicates no further outgoing messages. // shutdown(_fed.sockets_for_outbound_p2p_connections[fed_id], SHUT_WR); // if (flag > 0) { @@ -822,7 +824,7 @@ static void close_outbound_netdrv(int fed_id, int flag) { // unsigned char message[32]; // while (read(_fed.sockets_for_outbound_p2p_connections[fed_id], &message, 32) > 0); // } - // } + } // close(_fed.sockets_for_outbound_p2p_connections[fed_id]); // _fed.sockets_for_outbound_p2p_connections[fed_id] = -1; close_netdrv(_fed.netdrv_for_outbound_p2p_connections[fed_id]); @@ -1668,7 +1670,8 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { // remote federate has not yet sent an MSG_TYPE_ADDRESS_ADVERTISEMENT message to the RTI. // Sleep for some time before retrying. if (port == -1) { - if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { + //TODO: NEED TO CHANGE + if (count_tries++ >= CONNECT_MAX_RETRIES) { lf_print_error_and_exit("TIMEOUT obtaining IP/port for federate %d from the RTI.", remote_federate_id); } // Wait ADDRESS_QUERY_RETRY_INTERVAL nanoseconds. @@ -1690,6 +1693,10 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { set_host_name(netdrv, hostname); set_port(netdrv, uport); result = connect_to_netdrv(netdrv); + if (result != 0 ) { + LF_PRINT_LOG("Failed to connect."); + } + // Connect was successful. size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); @@ -1956,10 +1963,10 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { } // Get the federation ID and check it. - unsigned char federation_id_length = buffer[header_length - 1]; + // unsigned char federation_id_length = buffer[header_length - 1]; // char remote_federation_id[federation_id_length]; // bytes_read = read_from_netdrv(client_fed_netdrv, (unsigned char*)remote_federation_id, federation_id_length); - if (bytes_read <= 0 || (strncmp(federation_metadata.federation_id, buffer + header_length, + if (bytes_read <= 0 || (strncmp(federation_metadata.federation_id, (const char *) buffer + header_length, strnlen(federation_metadata.federation_id, 255)) != 0)) { lf_print_warning("Received invalid federation ID. Closing socket."); if (bytes_read > 0) { diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index a3e6b9109..fd876d2ae 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -49,7 +49,9 @@ netdrv_t* initialize_netdrv(int federate_id, const char* federation_id) { return drv; } -void close_netdrv(netdrv_t* drv) {} +void close_netdrv(netdrv_t* drv) { + if(drv == NULL) {} //JUST TO PASS COMPILER. +} /** * @brief Create a server object @@ -63,6 +65,8 @@ void close_netdrv(netdrv_t* drv) {} * @return int */ int create_server(netdrv_t* drv, int server_type, uint16_t port) { + if(server_type == 0) {} //JUST TO PASS COMPILER. + if(port == 0) {} //JUST TO PASS COMPILER. MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; // If RTI calls this, it will be -1. If federate server calls, it will be it's federate ID. set_MQTTServer_id(MQTT_priv, drv->federate_id, drv->federate_id); @@ -198,6 +202,7 @@ int connect_to_netdrv(netdrv_t* drv) { buffer[0] = MSG_TYPE_MQTT_ACCEPT_ACK; write_to_netdrv_fail_on_error(drv, 1, buffer, NULL, "Failed to write MSG_TYPE_MQTT_ACCEPT_ACK_to RTI for connection through MQTT."); + return 0; } /** @@ -236,6 +241,7 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { } ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + if(buffer_length == 0) {} //JUST TO PASS COMPILER. MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; char* topicName = NULL; int topicLen; @@ -267,15 +273,43 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len return 1; } -char* get_host_name(netdrv_t* drv) {} -int32_t get_my_port(netdrv_t* drv) {} -int32_t get_port(netdrv_t* drv) {} -struct in_addr* get_ip_addr(netdrv_t* drv) {} -void set_host_name(netdrv_t* drv, const char* hostname) {} -void set_port(netdrv_t* drv, int port) {} -void set_specified_port(netdrv_t* drv, int port) {} -void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) {} -ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} +char* get_host_name(netdrv_t* drv) { + if(drv == NULL) {} //JUST TO PASS COMPILER. + return NULL; +} +int32_t get_my_port(netdrv_t* drv) { + if(drv == NULL) {} //JUST TO PASS COMPILER. + return 0; +} +int32_t get_port(netdrv_t* drv) { + if(drv == NULL) {} //JUST TO PASS COMPILER. + return 0; +} +struct in_addr* get_ip_addr(netdrv_t* drv) { + if(drv == NULL) {} //JUST TO PASS COMPILER. + return NULL; +} +void set_host_name(netdrv_t* drv, const char* hostname) { + if(drv == NULL) {} //JUST TO PASS COMPILER. + if(hostname == NULL) {} //JUST TO PASS COMPILER. +} +void set_port(netdrv_t* drv, int port) { + if(drv == NULL) {} //JUST TO PASS COMPILER + if(port == 0) {} //JUST TO PASS COMPILER. +} +void set_specified_port(netdrv_t* drv, int port) { + if(drv == NULL) {} //JUST TO PASS COMPILER. + if(port == 0) {} //JUST TO PASS COMPILER. +} +void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { + if(drv == NULL) {} //JUST TO PASS COMPILER. + if(ip_addr.s_addr == 0) {} //JUST TO PASS COMPILER. +} +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { + if(drv == NULL) {} //JUST TO PASS COMPILER. + if(result == NULL) {} //JUST TO PASS COMPILER. + return 0; +} // ------------------Helper Functions------------------ // diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index fb7c500cc..0b6de161f 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -408,6 +408,7 @@ static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int case MSG_TYPE_FAILED: *bytes_to_read = 0; *state = FINISH_READ; + break; default: *bytes_to_read = 0; // Error handling? diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 89dfecb64..4a81bb729 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -18,6 +18,8 @@ static void var_length_int_to_num(unsigned char* buf, unsigned int buf_length, u unsigned int* var_len_int_buf_size); netdrv_t* initialize_netdrv(int federate_id, const char* federation_id) { + if(federate_id == 0) {} //JUST TO PASS COMPILER. + if(federation_id == NULL) {} //JUST TO PASS COMPILER. netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { lf_print_error_and_exit("Falied to malloc netdrv_t."); @@ -120,6 +122,7 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { } ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + if(buffer_length == 0) {}//JUST TO PASS COMPILER. sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; unsigned char sst_buffer[1024]; ssize_t bytes_read = 0; @@ -205,7 +208,11 @@ void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { sst_priv->socket_priv->server_ip_addr = ip_addr; } -ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) {} +ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { + if(drv == NULL) {} //JUST TO PASS COMPILER. + if(result == NULL) {} //JUST TO PASS COMPILER. + return 0; +} // ------------------Helper Functions------------------ // @@ -226,7 +233,7 @@ static void var_length_int_to_num(unsigned char* buf, unsigned int buf_length, u unsigned int* var_len_int_buf_size) { *num = 0; *var_len_int_buf_size = 0; - for (int i = 0; i < buf_length; i++) { + for (unsigned int i = 0; i < buf_length; i++) { *num |= (buf[i] & 127) << (7 * i); if ((buf[i] & 128) == 0) { *var_len_int_buf_size = i + 1; From 8315cb4fcc11cdf79b2ca9d1838debcf278baac0 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 28 Apr 2024 15:58:22 -0700 Subject: [PATCH 205/262] Add resign message --- core/federated/RTI/rti_remote.c | 11 +-- core/federated/network/lf_mqtt_support.c | 77 +++++++++++++------ .../federated/network/type/lf_mqtt_support.h | 2 + 3 files changed, 62 insertions(+), 28 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 028a80618..6b658b8e7 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1098,12 +1098,13 @@ static int32_t receive_and_check_fed_id_message(netdrv_t* netdrv) { // the .server_hostname field of the federate. char str[INET_ADDRSTRLEN + 1]; - // TODO: NEED TO FIX HERE! - inet_ntop(AF_INET, get_ip_addr(fed->fed_netdrv), str, INET_ADDRSTRLEN); - // strncpy(get_host_name(fed->fed_netdrv), str, INET_ADDRSTRLEN); - set_host_name(fed->fed_netdrv, str); +// get_ip_addr(fed->fed_netdrv); +// // TODO: NEED TO FIX HERE! +// inet_ntop(AF_INET, get_ip_addr(fed->fed_netdrv), str, INET_ADDRSTRLEN); +// // strncpy(get_host_name(fed->fed_netdrv), str, INET_ADDRSTRLEN); +// set_host_name(fed->fed_netdrv, str); - LF_PRINT_DEBUG("RTI got address %s from federate %d.", get_host_name(fed->fed_netdrv), fed_id); +// LF_PRINT_DEBUG("RTI got address %s from federate %d.", get_host_name(fed->fed_netdrv), fed_id); #endif // Set the federate's state as pending diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index fd876d2ae..a6f874eab 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -50,7 +50,16 @@ netdrv_t* initialize_netdrv(int federate_id, const char* federation_id) { } void close_netdrv(netdrv_t* drv) { - if(drv == NULL) {} //JUST TO PASS COMPILER. + MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; + unsigned char buffer[1]; + buffer[0] = MQTT_RTI_RESIGNED; + write_to_netdrv_fail_on_error(drv, 1, buffer, NULL, + "Failed to send MQTT_RTI_RESIGNED to federate %d", drv->federate_id); + int rc; + if ((rc = MQTTClient_disconnect(MQTT_priv->client, 10000)) != MQTTCLIENT_SUCCESS) { + printf("Failed to disconnect, return code %d\n", rc); + } + MQTTClient_destroy(&MQTT_priv->client); } /** @@ -65,8 +74,10 @@ void close_netdrv(netdrv_t* drv) { * @return int */ int create_server(netdrv_t* drv, int server_type, uint16_t port) { - if(server_type == 0) {} //JUST TO PASS COMPILER. - if(port == 0) {} //JUST TO PASS COMPILER. + if (server_type == 0) { + } // JUST TO PASS COMPILER. + if (port == 0) { + } // JUST TO PASS COMPILER. MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; // If RTI calls this, it will be -1. If federate server calls, it will be it's federate ID. set_MQTTServer_id(MQTT_priv, drv->federate_id, drv->federate_id); @@ -219,7 +230,7 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { MQTTClient_deliveryToken token; int rc; // pubmsg.payload = (void*)base64_encode(buffer, num_bytes, &pubmsg.payloadlen); - pubmsg.payload = (void*) buffer; + pubmsg.payload = (void*)buffer; pubmsg.payloadlen = num_bytes; pubmsg.qos = QOS; pubmsg.retained = 0; @@ -236,12 +247,13 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { // LF_PRINT_LOG("Message publishing on topic %s is %.*s", MQTT_priv->topic_name, pubmsg.payloadlen, // (char*)(pubmsg.payload)); rc = MQTTClient_waitForCompletion(MQTT_priv->client, token, TIMEOUT); - // free(pubmsg.payload); - return 1; + int bytes_written = pubmsg.payloadlen; + return bytes_written; } ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { - if(buffer_length == 0) {} //JUST TO PASS COMPILER. + if (buffer_length == 0) { + } // JUST TO PASS COMPILER. MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; char* topicName = NULL; int topicLen; @@ -250,6 +262,10 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len if ((rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 1000000)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to receive message, return code %d\n", rc); } + + if (buffer[0] == MQTT_RTI_RESIGNED) { + return 0; + } // int decoded_length; // unsigned char* decoded = base64_decode(message->payload, message->payloadlen, &decoded_length); // lf_print_log("decoded_length: %d", decoded_length); @@ -267,47 +283,62 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len // memcpy(buffer, decoded, decoded_length); // free(decoded); - memcpy(buffer, (unsigned char *)message->payload, message->payloadlen); + memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); + int bytes_read = message->payloadlen; MQTTClient_free(topicName); MQTTClient_freeMessage(&message); - return 1; + return bytes_read; } char* get_host_name(netdrv_t* drv) { - if(drv == NULL) {} //JUST TO PASS COMPILER. + if (drv == NULL) { + } // JUST TO PASS COMPILER. return NULL; } int32_t get_my_port(netdrv_t* drv) { - if(drv == NULL) {} //JUST TO PASS COMPILER. + if (drv == NULL) { + } // JUST TO PASS COMPILER. return 0; } int32_t get_port(netdrv_t* drv) { - if(drv == NULL) {} //JUST TO PASS COMPILER. + if (drv == NULL) { + } // JUST TO PASS COMPILER. return 0; } struct in_addr* get_ip_addr(netdrv_t* drv) { - if(drv == NULL) {} //JUST TO PASS COMPILER. + if (drv == NULL) { + } // JUST TO PASS COMPILER. return NULL; } void set_host_name(netdrv_t* drv, const char* hostname) { - if(drv == NULL) {} //JUST TO PASS COMPILER. - if(hostname == NULL) {} //JUST TO PASS COMPILER. + if (drv == NULL) { + } // JUST TO PASS COMPILER. + if (hostname == NULL) { + } // JUST TO PASS COMPILER. } void set_port(netdrv_t* drv, int port) { - if(drv == NULL) {} //JUST TO PASS COMPILER - if(port == 0) {} //JUST TO PASS COMPILER. + if (drv == NULL) { + } // JUST TO PASS COMPILER + if (port == 0) { + } // JUST TO PASS COMPILER. } void set_specified_port(netdrv_t* drv, int port) { - if(drv == NULL) {} //JUST TO PASS COMPILER. - if(port == 0) {} //JUST TO PASS COMPILER. + if (drv == NULL) { + } // JUST TO PASS COMPILER. + if (port == 0) { + } // JUST TO PASS COMPILER. } void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { - if(drv == NULL) {} //JUST TO PASS COMPILER. - if(ip_addr.s_addr == 0) {} //JUST TO PASS COMPILER. + if (drv == NULL) { + } // JUST TO PASS COMPILER. + if (ip_addr.s_addr == 0) { + } // JUST TO PASS COMPILER. } ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { - if(drv == NULL) {} //JUST TO PASS COMPILER. - if(result == NULL) {} //JUST TO PASS COMPILER. + if (drv == NULL) { + } // JUST TO PASS COMPILER. + if (result == NULL) { + } // JUST TO PASS COMPILER. return 0; } diff --git a/include/core/federated/network/type/lf_mqtt_support.h b/include/core/federated/network/type/lf_mqtt_support.h index 9b9a377f4..f24efec0e 100644 --- a/include/core/federated/network/type/lf_mqtt_support.h +++ b/include/core/federated/network/type/lf_mqtt_support.h @@ -3,6 +3,8 @@ #include +#define MQTT_RTI_RESIGNED 88 + typedef struct MQTT_priv_t { MQTTClient client; MQTTClient_connectOptions conn_opts; // = MQTTClient_connectOptions_initializer; From bbe209aaa94f4f78ffed5e6800c87a0c5ee2d855 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sun, 28 Apr 2024 20:23:15 -0700 Subject: [PATCH 206/262] FIx sst read --- core/federated/network/lf_mqtt_support.c | 2 +- core/federated/network/lf_sst_support.c | 7 ++++++- core/federated/network/temp__d.config | 8 ++++---- core/federated/network/temp__s.config | 8 ++++---- core/federated/sst-c-api | 1 + trace/impl/lib/lf-trace-impl.a | Bin 0 -> 21538 bytes 6 files changed, 16 insertions(+), 10 deletions(-) create mode 160000 core/federated/sst-c-api create mode 100644 trace/impl/lib/lf-trace-impl.a diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index a6f874eab..7f66f7dd7 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -10,7 +10,7 @@ // #include -#define ADDRESS "tcp://mqtt.eclipseprojects.io:1883" +#define ADDRESS "tcp://10.218.100.147:1883" #define QOS 2 #define TIMEOUT 10000L diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 4a81bb729..eb16c5188 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -147,10 +147,15 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len unsigned int bytes_to_read = payload_length - (temp_length - (sizeof(unsigned char) + var_length_buf_size)); unsigned int second_read = 0; - unsigned int more = 0; + ssize_t more = 0; while (second_read != bytes_to_read) { more = read(sst_priv->session_ctx->sock, sst_buffer + temp_length, bytes_to_read); second_read += more; + if (more == 0) { + return 0; + } else if (more < 0 && errno != EAGAIN && errno != EWOULDBLOCK) { + continue; + } bytes_read += second_read; } diff --git a/core/federated/network/temp__d.config b/core/federated/network/temp__d.config index fe544d8fb..b1851561d 100644 --- a/core/federated/network/temp__d.config +++ b/core/federated/network/temp__d.config @@ -1,10 +1,10 @@ entityInfo.name=net1.federate__d entityInfo.purpose={"group":"Servers"} entityInfo.number_key=1 -authInfo.pubkey.path=/home/dongha/project/iotauth/entity/auth_certs/Auth101EntityCert.pem -entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.federate__dKey.pem -auth.ip.address=127.0.0.1 +authInfo.pubkey.path=/home/jake/project/iotauth/entity/auth_certs/Auth101EntityCert.pem +entityInfo.privkey.path=/home/jake/project/iotauth/entity/credentials/keys/net1/Net1.federate__dKey.pem +auth.ip.address=10.218.100.147 auth.port.number=21900 -entity.server.ip.address=127.0.0.1 +entity.server.ip.address=10.218.100.147 entity.server.port.number=15045 network.protocol=TCP \ No newline at end of file diff --git a/core/federated/network/temp__s.config b/core/federated/network/temp__s.config index 7e2d28964..e28044b22 100644 --- a/core/federated/network/temp__s.config +++ b/core/federated/network/temp__s.config @@ -1,10 +1,10 @@ entityInfo.name=net1.federate__s entityInfo.purpose={"group":"Servers"} entityInfo.number_key=1 -authInfo.pubkey.path=/home/dongha/project/iotauth/entity/auth_certs/Auth101EntityCert.pem -entityInfo.privkey.path=/home/dongha/project/iotauth/entity/credentials/keys/net1/Net1.federate__sKey.pem -auth.ip.address=127.0.0.1 +authInfo.pubkey.path=/home/jake/project/iotauth/entity/auth_certs/Auth101EntityCert.pem +entityInfo.privkey.path=/home/jake/project/iotauth/entity/credentials/keys/net1/Net1.federate__sKey.pem +auth.ip.address=10.218.100.147 auth.port.number=21900 -entity.server.ip.address=127.0.0.1 +entity.server.ip.address=10.218.100.147 entity.server.port.number=15045 network.protocol=TCP \ No newline at end of file diff --git a/core/federated/sst-c-api b/core/federated/sst-c-api new file mode 160000 index 000000000..9518b6677 --- /dev/null +++ b/core/federated/sst-c-api @@ -0,0 +1 @@ +Subproject commit 9518b6677b6f5b72ccb1f6f5c0a47de2f9efcfa7 diff --git a/trace/impl/lib/lf-trace-impl.a b/trace/impl/lib/lf-trace-impl.a new file mode 100644 index 0000000000000000000000000000000000000000..ec0cf83926cac6bada4bfa331d8b84531613daaa GIT binary patch literal 21538 zcmcIs3z$^Jm9E=O&GbB&85kZjJTH&IL75i;1Oyx&jSV6Y9swWN^mN~uY3=DAyKnO_ zAd?wP97ht^O``ciT+L&BtY&e)BpNgk0ueRe8cmFgc^FhkP{@V^lgt_t_MECy-8Dsb zHv2{E`{-NeuT$roI(4dU-KrWU%nK#M?F)(XosVVp$e(?v>QomjWZ_X2BRIFvHEa*qQTDB+F3JZh*nN-n*NdL zBDcACmw&}lk7Yq)WwO`;mZcQRSm$-we6z?lvk`1KJ6}HT{q=#~Q-Pkdje*{s#{+$S z_}6R)?mSe!dySW|4A6V{APWAj4}JoB=A(?$_!H>$p9}QtJZHH}1ASZ~hYwDH%y*H0 z0IL$-drVeE`dG7#m7cl?>76qkO=I8s0 zp6~HM?<;}BZ}I?IWW5;JbGt8Nk?%vX=xuOa#`Asaa~o0dAscbCX~f~Tcwo=n2cX5d zJn`Z5&Fe~ApZ|2=@ChEUUJmd>0)()jIO_HHOK+{V;n^S9(`g0zuESuaI?ro$UJ3O6 zUWR72`Z-ap=a3bc<3Hyv{)YqkOiiH2e;SOy(bOeEc#i*cdG}ZTa`B=DzHmeve>RN2 z)4l1FXmww66%4>TAC*0DIx`}_kO5Zv`uryY_kl~i=#oArM(lPfFaK88fiA{+&RM$; zxlJe$eN}$p;>9};Z685n@+t7598K>mqc_Pg``5gT)wbqusKHlR0QaPI8yO~04XB}27uJs|%6-q+CBiy|6m&XnbQvqILw zoLq}@a&P)osB>KQ4eRs28VEy&LuB=?Mt9(RT@k?8#aPJr;CqsVIA9)L?IYxv|13_n z5Tl}UMW6pH1=5}|o@W{Js43Rl<3CF=+*~ooe|E=91Jw0C_pCPikv`JW*X+w`l-RN6 zD)iDN!M8Wix2ZqdY-qLc9jNL**o75(pBwNJ*)vlULoWmALwfz(c_=+u;C;||SweMs zk7Z;2OjTfjq-=@S2VjgCmSBt;lh1?pV}2M(;K5rFmqB_#8;ju43mK!cawRi3=FUTI zUGADVirpc7>n~uj43eMz`QpVM{{=NBp&u^nxC@KHpD=0}NyRs|J0?S@FhKigbY0^3 zGuFVClG_KwBM9urm^$-UoVW%Q>6K~aa13HcSakeY^B^(~vOb(BKoY*}D5?_ZnGK3#&uS~sJ6x#iImE@g13P6f833`dzADhW zqzvBW>&kGL*nq%*TT%w_x-y^!D9+j|24?Thp9gx=FK2tV*MGWa=V`XR+^9z+O#gR` z4fF|nuy0jNX9Z*nwNPS#`4)(6e*vfTa?+ydtL?_L`&o zXcx?FclD-s_pa}X1o{Tm)M8-3)ZKJQ^GUDl1L_JG*_UVBd-&iLxdPx>j5|5}{kv6l z|6OXZ)4%{p{fif&z5f14;0oC; zmkW!uSq|O~$Pthh?#)J*n(M+a#bnw_FNaM>FnIN}Vd0vU%T``9*IpP7JE@fICT#IJ zVYfzOj@=r9-$*@t6D<`vEZ&-ox(+e5JE4e^thd+UmyN8lH5!ZAEshD;-m1Xp11t&V4xE)KhDLHPt?Ie?lq#aH~9J?k`zcL|;l?F7#b>d*% zDyT`~$%>j(y=yr>Lfvi-5yHWHMghjq!UggBfz!RO>}nZw#j-K`~2I&juXj9 zPqf_Pgk9SWwSaq4(c7K>tMT|f3CV2-pS35!Uv@NN*VaU)+K!M6E{CFcx}yaQOtg|? zrNJp+ygfY?>u2oA`U}4pqoEksK$SYuuCoo?k#wUB91v@D;Q@ZbOkELUIEymo!}w;U z_@k!-C0Pn5Vdi;dTOu! z6D1P5Pe3yNh0$1C;QJCXNhyVx7t)UpYVtJ#9~cd0f27dCrzB<--3xi2B(4-hg(PMR zqDm5T1Yt{Jt{`e9ag`t%B{5GBvn4TK5Y3Wk7DPZ23k9)S5{m?}Q4&i=ECV|?OJeD; zRY0^$A|R~pl*BSYxRO|2vJ0B9O%m4)T@6H+BvzJh0HRwGt9WgP6D@B2gqMb}E#2{HxEn4rR%A>sJfUgiM4yh^}Q}nTngt1k1kS7V_%D*B^K$)y? zymvYjk$JwMWj#RUGtW1|+XBU+qHlD~7a=bq-u8|0{Q?MKly9u)EF#7U!Y50{j}X!& zVT(wtVndpJlZtMF;Vt3GqDe&5=(VSak_yRonIMKqqPFA!*ijdNk&xZN;NX3Sf4SEh`=?Vp7^x zYzy0@ImMHTFg&C=#Z!ExP)C|mJhf^J5D!Hw38j;cUEXVDQT$QmLiK+NOD7ba`}Nb#u17L5`GSoAjNtD@ps6zJL4&Z-5#vixcz z&)RW}UbiyTh}ud7K-KFzap6(Vl%9$3>a-2O@4F zxj)IsJwWoU{lCb_{mE6>Z=QXOjTd^3l;CJpX#r)d{Wj*Tr^Rv%v-9x>lC^&-%q!By zrzc<@y;$JG&a?%?Lzz17A`QvfzavxUp;}pI;{;j8*e581ZFx*|zh@szU^c?my%}M9 zh|SvnXhzt*W3gM%02@oKT^a5_Aq~me50Omf?wTl72c-48>ZFI4WGuN#)?sMLJ!HvE z%95=a*?wZP_Ak!J-b%9DrR=RFJ3@x7$y9#HlC`b<4`wQ_nMyv9mDkLWhONsOh8s+n z+!J4qyP`NlO9bSo*P&yArbg5-6t3>|6 z6F^P_@RiNbDqdZUOyz^D1tq91E54!@xW)kckV;EeJ5<=gvy7Dk?10c8CKN$txUR?p zv&D#dc6GJz0H0HWPHC?C{31|4vfj$#msQJ>dlyxs*;QOx3pJKiqLAub%peAtN0G)1 z^XLpS_*_XQW|+XUy@8U)0^n2KgTOctHvkx)X@Ka$jG-_v>Y;mNT|>=;5{QJMFit1x zEXyjj_OodaFEW&%=e4A-sWq5Y!W`yhZ$lN!`g7S}_!TEGFf^=&_C$x%a7*Y`r=c^M zz;BI)7<@9NLv^jmP&^!JfX^1EA(ad_bcCYuhNP29q?7RF23#!-VW2}{H<7FhH;Ave z20Ro(Zq|@aB?V7gINY#p_N?Hn8Fe5yy{)b-o^EJrY=G~zSUTcJMj|d{Y>B$5zk{X0 z-QMW{;|J9kI&^CYbw)opq0&PisL0M($Zbs|J3b6UMOWtPrGW>445BFIMj}pYeLDuF z=n2TeM457v>98AIx@?6X09eRmb5H}m-0I+8T=K%PCPtb%?gS8K1mQ8rLinnd0tI73 z6vz|Ec3jV*xC9j8I*~W9BARC*>L*&f^gJ)<=41A8pQomh7pD1e&(aZmOgA6?8292S`w`N$jiIQaGL<;74?l;$I`;BP@UAlEA7n&5N!$fvpg_fX&Eb-pMs?&d{p zJit7IJl?2hvBf7q*4oH9J|5%c-ck2+>v2ABCNK3h@B)`#js@L(qI_Hn56@oSf{$*# z7#}Bj`Db|%m_3h|T+53O@}g^fmHe_B_?QEHYBz80=9BK{W0q61e5d%>^I*+zKB8X*Vl9kWLu~Bk_CK{ zubEGIg0DQzW8K_d&PTt^eOve_mzO@yy)G{X+q?~Y3_e^w7az}a8z1-cMfkW%wrM%{ z0tGF+<|cjx2!dw#dieNmUi}RBKF%#{%NFka10My_t9vW!msC} z&r4gM;oO@9ODu1>&1)OE_x!1+(J6K_FNTbFuxFaZ1GjK*4=+81#`2z1;LmA|e3i@B zKE}PCS;C2n8~I@0)x6*Z&Tru(e~NzQlk3h1aQE-yUE!Q0g?A9s>Z zJP1L%sFII!`J|J)AkBFjw|>QM+~V8Fhn(W&_hay)((6HI*#o@rpLhWn%dhpl2%0Aj z0}H{Y^}aTK)j_`aF+OQN7>f3LyzmkT1{1Atn}9`9ZV=YS!DXx9Nrn;Pq9);HR99d0`A%x{BzuVgd~B;I?N5A%B6tQmG)n_br$N^Osa+mnfSBAu#B z$G1k~kvg$!m4ZUJSP;Io4qh-WykOvU0W(7)jf5y&eJDcD$(Hz8O@Xj>3=xPq}n7;ZYqZLkyzrrHxp7k0YD93`3yM6e~4 zg6j^6wqOh{P{beyhKZkaJQZ!jeLmb{TDNA|qE)L_1edJxuMMtTwJvzw!gcHXYgoid zg_F@v7q4ibc`OJwE8JN#z|5_QO^4RXeMIF-ReY`2(?RPr9xXA8E}G8Yd=^HJH`}3q9>-aUl9X%l4wy|4ei~8Yf?p=@fXYBN|R7;Hprk=tkKh>|n`4i?|PN zr6bmi;2S3yf^GPQHS3l&i1-lN(L)#^;96V{Fmc`JZw3O>gDW!<*R5IaXRy@7sY{y? za$bu1z!rwWVVPB~T=ddSDCjN`nkh0D7ec{k3c9N$-Nu585{XzgYQ^A%`6dq6t$>f> z1&1g4WotCz1S26gqy>l^F(Mk_5P}7_h{;urEj2wYUASVcU#zpVsyH)hBnF7?G2`Z! zFb$?^Jf1<{${2||TV)O=I2g}jfYQ$;eK-LPOf z4v`s|j!QQ9j_-fwE`|xQrsD1>PU&P8vFDw8!A~8`M|Rz8ZU%#1c3) z>rpj3%Vt3l#Ev`-fp*dCBnM*(ZD?!5IXW{<$r5c8iKde*;!eT$Qw-iy;`9aP0(Q;f z#dGc2^)2bRo2D0PT~k_+O?OOhtZ$q#m0)>hf_u5J`o(uJuBZ>e${Cl_A`PRbb^97- zZL6?Gmlpc=!V(-eEX1Y-JjFJKzpUbup2dR;yj#7%BFg4bU9pjpDgVBu%5S1_KR#9Y z4lI>BIXkFa>=3DPe~;Jmj^si84-n5Dd@3H#Zoz=%hY*J(Hn=k7Z)VC*h*H`#Q{`?} zK7MXs65DO6Je@7Ksa$N}sdCRlg29G*%~UQn4plj{!8=R1LHH>`JVKY^@%$-c<8CS! z+m)*PqgfliO660~P*uK3mLrraVU~30Jh*+`E?Wl{f$( ziCBc^2Ka|^{+V#KOBp8oZumyTB;pR99qD^y=;gH3EC@k*i%rd2qaXl#AcagHOqWUzrEL8t|bIR|{xBsN;Y& zgzq5y0JH~FlJIHbXp1p19|3+>9{HckgFjAkI*Wx^9GoH@&BOn29{i_y@Hg||@8rSX z2ORy-Nkc%LAq|6h1M#~F7jq+6+5mX2exYRtZbH?EiI8i0ZE2F@iz3HbT!RKIL9z>* zOVT7~Y+>LnaYz*i)E*20GuuB|$gu+9jI z>m-7teLDKwz$I`FI2{)S9ibRJ8GNGQBO^?%BSA$x+_{~#;_Ve!i-C%GLVW1rCn#$b zid(Uk`GrPn7+9SAfB$emEM#bztu-tdibsOZwt;^}pnu|`=>r>%t4L@;xTBM$$kHJG z)d74FgxhZo;`JXi9eW1tG*+fs$t7RNm#D%;BE;7mIUHclmust^cS%5vPkgW8p`y4S z30EXn%VNQg>lKAZG#rPl!lQ(na<*&uSdIT18m{Yoj&QV7*ZWfq*Y*A~kDT9XxUP38 zj7vWTc3vOdJk*(IH;%M1YYtYnR2QL$7;GC#N`jb5ZCR&n;)1= zIg2!0x2Io|k8&o9+8`GNK*9$eXDd4wX}IpUb%dLC;{60nrkx#mL@#@ZY2HPtf>Z)$oZLK9ZK2s8h$6 zX!s+$)iJp7;0_;vZ8H~5csfpSP+GjL_+97ly?>wAaO~e(?}X z^u^IG$^T{^{JepqZcO7)86?xsQwT@dy8TNv9FOBwdq0*(&dnOXt?@esKgz;%TONF; zhGRBD{`nN)XlEV#Q}%pXVys62-IThN)CO1di9Glzg@G zfo?_oU2Fs-ait2L3a=m>t_z8TZb9FvG?g;Qul7_Cs@HIo`2^AP47`HYRf`S$8B(&s zz>~BNSZm-nlAIe1{7LG^kb%oTERp+LSftv!p7=j*@c)MJE(0f$-DBXhs6!qw@DYSR zYT#-;_oRWBkspp4xZ3G@#lTOHoo^U;GwD5J;B)DH*>B(z$)B9$DgV4j_)r7?E7c!w z;KRxOX$BrAIdcsBA+l3_XDPia314gQucCO^Y~aej9R_}!=-UnaKCy%)m>? zPBmT?{|b^j&)|QA>|AExjYMxS@IfT!HUn4Ry;}`@8QH(nz<){fZUg@>^21&OKSJ%= zp9g=$z;_b=w+ws&*>l9e|A*$QmksoJ|J)7WHq`!21bL8~9(Szj_QDua9HeYvA3a z_e%!OiT_ape}nw|q=Em2@S_I)8p(gf!25`P!@#?#U1tsaD>p30wU|6-xhV_ZTKbrV&CtUF#?~)aI4E}#5|LisRPZ0kX z4E|5kIC@ay$0n)shHn`B7l>BxJ*fGYT2LC6?87B?AmGqt^JR=7?0+N^7t@`C2 zqK6r{+P|wY@Ykgnrq*Rjj*6d+2LDsUA0%Aaqt2PO82mx9|A2wNNbObcVI@bMW4&bZ zQ-8f-;BzRh)V__9qt3}L82m4h{azYpieH`Ajv`$7LB(OCfq$RmUTMft=fNutekEs< z!9R=Wod*9DlE2&FSLe`QH2772{hNVzlAQlA;t~h= zR{8B~)GuW;u`55T@n1u@;#YcS7`Td`B?ca#c(~S(-$i(f!LQ`sX5dPGmm%lJBxj$& zekF!+_;-x~aQ9*t=*ew;&6dPfkh_MMcU z)j2RVL-d#W=EeFI_ybAFkrZRUr}mk+O$=B}ECOjZaMdrH4P3=Tmw~JJ{HlSg_&;jk zYTTVPa5b(6kw283YJQk(;A;L+ep38uerq@Q)wwvHt7B69YM#gQa2;3g3s#@n-T_za z;OQpivt8wqZ~?O({`B2t_2QCVeM>6E>XQjch*EJ_3pasV6TpKP0E3~HmZY-<*swA| z@E101@MkMJ27e>ts4Ae3)x-a4(1HK2TYVfZPuIhhFt|Jo=cPo$AJf#sfq18rbhncn zryZ`t;{DGLB-tPZU8Les32mm#0ovD5IJr}iVowcUCCwQ`W;$_G4blTtAO0Fk=%L{w z|9TX#DTLE-2TG=MhF*o6`f)!MWt#QX2Gi*-RZ~9gfh21J8f9YK3`nJtI&COa_A6dI zXEsX@X|FDmg{wfl<9G<33EUF$U8KxNxGkG`V zsqe3r^{E>rk%M<5V7ctCy>?)Iv>#nz+J75hrcGEgP5RY28e*7C-WXuH^lv2n%1@{t zL(0^@lVqChyax|WA+^!_R#I90%8t9B0P|-3^BCBWFh2F9>Z#{GC{%f!Z~SFCmCc*H z4?+=|Xmm5PslJ`9Dsrm*3jQ`^P^MYGnd%=h6q@z%zC$kmcar~SQ+@P5zUNeZ)i1ep z0~=$sfm=)K8{EUiyGCYxjHye;K47)9(Yw@Wn9&?zQ?B|CuK*#Cj>t#m*R21)I6ScT literal 0 HcmV?d00001 From f7d8a72094544329af8506aad3a0d73fcfff8db5 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 10 May 2024 17:09:59 -0700 Subject: [PATCH 207/262] Remove library --- trace/impl/lib/lf-trace-impl.a | Bin 21538 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 trace/impl/lib/lf-trace-impl.a diff --git a/trace/impl/lib/lf-trace-impl.a b/trace/impl/lib/lf-trace-impl.a deleted file mode 100644 index ec0cf83926cac6bada4bfa331d8b84531613daaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 21538 zcmcIs3z$^Jm9E=O&GbB&85kZjJTH&IL75i;1Oyx&jSV6Y9swWN^mN~uY3=DAyKnO_ zAd?wP97ht^O``ciT+L&BtY&e)BpNgk0ueRe8cmFgc^FhkP{@V^lgt_t_MECy-8Dsb zHv2{E`{-NeuT$roI(4dU-KrWU%nK#M?F)(XosVVp$e(?v>QomjWZ_X2BRIFvHEa*qQTDB+F3JZh*nN-n*NdL zBDcACmw&}lk7Yq)WwO`;mZcQRSm$-we6z?lvk`1KJ6}HT{q=#~Q-Pkdje*{s#{+$S z_}6R)?mSe!dySW|4A6V{APWAj4}JoB=A(?$_!H>$p9}QtJZHH}1ASZ~hYwDH%y*H0 z0IL$-drVeE`dG7#m7cl?>76qkO=I8s0 zp6~HM?<;}BZ}I?IWW5;JbGt8Nk?%vX=xuOa#`Asaa~o0dAscbCX~f~Tcwo=n2cX5d zJn`Z5&Fe~ApZ|2=@ChEUUJmd>0)()jIO_HHOK+{V;n^S9(`g0zuESuaI?ro$UJ3O6 zUWR72`Z-ap=a3bc<3Hyv{)YqkOiiH2e;SOy(bOeEc#i*cdG}ZTa`B=DzHmeve>RN2 z)4l1FXmww66%4>TAC*0DIx`}_kO5Zv`uryY_kl~i=#oArM(lPfFaK88fiA{+&RM$; zxlJe$eN}$p;>9};Z685n@+t7598K>mqc_Pg``5gT)wbqusKHlR0QaPI8yO~04XB}27uJs|%6-q+CBiy|6m&XnbQvqILw zoLq}@a&P)osB>KQ4eRs28VEy&LuB=?Mt9(RT@k?8#aPJr;CqsVIA9)L?IYxv|13_n z5Tl}UMW6pH1=5}|o@W{Js43Rl<3CF=+*~ooe|E=91Jw0C_pCPikv`JW*X+w`l-RN6 zD)iDN!M8Wix2ZqdY-qLc9jNL**o75(pBwNJ*)vlULoWmALwfz(c_=+u;C;||SweMs zk7Z;2OjTfjq-=@S2VjgCmSBt;lh1?pV}2M(;K5rFmqB_#8;ju43mK!cawRi3=FUTI zUGADVirpc7>n~uj43eMz`QpVM{{=NBp&u^nxC@KHpD=0}NyRs|J0?S@FhKigbY0^3 zGuFVClG_KwBM9urm^$-UoVW%Q>6K~aa13HcSakeY^B^(~vOb(BKoY*}D5?_ZnGK3#&uS~sJ6x#iImE@g13P6f833`dzADhW zqzvBW>&kGL*nq%*TT%w_x-y^!D9+j|24?Thp9gx=FK2tV*MGWa=V`XR+^9z+O#gR` z4fF|nuy0jNX9Z*nwNPS#`4)(6e*vfTa?+ydtL?_L`&o zXcx?FclD-s_pa}X1o{Tm)M8-3)ZKJQ^GUDl1L_JG*_UVBd-&iLxdPx>j5|5}{kv6l z|6OXZ)4%{p{fif&z5f14;0oC; zmkW!uSq|O~$Pthh?#)J*n(M+a#bnw_FNaM>FnIN}Vd0vU%T``9*IpP7JE@fICT#IJ zVYfzOj@=r9-$*@t6D<`vEZ&-ox(+e5JE4e^thd+UmyN8lH5!ZAEshD;-m1Xp11t&V4xE)KhDLHPt?Ie?lq#aH~9J?k`zcL|;l?F7#b>d*% zDyT`~$%>j(y=yr>Lfvi-5yHWHMghjq!UggBfz!RO>}nZw#j-K`~2I&juXj9 zPqf_Pgk9SWwSaq4(c7K>tMT|f3CV2-pS35!Uv@NN*VaU)+K!M6E{CFcx}yaQOtg|? zrNJp+ygfY?>u2oA`U}4pqoEksK$SYuuCoo?k#wUB91v@D;Q@ZbOkELUIEymo!}w;U z_@k!-C0Pn5Vdi;dTOu! z6D1P5Pe3yNh0$1C;QJCXNhyVx7t)UpYVtJ#9~cd0f27dCrzB<--3xi2B(4-hg(PMR zqDm5T1Yt{Jt{`e9ag`t%B{5GBvn4TK5Y3Wk7DPZ23k9)S5{m?}Q4&i=ECV|?OJeD; zRY0^$A|R~pl*BSYxRO|2vJ0B9O%m4)T@6H+BvzJh0HRwGt9WgP6D@B2gqMb}E#2{HxEn4rR%A>sJfUgiM4yh^}Q}nTngt1k1kS7V_%D*B^K$)y? zymvYjk$JwMWj#RUGtW1|+XBU+qHlD~7a=bq-u8|0{Q?MKly9u)EF#7U!Y50{j}X!& zVT(wtVndpJlZtMF;Vt3GqDe&5=(VSak_yRonIMKqqPFA!*ijdNk&xZN;NX3Sf4SEh`=?Vp7^x zYzy0@ImMHTFg&C=#Z!ExP)C|mJhf^J5D!Hw38j;cUEXVDQT$QmLiK+NOD7ba`}Nb#u17L5`GSoAjNtD@ps6zJL4&Z-5#vixcz z&)RW}UbiyTh}ud7K-KFzap6(Vl%9$3>a-2O@4F zxj)IsJwWoU{lCb_{mE6>Z=QXOjTd^3l;CJpX#r)d{Wj*Tr^Rv%v-9x>lC^&-%q!By zrzc<@y;$JG&a?%?Lzz17A`QvfzavxUp;}pI;{;j8*e581ZFx*|zh@szU^c?my%}M9 zh|SvnXhzt*W3gM%02@oKT^a5_Aq~me50Omf?wTl72c-48>ZFI4WGuN#)?sMLJ!HvE z%95=a*?wZP_Ak!J-b%9DrR=RFJ3@x7$y9#HlC`b<4`wQ_nMyv9mDkLWhONsOh8s+n z+!J4qyP`NlO9bSo*P&yArbg5-6t3>|6 z6F^P_@RiNbDqdZUOyz^D1tq91E54!@xW)kckV;EeJ5<=gvy7Dk?10c8CKN$txUR?p zv&D#dc6GJz0H0HWPHC?C{31|4vfj$#msQJ>dlyxs*;QOx3pJKiqLAub%peAtN0G)1 z^XLpS_*_XQW|+XUy@8U)0^n2KgTOctHvkx)X@Ka$jG-_v>Y;mNT|>=;5{QJMFit1x zEXyjj_OodaFEW&%=e4A-sWq5Y!W`yhZ$lN!`g7S}_!TEGFf^=&_C$x%a7*Y`r=c^M zz;BI)7<@9NLv^jmP&^!JfX^1EA(ad_bcCYuhNP29q?7RF23#!-VW2}{H<7FhH;Ave z20Ro(Zq|@aB?V7gINY#p_N?Hn8Fe5yy{)b-o^EJrY=G~zSUTcJMj|d{Y>B$5zk{X0 z-QMW{;|J9kI&^CYbw)opq0&PisL0M($Zbs|J3b6UMOWtPrGW>445BFIMj}pYeLDuF z=n2TeM457v>98AIx@?6X09eRmb5H}m-0I+8T=K%PCPtb%?gS8K1mQ8rLinnd0tI73 z6vz|Ec3jV*xC9j8I*~W9BARC*>L*&f^gJ)<=41A8pQomh7pD1e&(aZmOgA6?8292S`w`N$jiIQaGL<;74?l;$I`;BP@UAlEA7n&5N!$fvpg_fX&Eb-pMs?&d{p zJit7IJl?2hvBf7q*4oH9J|5%c-ck2+>v2ABCNK3h@B)`#js@L(qI_Hn56@oSf{$*# z7#}Bj`Db|%m_3h|T+53O@}g^fmHe_B_?QEHYBz80=9BK{W0q61e5d%>^I*+zKB8X*Vl9kWLu~Bk_CK{ zubEGIg0DQzW8K_d&PTt^eOve_mzO@yy)G{X+q?~Y3_e^w7az}a8z1-cMfkW%wrM%{ z0tGF+<|cjx2!dw#dieNmUi}RBKF%#{%NFka10My_t9vW!msC} z&r4gM;oO@9ODu1>&1)OE_x!1+(J6K_FNTbFuxFaZ1GjK*4=+81#`2z1;LmA|e3i@B zKE}PCS;C2n8~I@0)x6*Z&Tru(e~NzQlk3h1aQE-yUE!Q0g?A9s>Z zJP1L%sFII!`J|J)AkBFjw|>QM+~V8Fhn(W&_hay)((6HI*#o@rpLhWn%dhpl2%0Aj z0}H{Y^}aTK)j_`aF+OQN7>f3LyzmkT1{1Atn}9`9ZV=YS!DXx9Nrn;Pq9);HR99d0`A%x{BzuVgd~B;I?N5A%B6tQmG)n_br$N^Osa+mnfSBAu#B z$G1k~kvg$!m4ZUJSP;Io4qh-WykOvU0W(7)jf5y&eJDcD$(Hz8O@Xj>3=xPq}n7;ZYqZLkyzrrHxp7k0YD93`3yM6e~4 zg6j^6wqOh{P{beyhKZkaJQZ!jeLmb{TDNA|qE)L_1edJxuMMtTwJvzw!gcHXYgoid zg_F@v7q4ibc`OJwE8JN#z|5_QO^4RXeMIF-ReY`2(?RPr9xXA8E}G8Yd=^HJH`}3q9>-aUl9X%l4wy|4ei~8Yf?p=@fXYBN|R7;Hprk=tkKh>|n`4i?|PN zr6bmi;2S3yf^GPQHS3l&i1-lN(L)#^;96V{Fmc`JZw3O>gDW!<*R5IaXRy@7sY{y? za$bu1z!rwWVVPB~T=ddSDCjN`nkh0D7ec{k3c9N$-Nu585{XzgYQ^A%`6dq6t$>f> z1&1g4WotCz1S26gqy>l^F(Mk_5P}7_h{;urEj2wYUASVcU#zpVsyH)hBnF7?G2`Z! zFb$?^Jf1<{${2||TV)O=I2g}jfYQ$;eK-LPOf z4v`s|j!QQ9j_-fwE`|xQrsD1>PU&P8vFDw8!A~8`M|Rz8ZU%#1c3) z>rpj3%Vt3l#Ev`-fp*dCBnM*(ZD?!5IXW{<$r5c8iKde*;!eT$Qw-iy;`9aP0(Q;f z#dGc2^)2bRo2D0PT~k_+O?OOhtZ$q#m0)>hf_u5J`o(uJuBZ>e${Cl_A`PRbb^97- zZL6?Gmlpc=!V(-eEX1Y-JjFJKzpUbup2dR;yj#7%BFg4bU9pjpDgVBu%5S1_KR#9Y z4lI>BIXkFa>=3DPe~;Jmj^si84-n5Dd@3H#Zoz=%hY*J(Hn=k7Z)VC*h*H`#Q{`?} zK7MXs65DO6Je@7Ksa$N}sdCRlg29G*%~UQn4plj{!8=R1LHH>`JVKY^@%$-c<8CS! z+m)*PqgfliO660~P*uK3mLrraVU~30Jh*+`E?Wl{f$( ziCBc^2Ka|^{+V#KOBp8oZumyTB;pR99qD^y=;gH3EC@k*i%rd2qaXl#AcagHOqWUzrEL8t|bIR|{xBsN;Y& zgzq5y0JH~FlJIHbXp1p19|3+>9{HckgFjAkI*Wx^9GoH@&BOn29{i_y@Hg||@8rSX z2ORy-Nkc%LAq|6h1M#~F7jq+6+5mX2exYRtZbH?EiI8i0ZE2F@iz3HbT!RKIL9z>* zOVT7~Y+>LnaYz*i)E*20GuuB|$gu+9jI z>m-7teLDKwz$I`FI2{)S9ibRJ8GNGQBO^?%BSA$x+_{~#;_Ve!i-C%GLVW1rCn#$b zid(Uk`GrPn7+9SAfB$emEM#bztu-tdibsOZwt;^}pnu|`=>r>%t4L@;xTBM$$kHJG z)d74FgxhZo;`JXi9eW1tG*+fs$t7RNm#D%;BE;7mIUHclmust^cS%5vPkgW8p`y4S z30EXn%VNQg>lKAZG#rPl!lQ(na<*&uSdIT18m{Yoj&QV7*ZWfq*Y*A~kDT9XxUP38 zj7vWTc3vOdJk*(IH;%M1YYtYnR2QL$7;GC#N`jb5ZCR&n;)1= zIg2!0x2Io|k8&o9+8`GNK*9$eXDd4wX}IpUb%dLC;{60nrkx#mL@#@ZY2HPtf>Z)$oZLK9ZK2s8h$6 zX!s+$)iJp7;0_;vZ8H~5csfpSP+GjL_+97ly?>wAaO~e(?}X z^u^IG$^T{^{JepqZcO7)86?xsQwT@dy8TNv9FOBwdq0*(&dnOXt?@esKgz;%TONF; zhGRBD{`nN)XlEV#Q}%pXVys62-IThN)CO1di9Glzg@G zfo?_oU2Fs-ait2L3a=m>t_z8TZb9FvG?g;Qul7_Cs@HIo`2^AP47`HYRf`S$8B(&s zz>~BNSZm-nlAIe1{7LG^kb%oTERp+LSftv!p7=j*@c)MJE(0f$-DBXhs6!qw@DYSR zYT#-;_oRWBkspp4xZ3G@#lTOHoo^U;GwD5J;B)DH*>B(z$)B9$DgV4j_)r7?E7c!w z;KRxOX$BrAIdcsBA+l3_XDPia314gQucCO^Y~aej9R_}!=-UnaKCy%)m>? zPBmT?{|b^j&)|QA>|AExjYMxS@IfT!HUn4Ry;}`@8QH(nz<){fZUg@>^21&OKSJ%= zp9g=$z;_b=w+ws&*>l9e|A*$QmksoJ|J)7WHq`!21bL8~9(Szj_QDua9HeYvA3a z_e%!OiT_ape}nw|q=Em2@S_I)8p(gf!25`P!@#?#U1tsaD>p30wU|6-xhV_ZTKbrV&CtUF#?~)aI4E}#5|LisRPZ0kX z4E|5kIC@ay$0n)shHn`B7l>BxJ*fGYT2LC6?87B?AmGqt^JR=7?0+N^7t@`C2 zqK6r{+P|wY@Ykgnrq*Rjj*6d+2LDsUA0%Aaqt2PO82mx9|A2wNNbObcVI@bMW4&bZ zQ-8f-;BzRh)V__9qt3}L82m4h{azYpieH`Ajv`$7LB(OCfq$RmUTMft=fNutekEs< z!9R=Wod*9DlE2&FSLe`QH2772{hNVzlAQlA;t~h= zR{8B~)GuW;u`55T@n1u@;#YcS7`Td`B?ca#c(~S(-$i(f!LQ`sX5dPGmm%lJBxj$& zekF!+_;-x~aQ9*t=*ew;&6dPfkh_MMcU z)j2RVL-d#W=EeFI_ybAFkrZRUr}mk+O$=B}ECOjZaMdrH4P3=Tmw~JJ{HlSg_&;jk zYTTVPa5b(6kw283YJQk(;A;L+ep38uerq@Q)wwvHt7B69YM#gQa2;3g3s#@n-T_za z;OQpivt8wqZ~?O({`B2t_2QCVeM>6E>XQjch*EJ_3pasV6TpKP0E3~HmZY-<*swA| z@E101@MkMJ27e>ts4Ae3)x-a4(1HK2TYVfZPuIhhFt|Jo=cPo$AJf#sfq18rbhncn zryZ`t;{DGLB-tPZU8Les32mm#0ovD5IJr}iVowcUCCwQ`W;$_G4blTtAO0Fk=%L{w z|9TX#DTLE-2TG=MhF*o6`f)!MWt#QX2Gi*-RZ~9gfh21J8f9YK3`nJtI&COa_A6dI zXEsX@X|FDmg{wfl<9G<33EUF$U8KxNxGkG`V zsqe3r^{E>rk%M<5V7ctCy>?)Iv>#nz+J75hrcGEgP5RY28e*7C-WXuH^lv2n%1@{t zL(0^@lVqChyax|WA+^!_R#I90%8t9B0P|-3^BCBWFh2F9>Z#{GC{%f!Z~SFCmCc*H z4?+=|Xmm5PslJ`9Dsrm*3jQ`^P^MYGnd%=h6q@z%zC$kmcar~SQ+@P5zUNeZ)i1ep z0~=$sfm=)K8{EUiyGCYxjHye;K47)9(Yw@Wn9&?zQ?B|CuK*#Cj>t#m*R21)I6ScT From 4b4d2b2f795bbc20e711c5c190c8cf9673711bc9 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Sat, 11 May 2024 19:35:05 -0700 Subject: [PATCH 208/262] Fix to return code --- core/federated/RTI/rti_remote.c | 7 ++++--- core/federated/RTI/rti_remote.h | 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 6b658b8e7..425c1909b 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1447,17 +1447,18 @@ void initialize_federate(federate_info_t* fed, uint16_t id) { fed->in_transit_message_tags = pqueue_tag_init(10); } -int32_t start_rti_server(uint16_t port) { +int start_rti_server(uint16_t port) { + int rc; _lf_initialize_clock(); rti_remote->rti_netdrv = initialize_netdrv(-1, rti_remote->federation_id); // Create the RTI's netdriver. - int ret = create_server(rti_remote->rti_netdrv, 0, port); // 0 for RTI + rc = create_server(rti_remote->rti_netdrv, 0, port); // 0 for RTI lf_print("RTI: Listening for federates."); // Create the clocksync's netdriver. if (rti_remote->clock_sync_global_status >= clock_sync_on) { rti_remote->clock_sync_socket = create_clock_sync_server(&rti_remote->clock_sync_port); } - return ret; + return rc; } void wait_for_federates(netdrv_t* netdrv) { diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 5b7162b32..5494e0545 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -375,12 +375,11 @@ void* respond_to_erroneous_connections(void* nothing); void initialize_federate(federate_info_t* fed, uint16_t id); /** - * Start the socket server for the runtime infrastructure (RTI) and - * return the socket descriptor. + * Start the socket server for the runtime infrastructure (RTI). * @param port The port on which to listen for socket connections, or * 0 to use the default port range. */ -int32_t start_rti_server(uint16_t port); +int start_rti_server(uint16_t port); // /** // * Start the runtime infrastructure (RTI) interaction with the federates From a59d915c2161c9e65ac1a56972cb01d1c222cdc6 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 13 May 2024 15:34:36 -0700 Subject: [PATCH 209/262] Fix to get server_type_t when create_server() --- core/federated/RTI/rti_remote.c | 3 ++- core/federated/federate.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 425c1909b..e27ff8c80 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1450,9 +1450,10 @@ void initialize_federate(federate_info_t* fed, uint16_t id) { int start_rti_server(uint16_t port) { int rc; _lf_initialize_clock(); + // Initialize RTI's netdriver. The ID is -1 for the RTI. rti_remote->rti_netdrv = initialize_netdrv(-1, rti_remote->federation_id); // Create the RTI's netdriver. - rc = create_server(rti_remote->rti_netdrv, 0, port); // 0 for RTI + rc = create_server(rti_remote->rti_netdrv, RTI, port); // 0 for RTI lf_print("RTI: Listening for federates."); // Create the clocksync's netdriver. if (rti_remote->clock_sync_global_status >= clock_sync_on) { diff --git a/core/federated/federate.c b/core/federated/federate.c index edfb8991d..a04affbf6 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1871,7 +1871,7 @@ void lf_create_server(int specified_port) { LF_PRINT_LOG("Creating a socket server on port %d.", port); netdrv_t* my_netdrv = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); - create_server(my_netdrv, 1, specified_port); // 1 for FED + create_server(my_netdrv, FED, specified_port); // 1 for FED // TODO: NEED to fix. LF_PRINT_LOG("Server for communicating with other federates started using port %d.", get_my_port(my_netdrv)); From 35e0711404a0c13b993d5fdbac1f28c43d77229e Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 13 May 2024 15:34:44 -0700 Subject: [PATCH 210/262] Minor fix --- include/core/federated/network/socket_common.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/core/federated/network/socket_common.h b/include/core/federated/network/socket_common.h index 772d45fe7..5121491e4 100644 --- a/include/core/federated/network/socket_common.h +++ b/include/core/federated/network/socket_common.h @@ -52,7 +52,6 @@ typedef struct socket_priv_t { int port; // my port number int socket_descriptor; - int proto; uint16_t user_specified_port; // The connected other side's info. From d4eededa28058d90862504ccaac07ed325c07f4f Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 13 May 2024 15:35:35 -0700 Subject: [PATCH 211/262] Add initialize_common_netdrv() to not repeat code && Apply server_type_t --- core/federated/network/lf_mqtt_support.c | 13 +++---------- core/federated/network/lf_socket_support.c | 17 +++-------------- core/federated/network/lf_sst_support.c | 11 ++--------- 3 files changed, 8 insertions(+), 33 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 7f66f7dd7..06ec7f578 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -32,14 +32,7 @@ static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id); * @return netdrv_t* */ netdrv_t* initialize_netdrv(int federate_id, const char* federation_id) { - netdrv_t* drv = malloc(sizeof(netdrv_t)); - if (!drv) { - lf_print_error_and_exit("Falied to malloc netdrv_t."); - } - memset(drv, 0, sizeof(netdrv_t)); - drv->read_remaining_bytes = 0; - drv->federate_id = federate_id; - drv->federation_id = federation_id; + netdrv_t* drv = initialize_common_netdrv(federate_id, federation_id); // Initialize priv. MQTT_priv_t* priv = MQTT_priv_init(); @@ -73,8 +66,8 @@ void close_netdrv(netdrv_t* drv) { * @param port The port is NULL here. * @return int */ -int create_server(netdrv_t* drv, int server_type, uint16_t port) { - if (server_type == 0) { +int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { + if (server_type == RTI) { } // JUST TO PASS COMPILER. if (port == 0) { } // JUST TO PASS COMPILER. diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 0b6de161f..9fa243f31 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -13,17 +12,7 @@ static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int* state); netdrv_t* initialize_netdrv(int federate_id, const char* federation_id) { - printf("\n\t[TCP PROTOCOL]\n\n"); - netdrv_t* drv = malloc(sizeof(netdrv_t)); - if (!drv) { - lf_print_error_and_exit("Falied to malloc netdrv_t."); - } - memset(drv, 0, sizeof(netdrv_t)); - // drv->read = socket_read; - // drv->write = socket_write; - drv->read_remaining_bytes = 0; - drv->federate_id = federate_id; - drv->federation_id = federation_id; + netdrv_t* drv = initialize_common_netdrv(federate_id, federation_id); // Initialize priv. socket_priv_t* priv = TCP_socket_priv_init(); @@ -39,9 +28,9 @@ void close_netdrv(netdrv_t* drv) { } // This only creates TCP servers not UDP. -int create_server(netdrv_t* drv, int server_type, uint16_t port) { +int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { socket_priv_t* priv = (socket_priv_t*)drv->priv; - return create_TCP_server(priv, server_type, port); + return create_TCP_server(priv, (int) server_type, port); } /** diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index eb16c5188..0e54dd1d2 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -18,14 +18,7 @@ static void var_length_int_to_num(unsigned char* buf, unsigned int buf_length, u unsigned int* var_len_int_buf_size); netdrv_t* initialize_netdrv(int federate_id, const char* federation_id) { - if(federate_id == 0) {} //JUST TO PASS COMPILER. - if(federation_id == NULL) {} //JUST TO PASS COMPILER. - netdrv_t* drv = malloc(sizeof(netdrv_t)); - if (!drv) { - lf_print_error_and_exit("Falied to malloc netdrv_t."); - } - memset(drv, 0, sizeof(netdrv_t)); - drv->read_remaining_bytes = 0; + netdrv_t* drv = initialize_common_netdrv(federate_id, federation_id); // Initialize priv. sst_priv_t* sst_priv = sst_priv_init(); @@ -44,7 +37,7 @@ void close_netdrv(netdrv_t* drv) { } // Port will be NULL on MQTT. -int create_server(netdrv_t* drv, int server_type, uint16_t port) { +int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; SST_ctx_t* ctx = init_SST(RTI_config_path); sst_priv->sst_ctx = ctx; From 9b0ca53820a634be8385e8d5a1a5a446882e0386 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 13 May 2024 15:36:41 -0700 Subject: [PATCH 212/262] Add initialize_common_netdrv --- core/federated/network/netdriver.c | 14 +++++ include/core/federated/network/netdriver.h | 60 ++++++++++------------ 2 files changed, 41 insertions(+), 33 deletions(-) diff --git a/core/federated/network/netdriver.c b/core/federated/network/netdriver.c index ff3c56b61..7f385ce9f 100644 --- a/core/federated/network/netdriver.c +++ b/core/federated/network/netdriver.c @@ -1,8 +1,22 @@ #include +#include +#include #include "netdriver.h" #include "util.h" +netdrv_t* initialize_common_netdrv(int federate_id, const char* federation_id) { + netdrv_t* drv = malloc(sizeof(netdrv_t)); + if (!drv) { + lf_print_error_and_exit("Falied to malloc netdrv_t."); + } + memset(drv, 0, sizeof(netdrv_t)); + drv->read_remaining_bytes = 0; + drv->federate_id = federate_id; + drv->federation_id = federation_id; + return drv; +} + /** * Write the specified number of bytes to the specified netdriver using write_to_netdriver * and close the netdriver if an error occurs. If an error occurs, this will change the diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index bce567bdd..82d9c9c2f 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -16,7 +16,7 @@ typedef enum netdrv_type_t { NETDRV, UDP } netdrv_type_t; // Just doing 0 for RTI, 1 for FED -// typedef enum server_type_t { RTI, FED } server_type_t; +typedef enum server_type_t { RTI, FED } server_type_t; typedef struct netdrv_t { void* priv; @@ -26,74 +26,70 @@ typedef struct netdrv_t { } netdrv_t; /** - * @brief Allocate memory for the netdriver, and save the federate_id, and federation_id used for the netdriver. - * - * @param federate_id - * @param federation_id - * @return netdrv_t* + * @brief Allocate memory for the netdriver, save the federate_id, and federation_id used for the netdriver. + * If the netdriver belongs to the RTI, the federtae_id is -1. + * @param federate_id + * @param federation_id + * @return netdrv_t* */ netdrv_t* initialize_netdrv(int federate_id, const char* federation_id); +netdrv_t* initialize_common_netdrv(int federate_id, const char* federation_id); + /** * @brief Close connections, and free allocated memory. - * - * @param drv + * + * @param drv */ void close_netdrv(netdrv_t* drv); - // Port will be NULL on MQTT. /** - * @brief Create a netdriver server. This is such as a server socket which accepts connections. However this is only the creation of the server netdriver. - * - * @param drv - * @param server_type - * @param port - * @return int + * @brief Create a netdriver server. This is such as a server socket which accepts connections. However this is only the + * creation of the server netdriver. + * + * @param drv + * @param server_type + * @param port + * @return int */ -int create_server(netdrv_t* drv, int server_type, uint16_t port); +int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port); /** - * @brief Creates a communications session. - * - * @param netdrv - * @return netdrv_t* + * @brief Creates a communications session. + * + * @param netdrv + * @return netdrv_t* */ netdrv_t* establish_communication_session(netdrv_t* netdrv); /** * @brief Create a netdriver client. - * - * @param drv + * + * @param drv */ void create_client(netdrv_t* drv); /** * @brief Request connect to the target server. - * - * @param drv - * @return int + * + * @param drv + * @return int */ int connect_to_netdrv(netdrv_t* drv); - - int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); - int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer); - void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned char* buffer, lf_mutex_t* mutex, char* format, ...); // Return 0 when connection lost. -1 on error. > 0 bytes read. ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); - ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length); - void read_from_netdrv_fail_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length, lf_mutex_t* mutex, char* format, ...); @@ -111,8 +107,6 @@ void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr); // Returns socket number of clock_sync_server. int create_clock_sync_server(uint16_t* clock_sync_port); - - /** * Without blocking, peek at the specified socket and, if there is * anything on the queue, put its first byte at the specified address and return 1. From c58bbad5fd6ae22d1d1e50216182da8389c1055f Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 13 May 2024 18:27:26 -0700 Subject: [PATCH 213/262] Minor fix on netdriver CMake. --- core/federated/network/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/federated/network/CMakeLists.txt b/core/federated/network/CMakeLists.txt index b7239a997..c858ccdae 100644 --- a/core/federated/network/CMakeLists.txt +++ b/core/federated/network/CMakeLists.txt @@ -1,5 +1,6 @@ add_library(lf-network-impl STATIC) add_library(lf::network-impl ALIAS lf-network-impl) +target_link_libraries(lf-network-impl PUBLIC lf-logging-api) if(COMM_TYPE MATCHES MQTT) # $ git clone https://github.com/eclipse/paho.mqtt.c.git # $ cd paho.mqtt.c.git @@ -10,13 +11,11 @@ if(COMM_TYPE MATCHES MQTT) # It will be installed in /usr/local/lib find_package(eclipse-paho-mqtt-c REQUIRED) target_link_libraries(lf-network-impl PRIVATE lf::network-api eclipse-paho-mqtt-c::paho-mqtt3a eclipse-paho-mqtt-c::paho-mqtt3c) - target_link_libraries(lf-network-impl PUBLIC lf-logging-api) # $ apt-get install libssl-dev # find_package(OpenSSL REQUIRED) # target_link_libraries(lf-network-impl PUBLIC OpenSSL::SSL) else() target_link_libraries(lf-network-impl PRIVATE lf::network-api) - target_link_libraries(lf-network-impl PUBLIC lf-logging-api) endif() include_directories(/usr/local/include) From 187dee46ff872a0816fe76c21953def22e8a73eb Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 13 May 2024 18:29:39 -0700 Subject: [PATCH 214/262] Add send_address_advertisement_to_RTI && minor formatting. --- core/federated/federate.c | 57 +++++++++---------- core/federated/network/lf_mqtt_support.c | 3 + core/federated/network/lf_socket_support.c | 22 ++++++- core/federated/network/lf_sst_support.c | 35 ++++++++++-- .../core/federated/network/socket_common.h | 4 +- 5 files changed, 82 insertions(+), 39 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index a04affbf6..87623c1bc 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1621,20 +1621,18 @@ void lf_terminate_execution(environment_t* env) { } } -////////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////////// -// Public functions (declared in federate.h, in alphabetical order) - -// TODO: DONGHA: Handling address queries must be changed. Just leaving port and ip_addr now. -void lf_connect_to_federate(uint16_t remote_federate_id) { - int result = -1; - - // Ask the RTI for port number of the remote federate. +/** + * @brief Ask the RTI for port number of the remote federate. + * + * @param remote_federate_id + * @return int + */ +static int get_remote_federate_port_from_RTI(uint16_t remote_federate_id){ // The buffer is used for both sending and receiving replies. // The size is what is needed for receiving replies. unsigned char buffer[sizeof(int32_t) + sizeof(struct in_addr) + 1]; int port = -1; - int count_tries = 0; + instant_t start_connect = lf_time_physical(); while (port == -1 && !_lf_termination_executed) { buffer[0] = MSG_TYPE_ADDRESS_QUERY; // NOTE: Sending messages in little endian. @@ -1650,7 +1648,6 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); // Read RTI's response. - // TODO: Fix two reads. read_from_netdrv_fail_on_error(_fed.netdrv_to_rti, buffer, sizeof(int32_t) + sizeof(struct in_addr) + 1, NULL, "Failed to read the requested port number and IP address for federate %d from RTI.", remote_federate_id); @@ -1670,8 +1667,7 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { // remote federate has not yet sent an MSG_TYPE_ADDRESS_ADVERTISEMENT message to the RTI. // Sleep for some time before retrying. if (port == -1) { - //TODO: NEED TO CHANGE - if (count_tries++ >= CONNECT_MAX_RETRIES) { + if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { lf_print_error_and_exit("TIMEOUT obtaining IP/port for federate %d from the RTI.", remote_federate_id); } // Wait ADDRESS_QUERY_RETRY_INTERVAL nanoseconds. @@ -1680,14 +1676,27 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { } assert(port < 65536); assert(port > 0); + return port; +} + +////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////// +// Public functions (declared in federate.h, in alphabetical order) + +// TODO: DONGHA: Handling address queries must be changed. Just leaving port and ip_addr now. +void lf_connect_to_federate(uint16_t remote_federate_id) { + int result = -1; + + int port = get_remote_federate_port_from_RTI(remote_federate_id); + uint16_t uport = (uint16_t)port; char hostname[INET_ADDRSTRLEN]; inet_ntop(AF_INET, buffer + 1 + sizeof(int32_t), hostname, INET_ADDRSTRLEN); LF_PRINT_LOG("Received address %s port %d for federate %d from RTI.", hostname, uport, remote_federate_id); - // Iterate until we either successfully connect or exceed the number of - // attempts given by CONNECT_MAX_RETRIES. + // Iterate until we either successfully connect or we exceed the CONNECT_TIMEOUT + start_connect = lf_time_physical(); netdrv_t* netdrv = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); create_client(netdrv); set_host_name(netdrv, hostname); @@ -1876,23 +1885,13 @@ void lf_create_server(int specified_port) { // TODO: NEED to fix. LF_PRINT_LOG("Server for communicating with other federates started using port %d.", get_my_port(my_netdrv)); - // Send the server port number to the RTI - // on an MSG_TYPE_ADDRESS_ADVERTISEMENT message (@see net_common.h). - unsigned char buffer[sizeof(int32_t) + 1]; - buffer[0] = MSG_TYPE_ADDRESS_ADVERTISEMENT; - encode_int32(get_my_port(my_netdrv), &(buffer[1])); + // Set the global server netdriver. + _fed.my_netdrv = my_netdrv; - // Trace the event when tracing is enabled + // Trace the event when tracing is enabled. This will not be sent in MQTT. tracepoint_federate_to_rti(send_ADR_AD, _lf_my_fed_id, NULL); - // No need for a mutex because we have the only handle on this socket. - write_to_netdrv_fail_on_error(_fed.netdrv_to_rti, sizeof(int32_t) + 1, (unsigned char*)buffer, NULL, - "Failed to send address advertisement."); - - LF_PRINT_DEBUG("Sent port %d to the RTI.", get_my_port(my_netdrv)); - - // Set the global server socket - _fed.my_netdrv = my_netdrv; + send_address_advertisement_to_RTI(my_netdrv, _fed.netdrv_to_rti); } void lf_enqueue_port_absent_reactions(environment_t* env) { diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 06ec7f578..a0a38f9d7 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -177,6 +177,7 @@ void create_client(netdrv_t* drv) { * @param drv * @return int */ +//TODO: Suppport Decentralized int connect_to_netdrv(netdrv_t* drv) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; int rc; @@ -335,6 +336,8 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { return 0; } +void send_address_advertisement_to_RTI(netdrv_t* fed_drv, netdrv_t* rti_drv) {} + // ------------------Helper Functions------------------ // static MQTT_priv_t* MQTT_priv_init() { diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 9fa243f31..de1cd16ca 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -30,7 +30,7 @@ void close_netdrv(netdrv_t* drv) { // This only creates TCP servers not UDP. int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { socket_priv_t* priv = (socket_priv_t*)drv->priv; - return create_TCP_server(priv, (int) server_type, port); + return create_TCP_server(priv, (int)server_type, port); } /** @@ -79,7 +79,8 @@ void create_client(netdrv_t* drv) { int connect_to_netdrv(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; - int ret = connect_to_socket(priv->socket_descriptor, priv->server_hostname, priv->server_port, priv->user_specified_port); + int ret = + connect_to_socket(priv->socket_descriptor, priv->server_hostname, priv->server_port, priv->user_specified_port); return ret; } @@ -274,6 +275,23 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { return bytes_read; } +/** + * @brief Send the server port number to the RTI on an MSG_TYPE_ADDRESS_ADVERTISEMENT message (@see net_common.h). + * + * @param drv + */ +void send_address_advertisement_to_RTI(netdrv_t* fed_drv, netdrv_t* rti_drv) { + unsigned char buffer[sizeof(int32_t) + 1]; + buffer[0] = MSG_TYPE_ADDRESS_ADVERTISEMENT; + encode_int32(get_my_port(fed_drv), &(buffer[1])); + + // No need for a mutex because we have the only handle on this socket. + write_to_netdrv_fail_on_error(rti_drv, sizeof(int32_t) + 1, (unsigned char*)buffer, NULL, + "Failed to send address advertisement."); + + LF_PRINT_DEBUG("Sent port %d to the RTI.", get_my_port(fed_drv)); +} + // ------------------Helper Functions------------------ // static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int* state) { diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 0e54dd1d2..357d24837 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -96,11 +96,14 @@ int connect_to_netdrv(netdrv_t* drv) { session_key_list_t* s_key_list = get_session_key(sst_priv->sst_ctx, NULL); // Does not increases RTI port number. int sock = create_real_time_tcp_socket_errexit(); - int ret = connect_to_socket(sock, sst_priv->sst_ctx->config->entity_server_ip_addr, atoi(sst_priv->sst_ctx->config->entity_server_port_num), 0); // Not supporting user_specified_port yet. + // TODO: To support Decentralized, this should chagne. + int ret = connect_to_socket(sock, sst_priv->sst_ctx->config->entity_server_ip_addr, + atoi(sst_priv->sst_ctx->config->entity_server_port_num), + 0); // Not supporting user_specified_port yet. if (ret != 0) { return ret; } - SST_session_ctx_t *session_ctx = secure_connect_to_server_with_socket(&s_key_list->s_key[0], sock); + SST_session_ctx_t* session_ctx = secure_connect_to_server_with_socket(&s_key_list->s_key[0], sock); sst_priv->session_ctx = session_ctx; return 1; } @@ -115,7 +118,8 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { } ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { - if(buffer_length == 0) {}//JUST TO PASS COMPILER. + if (buffer_length == 0) { + } // JUST TO PASS COMPILER. sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; unsigned char sst_buffer[1024]; ssize_t bytes_read = 0; @@ -207,11 +211,32 @@ void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr) { } ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { - if(drv == NULL) {} //JUST TO PASS COMPILER. - if(result == NULL) {} //JUST TO PASS COMPILER. + if (drv == NULL) { + } // JUST TO PASS COMPILER. + if (result == NULL) { + } // JUST TO PASS COMPILER. return 0; } +// TODO: This is repeated in socket support.c. Want it to be in socket_common.c, however, socket_common.h does no +// include write_to_netdrv_fail_on_error. +/** + * @brief Send the server port number to the RTI on an MSG_TYPE_ADDRESS_ADVERTISEMENT message (@see net_common.h). + * + * @param drv + */ +void send_address_advertisement_to_RTI(netdrv_t* fed_drv, netdrv_t* rti_drv) { + unsigned char buffer[sizeof(int32_t) + 1]; + buffer[0] = MSG_TYPE_ADDRESS_ADVERTISEMENT; + encode_int32(get_my_port(fed_drv), &(buffer[1])); + + // No need for a mutex because we have the only handle on this socket. + write_to_netdrv_fail_on_error(rti_drv, sizeof(int32_t) + 1, (unsigned char*)buffer, NULL, + "Failed to send address advertisement."); + + LF_PRINT_DEBUG("Sent port %d to the RTI.", get_my_port(fed_drv)); +} + // ------------------Helper Functions------------------ // void lf_set_sst_config_path(const char* config_path) { sst_config_path = config_path; } diff --git a/include/core/federated/network/socket_common.h b/include/core/federated/network/socket_common.h index 5121491e4..a7b879e6f 100644 --- a/include/core/federated/network/socket_common.h +++ b/include/core/federated/network/socket_common.h @@ -4,8 +4,6 @@ #include // IPPROTO_TCP, IPPROTO_UDP #include // TCP_NODELAY -#include "tag.h" - /** * The timeout time in ns for TCP operations. * Default value is 10 secs. @@ -50,8 +48,8 @@ #define RTI_DEFAULT_UDP_PORT 15061u typedef struct socket_priv_t { - int port; // my port number int socket_descriptor; + uint16_t port; // my port number // TODO: Only used in federate.c to send federate's port. uint16_t user_specified_port; // The connected other side's info. From 25564517203b4e7cddc4ed5bb10b61d70c652a79 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 13 May 2024 18:36:39 -0700 Subject: [PATCH 215/262] Minor comments and formatting. --- core/federated/federate.c | 59 ++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index 87623c1bc..22188d7de 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -391,12 +391,12 @@ static void close_inbound_netdrv(int fed_id, int flag) { LF_MUTEX_LOCK(&netdrv_mutex); if (_fed.netdrv_for_inbound_p2p_connections[fed_id] != NULL) { if (flag >= 0) { - // if (flag > 0) { - // shutdown(_fed.sockets_for_inbound_p2p_connections[fed_id], SHUT_RDWR); - // } else { - // // Have received EOF from the other end. Send EOF to the other end. - // shutdown(_fed.sockets_for_inbound_p2p_connections[fed_id], SHUT_WR); - // } + // if (flag > 0) { + // shutdown(_fed.sockets_for_inbound_p2p_connections[fed_id], SHUT_RDWR); + // } else { + // // Have received EOF from the other end. Send EOF to the other end. + // shutdown(_fed.sockets_for_inbound_p2p_connections[fed_id], SHUT_WR); + // } } // close(_fed.sockets_for_inbound_p2p_connections[fed_id]); // _fed.sockets_for_inbound_p2p_connections[fed_id] = -1; @@ -463,8 +463,9 @@ static int handle_message(netdrv_t* netdrv, int fed_id, unsigned char* buffer, s unsigned short port_id; unsigned short federate_id; size_t length; - //TODO: JUST FOR COMPILER. - if(fed_id==0){} + // TODO: JUST FOR COMPILER. + if (fed_id == 0) { + } extract_header(buffer, &port_id, &federate_id, &length); size_t header_length = sizeof(uint16_t) + sizeof(uint16_t) + sizeof(int32_t); // Check if the message is intended for this federate @@ -815,15 +816,15 @@ static void close_outbound_netdrv(int fed_id, int flag) { // // Close the socket by sending a FIN packet indicating that no further writes // // are expected. Then read until we get an EOF indication. if (flag >= 0) { - // // SHUT_WR indicates no further outgoing messages. - // shutdown(_fed.sockets_for_outbound_p2p_connections[fed_id], SHUT_WR); - // if (flag > 0) { - // // Have not received EOF yet. read until we get an EOF or error indication. - // // This compensates for delayed ACKs and disabling of Nagles algorithm - // // by delaying exiting until the shutdown is complete. - // unsigned char message[32]; - // while (read(_fed.sockets_for_outbound_p2p_connections[fed_id], &message, 32) > 0); - // } + // // SHUT_WR indicates no further outgoing messages. + // shutdown(_fed.sockets_for_outbound_p2p_connections[fed_id], SHUT_WR); + // if (flag > 0) { + // // Have not received EOF yet. read until we get an EOF or error indication. + // // This compensates for delayed ACKs and disabling of Nagles algorithm + // // by delaying exiting until the shutdown is complete. + // unsigned char message[32]; + // while (read(_fed.sockets_for_outbound_p2p_connections[fed_id], &message, 32) > 0); + // } } // close(_fed.sockets_for_outbound_p2p_connections[fed_id]); // _fed.sockets_for_outbound_p2p_connections[fed_id] = -1; @@ -1623,11 +1624,11 @@ void lf_terminate_execution(environment_t* env) { /** * @brief Ask the RTI for port number of the remote federate. - * - * @param remote_federate_id - * @return int + * + * @param remote_federate_id + * @return int */ -static int get_remote_federate_port_from_RTI(uint16_t remote_federate_id){ +static int get_remote_federate_port_from_RTI(uint16_t remote_federate_id) { // The buffer is used for both sending and receiving replies. // The size is what is needed for receiving replies. unsigned char buffer[sizeof(int32_t) + sizeof(struct in_addr) + 1]; @@ -1702,11 +1703,10 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { set_host_name(netdrv, hostname); set_port(netdrv, uport); result = connect_to_netdrv(netdrv); - if (result != 0 ) { + if (result != 0) { LF_PRINT_LOG("Failed to connect."); } - // Connect was successful. size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); unsigned char* buf = (unsigned char*)malloc(1 + sizeof(uint16_t) + 1 + federation_id_length); @@ -1768,7 +1768,7 @@ void lf_connect_to_rti(const char* hostname, int port) { } // Initialize netdriver to rti. - _fed.netdrv_to_rti = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); // set memory. + _fed.netdrv_to_rti = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); // set memory. create_client(_fed.netdrv_to_rti); set_host_name(_fed.netdrv_to_rti, hostname); set_port(_fed.netdrv_to_rti, uport); @@ -1891,6 +1891,8 @@ void lf_create_server(int specified_port) { // Trace the event when tracing is enabled. This will not be sent in MQTT. tracepoint_federate_to_rti(send_ADR_AD, _lf_my_fed_id, NULL); + // Send the federate's information to the RTI, for inbound connection. For TCP, it will send the port, and for MQTT it + // will do nothing. send_address_advertisement_to_RTI(my_netdrv, _fed.netdrv_to_rti); } @@ -1965,7 +1967,7 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { // unsigned char federation_id_length = buffer[header_length - 1]; // char remote_federation_id[federation_id_length]; // bytes_read = read_from_netdrv(client_fed_netdrv, (unsigned char*)remote_federation_id, federation_id_length); - if (bytes_read <= 0 || (strncmp(federation_metadata.federation_id, (const char *) buffer + header_length, + if (bytes_read <= 0 || (strncmp(federation_metadata.federation_id, (const char*)buffer + header_length, strnlen(federation_metadata.federation_id, 255)) != 0)) { lf_print_warning("Received invalid federation ID. Closing socket."); if (bytes_read > 0) { @@ -2015,7 +2017,7 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { // Failed to create a listening thread. LF_MUTEX_LOCK(&netdrv_mutex); if (_fed.netdrv_for_inbound_p2p_connections[remote_fed_id] != NULL) { - close_netdrv(_fed.netdrv_for_inbound_p2p_connections[remote_fed_id]); + close_netdrv(_fed.netdrv_for_inbound_p2p_connections[remote_fed_id]); _fed.netdrv_for_inbound_p2p_connections[remote_fed_id] = NULL; } LF_MUTEX_UNLOCK(&netdrv_mutex); @@ -2421,10 +2423,9 @@ int lf_send_tagged_message(environment_t* env, interval_t additional_delay, int tracepoint_federate_to_rti(send_TAGGED_MSG, _lf_my_fed_id, ¤t_message_intended_tag); } - -//TODO: THIS IS ONLY TEMPORARY... NEED TO FIX!! + // TODO: THIS IS ONLY TEMPORARY... NEED TO FIX!! size_t sender_length = length + header_length; - unsigned char *sender = malloc(sender_length); + unsigned char* sender = malloc(sender_length); memcpy(sender, header_buffer, header_length); memcpy(sender + header_length, message, length); // int bytes_written = write_to_netdrv_close_on_error(netdrv, header_length, header_buffer); From b1b030bb7e172cf08ff98e7d89a51d0b5a65002e Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 13 May 2024 18:52:40 -0700 Subject: [PATCH 216/262] Fix declaration of send_address_advertisement_to_RTI --- include/core/federated/network/netdriver.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index 82d9c9c2f..999929bbb 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -117,6 +117,14 @@ int create_clock_sync_server(uint16_t* clock_sync_port); */ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result); +/** + * @brief Send ADDRESS_ADVERTISEMENT message to RTI. + * + * @param fed_drv + * @param rti_drv + */ +void send_address_advertisement_to_RTI(netdrv_t* fed_drv, netdrv_t* rti_drv); + //////////////////////////// #endif /* NETDRIVER_H */ From 199ec22285cef8320d0044df115855e665a63176 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 13 May 2024 19:07:19 -0700 Subject: [PATCH 217/262] Change function names to connector and listener --- core/federated/RTI/rti_remote.c | 2 +- core/federated/federate.c | 14 ++++++++------ core/federated/network/lf_mqtt_support.c | 4 ++-- core/federated/network/lf_socket_support.c | 4 ++-- core/federated/network/lf_sst_support.c | 4 ++-- include/core/federated/network/netdriver.h | 4 ++-- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index e27ff8c80..2ce7383e1 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1453,7 +1453,7 @@ int start_rti_server(uint16_t port) { // Initialize RTI's netdriver. The ID is -1 for the RTI. rti_remote->rti_netdrv = initialize_netdrv(-1, rti_remote->federation_id); // Create the RTI's netdriver. - rc = create_server(rti_remote->rti_netdrv, RTI, port); // 0 for RTI + rc = create_listener(rti_remote->rti_netdrv, RTI, port); // 0 for RTI lf_print("RTI: Listening for federates."); // Create the clocksync's netdriver. if (rti_remote->clock_sync_global_status >= clock_sync_on) { diff --git a/core/federated/federate.c b/core/federated/federate.c index 22188d7de..3f30d2ca6 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1628,7 +1628,7 @@ void lf_terminate_execution(environment_t* env) { * @param remote_federate_id * @return int */ -static int get_remote_federate_port_from_RTI(uint16_t remote_federate_id) { +static int get_remote_federate_info_from_RTI(uint16_t remote_federate_id) { // The buffer is used for both sending and receiving replies. // The size is what is needed for receiving replies. unsigned char buffer[sizeof(int32_t) + sizeof(struct in_addr) + 1]; @@ -1688,7 +1688,10 @@ static int get_remote_federate_port_from_RTI(uint16_t remote_federate_id) { void lf_connect_to_federate(uint16_t remote_federate_id) { int result = -1; - int port = get_remote_federate_port_from_RTI(remote_federate_id); + // Initialize the netdriver to connect the remote federate. + netdrv_t* netdrv = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); + create_connector(netdrv); + int port = get_remote_federate_info_from_RTI(remote_federate_id); uint16_t uport = (uint16_t)port; @@ -1698,8 +1701,7 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { // Iterate until we either successfully connect or we exceed the CONNECT_TIMEOUT start_connect = lf_time_physical(); - netdrv_t* netdrv = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); - create_client(netdrv); + set_host_name(netdrv, hostname); set_port(netdrv, uport); result = connect_to_netdrv(netdrv); @@ -1769,7 +1771,7 @@ void lf_connect_to_rti(const char* hostname, int port) { // Initialize netdriver to rti. _fed.netdrv_to_rti = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); // set memory. - create_client(_fed.netdrv_to_rti); + create_connector(_fed.netdrv_to_rti); set_host_name(_fed.netdrv_to_rti, hostname); set_port(_fed.netdrv_to_rti, uport); set_specified_port(_fed.netdrv_to_rti, port); @@ -1880,7 +1882,7 @@ void lf_create_server(int specified_port) { LF_PRINT_LOG("Creating a socket server on port %d.", port); netdrv_t* my_netdrv = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); - create_server(my_netdrv, FED, specified_port); // 1 for FED + create_listener(my_netdrv, FED, specified_port); // 1 for FED // TODO: NEED to fix. LF_PRINT_LOG("Server for communicating with other federates started using port %d.", get_my_port(my_netdrv)); diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index a0a38f9d7..b65514339 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -66,7 +66,7 @@ void close_netdrv(netdrv_t* drv) { * @param port The port is NULL here. * @return int */ -int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { +int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { if (server_type == RTI) { } // JUST TO PASS COMPILER. if (port == 0) { @@ -154,7 +154,7 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { * * @param drv */ -void create_client(netdrv_t* drv) { +void create_connector(netdrv_t* drv) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; set_MQTTClient_id(MQTT_priv, drv->federate_id); int rc; diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index de1cd16ca..f96c78df1 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -28,7 +28,7 @@ void close_netdrv(netdrv_t* drv) { } // This only creates TCP servers not UDP. -int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { +int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { socket_priv_t* priv = (socket_priv_t*)drv->priv; return create_TCP_server(priv, (int)server_type, port); } @@ -71,7 +71,7 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { return ret_netdrv; } -void create_client(netdrv_t* drv) { +void create_connector(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; TCP_socket_open(priv); } diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 357d24837..582874eb6 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -37,7 +37,7 @@ void close_netdrv(netdrv_t* drv) { } // Port will be NULL on MQTT. -int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port) { +int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; SST_ctx_t* ctx = init_SST(RTI_config_path); sst_priv->sst_ctx = ctx; @@ -84,7 +84,7 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { return ret_netdrv; } -void create_client(netdrv_t* drv) { +void create_connector(netdrv_t* drv) { sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; SST_ctx_t* ctx = init_SST((const char*)sst_config_path); diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index 999929bbb..07e95b287 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -53,7 +53,7 @@ void close_netdrv(netdrv_t* drv); * @param port * @return int */ -int create_server(netdrv_t* drv, server_type_t server_type, uint16_t port); +int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port); /** * @brief Creates a communications session. @@ -68,7 +68,7 @@ netdrv_t* establish_communication_session(netdrv_t* netdrv); * * @param drv */ -void create_client(netdrv_t* drv); +void create_connector(netdrv_t* drv); /** * @brief Request connect to the target server. From ca645a6849147620e65aa66e9c88311f103171fc Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 14 May 2024 16:00:48 -0700 Subject: [PATCH 218/262] Move send_address_advertisement_to_RTI() back to federate.c --- core/federated/federate.c | 46 ++++++++++++++++------ core/federated/network/lf_mqtt_support.c | 2 - core/federated/network/lf_socket_support.c | 17 -------- core/federated/network/lf_sst_support.c | 19 --------- include/core/federated/network/netdriver.h | 8 ---- 5 files changed, 35 insertions(+), 57 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index 3f30d2ca6..345f7a3b5 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1622,13 +1622,35 @@ void lf_terminate_execution(environment_t* env) { } } +/** + * @brief Send the server port number to the RTI on an MSG_TYPE_ADDRESS_ADVERTISEMENT message (@see net_common.h). + * + * @param drv + */ +void send_address_advertisement_to_RTI(netdrv_t* fed_drv, netdrv_t* rti_drv) { + #if defined(COMM_TYPE_TCP) || defined(COMM_TYPE_SST) + unsigned char buffer[sizeof(int32_t) + 1]; + buffer[0] = MSG_TYPE_ADDRESS_ADVERTISEMENT; + encode_int32(get_my_port(fed_drv), &(qbuffer[1])); + + // No need for a mutex because we have the only handle on this socket. + write_to_netdrv_fail_on_error(rti_drv, sizeof(int32_t) + 1, (unsigned char*)buffer, NULL, + "Failed to send address advertisement."); + + LF_PRINT_DEBUG("Sent port %d to the RTI.", get_my_port(fed_drv)); + #elif defined(COMM_TYPE_MQTT) + // Do not send port. + #endif +} + /** * @brief Ask the RTI for port number of the remote federate. * * @param remote_federate_id * @return int */ -static int get_remote_federate_info_from_RTI(uint16_t remote_federate_id) { +static int get_remote_federate_info_from_RTI(uint16_t remote_federate_id, netdrv_t* rti_netdrv, netdrv_t* fed_netdrv) { + #if defined(COMM_TYPE_TCP) || defined(COMM_TYPE_SST) // The buffer is used for both sending and receiving replies. // The size is what is needed for receiving replies. unsigned char buffer[sizeof(int32_t) + sizeof(struct in_addr) + 1]; @@ -1644,12 +1666,12 @@ static int get_remote_federate_info_from_RTI(uint16_t remote_federate_id) { tracepoint_federate_to_rti(send_ADR_QR, _lf_my_fed_id, NULL); LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); - write_to_netdrv_fail_on_error(_fed.netdrv_to_rti, sizeof(uint16_t) + 1, buffer, &lf_outbound_netdrv_mutex, + write_to_netdrv_fail_on_error(rti_netdrv, sizeof(uint16_t) + 1, buffer, &lf_outbound_netdrv_mutex, "Failed to send address query for federate %d to RTI.", remote_federate_id); LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); // Read RTI's response. - read_from_netdrv_fail_on_error(_fed.netdrv_to_rti, buffer, sizeof(int32_t) + sizeof(struct in_addr) + 1, NULL, + read_from_netdrv_fail_on_error(rti_netdrv, buffer, sizeof(int32_t) + sizeof(struct in_addr) + 1, NULL, "Failed to read the requested port number and IP address for federate %d from RTI.", remote_federate_id); @@ -1677,7 +1699,14 @@ static int get_remote_federate_info_from_RTI(uint16_t remote_federate_id) { } assert(port < 65536); assert(port > 0); - return port; + char hostname[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, buffer + 1 + sizeof(int32_t), hostname, INET_ADDRSTRLEN); + LF_PRINT_LOG("Received address %s port %d for federate %d from RTI.", hostname, uport, remote_federate_id); + set_host_name(fed_netdrv, hostname); + set_port(fed_netdrv, uport); + #elif defined(COMM_TYPE_MQTT) + // Do not send port. + #endif } ////////////////////////////////////////////////////////////////////////////////// @@ -1691,19 +1720,14 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { // Initialize the netdriver to connect the remote federate. netdrv_t* netdrv = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); create_connector(netdrv); - int port = get_remote_federate_info_from_RTI(remote_federate_id); + get_remote_federate_info_from_RTI(remote_federate_id, _fed.netdrv_to_rti, netdrv); uint16_t uport = (uint16_t)port; - char hostname[INET_ADDRSTRLEN]; - inet_ntop(AF_INET, buffer + 1 + sizeof(int32_t), hostname, INET_ADDRSTRLEN); - LF_PRINT_LOG("Received address %s port %d for federate %d from RTI.", hostname, uport, remote_federate_id); // Iterate until we either successfully connect or we exceed the CONNECT_TIMEOUT - start_connect = lf_time_physical(); + instant_t start_connect = lf_time_physical(); - set_host_name(netdrv, hostname); - set_port(netdrv, uport); result = connect_to_netdrv(netdrv); if (result != 0) { LF_PRINT_LOG("Failed to connect."); diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index b65514339..c974dfad9 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -336,8 +336,6 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { return 0; } -void send_address_advertisement_to_RTI(netdrv_t* fed_drv, netdrv_t* rti_drv) {} - // ------------------Helper Functions------------------ // static MQTT_priv_t* MQTT_priv_init() { diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index f96c78df1..c4a5848a1 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -275,23 +275,6 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { return bytes_read; } -/** - * @brief Send the server port number to the RTI on an MSG_TYPE_ADDRESS_ADVERTISEMENT message (@see net_common.h). - * - * @param drv - */ -void send_address_advertisement_to_RTI(netdrv_t* fed_drv, netdrv_t* rti_drv) { - unsigned char buffer[sizeof(int32_t) + 1]; - buffer[0] = MSG_TYPE_ADDRESS_ADVERTISEMENT; - encode_int32(get_my_port(fed_drv), &(buffer[1])); - - // No need for a mutex because we have the only handle on this socket. - write_to_netdrv_fail_on_error(rti_drv, sizeof(int32_t) + 1, (unsigned char*)buffer, NULL, - "Failed to send address advertisement."); - - LF_PRINT_DEBUG("Sent port %d to the RTI.", get_my_port(fed_drv)); -} - // ------------------Helper Functions------------------ // static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int* state) { diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 582874eb6..e3d2f3d95 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -218,25 +218,6 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { return 0; } -// TODO: This is repeated in socket support.c. Want it to be in socket_common.c, however, socket_common.h does no -// include write_to_netdrv_fail_on_error. -/** - * @brief Send the server port number to the RTI on an MSG_TYPE_ADDRESS_ADVERTISEMENT message (@see net_common.h). - * - * @param drv - */ -void send_address_advertisement_to_RTI(netdrv_t* fed_drv, netdrv_t* rti_drv) { - unsigned char buffer[sizeof(int32_t) + 1]; - buffer[0] = MSG_TYPE_ADDRESS_ADVERTISEMENT; - encode_int32(get_my_port(fed_drv), &(buffer[1])); - - // No need for a mutex because we have the only handle on this socket. - write_to_netdrv_fail_on_error(rti_drv, sizeof(int32_t) + 1, (unsigned char*)buffer, NULL, - "Failed to send address advertisement."); - - LF_PRINT_DEBUG("Sent port %d to the RTI.", get_my_port(fed_drv)); -} - // ------------------Helper Functions------------------ // void lf_set_sst_config_path(const char* config_path) { sst_config_path = config_path; } diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index 07e95b287..675ede619 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -117,14 +117,6 @@ int create_clock_sync_server(uint16_t* clock_sync_port); */ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result); -/** - * @brief Send ADDRESS_ADVERTISEMENT message to RTI. - * - * @param fed_drv - * @param rti_drv - */ -void send_address_advertisement_to_RTI(netdrv_t* fed_drv, netdrv_t* rti_drv); - //////////////////////////// #endif /* NETDRIVER_H */ From 5362a71381d3724b90da9219a13286d73e1ea157 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 14 May 2024 16:49:45 -0700 Subject: [PATCH 219/262] Change multiple term changes. federate_id-> my_federate_id, my_netdrv->listener_netdrv, ret_netdrv->connector_netdrv --- core/federated/federate.c | 14 +++----- core/federated/network/lf_mqtt_support.c | 42 +++++++++++----------- core/federated/network/lf_socket_support.c | 26 +++++++------- core/federated/network/lf_sst_support.c | 32 ++++++++--------- include/core/federated/network/netdriver.h | 14 ++++---- 5 files changed, 61 insertions(+), 67 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index 345f7a3b5..56a927644 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1701,9 +1701,10 @@ static int get_remote_federate_info_from_RTI(uint16_t remote_federate_id, netdrv assert(port > 0); char hostname[INET_ADDRSTRLEN]; inet_ntop(AF_INET, buffer + 1 + sizeof(int32_t), hostname, INET_ADDRSTRLEN); - LF_PRINT_LOG("Received address %s port %d for federate %d from RTI.", hostname, uport, remote_federate_id); + LF_PRINT_LOG("Received address %s port %d for federate %d from RTI.", hostname, port, remote_federate_id); set_host_name(fed_netdrv, hostname); - set_port(fed_netdrv, uport); + // Must set as specified port. Or else, the port will be increased when connecting to the other federate. + set_specified_port(fed_netdrv, port); #elif defined(COMM_TYPE_MQTT) // Do not send port. #endif @@ -1721,16 +1722,9 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { netdrv_t* netdrv = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); create_connector(netdrv); get_remote_federate_info_from_RTI(remote_federate_id, _fed.netdrv_to_rti, netdrv); - - uint16_t uport = (uint16_t)port; - - - // Iterate until we either successfully connect or we exceed the CONNECT_TIMEOUT - instant_t start_connect = lf_time_physical(); - result = connect_to_netdrv(netdrv); if (result != 0) { - LF_PRINT_LOG("Failed to connect."); + lf_print_error("Failed to connect to federate %d.", remote_federate_id); } // Connect was successful. diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index c974dfad9..2c0584bbd 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -31,8 +31,8 @@ static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id); * * @return netdrv_t* */ -netdrv_t* initialize_netdrv(int federate_id, const char* federation_id) { - netdrv_t* drv = initialize_common_netdrv(federate_id, federation_id); +netdrv_t* initialize_netdrv(int my_federate_id, const char* federation_id) { + netdrv_t* drv = initialize_common_netdrv(my_federate_id, federation_id); // Initialize priv. MQTT_priv_t* priv = MQTT_priv_init(); @@ -105,48 +105,48 @@ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { * @param netdrv * @return netdrv_t* */ -netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { - netdrv_t* ret_netdrv = initialize_netdrv(-2, my_netdrv->federation_id); - // MQTT_priv_t* my_priv = (MQTT_priv_t*)my_netdrv->priv; - MQTT_priv_t* ret_priv = (MQTT_priv_t*)ret_netdrv->priv; +netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { + netdrv_t* connector_nedrv = initialize_netdrv(-2, listener_netdrv->federation_id); + // MQTT_priv_t* listener_priv = (MQTT_priv_t*)listener_netdrv->priv; + MQTT_priv_t* connector_priv = (MQTT_priv_t*)connector_nedrv->priv; unsigned char buffer[1 + sizeof(uint16_t)]; - read_from_netdrv_fail_on_error(my_netdrv, buffer, 1 + sizeof(uint16_t), NULL, "MQTT receive failed."); + read_from_netdrv_fail_on_error(listener_netdrv, buffer, 1 + sizeof(uint16_t), NULL, "MQTT receive failed."); if (buffer[0] != MSG_TYPE_MQTT_JOIN) { lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_JOIN."); } uint16_t fed_id = extract_uint16(buffer + 1); - ret_netdrv->federate_id = (int)fed_id; + connector_nedrv->federate_id = (int)fed_id; - set_MQTTServer_id(ret_priv, my_netdrv->federate_id, ret_netdrv->federate_id); + set_MQTTServer_id(connector_priv, listener_netdrv->federate_id, connector_nedrv->federate_id); int rc; - if ((rc = MQTTClient_create(&ret_priv->client, ADDRESS, ret_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != + if ((rc = MQTTClient_create(&connector_priv->client, ADDRESS, connector_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to create client, return code %d\n", rc); } - ret_priv->conn_opts.keepAliveInterval = 20; - ret_priv->conn_opts.cleansession = 1; - if ((rc = MQTTClient_connect(ret_priv->client, &ret_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + connector_priv->conn_opts.keepAliveInterval = 20; + connector_priv->conn_opts.cleansession = 1; + if ((rc = MQTTClient_connect(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to connect, return code %d\n", rc); } - char* topic_to_subscribe = create_topic_federation_id_fed_id_to_rti(ret_netdrv->federation_id, fed_id); - if ((rc = MQTTClient_subscribe(ret_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { + char* topic_to_subscribe = create_topic_federation_id_fed_id_to_rti(connector_nedrv->federation_id, fed_id); + if ((rc = MQTTClient_subscribe(connector_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); } LF_PRINT_LOG("Subscribing on topic %s.", topic_to_subscribe); free(topic_to_subscribe); - ret_priv->topic_name = (const char*)create_topic_federation_id_rti_to_fed_id(ret_netdrv->federation_id, fed_id); + connector_priv->topic_name = (const char*)create_topic_federation_id_rti_to_fed_id(connector_nedrv->federation_id, fed_id); buffer[0] = MSG_TYPE_MQTT_ACCEPT; - encode_uint16((uint16_t)ret_netdrv->federate_id, buffer + 1); - write_to_netdrv_fail_on_error(ret_netdrv, 1 + sizeof(uint16_t), buffer, NULL, - "Failed to send MSG_TYPE_MQTT_ACCEPT to federate %d", ret_netdrv->federate_id); - read_from_netdrv_fail_on_error(ret_netdrv, buffer, 1, NULL, "MQTT receive failed."); + encode_uint16((uint16_t)connector_nedrv->federate_id, buffer + 1); + write_to_netdrv_fail_on_error(connector_nedrv, 1 + sizeof(uint16_t), buffer, NULL, + "Failed to send MSG_TYPE_MQTT_ACCEPT to federate %d", connector_nedrv->federate_id); + read_from_netdrv_fail_on_error(connector_nedrv, buffer, 1, NULL, "MQTT receive failed."); if (buffer[0] != MSG_TYPE_MQTT_ACCEPT_ACK) { lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_ACCEPT_ACK."); } - return ret_netdrv; + return connector_nedrv; } /** diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index c4a5848a1..ee11174d8 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -11,8 +11,8 @@ static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int* state); -netdrv_t* initialize_netdrv(int federate_id, const char* federation_id) { - netdrv_t* drv = initialize_common_netdrv(federate_id, federation_id); +netdrv_t* initialize_netdrv(int my_federate_id, const char* federation_id) { + netdrv_t* drv = initialize_common_netdrv(my_federate_id, federation_id); // Initialize priv. socket_priv_t* priv = TCP_socket_priv_init(); @@ -38,23 +38,23 @@ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { * 2. Establishes communication session. **/ -netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { +netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { // -2 is for uninitialized value. - netdrv_t* ret_netdrv = initialize_netdrv(-2, my_netdrv->federation_id); - socket_priv_t* my_priv = (socket_priv_t*)my_netdrv->priv; - socket_priv_t* ret_priv = (socket_priv_t*)ret_netdrv->priv; + netdrv_t* connector_nedrv = initialize_netdrv(-2, listener_netdrv->federation_id); + socket_priv_t* listener_priv = (socket_priv_t*)listener_netdrv->priv; + socket_priv_t* connector_priv = (socket_priv_t*)connector_nedrv->priv; // Wait for an incoming connection request. struct sockaddr client_fd; uint32_t client_length = sizeof(client_fd); // The following blocks until a client connects. while (1) { - ret_priv->socket_descriptor = accept(my_priv->socket_descriptor, &client_fd, &client_length); - if (ret_priv->socket_descriptor >= 0) { + connector_priv->socket_descriptor = accept(listener_priv->socket_descriptor, &client_fd, &client_length); + if (connector_priv->socket_descriptor >= 0) { // Got a socket break; - } else if (ret_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { - lf_print_error_and_exit("Failed to accept the socket. %s. ret_priv->socket_descriptor = %d", strerror(errno), - ret_priv->socket_descriptor); + } else if (connector_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { + lf_print_error_and_exit("Failed to accept the socket. %s. connector_priv->socket_descriptor = %d", strerror(errno), + connector_priv->socket_descriptor); } else { // Try again lf_print_warning("Failed to accept the socket. %s. Trying again.", strerror(errno)); @@ -67,8 +67,8 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { // 1) Decentralized coordination - handle_address_query() - Sends the port number and address of the federate. // 2) Clock synchronization - send_physical_clock - Send through UDP. struct sockaddr_in* pV4_addr = (struct sockaddr_in*)&client_fd; - ret_priv->server_ip_addr = pV4_addr->sin_addr; - return ret_netdrv; + connector_priv->server_ip_addr = pV4_addr->sin_addr; + return connector_nedrv; } void create_connector(netdrv_t* drv) { diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index e3d2f3d95..83d4fe5e4 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -17,8 +17,8 @@ static sst_priv_t* sst_priv_init(); static void var_length_int_to_num(unsigned char* buf, unsigned int buf_length, unsigned int* num, unsigned int* var_len_int_buf_size); -netdrv_t* initialize_netdrv(int federate_id, const char* federation_id) { - netdrv_t* drv = initialize_common_netdrv(federate_id, federation_id); +netdrv_t* initialize_netdrv(int my_federate_id, const char* federation_id) { + netdrv_t* drv = initialize_common_netdrv(my_federate_id, federation_id); // Initialize priv. sst_priv_t* sst_priv = sst_priv_init(); @@ -44,24 +44,24 @@ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { return create_TCP_server(sst_priv->socket_priv, server_type, port); } -netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { - netdrv_t* ret_netdrv = initialize_netdrv(-2, my_netdrv->federation_id); - sst_priv_t* my_priv = (sst_priv_t*)my_netdrv->priv; - sst_priv_t* ret_priv = (sst_priv_t*)ret_netdrv->priv; +netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { + netdrv_t* connector_nedrv = initialize_netdrv(-2, listener_netdrv->federation_id); + sst_priv_t* listener_priv = (sst_priv_t*)listener_netdrv->priv; + sst_priv_t* connector_priv = (sst_priv_t*)connector_nedrv->priv; // Wait for an incoming connection request. struct sockaddr client_fd; uint32_t client_length = sizeof(client_fd); // The following blocks until a client connects. while (1) { - ret_priv->socket_priv->socket_descriptor = - accept(my_priv->socket_priv->socket_descriptor, &client_fd, &client_length); - if (ret_priv->socket_priv->socket_descriptor >= 0) { + connector_priv->socket_priv->socket_descriptor = + accept(listener_priv->socket_priv->socket_descriptor, &client_fd, &client_length); + if (connector_priv->socket_priv->socket_descriptor >= 0) { // Got a socket break; - } else if (ret_priv->socket_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { - lf_print_error_and_exit("Failed to accept the socket. %s. ret_priv->socket_priv->socket_descriptor = %d", - strerror(errno), ret_priv->socket_priv->socket_descriptor); + } else if (connector_priv->socket_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { + lf_print_error_and_exit("Failed to accept the socket. %s. connector_priv->socket_priv->socket_descriptor = %d", + strerror(errno), connector_priv->socket_priv->socket_descriptor); } else { // Try again lf_print_warning("Failed to accept the socket. %s. Trying again.", strerror(errno)); @@ -71,17 +71,17 @@ netdrv_t* establish_communication_session(netdrv_t* my_netdrv) { session_key_list_t* s_key_list = init_empty_session_key_list(); SST_session_ctx_t* session_ctx = - server_secure_comm_setup(my_priv->sst_ctx, ret_priv->socket_priv->socket_descriptor, s_key_list); + server_secure_comm_setup(listener_priv->sst_ctx, connector_priv->socket_priv->socket_descriptor, s_key_list); free_session_key_list_t(s_key_list); - ret_priv->session_ctx = session_ctx; + connector_priv->session_ctx = session_ctx; // TODO: DONGHA // Get the IP address of the other accepting client. This is used in two cases. // 1) Decentralized coordination - handle_address_query() - Sends the port number and address of the federate. // 2) Clock synchronization - send_physical_clock - Send through UDP. struct sockaddr_in* pV4_addr = (struct sockaddr_in*)&client_fd; - ret_priv->socket_priv->server_ip_addr = pV4_addr->sin_addr; - return ret_netdrv; + connector_priv->socket_priv->server_ip_addr = pV4_addr->sin_addr; + return connector_nedrv; } void create_connector(netdrv_t* drv) { diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index 675ede619..4ffa9df36 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -21,18 +21,18 @@ typedef enum server_type_t { RTI, FED } server_type_t; typedef struct netdrv_t { void* priv; unsigned int read_remaining_bytes; - int federate_id; + int my_federate_id; // The RTI is -1, and unitialized is -2. const char* federation_id; } netdrv_t; /** - * @brief Allocate memory for the netdriver, save the federate_id, and federation_id used for the netdriver. + * @brief Allocate memory for the netdriver, save my_federate_id, and federation_id used for the netdriver. * If the netdriver belongs to the RTI, the federtae_id is -1. - * @param federate_id + * @param my_federate_id * @param federation_id * @return netdrv_t* */ -netdrv_t* initialize_netdrv(int federate_id, const char* federation_id); +netdrv_t* initialize_netdrv(int my_federate_id, const char* federation_id); netdrv_t* initialize_common_netdrv(int federate_id, const char* federation_id); @@ -56,12 +56,12 @@ void close_netdrv(netdrv_t* drv); int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port); /** - * @brief Creates a communications session. + * @brief Creates a communication session. It uses the listener_netdrv to listen to connections, and return a connector_nedrv * - * @param netdrv + * @param listener_netdrv * @return netdrv_t* */ -netdrv_t* establish_communication_session(netdrv_t* netdrv); +netdrv_t* establish_communication_session(netdrv_t* listener_netdrv); /** * @brief Create a netdriver client. From 3b3e55040999aea5618188c5ba4b36ada39c3451 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 14 May 2024 16:50:46 -0700 Subject: [PATCH 220/262] Fix connect_to_socket with timeout time and better errors --- core/federated/network/socket_common.c | 29 ++++++++++++++++---------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index e91a13c89..7481a6017 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -16,6 +16,9 @@ #include "net_util.h" #include "socket_common.h" +// Global variable defined in reactor_common.c: +extern bool _lf_termination_executed; + socket_priv_t* TCP_socket_priv_init() { socket_priv_t* priv = malloc(sizeof(socket_priv_t)); if (!priv) { @@ -29,9 +32,7 @@ socket_priv_t* TCP_socket_priv_init() { return priv; } -void TCP_socket_open(socket_priv_t* priv) { - priv->socket_descriptor = create_real_time_tcp_socket_errexit(); -} +void TCP_socket_open(socket_priv_t* priv) { priv->socket_descriptor = create_real_time_tcp_socket_errexit(); } void TCP_socket_close(socket_priv_t* priv) { if (priv->socket_descriptor > 0) { @@ -147,7 +148,6 @@ int create_TCP_server(socket_priv_t* priv, int server_type, uint16_t port) { return 1; } - // Returns clock sync UDP socket. int create_clock_sync_server(uint16_t* clock_sync_port) { // Create UDP socket. @@ -210,7 +210,7 @@ int create_clock_sync_server(uint16_t* clock_sync_port) { return socket_descriptor; } -int connect_to_socket(int sock, char* hostname, int port, uint16_t user_specified_port){ +int connect_to_socket(int sock, char* hostname, int port, uint16_t user_specified_port) { struct addrinfo hints; struct addrinfo* result; int ret = -1; @@ -223,24 +223,32 @@ int connect_to_socket(int sock, char* hostname, int port, uint16_t user_specifie hints.ai_next = NULL; hints.ai_flags = AI_NUMERICSERV; /* Allow only numeric port numbers */ - int count_retries = 0; - while (count_retries++ < CONNECT_MAX_RETRIES) { + int used_port = (user_specified_port == 0) ? port : user_specified_port; + + instant_t start_connect = lf_time_physical(); + while (!_lf_termination_executed) { + if (!CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { + lf_print_error("Failed to connect with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); + break; + } // Convert port number to string. char str[6]; - sprintf(str, "%u", port); + sprintf(str, "%u", used_port); // Get address structure matching hostname and hints criteria, and // set port to the port number provided in str. There should only // ever be one matching address structure, and we connect to that. if (getaddrinfo(hostname, (const char*)&str, &hints, &result)) { - lf_print_error_and_exit("No host matching given hostname: %s", hostname); + lf_print_error("No host matching given hostname: %s", hostname); + break; } ret = connect(sock, result->ai_addr, result->ai_addrlen); if (ret < 0) { lf_sleep(CONNECT_RETRY_INTERVAL); if (user_specified_port == 0) { - port++; + used_port++; } + lf_print_warning("Could not connect. Will try again every" PRINTF_TIME "nanoseconds.\n", CONNECT_RETRY_INTERVAL); continue; } else { break; @@ -249,4 +257,3 @@ int connect_to_socket(int sock, char* hostname, int port, uint16_t user_specifie freeaddrinfo(result); return ret; } - From 327068ba23a62c971521910b5fd95065045b7ca4 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 14 May 2024 18:04:15 -0700 Subject: [PATCH 221/262] Fix federate ID to uint16_t --- core/federated/RTI/rti_remote.c | 2 +- core/federated/network/lf_socket_support.c | 2 +- core/federated/network/lf_sst_support.c | 2 +- core/federated/network/netdriver.c | 4 ++-- include/core/federated/network/netdriver.h | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 2ce7383e1..331dae97b 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1089,7 +1089,7 @@ static int32_t receive_and_check_fed_id_message(netdrv_t* netdrv) { } } federate_info_t* fed = GET_FED_INFO(fed_id); - netdrv->federate_id = (int) fed_id; + netdrv->my_federate_id = (uint16_t) fed_id; fed->fed_netdrv = netdrv; // TODO: Make this work for only TCP. diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index ee11174d8..9e77de44a 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -11,7 +11,7 @@ static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int* state); -netdrv_t* initialize_netdrv(int my_federate_id, const char* federation_id) { +netdrv_t* initialize_netdrv(uint16_t my_federate_id, const char* federation_id) { netdrv_t* drv = initialize_common_netdrv(my_federate_id, federation_id); // Initialize priv. diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 83d4fe5e4..447b82160 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -17,7 +17,7 @@ static sst_priv_t* sst_priv_init(); static void var_length_int_to_num(unsigned char* buf, unsigned int buf_length, unsigned int* num, unsigned int* var_len_int_buf_size); -netdrv_t* initialize_netdrv(int my_federate_id, const char* federation_id) { +netdrv_t* initialize_netdrv(uint16_t my_federate_id, const char* federation_id) { netdrv_t* drv = initialize_common_netdrv(my_federate_id, federation_id); // Initialize priv. diff --git a/core/federated/network/netdriver.c b/core/federated/network/netdriver.c index 7f385ce9f..41d250393 100644 --- a/core/federated/network/netdriver.c +++ b/core/federated/network/netdriver.c @@ -5,14 +5,14 @@ #include "netdriver.h" #include "util.h" -netdrv_t* initialize_common_netdrv(int federate_id, const char* federation_id) { +netdrv_t* initialize_common_netdrv(uint16_t my_federate_id, const char* federation_id) { netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { lf_print_error_and_exit("Falied to malloc netdrv_t."); } memset(drv, 0, sizeof(netdrv_t)); drv->read_remaining_bytes = 0; - drv->federate_id = federate_id; + drv->my_federate_id = my_federate_id; drv->federation_id = federation_id; return drv; } diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index 4ffa9df36..c372dbaf3 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -21,7 +21,7 @@ typedef enum server_type_t { RTI, FED } server_type_t; typedef struct netdrv_t { void* priv; unsigned int read_remaining_bytes; - int my_federate_id; // The RTI is -1, and unitialized is -2. + uint16_t my_federate_id; // The RTI is -1, and unitialized is -2. const char* federation_id; } netdrv_t; @@ -32,9 +32,9 @@ typedef struct netdrv_t { * @param federation_id * @return netdrv_t* */ -netdrv_t* initialize_netdrv(int my_federate_id, const char* federation_id); +netdrv_t* initialize_netdrv(uint16_t my_federate_id, const char* federation_id); -netdrv_t* initialize_common_netdrv(int federate_id, const char* federation_id); +netdrv_t* initialize_common_netdrv(uint16_t federate_id, const char* federation_id); /** * @brief Close connections, and free allocated memory. From c54d449141c3e0e3bbd99badf8b12d21e8f58e8b Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 14 May 2024 18:04:46 -0700 Subject: [PATCH 222/262] Create function create_topic_federation_id_A_to_B to make a topic name with the federateID and RTI name. --- core/federated/network/lf_mqtt_support.c | 166 +++++++++++------------ 1 file changed, 79 insertions(+), 87 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 2c0584bbd..aca9f35e6 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -15,13 +15,10 @@ #define TIMEOUT 10000L static MQTT_priv_t* MQTT_priv_init(); -static char* create_topic_federation_id_rti(const char* federation_id); -static char* create_topic_federation_id_fed_id_to_rti(const char* federation_id, uint16_t fed_id); -static char* create_topic_federation_id_rti_to_fed_id(const char* federation_id, uint16_t fed_id); -// static char* base64_encode(const unsigned char* input, int input_len, int* output_len); -// static unsigned char* base64_decode(const unsigned char* input, int input_len, int* output_len); -static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id); -static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id); +static char* create_topic_federation_id_listener_id(const char* federation_id, uint16_t listener_id); +static char* create_topic_federation_id_A_to_B(const char* federation_id, uint16_t A, uint16_t B); +static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, uint16_t my_id, uint16_t client_id); +static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, uint16_t client_id); /** * @brief @@ -31,7 +28,7 @@ static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id); * * @return netdrv_t* */ -netdrv_t* initialize_netdrv(int my_federate_id, const char* federation_id) { +netdrv_t* initialize_netdrv(uint16_t my_federate_id, const char* federation_id) { netdrv_t* drv = initialize_common_netdrv(my_federate_id, federation_id); // Initialize priv. @@ -46,8 +43,8 @@ void close_netdrv(netdrv_t* drv) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; unsigned char buffer[1]; buffer[0] = MQTT_RTI_RESIGNED; - write_to_netdrv_fail_on_error(drv, 1, buffer, NULL, - "Failed to send MQTT_RTI_RESIGNED to federate %d", drv->federate_id); + write_to_netdrv_fail_on_error(drv, 1, buffer, NULL, "Failed to send MQTT_RTI_RESIGNED to federate %d", + drv->my_federate_id); int rc; if ((rc = MQTTClient_disconnect(MQTT_priv->client, 10000)) != MQTTCLIENT_SUCCESS) { printf("Failed to disconnect, return code %d\n", rc); @@ -73,7 +70,7 @@ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { } // JUST TO PASS COMPILER. MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; // If RTI calls this, it will be -1. If federate server calls, it will be it's federate ID. - set_MQTTServer_id(MQTT_priv, drv->federate_id, drv->federate_id); + set_MQTTServer_id(MQTT_priv, drv->my_federate_id, drv->my_federate_id); int rc; if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { @@ -86,7 +83,7 @@ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to connect, return code %d\n", rc); } - MQTT_priv->topic_name = (const char*)create_topic_federation_id_rti(drv->federation_id); + MQTT_priv->topic_name = (const char*)create_topic_federation_id_listener_id(drv->federation_id, drv->my_federate_id); if ((rc = MQTTClient_subscribe(MQTT_priv->client, MQTT_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); } @@ -115,12 +112,12 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_JOIN."); } uint16_t fed_id = extract_uint16(buffer + 1); - connector_nedrv->federate_id = (int)fed_id; + connector_nedrv->my_federate_id = (int)fed_id; - set_MQTTServer_id(connector_priv, listener_netdrv->federate_id, connector_nedrv->federate_id); + set_MQTTServer_id(connector_priv, listener_netdrv->my_federate_id, connector_nedrv->my_federate_id); int rc; - if ((rc = MQTTClient_create(&connector_priv->client, ADDRESS, connector_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != - MQTTCLIENT_SUCCESS) { + if ((rc = MQTTClient_create(&connector_priv->client, ADDRESS, connector_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, + NULL)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to create client, return code %d\n", rc); } @@ -129,19 +126,22 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { if ((rc = MQTTClient_connect(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to connect, return code %d\n", rc); } + // Subscribe to topic: federationID_fedID_to_listenorID + char* topic_to_subscribe = create_topic_federation_id_A_to_B(connector_nedrv->federation_id, fed_id, listener_netdrv->my_federate_id); - char* topic_to_subscribe = create_topic_federation_id_fed_id_to_rti(connector_nedrv->federation_id, fed_id); if ((rc = MQTTClient_subscribe(connector_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); } LF_PRINT_LOG("Subscribing on topic %s.", topic_to_subscribe); free(topic_to_subscribe); - connector_priv->topic_name = (const char*)create_topic_federation_id_rti_to_fed_id(connector_nedrv->federation_id, fed_id); + // Publish to topic: federationID_listenerID_to_fedID + connector_priv->topic_name = + (const char*)create_topic_federation_id_A_to_B(connector_nedrv->federation_id, listener_netdrv->my_federate_id, fed_id); buffer[0] = MSG_TYPE_MQTT_ACCEPT; - encode_uint16((uint16_t)connector_nedrv->federate_id, buffer + 1); + encode_uint16((uint16_t)connector_nedrv->my_federate_id, buffer + 1); write_to_netdrv_fail_on_error(connector_nedrv, 1 + sizeof(uint16_t), buffer, NULL, - "Failed to send MSG_TYPE_MQTT_ACCEPT to federate %d", connector_nedrv->federate_id); + "Failed to send MSG_TYPE_MQTT_ACCEPT to federate %d", connector_nedrv->my_federate_id); read_from_netdrv_fail_on_error(connector_nedrv, buffer, 1, NULL, "MQTT receive failed."); if (buffer[0] != MSG_TYPE_MQTT_ACCEPT_ACK) { lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_ACCEPT_ACK."); @@ -156,7 +156,7 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { */ void create_connector(netdrv_t* drv) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; - set_MQTTClient_id(MQTT_priv, drv->federate_id); + set_MQTTClient_id(MQTT_priv, drv->my_federate_id); int rc; if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { @@ -177,31 +177,40 @@ void create_connector(netdrv_t* drv) { * @param drv * @return int */ -//TODO: Suppport Decentralized +// TODO: Suppport Decentralized int connect_to_netdrv(netdrv_t* drv) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; int rc; - MQTT_priv->topic_name = (const char*)create_topic_federation_id_rti(drv->federation_id); + + uint16_t listenerID; + + MQTT_priv->topic_name = (const char*)create_topic_federation_id_listener_id(drv->federation_id, listenerID); unsigned char buffer[1 + sizeof(uint16_t)]; buffer[0] = MSG_TYPE_MQTT_JOIN; - lf_print_log("Federate_id: %d", drv->federate_id); - encode_uint16((uint16_t)drv->federate_id, buffer + 1); + lf_print_log("Federate_id: %d", drv->my_federate_id); + encode_uint16((uint16_t)drv->my_federate_id, buffer + 1); write_to_netdrv_fail_on_error(drv, 1 + sizeof(uint16_t), buffer, NULL, - "Failed to write federate_id_to RTI for connection through MQTT."); + "Failed to write my_federate_id to listener for connection through MQTT."); free((char*)MQTT_priv->topic_name); - char* topic_to_subscribe = create_topic_federation_id_rti_to_fed_id(drv->federation_id, drv->federate_id); + + // Subscribe to topic: federationID_listenerID_to_fedID + char* topic_to_subscribe = create_topic_federation_id_A_to_B(drv->federation_id, listenerID, drv->my_federate_id); + if ((rc = MQTTClient_subscribe(MQTT_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); } LF_PRINT_LOG("Subscribing on topic %s.", topic_to_subscribe); free(topic_to_subscribe); - MQTT_priv->topic_name = (const char*)create_topic_federation_id_fed_id_to_rti(drv->federation_id, drv->federate_id); + + // Publish to topic: federationID_fedID_to_listenorID + MQTT_priv->topic_name = + (const char*)create_topic_federation_id_A_to_B(drv->federation_id, drv->my_federate_id, listenerID); read_from_netdrv_fail_on_error(drv, buffer, 1 + sizeof(uint16_t), NULL, "Failed to read MSG_TYPE_MQTT_ACCEPT."); if (buffer[0] != MSG_TYPE_MQTT_ACCEPT) { lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_ACCEPT."); } uint16_t temp_fed_id = extract_uint16(buffer + 1); - if (drv->federate_id != temp_fed_id) { + if (drv->my_federate_id != temp_fed_id) { lf_print_error_and_exit("Wrong federate id. Received %d\n", temp_fed_id); } buffer[0] = MSG_TYPE_MQTT_ACCEPT_ACK; @@ -349,10 +358,18 @@ static MQTT_priv_t* MQTT_priv_init() { return MQTT_priv; } -static char* create_topic_federation_id_rti(const char* federation_id) { +static char* create_topic_federation_id_listener_id(const char* federation_id, uint16_t listener_id) { + int max_length; // Determine the maximum length of the resulting string - int max_length = snprintf(NULL, 0, "%s_RTI", federation_id) + 1; // +1 for null terminator - + if (listener_id == -2) { + lf_print_error_and_exit("The ID used for the MQTT topic is not initalized."); + return NULL; + } + if (listener_id == -1) { + max_length = snprintf(NULL, 0, "%s_RTI", federation_id) + 1; // +1 for null terminator + } else { + max_length = snprintf(NULL, 0, "%s_fed_%d", federation_id, listener_id) + 1; // +1 for null terminator + } // Allocate memory for the resulting string char* result = (char*)malloc(max_length); if (result == NULL) { @@ -361,78 +378,53 @@ static char* create_topic_federation_id_rti(const char* federation_id) { } // Format the string using snprintf - snprintf(result, max_length, "%s_RTI", federation_id); - + if (listener_id == -1) { + snprintf(result, max_length, "%s_RTI", federation_id); + } else { + snprintf(result, max_length, "%s_fed__%d", federation_id, listener_id); + } return result; } -static char* create_topic_federation_id_fed_id_to_rti(const char* federation_id, uint16_t fed_id) { - // Determine the maximum length of the resulting string - int max_length = snprintf(NULL, 0, "%s_fed_%d_to_RTI", federation_id, fed_id) + 1; // +1 for null terminator - // Allocate memory for the resulting string - char* result = (char*)malloc(max_length); - if (result == NULL) { - lf_print_error_and_exit("Falied to malloc."); +static char* create_topic_federation_id_A_to_B(const char* federation_id, uint16_t A, uint16_t B) { + int max_length; + char* result; + if (A == -2 || B == -2) { + lf_print_error_and_exit("The ID used for the MQTT topic is not initalized."); return NULL; } - // Format the string using snprintf - snprintf(result, max_length, "%s_fed_%d_to_RTI", federation_id, fed_id); - - return result; -} - -static char* create_topic_federation_id_rti_to_fed_id(const char* federation_id, uint16_t fed_id) { // Determine the maximum length of the resulting string - int max_length = snprintf(NULL, 0, "%s_RTI_to_fed_%d", federation_id, fed_id) + 1; // +1 for null terminator + if (A == -1) { + max_length = snprintf(NULL, 0, "%s_RTI_to_fed_%d", federation_id, B) + 1; // +1 for null terminator + } else if (B == -1) { + max_length = snprintf(NULL, 0, "%s_fed_%d_to_RTI", federation_id, A) + 1; // +1 for null terminator + } else { + max_length = snprintf(NULL, 0, "%s_fed_%d_to_fed_%d", federation_id, A, B) + 1; // +1 for null terminator + } // Allocate memory for the resulting string - char* result = (char*)malloc(max_length); + result = (char*)malloc(max_length); if (result == NULL) { - lf_print_error_and_exit("Falied to malloc."); + lf_print_error_and_exit("Failed to malloc."); return NULL; } // Format the string using snprintf - snprintf(result, max_length, "%s_RTI_to_fed_%d", federation_id, fed_id); - + if (A == -1) { + snprintf(result, max_length, "%s_RTI_to_fed_%d", federation_id, B); + } else if (B == -1) { + snprintf(result, max_length, "%s_fed_%d_to_RTI", federation_id, A); + } else { + snprintf(result, max_length, "%s_fed_%d_to_fed_%d", federation_id, A, B); + } + return result; } -// Function to encode data as Base64 using OpenSSL's EVP_EncodeBlock() -// static char* base64_encode(const unsigned char* input, int input_len, int* output_len) { -// // Calculate the maximum possible length of the Base64 encoded data -// int max_encoded_len = (((input_len + 2) / 3) * 4) + 1; // +1 for null terminator - -// // Allocate memory for the Base64 encoded data -// char* encoded_data = (char*)malloc(max_encoded_len); -// if (encoded_data == NULL) { -// *output_len = 0; -// return NULL; // Memory allocation failed -// } - -// // Encode the input data as Base64 -// *output_len = EVP_EncodeBlock((unsigned char*)encoded_data, input, input_len); -// return encoded_data; -// } - -// // Function to encode data as Base64 using OpenSSL's EVP_DecodeBlock() -// static unsigned char* base64_decode(const unsigned char* input, int input_len, int* output_len) { -// // Allocate memory for the output buffer -// unsigned char* output = (unsigned char*)malloc(input_len); -// if (output == NULL) { -// return NULL; // Memory allocation failed -// } - -// // Decode the Base64 data -// // TODO: DONGHA This can have errors, because this may add 0bit paddings. -// *output_len = EVP_DecodeBlock(output, input, input_len); - -// return output; -// } - -static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id) { + +static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, uint16_t my_id, uint16_t client_id) { if (my_id == -1 && client_id == -1) { strcat(MQTT_priv->client_id, "RTI_RTI"); } else if (my_id == -1) { @@ -442,4 +434,4 @@ static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id) } } -static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id) { sprintf(MQTT_priv->client_id, "%d", client_id); } +static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, uint16_t client_id) { sprintf(MQTT_priv->client_id, "%d", client_id); } From 60d155e8e9974d162a4321a3f2f51bf06075f351 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 14 May 2024 18:27:56 -0700 Subject: [PATCH 223/262] Add set_MQTT_target_ID. --- core/federated/federate.c | 4 +++- core/federated/network/lf_mqtt_support.c | 7 ++++++- core/federated/network/lf_socket_support.c | 9 +++++++++ core/federated/network/lf_sst_support.c | 7 +++++++ core/federated/network/socket_common.c | 8 +++++--- include/core/federated/network/netdriver.h | 18 +++++++++++++----- .../federated/network/type/lf_mqtt_support.h | 1 + 7 files changed, 44 insertions(+), 10 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index 56a927644..015b03254 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1706,7 +1706,8 @@ static int get_remote_federate_info_from_RTI(uint16_t remote_federate_id, netdrv // Must set as specified port. Or else, the port will be increased when connecting to the other federate. set_specified_port(fed_netdrv, port); #elif defined(COMM_TYPE_MQTT) - // Do not send port. + // Do not send port for MQTT. It only needs to know the target federate's ID. + set_target_id(fed_netdrv, remote_federate_id); #endif } @@ -1793,6 +1794,7 @@ void lf_connect_to_rti(const char* hostname, int port) { set_host_name(_fed.netdrv_to_rti, hostname); set_port(_fed.netdrv_to_rti, uport); set_specified_port(_fed.netdrv_to_rti, port); + set_target_id(_fed.netdrv_to_rti, -1); if (connect_to_netdrv(_fed.netdrv_to_rti) < 0) { lf_print_error_and_exit("Failed to connect() to RTI after %d tries.", CONNECT_MAX_RETRIES); diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index aca9f35e6..9981ce5d0 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -182,7 +182,7 @@ int connect_to_netdrv(netdrv_t* drv) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; int rc; - uint16_t listenerID; + uint16_t listenerID = MQTT_priv->target_id; MQTT_priv->topic_name = (const char*)create_topic_federation_id_listener_id(drv->federation_id, listenerID); unsigned char buffer[1 + sizeof(uint16_t)]; @@ -345,6 +345,11 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { return 0; } +void set_target_id(netdrv_t* drv, uint16_t federate_id) { + MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; + MQTT_priv->target_id = federate_id; +} + // ------------------Helper Functions------------------ // static MQTT_priv_t* MQTT_priv_init() { diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 9e77de44a..c44587e9b 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -8,6 +8,7 @@ #include "net_common.h" #include "net_util.h" #include "netdriver.h" +#include "lf_socket_support.h" static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int* state); @@ -275,6 +276,14 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { return bytes_read; } +void set_target_id(netdrv_t* drv, uint16_t federate_id){ + if (drv == NULL) { + } // JUST TO PASS COMPILER. + if (federate_id == 0) { + } // JUST TO PASS COMPILER. +} + + // ------------------Helper Functions------------------ // static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int* state) { diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 447b82160..e7cf35180 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -218,6 +218,13 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { return 0; } +void set_target_id(netdrv_t* drv, uint16_t federate_id){ + if (drv == NULL) { + } // JUST TO PASS COMPILER. + if (federate_id == 0) { + } // JUST TO PASS COMPILER. +} + // ------------------Helper Functions------------------ // void lf_set_sst_config_path(const char* config_path) { sst_config_path = config_path; } diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index 7481a6017..53b212b42 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -16,8 +16,9 @@ #include "net_util.h" #include "socket_common.h" -// Global variable defined in reactor_common.c: -extern bool _lf_termination_executed; +// TODO: Not working... +// // Global variable defined in reactor_common.c: +// extern bool _lf_termination_executed; socket_priv_t* TCP_socket_priv_init() { socket_priv_t* priv = malloc(sizeof(socket_priv_t)); @@ -226,7 +227,8 @@ int connect_to_socket(int sock, char* hostname, int port, uint16_t user_specifie int used_port = (user_specified_port == 0) ? port : user_specified_port; instant_t start_connect = lf_time_physical(); - while (!_lf_termination_executed) { + // while (!_lf_termination_executed) { // Not working... + while(1) { if (!CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { lf_print_error("Failed to connect with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); break; diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index c372dbaf3..5c805b4be 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -56,7 +56,8 @@ void close_netdrv(netdrv_t* drv); int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port); /** - * @brief Creates a communication session. It uses the listener_netdrv to listen to connections, and return a connector_nedrv + * @brief Creates a communication session. It uses the listener_netdrv to listen to connections, and return a + * connector_nedrv * * @param listener_netdrv * @return netdrv_t* @@ -103,10 +104,6 @@ void set_host_name(netdrv_t* drv, const char* hostname); void set_port(netdrv_t* drv, int port); void set_specified_port(netdrv_t* drv, int port); void set_ip_addr(netdrv_t* drv, struct in_addr ip_addr); - -// Returns socket number of clock_sync_server. -int create_clock_sync_server(uint16_t* clock_sync_port); - /** * Without blocking, peek at the specified socket and, if there is * anything on the queue, put its first byte at the specified address and return 1. @@ -117,6 +114,17 @@ int create_clock_sync_server(uint16_t* clock_sync_port); */ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result); +/** + * @brief Set the target id to connect. This is only used in MQTT. + * + * @param drv + * @param federate_id + */ +void set_target_id(netdrv_t* drv, uint16_t federate_id); + +// Returns socket number of clock_sync_server. +int create_clock_sync_server(uint16_t* clock_sync_port); + //////////////////////////// #endif /* NETDRIVER_H */ diff --git a/include/core/federated/network/type/lf_mqtt_support.h b/include/core/federated/network/type/lf_mqtt_support.h index f24efec0e..512b706f8 100644 --- a/include/core/federated/network/type/lf_mqtt_support.h +++ b/include/core/federated/network/type/lf_mqtt_support.h @@ -10,6 +10,7 @@ typedef struct MQTT_priv_t { MQTTClient_connectOptions conn_opts; // = MQTTClient_connectOptions_initializer; const char* topic_name; char client_id[20]; + uint16_t target_id; } MQTT_priv_t; #endif // LF_MQTT_SUPPORT_H From f86d82feb9662e032d6e03126183f463927dbc64 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 15 May 2024 15:22:23 -0700 Subject: [PATCH 224/262] Add stdint.h to mqtt_support.h --- include/core/federated/network/type/lf_mqtt_support.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/core/federated/network/type/lf_mqtt_support.h b/include/core/federated/network/type/lf_mqtt_support.h index 512b706f8..b4099bed3 100644 --- a/include/core/federated/network/type/lf_mqtt_support.h +++ b/include/core/federated/network/type/lf_mqtt_support.h @@ -1,6 +1,7 @@ #ifndef LF_MQTT_SUPPORT_H #define LF_MQTT_SUPPORT_H +#include #include #define MQTT_RTI_RESIGNED 88 From 19856a5fcfd9d4b02e0aa8363ea135047cfcf42b Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 15 May 2024 17:28:21 -0700 Subject: [PATCH 225/262] Minor fixes. --- core/federated/RTI/rti_remote.c | 5 ---- core/federated/federate.c | 34 +++++++++++++--------- core/federated/network/lf_mqtt_support.c | 25 +++++++++------- core/federated/network/lf_socket_support.c | 3 +- core/federated/network/lf_sst_support.c | 2 +- core/federated/network/netdriver.c | 2 +- core/federated/network/socket_common.c | 6 ++-- include/core/federated/network/netdriver.h | 6 ++-- 8 files changed, 44 insertions(+), 39 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 331dae97b..e274f0ced 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1366,9 +1366,7 @@ void lf_connect_to_federates(netdrv_t* rti_netdrv) { if (rti_remote->authentication_enabled) { if (!authenticate_federate(fed_netdrv)) { lf_print_warning("RTI failed to authenticate the incoming federate."); - close_netdrv(fed_netdrv); - // Ignore the federate that failed authentication. i--; continue; @@ -1416,7 +1414,6 @@ void lf_connect_to_federates(netdrv_t* rti_netdrv) { void* respond_to_erroneous_connections(void* nothing) { initialize_lf_thread_id(); while (true) { - // TODO: DONGHA: Need to fix. Do we need accept as api? netdrv_t* fed_netdrv = establish_communication_session(rti_remote->rti_netdrv); if (fed_netdrv == NULL) @@ -1508,8 +1505,6 @@ void initialize_RTI(rti_remote_t* rti) { rti_remote->all_federates_exited = false; rti_remote->federation_id = "Unidentified Federation"; rti_remote->user_specified_port = 0; - // rti_remote->final_port_TCP = 0; - // rti_remote->socket_descriptor_TCP = -1; rti_remote->clock_sync_port = UINT16_MAX; rti_remote->clock_sync_socket = -1; rti_remote->clock_sync_global_status = clock_sync_init; diff --git a/core/federated/federate.c b/core/federated/federate.c index 015b03254..086a6229d 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1627,20 +1627,24 @@ void lf_terminate_execution(environment_t* env) { * * @param drv */ -void send_address_advertisement_to_RTI(netdrv_t* fed_drv, netdrv_t* rti_drv) { - #if defined(COMM_TYPE_TCP) || defined(COMM_TYPE_SST) +void send_address_advertisement_to_RTI(netdrv_t* fed_netdrv, netdrv_t* rti_netdrv) { +#if defined(COMM_TYPE_TCP) || defined(COMM_TYPE_SST) unsigned char buffer[sizeof(int32_t) + 1]; buffer[0] = MSG_TYPE_ADDRESS_ADVERTISEMENT; - encode_int32(get_my_port(fed_drv), &(qbuffer[1])); + encode_int32(get_my_port(fed_netdrv), &(buffer[1])); // No need for a mutex because we have the only handle on this socket. - write_to_netdrv_fail_on_error(rti_drv, sizeof(int32_t) + 1, (unsigned char*)buffer, NULL, + write_to_netdrv_fail_on_error(rti_netdrv, sizeof(int32_t) + 1, (unsigned char*)buffer, NULL, "Failed to send address advertisement."); - LF_PRINT_DEBUG("Sent port %d to the RTI.", get_my_port(fed_drv)); - #elif defined(COMM_TYPE_MQTT) - // Do not send port. - #endif + LF_PRINT_DEBUG("Sent port %d to the RTI.", get_my_port(fed_netdrv)); +#elif defined(COMM_TYPE_MQTT) +// Do not send port. + if (fed_netdrv == NULL) { + } // JUST TO PASS COMPILER. + if (rti_netdrv == NULL) { + } // JUST TO PASS COMPILER. +#endif } /** @@ -1649,8 +1653,8 @@ void send_address_advertisement_to_RTI(netdrv_t* fed_drv, netdrv_t* rti_drv) { * @param remote_federate_id * @return int */ -static int get_remote_federate_info_from_RTI(uint16_t remote_federate_id, netdrv_t* rti_netdrv, netdrv_t* fed_netdrv) { - #if defined(COMM_TYPE_TCP) || defined(COMM_TYPE_SST) +static void get_remote_federate_info_from_RTI(uint16_t remote_federate_id, netdrv_t* rti_netdrv, netdrv_t* fed_netdrv) { +#if defined(COMM_TYPE_TCP) || defined(COMM_TYPE_SST) // The buffer is used for both sending and receiving replies. // The size is what is needed for receiving replies. unsigned char buffer[sizeof(int32_t) + sizeof(struct in_addr) + 1]; @@ -1705,10 +1709,12 @@ static int get_remote_federate_info_from_RTI(uint16_t remote_federate_id, netdrv set_host_name(fed_netdrv, hostname); // Must set as specified port. Or else, the port will be increased when connecting to the other federate. set_specified_port(fed_netdrv, port); - #elif defined(COMM_TYPE_MQTT) +#elif defined(COMM_TYPE_MQTT) // Do not send port for MQTT. It only needs to know the target federate's ID. set_target_id(fed_netdrv, remote_federate_id); - #endif + if (rti_netdrv == NULL) { + } // JUST TO PASS COMPILER. +#endif } ////////////////////////////////////////////////////////////////////////////////// @@ -1729,6 +1735,8 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { } // Connect was successful. + + // Send P2P message to target federate. size_t federation_id_length = strnlen(federation_metadata.federation_id, 255); unsigned char* buf = (unsigned char*)malloc(1 + sizeof(uint16_t) + 1 + federation_id_length); buf[0] = MSG_TYPE_P2P_SENDING_FED_ID; @@ -1755,7 +1763,7 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { lf_print_error_and_exit("Received MSG_TYPE_REJECT message from remote federate (%d).", buf[1]); result = -1; } else { - lf_print("Connected to federate %d, port %d.", remote_federate_id, port); + lf_print("Connected to federate %d.", remote_federate_id); // Trace the event when tracing is enabled tracepoint_federate_to_federate(receive_ACK, _lf_my_fed_id, remote_federate_id, NULL); } diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 9981ce5d0..cf4e1cad7 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -15,10 +15,10 @@ #define TIMEOUT 10000L static MQTT_priv_t* MQTT_priv_init(); -static char* create_topic_federation_id_listener_id(const char* federation_id, uint16_t listener_id); -static char* create_topic_federation_id_A_to_B(const char* federation_id, uint16_t A, uint16_t B); -static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, uint16_t my_id, uint16_t client_id); -static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, uint16_t client_id); +static char* create_topic_federation_id_listener_id(const char* federation_id, int listener_id); +static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, int B); +static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id); +static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id); /** * @brief @@ -28,7 +28,7 @@ static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, uint16_t client_id); * * @return netdrv_t* */ -netdrv_t* initialize_netdrv(uint16_t my_federate_id, const char* federation_id) { +netdrv_t* initialize_netdrv(int my_federate_id, const char* federation_id) { netdrv_t* drv = initialize_common_netdrv(my_federate_id, federation_id); // Initialize priv. @@ -103,11 +103,14 @@ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { * @return netdrv_t* */ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { + unsigned char buffer[1 + sizeof(uint16_t)]; + LF_PRINT_LOG("RTI READING."); + read_from_netdrv_fail_on_error(listener_netdrv, buffer, 1 + sizeof(uint16_t), NULL, "MQTT receive failed."); + netdrv_t* connector_nedrv = initialize_netdrv(-2, listener_netdrv->federation_id); // MQTT_priv_t* listener_priv = (MQTT_priv_t*)listener_netdrv->priv; MQTT_priv_t* connector_priv = (MQTT_priv_t*)connector_nedrv->priv; - unsigned char buffer[1 + sizeof(uint16_t)]; - read_from_netdrv_fail_on_error(listener_netdrv, buffer, 1 + sizeof(uint16_t), NULL, "MQTT receive failed."); + LF_PRINT_LOG("RTI READ SUCCESS."); if (buffer[0] != MSG_TYPE_MQTT_JOIN) { lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_JOIN."); } @@ -363,7 +366,7 @@ static MQTT_priv_t* MQTT_priv_init() { return MQTT_priv; } -static char* create_topic_federation_id_listener_id(const char* federation_id, uint16_t listener_id) { +static char* create_topic_federation_id_listener_id(const char* federation_id, int listener_id) { int max_length; // Determine the maximum length of the resulting string if (listener_id == -2) { @@ -392,7 +395,7 @@ static char* create_topic_federation_id_listener_id(const char* federation_id, u } -static char* create_topic_federation_id_A_to_B(const char* federation_id, uint16_t A, uint16_t B) { +static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, int B) { int max_length; char* result; if (A == -2 || B == -2) { @@ -429,7 +432,7 @@ static char* create_topic_federation_id_A_to_B(const char* federation_id, uint16 } -static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, uint16_t my_id, uint16_t client_id) { +static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id) { if (my_id == -1 && client_id == -1) { strcat(MQTT_priv->client_id, "RTI_RTI"); } else if (my_id == -1) { @@ -439,4 +442,4 @@ static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, uint16_t my_id, uint16_t c } } -static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, uint16_t client_id) { sprintf(MQTT_priv->client_id, "%d", client_id); } +static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id) { sprintf(MQTT_priv->client_id, "%d", client_id); } diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index c44587e9b..fcf284e66 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -12,7 +12,7 @@ static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int* state); -netdrv_t* initialize_netdrv(uint16_t my_federate_id, const char* federation_id) { +netdrv_t* initialize_netdrv(int my_federate_id, const char* federation_id) { netdrv_t* drv = initialize_common_netdrv(my_federate_id, federation_id); // Initialize priv. @@ -79,7 +79,6 @@ void create_connector(netdrv_t* drv) { int connect_to_netdrv(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; - int ret = connect_to_socket(priv->socket_descriptor, priv->server_hostname, priv->server_port, priv->user_specified_port); return ret; diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index e7cf35180..0e09240fa 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -17,7 +17,7 @@ static sst_priv_t* sst_priv_init(); static void var_length_int_to_num(unsigned char* buf, unsigned int buf_length, unsigned int* num, unsigned int* var_len_int_buf_size); -netdrv_t* initialize_netdrv(uint16_t my_federate_id, const char* federation_id) { +netdrv_t* initialize_netdrv(int my_federate_id, const char* federation_id) { netdrv_t* drv = initialize_common_netdrv(my_federate_id, federation_id); // Initialize priv. diff --git a/core/federated/network/netdriver.c b/core/federated/network/netdriver.c index 41d250393..3bf11e141 100644 --- a/core/federated/network/netdriver.c +++ b/core/federated/network/netdriver.c @@ -5,7 +5,7 @@ #include "netdriver.h" #include "util.h" -netdrv_t* initialize_common_netdrv(uint16_t my_federate_id, const char* federation_id) { +netdrv_t* initialize_common_netdrv(int my_federate_id, const char* federation_id) { netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { lf_print_error_and_exit("Falied to malloc netdrv_t."); diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index 53b212b42..c104013ae 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -228,8 +228,8 @@ int connect_to_socket(int sock, char* hostname, int port, uint16_t user_specifie instant_t start_connect = lf_time_physical(); // while (!_lf_termination_executed) { // Not working... - while(1) { - if (!CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { + while (1) { + if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { lf_print_error("Failed to connect with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); break; } @@ -255,7 +255,7 @@ int connect_to_socket(int sock, char* hostname, int port, uint16_t user_specifie } else { break; } + freeaddrinfo(result); } - freeaddrinfo(result); return ret; } diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index 5c805b4be..69e57fb86 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -21,7 +21,7 @@ typedef enum server_type_t { RTI, FED } server_type_t; typedef struct netdrv_t { void* priv; unsigned int read_remaining_bytes; - uint16_t my_federate_id; // The RTI is -1, and unitialized is -2. + int my_federate_id; // The RTI is -1, and unitialized is -2. This must be int not uint16_t const char* federation_id; } netdrv_t; @@ -32,9 +32,9 @@ typedef struct netdrv_t { * @param federation_id * @return netdrv_t* */ -netdrv_t* initialize_netdrv(uint16_t my_federate_id, const char* federation_id); +netdrv_t* initialize_netdrv(int my_federate_id, const char* federation_id); -netdrv_t* initialize_common_netdrv(uint16_t federate_id, const char* federation_id); +netdrv_t* initialize_common_netdrv(int federate_id, const char* federation_id); /** * @brief Close connections, and free allocated memory. From 23acbe597384e599963a83d4d5933cf1c396554e Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 15 May 2024 19:58:42 -0700 Subject: [PATCH 226/262] Set back federate ID to int --- core/federated/network/lf_socket_support.c | 2 +- core/federated/network/lf_sst_support.c | 2 +- include/core/federated/network/netdriver.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index fcf284e66..83d866b3a 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -275,7 +275,7 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { return bytes_read; } -void set_target_id(netdrv_t* drv, uint16_t federate_id){ +void set_target_id(netdrv_t* drv, int federate_id){ if (drv == NULL) { } // JUST TO PASS COMPILER. if (federate_id == 0) { diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index 0e09240fa..aa90c202a 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -218,7 +218,7 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { return 0; } -void set_target_id(netdrv_t* drv, uint16_t federate_id){ +void set_target_id(netdrv_t* drv, int federate_id){ if (drv == NULL) { } // JUST TO PASS COMPILER. if (federate_id == 0) { diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index 69e57fb86..43f5e5456 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -120,7 +120,7 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result); * @param drv * @param federate_id */ -void set_target_id(netdrv_t* drv, uint16_t federate_id); +void set_target_id(netdrv_t* drv, int federate_id); // Returns socket number of clock_sync_server. int create_clock_sync_server(uint16_t* clock_sync_port); From 707fd1ea68afd9c46cded4e6ba4291c05d6f407b Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 15 May 2024 19:59:20 -0700 Subject: [PATCH 227/262] Fix bugs, add comments. --- core/federated/network/lf_mqtt_support.c | 128 +++++++++--------- .../federated/network/type/lf_mqtt_support.h | 5 +- 2 files changed, 67 insertions(+), 66 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index cf4e1cad7..add91f4c2 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -75,11 +75,10 @@ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to create client, return code %d\n", rc); - exit(EXIT_FAILURE); } - MQTT_priv->conn_opts.keepAliveInterval = 20; - MQTT_priv->conn_opts.cleansession = 1; + MQTT_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; + MQTT_priv->conn_opts.cleansession = MQTTcleansession; if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to connect, return code %d\n", rc); } @@ -87,68 +86,79 @@ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { if ((rc = MQTTClient_subscribe(MQTT_priv->client, MQTT_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); } + int64_t current_physical_time = lf_time_physical(); LF_PRINT_LOG("Subscribing on topic %s.", MQTT_priv->topic_name); + LF_PRINT_LOG("PHYSICAL_TIME ON SUBSCRIBING TOPIC: " PRINTF_TIME, current_physical_time); return 1; } /** * @brief - * 1. Each federate publishes fed_id to {Federation_ID}_RTI - * 2. fed_{n} subscribes to “{Federation_Id}_RTI_to_fed_{n}â€. - * 3. RTI subscribes to “{Federation_Id}_fed_{n}_to_RTIâ€. + * This function returns a connector netdriver using the listener netdriver. + * 1. Each federate publishes fed_id to {Federation_ID}_{listenerID} + * 2. fed_{n} subscribes to “{Federation_Id}_{listenerID}_to_fed_{n}â€. + * 3. Listener subscribes to “{Federation_Id}_fed_{n}_to_{listenerID}â€. * Check lf_socket_support.c for example. * @param netdrv * @return netdrv_t* */ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { - unsigned char buffer[1 + sizeof(uint16_t)]; - LF_PRINT_LOG("RTI READING."); - read_from_netdrv_fail_on_error(listener_netdrv, buffer, 1 + sizeof(uint16_t), NULL, "MQTT receive failed."); - + // Create connector netdriver which will communicate with the connector. netdrv_t* connector_nedrv = initialize_netdrv(-2, listener_netdrv->federation_id); - // MQTT_priv_t* listener_priv = (MQTT_priv_t*)listener_netdrv->priv; MQTT_priv_t* connector_priv = (MQTT_priv_t*)connector_nedrv->priv; - LF_PRINT_LOG("RTI READ SUCCESS."); + + // Step1: The listener first waits for a MSG_TYPE_MQTT_JOIN message, through the topic federationID_listenerID. + unsigned char buffer[1 + sizeof(uint16_t)]; + read_from_netdrv_fail_on_error(listener_netdrv, buffer, 1 + sizeof(uint16_t), NULL, "MQTT receive failed."); if (buffer[0] != MSG_TYPE_MQTT_JOIN) { lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_JOIN."); } uint16_t fed_id = extract_uint16(buffer + 1); - connector_nedrv->my_federate_id = (int)fed_id; + LF_PRINT_LOG("Received MSG_TYPE_MQTT_JOIN message from federate %d.", fed_id); + // The conncetor netdriver connects to the broker. + connector_nedrv->my_federate_id = (int)fed_id; set_MQTTServer_id(connector_priv, listener_netdrv->my_federate_id, connector_nedrv->my_federate_id); int rc; if ((rc = MQTTClient_create(&connector_priv->client, ADDRESS, connector_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to create client, return code %d\n", rc); } - connector_priv->conn_opts.keepAliveInterval = 20; connector_priv->conn_opts.cleansession = 1; if ((rc = MQTTClient_connect(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to connect, return code %d\n", rc); } - // Subscribe to topic: federationID_fedID_to_listenorID - char* topic_to_subscribe = create_topic_federation_id_A_to_B(connector_nedrv->federation_id, fed_id, listener_netdrv->my_federate_id); + + // Subscribe to topic: federationID_fedID_to_listenerID + // This is the channel where the federate sends messages to the listener. + char* topic_to_subscribe = + create_topic_federation_id_A_to_B(connector_nedrv->federation_id, fed_id, listener_netdrv->my_federate_id); if ((rc = MQTTClient_subscribe(connector_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); } LF_PRINT_LOG("Subscribing on topic %s.", topic_to_subscribe); - free(topic_to_subscribe); + // Step2: The listener sends a MSG_TYPE_MQTT_ACCEPT message to the federate. // Publish to topic: federationID_listenerID_to_fedID - connector_priv->topic_name = - (const char*)create_topic_federation_id_A_to_B(connector_nedrv->federation_id, listener_netdrv->my_federate_id, fed_id); + connector_priv->topic_name = (const char*)create_topic_federation_id_A_to_B(connector_nedrv->federation_id, + listener_netdrv->my_federate_id, fed_id); buffer[0] = MSG_TYPE_MQTT_ACCEPT; encode_uint16((uint16_t)connector_nedrv->my_federate_id, buffer + 1); + LF_PRINT_LOG("Publishing MSG_TYPE_MQTT_ACCEPT message on topic %s.", connector_priv->topic_name); write_to_netdrv_fail_on_error(connector_nedrv, 1 + sizeof(uint16_t), buffer, NULL, "Failed to send MSG_TYPE_MQTT_ACCEPT to federate %d", connector_nedrv->my_federate_id); + + // Step3: The listner receives the MSG_TYPE_MQTT_ACCEPT_ACK message from the federate. read_from_netdrv_fail_on_error(connector_nedrv, buffer, 1, NULL, "MQTT receive failed."); if (buffer[0] != MSG_TYPE_MQTT_ACCEPT_ACK) { lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_ACCEPT_ACK."); } + LF_PRINT_LOG("Receiving MSG_TYPE_MQTT_ACCEPT_ACK message on topic %s.", topic_to_subscribe); + free(topic_to_subscribe); return connector_nedrv; } @@ -164,11 +174,10 @@ void create_connector(netdrv_t* drv) { if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to create client, return code %d\n", rc); - exit(EXIT_FAILURE); } - MQTT_priv->conn_opts.keepAliveInterval = 20; - MQTT_priv->conn_opts.cleansession = 1; + MQTT_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; + MQTT_priv->conn_opts.cleansession = MQTTcleansession; if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to connect, return code %d\n", rc); } @@ -185,40 +194,53 @@ int connect_to_netdrv(netdrv_t* drv) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; int rc; - uint16_t listenerID = MQTT_priv->target_id; + // Subscribe to topic: federationID_listenerID_to_fedID + // This should be done before sending the MSG_TYPE_MQTT_JOIN message, because the listener publishing the + // MSG_TYPE_MQTT_ACCEPT message at topic federationID_listenerID_to_fedID can be faster than the connector subscribing + // to the topic. + char* topic_to_subscribe = + create_topic_federation_id_A_to_B(drv->federation_id, MQTT_priv->target_id, drv->my_federate_id); + + if ((rc = MQTTClient_subscribe(MQTT_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { + lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); + } + LF_PRINT_LOG("Subscribed on topic %s.", topic_to_subscribe); - MQTT_priv->topic_name = (const char*)create_topic_federation_id_listener_id(drv->federation_id, listenerID); + // Step1: The federate sends a MSG_TYPE_MQTT_JOIN message including it's federateID to the listener. + // Publish to topic: federationID_listenorID + MQTT_priv->topic_name = (const char*)create_topic_federation_id_listener_id(drv->federation_id, MQTT_priv->target_id); unsigned char buffer[1 + sizeof(uint16_t)]; buffer[0] = MSG_TYPE_MQTT_JOIN; - lf_print_log("Federate_id: %d", drv->my_federate_id); encode_uint16((uint16_t)drv->my_federate_id, buffer + 1); + LF_PRINT_LOG("Publishing MSG_TYPE_MQTT_JOIN message with federateID %d on topic %s.", drv->my_federate_id, + MQTT_priv->topic_name); write_to_netdrv_fail_on_error(drv, 1 + sizeof(uint16_t), buffer, NULL, "Failed to write my_federate_id to listener for connection through MQTT."); free((char*)MQTT_priv->topic_name); - // Subscribe to topic: federationID_listenerID_to_fedID - char* topic_to_subscribe = create_topic_federation_id_A_to_B(drv->federation_id, listenerID, drv->my_federate_id); - - if ((rc = MQTTClient_subscribe(MQTT_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); - } - LF_PRINT_LOG("Subscribing on topic %s.", topic_to_subscribe); - free(topic_to_subscribe); - - // Publish to topic: federationID_fedID_to_listenorID - MQTT_priv->topic_name = - (const char*)create_topic_federation_id_A_to_B(drv->federation_id, drv->my_federate_id, listenerID); + // Step2: Receive MSG_TYPE_MQTT_ACCEPT from listener, which sends the connector's federateID. + // Receive from topic: federationID_listenerID_to_fedID read_from_netdrv_fail_on_error(drv, buffer, 1 + sizeof(uint16_t), NULL, "Failed to read MSG_TYPE_MQTT_ACCEPT."); if (buffer[0] != MSG_TYPE_MQTT_ACCEPT) { lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_ACCEPT."); } + LF_PRINT_LOG("Receiving MSG_TYPE_MQTT_ACCEPT message on topic %s.", topic_to_subscribe); + free(topic_to_subscribe); + + // Compare the received federateID with my federateID. uint16_t temp_fed_id = extract_uint16(buffer + 1); if (drv->my_federate_id != temp_fed_id) { - lf_print_error_and_exit("Wrong federate id. Received %d\n", temp_fed_id); + lf_print_error_and_exit("Wrong federate ID. Received %d\n", temp_fed_id); } + + // Step3: Send MSG_TYPE_MQTT_ACCEPT_ACK message to the listener. + // Publish to topic: federationID_fedID_to_listenorID + MQTT_priv->topic_name = + (const char*)create_topic_federation_id_A_to_B(drv->federation_id, drv->my_federate_id, MQTT_priv->target_id); buffer[0] = MSG_TYPE_MQTT_ACCEPT_ACK; write_to_netdrv_fail_on_error(drv, 1, buffer, NULL, "Failed to write MSG_TYPE_MQTT_ACCEPT_ACK_to RTI for connection through MQTT."); + LF_PRINT_LOG("Publishing MSG_TYPE_MQTT_ACCEPT_ACK_to message on topic %s.", MQTT_priv->topic_name); return 0; } @@ -235,22 +257,16 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { MQTTClient_message pubmsg = MQTTClient_message_initializer; MQTTClient_deliveryToken token; int rc; - // pubmsg.payload = (void*)base64_encode(buffer, num_bytes, &pubmsg.payloadlen); pubmsg.payload = (void*)buffer; pubmsg.payloadlen = num_bytes; pubmsg.qos = QOS; pubmsg.retained = 0; - // TESTING - lf_print_log("num_bytes: %ld", num_bytes); - // int decoded_length; - // unsigned char* decoded = base64_decode(pubmsg.payload, pubmsg.payloadlen, &decoded_length); - // pubmsg.payloadlen does not include null terminator. Only characters. if ((rc = MQTTClient_publishMessage(MQTT_priv->client, MQTT_priv->topic_name, &pubmsg, &token)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to publish message, return code %d\n", rc); } - // LF_PRINT_LOG("Message publishing on topic %s is %.*s", MQTT_priv->topic_name, pubmsg.payloadlen, + // LF_PRINT_DEBUG("Message publishing on topic %s is %.*s", MQTT_priv->topic_name, pubmsg.payloadlen, // (char*)(pubmsg.payload)); rc = MQTTClient_waitForCompletion(MQTT_priv->client, token, TIMEOUT); int bytes_written = pubmsg.payloadlen; @@ -272,22 +288,6 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len if (buffer[0] == MQTT_RTI_RESIGNED) { return 0; } - // int decoded_length; - // unsigned char* decoded = base64_decode(message->payload, message->payloadlen, &decoded_length); - // lf_print_log("decoded_length: %d", decoded_length); - // if (decoded_length == buffer_length + 1) { - // decoded_length--; - // lf_print_log("decoded_length -- : %d", decoded_length); - // } - - // if (buffer_length < decoded_length) { - // lf_print_error("Buffer to read is too short."); - // return -1; - // } - // // LF_PRINT_LOG("Message received on topic %s is %.*s", topicName, message->payloadlen, (char*)(message->payload)); - - // memcpy(buffer, decoded, decoded_length); - // free(decoded); memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); int bytes_read = message->payloadlen; @@ -348,7 +348,7 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { return 0; } -void set_target_id(netdrv_t* drv, uint16_t federate_id) { +void set_target_id(netdrv_t* drv, int federate_id) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; MQTT_priv->target_id = federate_id; } @@ -394,7 +394,6 @@ static char* create_topic_federation_id_listener_id(const char* federation_id, i return result; } - static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, int B) { int max_length; char* result; @@ -427,11 +426,10 @@ static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, } else { snprintf(result, max_length, "%s_fed_%d_to_fed_%d", federation_id, A, B); } - + return result; } - static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id) { if (my_id == -1 && client_id == -1) { strcat(MQTT_priv->client_id, "RTI_RTI"); diff --git a/include/core/federated/network/type/lf_mqtt_support.h b/include/core/federated/network/type/lf_mqtt_support.h index b4099bed3..41869b453 100644 --- a/include/core/federated/network/type/lf_mqtt_support.h +++ b/include/core/federated/network/type/lf_mqtt_support.h @@ -4,6 +4,9 @@ #include #include +#define MQTTkeepAliveInterval 20 +#define MQTTcleansession 1 + #define MQTT_RTI_RESIGNED 88 typedef struct MQTT_priv_t { @@ -11,7 +14,7 @@ typedef struct MQTT_priv_t { MQTTClient_connectOptions conn_opts; // = MQTTClient_connectOptions_initializer; const char* topic_name; char client_id[20]; - uint16_t target_id; + int target_id; // Must be int. Not uint_16_t. -1 stands for RTI, -2 means uninitialized. } MQTT_priv_t; #endif // LF_MQTT_SUPPORT_H From b442b81552061831dc5c945016bc45baea17e94e Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 16 May 2024 18:54:53 -0700 Subject: [PATCH 228/262] Make connect retries for MQTT connect() --- core/federated/network/lf_mqtt_support.c | 54 +++++++++++++++++++----- 1 file changed, 43 insertions(+), 11 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index add91f4c2..aca14df06 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -10,7 +10,7 @@ // #include -#define ADDRESS "tcp://10.218.100.147:1883" +#define ADDRESS "tcp://127.0.0.1:1883" #define QOS 2 #define TIMEOUT 10000L @@ -212,19 +212,46 @@ int connect_to_netdrv(netdrv_t* drv) { unsigned char buffer[1 + sizeof(uint16_t)]; buffer[0] = MSG_TYPE_MQTT_JOIN; encode_uint16((uint16_t)drv->my_federate_id, buffer + 1); - LF_PRINT_LOG("Publishing MSG_TYPE_MQTT_JOIN message with federateID %d on topic %s.", drv->my_federate_id, - MQTT_priv->topic_name); - write_to_netdrv_fail_on_error(drv, 1 + sizeof(uint16_t), buffer, NULL, - "Failed to write my_federate_id to listener for connection through MQTT."); - free((char*)MQTT_priv->topic_name); - - // Step2: Receive MSG_TYPE_MQTT_ACCEPT from listener, which sends the connector's federateID. - // Receive from topic: federationID_listenerID_to_fedID - read_from_netdrv_fail_on_error(drv, buffer, 1 + sizeof(uint16_t), NULL, "Failed to read MSG_TYPE_MQTT_ACCEPT."); + // The connect_to_netdrv() can be called in the federates before the establish_communication_session() is called in + // the RTI. The MQTT QOS2 ensures the message to arrive to the subscribed client, but this can be called even before + // the netdriver was initialized in the RTI side. Thus, the federate must retry sending messages to the RTI until it + // replies the MSG_TYPE_MQTT_ACCEPT message. The connect retry interval (500 msecs) should be shorter than the read + // timeout time (which is 10 secs), thus it does not use read_from_netdrv(). + instant_t start_connect = lf_time_physical(); + while (1) { + if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { + lf_print_error("Failed to connect with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); + return -1; + } + LF_PRINT_LOG("Publishing MSG_TYPE_MQTT_JOIN message with federateID %d on topic %s.", drv->my_federate_id, + MQTT_priv->topic_name); + write_to_netdrv_fail_on_error(drv, 1 + sizeof(uint16_t), buffer, NULL, + "Failed to write my_federate_id to listener for connection through MQTT."); + + // Step2: Receive MSG_TYPE_MQTT_ACCEPT from listener, which sends the connector's federateID. + // Receive from topic: federationID_listenerID_to_fedID + char* topicName = NULL; + int topicLen; + int temp_rc; + MQTTClient_message* message = NULL; + if ((temp_rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, CONNECT_RETRY_INTERVAL)) != + MQTTCLIENT_SUCCESS) { + lf_print_error("Failed to receive MSG_TYPE_MQTT_ACCEPT message, return code %d\n", temp_rc); + MQTTClient_free(topicName); + MQTTClient_freeMessage(&message); + continue; + } else { + memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); + MQTTClient_free(topicName); + MQTTClient_freeMessage(&message); + break; + } + } if (buffer[0] != MSG_TYPE_MQTT_ACCEPT) { lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_ACCEPT."); } LF_PRINT_LOG("Receiving MSG_TYPE_MQTT_ACCEPT message on topic %s.", topic_to_subscribe); + free((char*)MQTT_priv->topic_name); free(topic_to_subscribe); // Compare the received federateID with my federateID. @@ -268,7 +295,9 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { } // LF_PRINT_DEBUG("Message publishing on topic %s is %.*s", MQTT_priv->topic_name, pubmsg.payloadlen, // (char*)(pubmsg.payload)); - rc = MQTTClient_waitForCompletion(MQTT_priv->client, token, TIMEOUT); + if ((rc = MQTTClient_waitForCompletion(MQTT_priv->client, token, TIMEOUT)) != MQTTCLIENT_SUCCESS) { + lf_print_error_and_exit("Failed to complete publish message, return code %d\n", rc); + } int bytes_written = pubmsg.payloadlen; return bytes_written; } @@ -281,11 +310,14 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len int topicLen; MQTTClient_message* message = NULL; int rc; + LF_PRINT_LOG("RECEIVING message from federateID %d", drv->my_federate_id); if ((rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 1000000)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to receive message, return code %d\n", rc); } + LF_PRINT_LOG("RECEIVED message from federateID %d", drv->my_federate_id); if (buffer[0] == MQTT_RTI_RESIGNED) { + LF_PRINT_LOG("Received MQTT_RTI_RESIGNED message from federateID %d", drv->my_federate_id); return 0; } From 63ba4b31962a580be91732befde0f3c06d420501 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 17 May 2024 13:01:29 -0700 Subject: [PATCH 229/262] Minor comments. --- core/federated/federate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index 086a6229d..db7b8cb52 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1838,7 +1838,7 @@ void lf_connect_to_rti(const char* hostname, int port) { } encode_uint16((uint16_t)_lf_my_fed_id, &buffer[1]); // Next send the federation ID length. - // The federation ID is limited to 255 bytes. + // The federation ID is limited to 255 bytes. The overhead of memcpy() is acceptable. buffer[1 + sizeof(uint16_t)] = (unsigned char)(federation_id_length & 0xff); memcpy(buffer + 2 + sizeof(uint16_t), (unsigned char*)federation_metadata.federation_id, federation_id_length); // Trace the event when tracing is enabled From eb61921361520f4376b87f0ce03d8a461c561c06 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Fri, 17 May 2024 13:01:51 -0700 Subject: [PATCH 230/262] Minor change on MQTT connect. --- core/federated/RTI/rti_remote.c | 3 ++- core/federated/network/lf_mqtt_support.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index e274f0ced..243a5dd6d 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -628,6 +628,7 @@ void handle_timestamp(federate_info_t* my_fed, unsigned char* buffer) { tracepoint_rti_from_federate(receive_TIMESTAMP, my_fed->enclave.id, &tag); } LF_PRINT_DEBUG("RTI received timestamp message with time: " PRINTF_TIME ".", timestamp); + LF_PRINT_DEBUG("RTI received timestamp message with time: " PRINTF_TIME ". fro federate %d", timestamp, my_fed->fed_netdrv->my_federate_id); LF_MUTEX_LOCK(&rti_mutex); rti_remote->num_feds_proposed_start++; @@ -1144,7 +1145,7 @@ static int receive_connection_information(netdrv_t* netdrv, uint16_t fed_id) { fed_id); if (connection_info_buffer[0] != MSG_TYPE_NEIGHBOR_STRUCTURE) { - lf_print_error("RTI was expecting a MSG_TYPE_UDP_PORT message from federate %d. Got %u instead. " + lf_print_error("RTI was expecting a MSG_TYPE_NEIGHBOR_STRUCTURE message from federate %d. Got %u instead. " "Rejecting federate.", fed_id, connection_info_buffer[0]); send_reject(netdrv, UNEXPECTED_MESSAGE); diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index aca14df06..536901909 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -234,7 +234,7 @@ int connect_to_netdrv(netdrv_t* drv) { int topicLen; int temp_rc; MQTTClient_message* message = NULL; - if ((temp_rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, CONNECT_RETRY_INTERVAL)) != + if ((temp_rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 500)) != //CONNECT_RETRY_INTERVAL Does not work... MQTTCLIENT_SUCCESS) { lf_print_error("Failed to receive MSG_TYPE_MQTT_ACCEPT message, return code %d\n", temp_rc); MQTTClient_free(topicName); From 499be8bccdf3aa574a8d04184a8ce83c170088f0 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 20 May 2024 13:15:29 -0700 Subject: [PATCH 231/262] Minor fix --- core/federated/network/socket_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index c104013ae..713fe823d 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -250,7 +250,7 @@ int connect_to_socket(int sock, char* hostname, int port, uint16_t user_specifie if (user_specified_port == 0) { used_port++; } - lf_print_warning("Could not connect. Will try again every" PRINTF_TIME "nanoseconds.\n", CONNECT_RETRY_INTERVAL); + lf_print_warning("Could not connect. Will try again every " PRINTF_TIME " nanoseconds.\n", CONNECT_RETRY_INTERVAL); continue; } else { break; From 90efa9a7cc48430344fef5184ad3ea38f3c563c8 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 20 May 2024 13:16:01 -0700 Subject: [PATCH 232/262] Add retries for connect and subscribe --- core/federated/network/lf_mqtt_support.c | 171 +++++++++++++++++++---- 1 file changed, 141 insertions(+), 30 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 536901909..d5de61819 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -7,6 +7,7 @@ #include "net_util.h" #include "netdriver.h" #include "lf_mqtt_support.h" +#include "MQTTClientPersistence.h" // For logging // #include @@ -14,11 +15,21 @@ #define QOS 2 #define TIMEOUT 10000L +#define MAX_RETRIES 5 // Number of retry attempts +#define RETRY_DELAY 2 // Delay between attempts in seconds + static MQTT_priv_t* MQTT_priv_init(); static char* create_topic_federation_id_listener_id(const char* federation_id, int listener_id); static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, int B); static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id); static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id); +int MQTT_connect_with_retry(MQTTClient client, MQTTClient_connectOptions* conn_opts); +int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos); + +void log_callback(enum MQTTCLIENT_TRACE_LEVELS level, char* message) { + (void)level; // Explicitly mark the parameter as unused + lf_print("MQTT_LOG: %s\n", message); +} /** * @brief @@ -55,7 +66,6 @@ void close_netdrv(netdrv_t* drv) { /** * @brief Create a server object * Initializes MQTT client, and connects to broker. - * MQTTClient_connect() * RTI subscribes “{Federation_ID}_RTI†topic. This should be done here, because the establish_communication_session * loops. Check socket_common.c for example. It is a common function because also lf_sst_support.c will also use it. * @param drv @@ -79,11 +89,14 @@ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { MQTT_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; MQTT_priv->conn_opts.cleansession = MQTTcleansession; - if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + if ((rc = MQTT_connect_with_retry(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + MQTTClient_destroy(&MQTT_priv->client); lf_print_error_and_exit("Failed to connect, return code %d\n", rc); } MQTT_priv->topic_name = (const char*)create_topic_federation_id_listener_id(drv->federation_id, drv->my_federate_id); - if ((rc = MQTTClient_subscribe(MQTT_priv->client, MQTT_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { + if ((rc = MQTT_subscribe_with_retry(MQTT_priv->client, MQTT_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { + MQTTClient_disconnect(MQTT_priv->client, TIMEOUT); + MQTTClient_destroy(&MQTT_priv->client); lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); } int64_t current_physical_time = lf_time_physical(); @@ -109,6 +122,11 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { netdrv_t* connector_nedrv = initialize_netdrv(-2, listener_netdrv->federation_id); MQTT_priv_t* connector_priv = (MQTT_priv_t*)connector_nedrv->priv; + // Set the trace level to maximum verbosity + MQTTClient_setTraceLevel(MQTTCLIENT_TRACE_MAXIMUM); + // Set the trace callback function + MQTTClient_setTraceCallback(log_callback); + // Step1: The listener first waits for a MSG_TYPE_MQTT_JOIN message, through the topic federationID_listenerID. unsigned char buffer[1 + sizeof(uint16_t)]; read_from_netdrv_fail_on_error(listener_netdrv, buffer, 1 + sizeof(uint16_t), NULL, "MQTT receive failed."); @@ -120,28 +138,38 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { // The conncetor netdriver connects to the broker. connector_nedrv->my_federate_id = (int)fed_id; + LF_PRINT_DEBUG("Setting up MQTTServer_id for federate %d.", fed_id); set_MQTTServer_id(connector_priv, listener_netdrv->my_federate_id, connector_nedrv->my_federate_id); + LF_PRINT_DEBUG("Setup MQTTServer_id for federate %d as %s.", fed_id, connector_priv->client_id); int rc; + LF_PRINT_DEBUG("Creating MQTTClient for federate %d.", fed_id); if ((rc = MQTTClient_create(&connector_priv->client, ADDRESS, connector_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to create client, return code %d\n", rc); } connector_priv->conn_opts.keepAliveInterval = 20; connector_priv->conn_opts.cleansession = 1; - if ((rc = MQTTClient_connect(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + LF_PRINT_DEBUG("Connecting MQTTClient for federate %d.", fed_id); + if ((rc = MQTT_connect_with_retry(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + MQTTClient_destroy(&connector_priv->client); lf_print_error_and_exit("Failed to connect, return code %d\n", rc); } - + LF_PRINT_DEBUG("Connected, return code %d\n", rc); + LF_PRINT_DEBUG("Creating topic for federate %d.", fed_id); // Subscribe to topic: federationID_fedID_to_listenerID // This is the channel where the federate sends messages to the listener. char* topic_to_subscribe = create_topic_federation_id_A_to_B(connector_nedrv->federation_id, fed_id, listener_netdrv->my_federate_id); - - if ((rc = MQTTClient_subscribe(connector_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { + LF_PRINT_LOG("Starting subscribe"); + if ((rc = MQTT_subscribe_with_retry(connector_priv->client, (const char*)topic_to_subscribe, QOS)) != + MQTTCLIENT_SUCCESS) { + MQTTClient_disconnect(connector_priv->client, TIMEOUT); + MQTTClient_destroy(&connector_priv->client); lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); } + LF_PRINT_DEBUG("Subscribed, return code %d\n", rc); LF_PRINT_LOG("Subscribing on topic %s.", topic_to_subscribe); - + LF_PRINT_LOG("Finished subscribe"); // Step2: The listener sends a MSG_TYPE_MQTT_ACCEPT message to the federate. // Publish to topic: federationID_listenerID_to_fedID connector_priv->topic_name = (const char*)create_topic_federation_id_A_to_B(connector_nedrv->federation_id, @@ -178,7 +206,8 @@ void create_connector(netdrv_t* drv) { MQTT_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; MQTT_priv->conn_opts.cleansession = MQTTcleansession; - if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + if ((rc = MQTT_connect_with_retry(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + MQTTClient_destroy(&MQTT_priv->client); lf_print_error_and_exit("Failed to connect, return code %d\n", rc); } } @@ -201,13 +230,16 @@ int connect_to_netdrv(netdrv_t* drv) { char* topic_to_subscribe = create_topic_federation_id_A_to_B(drv->federation_id, MQTT_priv->target_id, drv->my_federate_id); - if ((rc = MQTTClient_subscribe(MQTT_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { + if ((rc = MQTT_subscribe_with_retry(MQTT_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { + MQTTClient_disconnect(MQTT_priv->client, TIMEOUT); + MQTTClient_destroy(&MQTT_priv->client); + free(topic_to_subscribe); lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); } LF_PRINT_LOG("Subscribed on topic %s.", topic_to_subscribe); // Step1: The federate sends a MSG_TYPE_MQTT_JOIN message including it's federateID to the listener. - // Publish to topic: federationID_listenorID + // Publish to topic: federationID_listenerID MQTT_priv->topic_name = (const char*)create_topic_federation_id_listener_id(drv->federation_id, MQTT_priv->target_id); unsigned char buffer[1 + sizeof(uint16_t)]; buffer[0] = MSG_TYPE_MQTT_JOIN; @@ -234,16 +266,33 @@ int connect_to_netdrv(netdrv_t* drv) { int topicLen; int temp_rc; MQTTClient_message* message = NULL; - if ((temp_rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 500)) != //CONNECT_RETRY_INTERVAL Does not work... - MQTTCLIENT_SUCCESS) { + temp_rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 500); + if (temp_rc != MQTTCLIENT_SUCCESS) { lf_print_error("Failed to receive MSG_TYPE_MQTT_ACCEPT message, return code %d\n", temp_rc); - MQTTClient_free(topicName); - MQTTClient_freeMessage(&message); + if (topicName) { + MQTTClient_free(topicName); + } + if (message) { + MQTTClient_freeMessage(&message); + } + continue; + } else if (message == NULL) { + // This means the call succeeded but no message was received within the timeout + lf_print_log("No message received within the timeout period."); + if (topicName) { + MQTTClient_free(topicName); + } continue; } else { + // Successfully received a message + lf_print_log("Successfully received MSG_TYPE_MQTT_ACCEPT message, return code %d\n", temp_rc); memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); - MQTTClient_free(topicName); - MQTTClient_freeMessage(&message); + if (topicName) { + MQTTClient_free(topicName); + } + if (message) { + MQTTClient_freeMessage(&message); + } break; } } @@ -311,21 +360,49 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len MQTTClient_message* message = NULL; int rc; LF_PRINT_LOG("RECEIVING message from federateID %d", drv->my_federate_id); - if ((rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 1000000)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to receive message, return code %d\n", rc); - } - LF_PRINT_LOG("RECEIVED message from federateID %d", drv->my_federate_id); + // if ((rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 1000000)) != MQTTCLIENT_SUCCESS) { + // lf_print_error_and_exit("Failed to receive message, return code %d\n", rc); + // } + + // while (1) { + rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 1000000); + if (rc != MQTTCLIENT_SUCCESS) { + lf_print_error("Failed to receive message, return code %d\n", rc); + if (topicName) { + MQTTClient_free(topicName); + } + if (message) { + MQTTClient_freeMessage(&message); + } + return -1; + // continue; + } else if (message == NULL) { + // This means the call succeeded but no message was received within the timeout + lf_print_log("No message received within the timeout period."); + if (topicName) { + MQTTClient_free(topicName); + } + return -1; + // continue; + } else { + // Successfully received a message + lf_print_log("Successfully received message, return code %d\n", rc); + memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); + int bytes_read = message->payloadlen; + if (topicName) { + MQTTClient_free(topicName); + } + if (message) { + MQTTClient_freeMessage(&message); + } + LF_PRINT_LOG("RECEIVED message from federateID %d", drv->my_federate_id); + if (buffer[0] == MQTT_RTI_RESIGNED) { + LF_PRINT_LOG("Received MQTT_RTI_RESIGNED message from federateID %d", drv->my_federate_id); + return 0; + } - if (buffer[0] == MQTT_RTI_RESIGNED) { - LF_PRINT_LOG("Received MQTT_RTI_RESIGNED message from federateID %d", drv->my_federate_id); - return 0; + return bytes_read; } - - memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); - int bytes_read = message->payloadlen; - MQTTClient_free(topicName); - MQTTClient_freeMessage(&message); - return bytes_read; } char* get_host_name(netdrv_t* drv) { @@ -473,3 +550,37 @@ static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id) } static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id) { sprintf(MQTT_priv->client_id, "%d", client_id); } + +int MQTT_connect_with_retry(MQTTClient client, MQTTClient_connectOptions* conn_opts) { + int rc; + int retries = 0; + + while ((rc = MQTTClient_connect(client, conn_opts)) != MQTTCLIENT_SUCCESS) { + LF_PRINT_LOG("Failed to connect to MQTT broker, return code %d\n", rc); + retries++; + if (retries >= MAX_RETRIES) { + LF_PRINT_LOG("Max retries reached. Giving up.\n"); + return rc; + } + lf_print_warning("Could not connect. Will try again every " PRINTF_TIME " nanoseconds.\n", CONNECT_RETRY_INTERVAL); + lf_sleep(CONNECT_RETRY_INTERVAL); + } + return MQTTCLIENT_SUCCESS; +} + +int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos) { + int rc; + int retries = 0; + + while ((rc = MQTTClient_subscribe(client, topic, qos)) != MQTTCLIENT_SUCCESS) { + LF_PRINT_LOG("Failed to subscribe to MQTT broker, return code %d\n", rc); + retries++; + if (retries >= MAX_RETRIES) { + LF_PRINT_LOG("Max retries reached. Giving up.\n"); + return rc; + } + lf_print_warning("Could not subscribe to topic. Will try again every " PRINTF_TIME " nanoseconds.\n", CONNECT_RETRY_INTERVAL); + lf_sleep(CONNECT_RETRY_INTERVAL); + } + return MQTTCLIENT_SUCCESS; +} \ No newline at end of file From b0299723faa3580bc418348f5ecf1c3a5f7c5120 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 20 May 2024 17:32:09 -0700 Subject: [PATCH 233/262] Add retry for the total logic itself. --- core/federated/network/RTI.log | 40979 +++++++++++++++++++++ core/federated/network/lf_mqtt_support.c | 109 +- 2 files changed, 41044 insertions(+), 44 deletions(-) create mode 100644 core/federated/network/RTI.log diff --git a/core/federated/network/RTI.log b/core/federated/network/RTI.log new file mode 100644 index 000000000..8df942320 --- /dev/null +++ b/core/federated/network/RTI.log @@ -0,0 +1,40979 @@ +RTI: Number of federates: 2 +RTI: Clock sync: init +Starting RTI for 2 federates in federation ID Unidentified Federation. +---- System clock resolution: 1 nsec +LOG: Subscribing on topic Unidentified Federation_RTI. +LOG: PHYSICAL_TIME ON SUBSCRIBING TOPIC: 1716248216825098740 +RTI: Listening for federates. +LOG: RECEIVING message from federateID -1 +MQTT_LOG: 20240520 163656.825 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163656.825 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163656.825 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163656.825 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163656.825 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163656.825 Return code 1 from poll + +MQTT_LOG: 20240520 163656.825 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163656.825 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163656.825 (140737352902464) (2)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163656.825 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163656.825 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163656.825 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.494 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.494 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.494 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.494 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.494 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.494 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.494 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.494 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.494 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (3)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163658.494 (140737352902464) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163658.494 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163658.494 (140737352902464) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163658.494 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555597e10 + + +MQTT_LOG: 20240520 163658.494 (140737352902464) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163658.494 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555597cf0 + + +MQTT_LOG: 20240520 163658.494 (140737352902464) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.494 (140737352902464) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163658.494 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163658.494 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 1280 bytes + + +MQTT_LOG: 20240520 163658.494 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.494 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163658.495 3 RTI_RTI <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163658.495 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163658.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598300 + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163658.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555597d20 + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163658.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598390 + + +MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x5555555960e0 + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598510 + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x5555555985f0 + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1504 bytes + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 1488 bytes + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163658.495 3 RTI_RTI -> PUBREC msgid: 1 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163658.495 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 1472 bytes + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.495 Return code 1 from poll + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (2)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.495 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.495 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163658.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555986a0 + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163658.495 3 RTI_RTI <- PUBREL msgid 1 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163658.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555984a0 + + +MQTT_LOG: 20240520 163658.495 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163658.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598730 + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163658.495 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1568 bytes + + +MQTT_LOG: 20240520 163658.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1520 bytes + + +MQTT_LOG: 20240520 163658.495 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1488 bytes + + +MQTT_LOG: 20240520 163658.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1408 bytes + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555597cf0 + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597e90 + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1408 bytes + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 1392 bytes + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163658.495 3 RTI_RTI -> PUBCOMP msgid 1 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163658.495 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 1376 bytes + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163658.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1328 bytes + + +MQTT_LOG: 20240520 163658.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1296 bytes + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163658.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 1264 bytes + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163658.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 1232 bytes + + +MQTT_LOG: 20240520 163658.495 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 1216 bytes + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID -1 +LOG: Received MSG_TYPE_MQTT_JOIN message from federate 0. +DEBUG: Setting up MQTTServer_id for federate 0. +DEBUG: Setup MQTTServer_id for federate 0 as RTI_0. +DEBUG: Creating MQTTClient for federate 0. +MQTT_LOG: 20240520 163658.495 (140737352902464) (0)> MQTTClient_createWithOptions:375 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (2)> UTF8_validate:134 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (2)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163658.495 Allocating 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 438 ptr 0x555555598850 + + +MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555597cf0 + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163658.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555597c60 + + +MQTT_LOG: 20240520 163658.495 Allocating 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 489 ptr 0x555555598910 + + +MQTT_LOG: 20240520 163658.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555986a0 + + +MQTT_LOG: 20240520 163658.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555597ca0 + + +MQTT_LOG: 20240520 163658.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598300 + + +MQTT_LOG: 20240520 163658.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555977e0 + + +MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555597f80 + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTPersistence_create:56 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTPersistence_create:104 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTPersistence_initialize:119 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTPersistence_initialize:127 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTPersistence_restoreMessageQueue:877 + +MQTT_LOG: 20240520 163658.495 0 queued messages restored for client RTI_0 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTPersistence_restoreMessageQueue:918 (0) + +MQTT_LOG: 20240520 163658.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598540 + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (0)< MQTTClient_createWithOptions:522 (0) + +DEBUG: Connecting MQTTClient for federate 0. +MQTT_LOG: 20240520 163658.495 (140737352902464) (0)> MQTTClient_connectAll:1745 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTClient_connectURI:1504 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (2)> MQTTClient_connectURIVersion:1209 + +MQTT_LOG: 20240520 163658.495 Connecting to serverURI 127.0.0.1:1883 with MQTT version 4 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTProtocol_connect:227 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> MQTTProtocol_addressPort:63 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)< MQTTProtocol_addressPort:101 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> Socket_new:1072 + +MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1082 ptr 0x555555598ba0 + + +MQTT_LOG: 20240520 163658.495 New socket 4 for 127.0.0.1:1883, port 1883 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> Socket_addSocket:272 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> Socket_setnonblocking:95 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< Socket_setnonblocking:100 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< Socket_addSocket:314 (0) + +MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1200 ptr 0x555555598c50 + + +MQTT_LOG: 20240520 163658.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d30 + + +MQTT_LOG: 20240520 163658.495 Connect pending + +MQTT_LOG: 20240520 163658.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1233, heap use now 1968 bytes + + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)< Socket_new:1235 (115) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTProtocol_connect:355 (115) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.495 Return code 0 from poll + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163658.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163658.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1936 bytes + + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (3)> MQTTPacket_send_connect:55 + +MQTT_LOG: 20240520 163658.596 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 73 ptr 0x555555598cf0 + + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.596 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598c20 + + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (7)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (7)< Socket_writev:773 (19) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.596 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.596 4 RTI_0 -> CONNECT version 4 clean: 1 (0) + +MQTT_LOG: 20240520 163658.596 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 127, heap use now 1936 bytes + + +MQTT_LOG: 20240520 163658.596 (140737352902464) (3)< MQTTPacket_send_connect:129 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (3)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.596 Return code 1 from poll + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.596 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.596 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> MQTTPacket_connack:148 + +MQTT_LOG: 20240520 163658.596 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 149 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< MQTTPacket_connack:176 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163658.596 4 RTI_0 <- CONNACK rc: 0 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (3)> MQTTClient_cleanSession:1131 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> MQTTPersistence_clear:170 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTPersistence_clear:174 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> MQTTClient_emptyMessageQueue:557 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTClient_emptyMessageQueue:572 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (3)< MQTTClient_cleanSession:1139 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (3)> MQTTPacket_freeConnack:187 + +MQTT_LOG: 20240520 163658.596 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 190, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163658.596 (140737352902464) (3)< MQTTPacket_freeConnack:191 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (2)< MQTTClient_connectURIVersion:1477 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (1)< MQTTClient_connectURI:1702 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (0)< MQTTClient_connectAll:1910 (0) + +DEBUG: Connected, return code 0 + +DEBUG: Creating topic for federate 0. +LOG: Starting subscribe +MQTT_LOG: 20240520 163658.596 (140737352902464) (0)> MQTTClient_subscribe5:2180 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (1)> MQTTClient_subscribeMany5:2034 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (1) + +MQTT_LOG: 20240520 163658.596 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163658.596 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163658.596 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 + + +MQTT_LOG: 20240520 163658.596 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e40 + + +MQTT_LOG: 20240520 163658.596 (140737352902464) (2)> MQTTProtocol_subscribe:394 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (3)> MQTTPacket_send_subscribe:235 + +MQTT_LOG: 20240520 163658.596 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 247 ptr 0x555555598f30 + + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.596 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599030 + + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (7)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (7)< Socket_writev:773 (43) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.596 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2128 bytes + + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.596 4 RTI_0 -> SUBSCRIBE msgid: 1 (0) + +MQTT_LOG: 20240520 163658.596 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 275, heap use now 2112 bytes + + +MQTT_LOG: 20240520 163658.596 (140737352902464) (3)< MQTTPacket_send_subscribe:277 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (2)< MQTTProtocol_subscribe:396 (0) + +MQTT_LOG: 20240520 163658.596 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163658.596 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 2032 bytes + + +MQTT_LOG: 20240520 163658.596 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 1984 bytes + + +MQTT_LOG: 20240520 163658.596 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163658.596 (140737352902464) (2)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (3)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.596 Return code 1 from poll + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> isReady:353 + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> isReady:353 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (5)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.597 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (5)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.597 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (5)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (5)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (6)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (7)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (7)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (7)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (7)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (6)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (5)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (5)> MQTTPacket_suback:296 + +MQTT_LOG: 20240520 163658.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 297 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163658.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163658.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 326 ptr 0x555555598ba0 + + +MQTT_LOG: 20240520 163658.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598cf0 + + +MQTT_LOG: 20240520 163658.597 (140737352902464) (5)< MQTTPacket_suback:348 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (5)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (5)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (3)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (2)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (2)> MQTTProtocol_handleSubacks:413 + +MQTT_LOG: 20240520 163658.597 4 RTI_0 <- SUBACK msgid: 1 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (3)> MQTTPacket_freeSuback:697 + +MQTT_LOG: 20240520 163658.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 366, heap use now 2048 bytes + + +MQTT_LOG: 20240520 163658.597 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 370, heap use now 2032 bytes + + +MQTT_LOG: 20240520 163658.597 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163658.597 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 702, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163658.597 (140737352902464) (3)< MQTTPacket_freeSuback:703 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (2)< MQTTProtocol_handleSubacks:417 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (1)< MQTTClient_subscribeMany5:2154 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (0)< MQTTClient_subscribe5:2184 (0) + +DEBUG: Subscribed, return code 0 + +LOG: Subscribing on topic Unidentified Federation_fed_0_to_RTI. +LOG: Finished subscribe +LOG: Publishing MSG_TYPE_MQTT_ACCEPT message on topic Unidentified Federation_RTI_to_fed_0. +MQTT_LOG: 20240520 163658.597 (140737352902464) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (2) + +MQTT_LOG: 20240520 163658.597 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163658.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555598ba0 + + +MQTT_LOG: 20240520 163658.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163658.597 (140737352902464) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163658.597 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163658.597 (140737352902464) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163658.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599130 + + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163658.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555990a0 + + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163658.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598f80 + + +MQTT_LOG: 20240520 163658.597 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163658.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163658.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163658.597 (140737352902464) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163658.597 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (8)< Socket_writev:773 (45) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163658.597 (140737352902464) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163658.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163658.597 4 RTI_0 -> PUBLISH msgid: 2 qos: 2 retained: 0 rc 0 payload len(3):  + +MQTT_LOG: 20240520 163658.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163658.597 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163658.597 (140737352902464) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.597 Return code 1 from poll + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.597 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.598 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.598 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163658.598 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163658.598 4 RTI_0 <- PUBREC msgid: 2 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163658.598 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991e0 + + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.598 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599240 + + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163658.598 4 RTI_0 -> PUBREL msgid: 2 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163658.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.598 Return code 1 from poll + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.598 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.598 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163658.598 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163658.598 4 RTI_0 <- PUBCOMP msgid:2 + +MQTT_LOG: 20240520 163658.598 PUBCOMP received from client RTI_0 for message id 2 - removing publication + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163658.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163658.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163658.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2144 bytes + + +MQTT_LOG: 20240520 163658.598 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163658.598 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163658.598 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1984 bytes + + +MQTT_LOG: 20240520 163658.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.598 Return code 1 from poll + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.639 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.639 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.639 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.639 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.639 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.639 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.639 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.639 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.639 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.639 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.639 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.639 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.639 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.639 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.639 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.639 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.639 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.639 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.639 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.639 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163658.640 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163658.640 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163658.640 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599240 + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163658.640 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2048 bytes + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163658.640 4 RTI_0 <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(1):  + +MQTT_LOG: 20240520 163658.640 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163658.640 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555990e0 + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163658.640 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163658.640 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d30 + + +MQTT_LOG: 20240520 163658.640 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555598b70 + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163658.640 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598c20 + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.640 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.640 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.640 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163658.640 4 RTI_0 -> PUBREC msgid: 1 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163658.640 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.640 Return code 1 from poll + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.640 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.640 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163658.640 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163658.640 4 RTI_0 <- PUBREL msgid 1 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163658.640 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555986f0 + + +MQTT_LOG: 20240520 163658.640 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163658.640 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599060 + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163658.640 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2336 bytes + + +MQTT_LOG: 20240520 163658.640 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163658.640 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163658.640 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163658.640 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599240 + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.640 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.640 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.640 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2160 bytes + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163658.640 4 RTI_0 -> PUBCOMP msgid 1 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163658.640 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2144 bytes + + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.640 Return code 0 from poll + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.640 (140737352902464) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) + +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163658.640 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163658.640 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.698 Return code 0 from poll + +MQTT_LOG: 20240520 163658.698 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.698 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.698 (140737352902464) (2)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163658.698 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.698 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163658.698 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163658.698 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163658.698 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163658.698 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163658.698 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2032 bytes + + +MQTT_LOG: 20240520 163658.698 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163658.698 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 1984 bytes + + +MQTT_LOG: 20240520 163658.698 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 1968 bytes + + +MQTT_LOG: 20240520 163658.698 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +LOG: Receiving MSG_TYPE_MQTT_ACCEPT_ACK message on topic Unidentified Federation_fed_0_to_RTI. +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163658.698 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.698 Return code 1 from poll + +MQTT_LOG: 20240520 163658.698 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.698 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.698 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.698 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.698 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.699 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.699 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163658.699 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163658.699 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x5555555981d0 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163658.699 4 RTI_0 <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(27):  + +MQTT_LOG: 20240520 163658.699 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163658.699 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163658.699 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e40 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163658.699 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e80 + + +MQTT_LOG: 20240520 163658.699 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555598fc0 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598f00 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163658.699 4 RTI_0 -> PUBREC msgid: 2 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163658.699 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.699 Return code 1 from poll + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.699 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.699 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163658.699 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555990e0 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163658.699 4 RTI_0 <- PUBREL msgid 2 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163658.699 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555990a0 + + +MQTT_LOG: 20240520 163658.699 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163658.699 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163658.699 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2384 bytes + + +MQTT_LOG: 20240520 163658.699 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2336 bytes + + +MQTT_LOG: 20240520 163658.699 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163658.699 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163658.699 4 RTI_0 -> PUBCOMP msgid 2 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163658.699 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163658.699 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2144 bytes + + +MQTT_LOG: 20240520 163658.699 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2112 bytes + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163658.699 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163658.699 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2032 bytes + + +MQTT_LOG: 20240520 163658.699 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI received federate ID: 0. +DEBUG: RTI received federation ID: Unidentified Federation. +DEBUG: RTI responding with MSG_TYPE_ACK to federate 0. +MQTT_LOG: 20240520 163658.699 (140737352902464) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (3) + +MQTT_LOG: 20240520 163658.699 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163658.699 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x5555555981d0 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163658.699 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163658.699 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163658.699 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163658.699 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555994d0 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x555555599240 + + +MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x555555599180 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (8)< Socket_writev:773 (43) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163658.699 4 RTI_0 -> PUBLISH msgid: 3 qos: 2 retained: 0 rc 0 payload len(1): ÿ + +MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163658.699 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163658.699 (140737352902464) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.699 Return code 1 from poll + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.711 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.711 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.711 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.711 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.711 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.711 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.711 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.711 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.711 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163658.711 (140737352902464) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163658.711 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163658.711 (140737352902464) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163658.711 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555598580 + + +MQTT_LOG: 20240520 163658.711 (140737352902464) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163658.711 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555598cc0 + + +MQTT_LOG: 20240520 163658.711 (140737352902464) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.711 (140737352902464) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163658.711 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163658.711 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163658.712 3 RTI_RTI <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163658.712 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x5555555995c0 + + +MQTT_LOG: 20240520 163658.712 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599630 + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163658.712 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598c80 + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163658.712 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599490 + + +MQTT_LOG: 20240520 163658.712 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163658.712 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555997c0 + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.712 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x5555555998a0 + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.712 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2544 bytes + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.712 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2528 bytes + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163658.712 3 RTI_RTI -> PUBREC msgid: 2 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163658.712 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2512 bytes + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.712 Return code 1 from poll + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.712 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.712 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163658.712 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599950 + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163658.712 3 RTI_RTI <- PUBREL msgid 2 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163658.712 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599750 + + +MQTT_LOG: 20240520 163658.712 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163658.712 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555999e0 + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163658.712 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2608 bytes + + +MQTT_LOG: 20240520 163658.712 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2560 bytes + + +MQTT_LOG: 20240520 163658.712 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2528 bytes + + +MQTT_LOG: 20240520 163658.712 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2448 bytes + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163658.712 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598cc0 + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.712 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.712 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2448 bytes + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.712 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2432 bytes + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163658.712 3 RTI_RTI -> PUBCOMP msgid 2 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163658.712 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2416 bytes + + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.712 Return code 1 from poll + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.739 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.739 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163658.739 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599950 + + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163658.739 4 RTI_0 <- PUBREC msgid: 3 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163658.739 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991e0 + + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.739 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.739 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2448 bytes + + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.739 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2432 bytes + + +MQTT_LOG: 20240520 163658.739 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163658.739 4 RTI_0 -> PUBREL msgid: 3 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163658.739 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2416 bytes + + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.739 Return code 1 from poll + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.739 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.739 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163658.739 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599950 + + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163658.739 4 RTI_0 <- PUBCOMP msgid:3 + +MQTT_LOG: 20240520 163658.739 PUBCOMP received from client RTI_0 for message id 3 - removing publication + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163658.739 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2416 bytes + + +MQTT_LOG: 20240520 163658.739 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2400 bytes + + +MQTT_LOG: 20240520 163658.739 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2352 bytes + + +MQTT_LOG: 20240520 163658.739 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163658.739 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163658.739 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163658.739 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2160 bytes + + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.739 Return code 1 from poll + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.800 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.800 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163658.800 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163658.800 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163658.800 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555598cc0 + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163658.800 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163658.800 4 RTI_0 <- PUBLISH msgid: 3 qos: 2 retained: 0 payload len(11):  + +MQTT_LOG: 20240520 163658.800 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x5555555995c0 + + +MQTT_LOG: 20240520 163658.800 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598f30 + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163658.800 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598db0 + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163658.800 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555992e0 + + +MQTT_LOG: 20240520 163658.800 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555599240 + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163658.800 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598b70 + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.800 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599360 + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.800 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2480 bytes + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.800 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2464 bytes + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163658.800 4 RTI_0 -> PUBREC msgid: 3 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163658.800 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2448 bytes + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) + +DEBUG: RTI sent MSG_TYPE_ACK to federate 0. +DEBUG: RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate 0. +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163658.800 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.800 Return code 1 from poll + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.800 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.800 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163658.800 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599630 + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163658.800 4 RTI_0 <- PUBREL msgid 3 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163658.800 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599270 + + +MQTT_LOG: 20240520 163658.800 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 + + +MQTT_LOG: 20240520 163658.800 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555994d0 + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163658.800 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2544 bytes + + +MQTT_LOG: 20240520 163658.800 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2496 bytes + + +MQTT_LOG: 20240520 163658.800 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2464 bytes + + +MQTT_LOG: 20240520 163658.800 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2384 bytes + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163658.800 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598cc0 + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.800 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x5555555991e0 + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.800 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2384 bytes + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.800 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163658.800 4 RTI_0 -> PUBCOMP msgid 3 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163658.800 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2352 bytes + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163658.800 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163658.800 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163658.800 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163658.800 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163658.800 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163658.800 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI got 0 upstreams and 1 downstreams from federate 0. +DEBUG: RTI received neighbor structure from federate 0. +DEBUG: RTI waiting for MSG_TYPE_UDP_PORT from federate 0. +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163658.800 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.800 Return code 1 from poll + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.800 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.900 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163658.900 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x5555555995c0 + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163658.900 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163658.900 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x5555555991e0 + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163658.900 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163658.900 4 RTI_0 <- PUBLISH msgid: 4 qos: 2 retained: 0 payload len(3): þÿÿ + +MQTT_LOG: 20240520 163658.900 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163658.900 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163658.900 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555998d0 + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163658.900 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555994d0 + + +MQTT_LOG: 20240520 163658.900 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555599000 + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163658.900 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599360 + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.900 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599870 + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.900 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2480 bytes + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.900 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2464 bytes + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163658.900 4 RTI_0 -> PUBREC msgid: 4 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163658.900 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2448 bytes + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTProtocol_keepalive:704 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTProtocol_keepalive:781 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.900 Return code 1 from poll + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.900 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.900 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163658.900 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555981d0 + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163658.900 4 RTI_0 <- PUBREL msgid 4 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163658.900 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599680 + + +MQTT_LOG: 20240520 163658.900 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 + + +MQTT_LOG: 20240520 163658.900 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598ec0 + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163658.900 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2544 bytes + + +MQTT_LOG: 20240520 163658.900 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2496 bytes + + +MQTT_LOG: 20240520 163658.900 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2464 bytes + + +MQTT_LOG: 20240520 163658.900 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2384 bytes + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163658.900 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991e0 + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.900 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163658.900 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2384 bytes + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163658.900 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163658.900 4 RTI_0 -> PUBCOMP msgid 4 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163658.900 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2352 bytes + + +MQTT_LOG: 20240520 163658.900 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.900 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.900 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163658.900 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163658.901 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163658.901 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163658.901 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163658.901 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163658.901 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163658.901 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI got MSG_TYPE_UDP_PORT 65535 from federate 0. +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163658.901 (140737349940800) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163658.901 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.901 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.901 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.901 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +LOG: RECEIVING message from federateID -1 +MQTT_LOG: 20240520 163658.901 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.901 Return code 0 from poll + +MQTT_LOG: 20240520 163658.901 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (2)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163658.901 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2112 bytes + + +MQTT_LOG: 20240520 163658.901 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163658.901 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2048 bytes + + +MQTT_LOG: 20240520 163658.901 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163658.901 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163658.901 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163658.901 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID -1 +LOG: Received MSG_TYPE_MQTT_JOIN message from federate 1. +DEBUG: Setting up MQTTServer_id for federate 1. +DEBUG: Setup MQTTServer_id for federate 1 as RTI_1. +DEBUG: Creating MQTTClient for federate 1. +MQTT_LOG: 20240520 163658.901 (140737352902464) (0)> MQTTClient_createWithOptions:375 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (2)> UTF8_validate:134 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (2)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163658.901 Allocating 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 438 ptr 0x555555599d40 + + +MQTT_LOG: 20240520 163658.901 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555598ba0 + + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163658.901 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599710 + + +MQTT_LOG: 20240520 163658.901 Allocating 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 489 ptr 0x555555599e00 + + +MQTT_LOG: 20240520 163658.901 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163658.901 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555981d0 + + +MQTT_LOG: 20240520 163658.901 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163658.901 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163658.901 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x5555555997c0 + + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTPersistence_create:56 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTPersistence_create:104 (0) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTPersistence_initialize:119 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTPersistence_initialize:127 (0) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTPersistence_restoreMessageQueue:877 + +MQTT_LOG: 20240520 163658.901 0 queued messages restored for client RTI_1 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTPersistence_restoreMessageQueue:918 (0) + +MQTT_LOG: 20240520 163658.901 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555997f0 + + +MQTT_LOG: 20240520 163658.901 (140737352902464) (0)< MQTTClient_createWithOptions:522 (0) + +DEBUG: Connecting MQTTClient for federate 1. +MQTT_LOG: 20240520 163658.901 (140737352902464) (0)> MQTTClient_connectAll:1745 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTClient_connectURI:1504 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (2)> MQTTClient_connectURIVersion:1209 + +MQTT_LOG: 20240520 163658.901 Connecting to serverURI 127.0.0.1:1883 with MQTT version 4 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (3)> MQTTProtocol_connect:227 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (4)> MQTTProtocol_addressPort:63 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (4)< MQTTProtocol_addressPort:101 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (4)> Socket_new:1072 + +MQTT_LOG: 20240520 163658.901 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1082 ptr 0x555555599870 + + +MQTT_LOG: 20240520 163658.901 New socket 5 for 127.0.0.1:1883, port 1883 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (5)> Socket_addSocket:272 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (6)> Socket_setnonblocking:95 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (6)< Socket_setnonblocking:100 (0) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (5)< Socket_addSocket:314 (0) + +MQTT_LOG: 20240520 163658.901 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1200 ptr 0x5555555978a0 + + +MQTT_LOG: 20240520 163658.901 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598fc0 + + +MQTT_LOG: 20240520 163658.901 Connect pending + +MQTT_LOG: 20240520 163658.901 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1233, heap use now 2784 bytes + + +MQTT_LOG: 20240520 163658.901 (140737352902464) (4)< Socket_new:1235 (115) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (3)< MQTTProtocol_connect:355 (115) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (3)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163658.901 Return code 1 from poll + +MQTT_LOG: 20240520 163658.901 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (5)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163658.901 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163658.901 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163658.901 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.001 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163659.001 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (7)> readUTFlen:387 + +MQTT_LOG: 20240520 163659.001 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599130 + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (7)< readUTFlen:401 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163659.001 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599360 + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163659.001 4 RTI_0 <- PUBLISH msgid: 5 qos: 2 retained: 0 payload len(9): |%ê©VÑ + +MQTT_LOG: 20240520 163659.001 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x5555555995c0 + + +MQTT_LOG: 20240520 163659.001 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599950 + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163659.001 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a000 + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163659.001 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a0f0 + + +MQTT_LOG: 20240520 163659.001 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a1f0 + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163659.001 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a2d0 + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.001 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a3b0 + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3168 bytes + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3152 bytes + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163659.001 4 RTI_0 -> PUBREC msgid: 5 (0) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163659.001 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.001 Return code 1 from poll + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.001 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.001 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163659.001 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff0000c40 + + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163659.001 4 RTI_0 <- PUBREL msgid 5 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163659.001 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7ffff0000d40 + + +MQTT_LOG: 20240520 163659.001 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7ffff0000b70 + + +MQTT_LOG: 20240520 163659.001 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000ee0 + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3232 bytes + + +MQTT_LOG: 20240520 163659.001 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3216 bytes + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163659.001 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163659.001 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163659.001 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163659.001 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163659.001 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599360 + + +MQTT_LOG: 20240520 163659.001 (140737349940800) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.001 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599870 + + +MQTT_LOG: 20240520 163659.001 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163659.001 (140737349940800) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163659.001 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163659.001 4 RTI_0 -> PUBCOMP msgid 5 (0) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163659.001 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163659.001 (140737349940800) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163659.001 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163659.001 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2912 bytes + + +MQTT_LOG: 20240520 163659.001 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163659.001 (140737349940800) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163659.001 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2880 bytes + + +MQTT_LOG: 20240520 163659.001 (140737349940800) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163659.001 (140737349940800) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163659.001 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes + + +MQTT_LOG: 20240520 163659.001 (140737349940800) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI: Received message type 2 from federate 0. +DEBUG: RTI received timestamp message with time: 1716248219000382844. +DEBUG: RTI received timestamp message with time: 1716248219000382844. fro federate 0 +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (3)> MQTTPacket_send_connect:55 + +MQTT_LOG: 20240520 163659.001 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 73 ptr 0x5555555994d0 + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (4)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.001 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597c30 + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (7)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.001 (140737352902464) (7)< Socket_writev:773 (19) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2800 bytes + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (4)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.001 5 RTI_1 -> CONNECT version 4 clean: 1 (0) + +MQTT_LOG: 20240520 163659.001 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 127, heap use now 2784 bytes + + +MQTT_LOG: 20240520 163659.001 (140737352902464) (3)< MQTTPacket_send_connect:129 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (3)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.002 Return code 1 from poll + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.002 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.002 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> MQTTPacket_connack:148 + +MQTT_LOG: 20240520 163659.002 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 149 ptr 0x55555559a460 + + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< MQTTPacket_connack:176 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163659.002 5 RTI_1 <- CONNACK rc: 0 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (3)> MQTTClient_cleanSession:1131 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> MQTTPersistence_clear:170 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)< MQTTPersistence_clear:174 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> MQTTClient_emptyMessageQueue:557 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)< MQTTClient_emptyMessageQueue:572 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (3)< MQTTClient_cleanSession:1139 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (3)> MQTTPacket_freeConnack:187 + +MQTT_LOG: 20240520 163659.002 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 190, heap use now 2800 bytes + + +MQTT_LOG: 20240520 163659.002 (140737352902464) (3)< MQTTPacket_freeConnack:191 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (2)< MQTTClient_connectURIVersion:1477 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (1)< MQTTClient_connectURI:1702 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (0)< MQTTClient_connectAll:1910 (0) + +DEBUG: Connected, return code 0 + +DEBUG: Creating topic for federate 1. +LOG: Starting subscribe +MQTT_LOG: 20240520 163659.002 (140737352902464) (0)> MQTTClient_subscribe5:2180 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (1)> MQTTClient_subscribeMany5:2034 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (1) + +MQTT_LOG: 20240520 163659.002 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x55555559a460 + + +MQTT_LOG: 20240520 163659.002 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x55555559a4b0 + + +MQTT_LOG: 20240520 163659.002 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a340 + + +MQTT_LOG: 20240520 163659.002 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 + + +MQTT_LOG: 20240520 163659.002 (140737352902464) (2)> MQTTProtocol_subscribe:394 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (3)> MQTTPacket_send_subscribe:235 + +MQTT_LOG: 20240520 163659.002 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 247 ptr 0x55555559a500 + + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.002 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a1f0 + + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (7)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (7)< Socket_writev:773 (43) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.002 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2976 bytes + + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.002 5 RTI_1 -> SUBSCRIBE msgid: 1 (0) + +MQTT_LOG: 20240520 163659.002 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 275, heap use now 2960 bytes + + +MQTT_LOG: 20240520 163659.002 (140737352902464) (3)< MQTTPacket_send_subscribe:277 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (2)< MQTTProtocol_subscribe:396 (0) + +MQTT_LOG: 20240520 163659.002 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 2912 bytes + + +MQTT_LOG: 20240520 163659.002 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 2880 bytes + + +MQTT_LOG: 20240520 163659.002 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163659.002 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 2800 bytes + + +MQTT_LOG: 20240520 163659.002 (140737352902464) (2)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (3)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.002 Return code 1 from poll + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> isReady:353 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> isReady:353 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> isReady:353 + +MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.003 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.003 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> MQTTPacket_suback:296 + +MQTT_LOG: 20240520 163659.003 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 297 ptr 0x55555559a4b0 + + +MQTT_LOG: 20240520 163659.003 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x55555559a460 + + +MQTT_LOG: 20240520 163659.003 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 326 ptr 0x55555559a380 + + +MQTT_LOG: 20240520 163659.003 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a3e0 + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< MQTTPacket_suback:348 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> MQTTProtocol_handleSubacks:413 + +MQTT_LOG: 20240520 163659.003 5 RTI_1 <- SUBACK msgid: 1 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTPacket_freeSuback:697 + +MQTT_LOG: 20240520 163659.003 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 366, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163659.003 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 370, heap use now 2880 bytes + + +MQTT_LOG: 20240520 163659.003 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2848 bytes + + +MQTT_LOG: 20240520 163659.003 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 702, heap use now 2800 bytes + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTPacket_freeSuback:703 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< MQTTProtocol_handleSubacks:417 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (1)< MQTTClient_subscribeMany5:2154 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (0)< MQTTClient_subscribe5:2184 (0) + +DEBUG: Subscribed, return code 0 + +LOG: Subscribing on topic Unidentified Federation_fed_1_to_RTI. +LOG: Finished subscribe +LOG: Publishing MSG_TYPE_MQTT_ACCEPT message on topic Unidentified Federation_RTI_to_fed_1. +MQTT_LOG: 20240520 163659.003 (140737352902464) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (2) + +MQTT_LOG: 20240520 163659.003 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163659.003 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x55555559a380 + + +MQTT_LOG: 20240520 163659.003 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x55555559a460 + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163659.003 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163659.003 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a5a0 + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163659.003 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555999a0 + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163659.003 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a130 + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163659.003 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x55555559a5f0 + + +MQTT_LOG: 20240520 163659.003 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x55555559a650 + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.003 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x55555559a6f0 + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (8)< Socket_writev:773 (45) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.003 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163659.003 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163659.003 5 RTI_1 -> PUBLISH msgid: 2 qos: 2 retained: 0 rc 0 payload len(3):  + +MQTT_LOG: 20240520 163659.003 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163659.003 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.003 Return code 1 from poll + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.003 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.003 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163659.003 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a7a0 + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163659.003 5 RTI_1 <- PUBREC msgid: 2 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163659.003 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a2a0 + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.003 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a620 + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.003 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.003 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3072 bytes + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163659.003 5 RTI_1 -> PUBREL msgid: 2 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163659.003 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3056 bytes + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.003 Return code 1 from poll + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.003 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.003 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163659.003 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a7a0 + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163659.003 5 RTI_1 <- PUBCOMP msgid:2 + +MQTT_LOG: 20240520 163659.003 PUBCOMP received from client RTI_1 for message id 2 - removing publication + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163659.003 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3056 bytes + + +MQTT_LOG: 20240520 163659.003 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163659.003 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163659.003 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163659.003 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2912 bytes + + +MQTT_LOG: 20240520 163659.003 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163659.003 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2800 bytes + + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.003 Return code 1 from poll + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.048 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.048 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163659.048 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163659.048 (140737352902464) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163659.048 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559a7a0 + + +MQTT_LOG: 20240520 163659.048 (140737352902464) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163659.048 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a620 + + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163659.048 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163659.048 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163659.048 5 RTI_1 <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(1):  + +MQTT_LOG: 20240520 163659.048 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163659.048 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a550 + + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163659.048 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598ec0 + + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163659.048 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 + + +MQTT_LOG: 20240520 163659.048 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a3b0 + + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163659.048 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a1f0 + + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.048 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597980 + + +MQTT_LOG: 20240520 163659.048 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.048 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.048 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163659.048 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163659.048 5 RTI_1 -> PUBREC msgid: 1 (0) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163659.048 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.048 Return code 1 from poll + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.048 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.049 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163659.049 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a4b0 + + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163659.049 5 RTI_1 <- PUBREL msgid 1 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163659.049 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559a0f0 + + +MQTT_LOG: 20240520 163659.049 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163659.049 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599400 + + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163659.049 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163659.049 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163659.049 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163659.049 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163659.049 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a620 + + +MQTT_LOG: 20240520 163659.049 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.049 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a5f0 + + +MQTT_LOG: 20240520 163659.049 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.049 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163659.049 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.049 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163659.049 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163659.049 5 RTI_1 -> PUBCOMP msgid 1 (0) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163659.049 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163659.049 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.049 Return code 0 from poll + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163659.049 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.103 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.103 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.103 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.103 (140737352902464) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163659.103 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) + +LOG: RECEIVING message from federateID 1 +MQTT_LOG: 20240520 163659.103 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163659.103 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.103 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.103 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.103 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.103 Return code 0 from poll + +MQTT_LOG: 20240520 163659.103 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.103 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.103 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.103 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.103 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.103 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.103 (140737352902464) (2)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163659.103 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.103 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163659.104 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163659.104 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2912 bytes + + +MQTT_LOG: 20240520 163659.104 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163659.104 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2880 bytes + + +MQTT_LOG: 20240520 163659.104 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163659.104 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163659.104 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes + + +MQTT_LOG: 20240520 163659.104 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 1 +LOG: Receiving MSG_TYPE_MQTT_ACCEPT_ACK message on topic Unidentified Federation_fed_1_to_RTI. +LOG: RECEIVING message from federateID 1 +MQTT_LOG: 20240520 163659.104 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.104 Return code 1 from poll + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.104 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.104 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163659.104 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163659.104 (140737352902464) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163659.104 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559a460 + + +MQTT_LOG: 20240520 163659.104 (140737352902464) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163659.104 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a650 + + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163659.104 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163659.104 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.104 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163659.104 5 RTI_1 <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(27):  + +MQTT_LOG: 20240520 163659.104 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163659.104 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a500 + + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163659.104 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598580 + + +MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163659.104 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599400 + + +MQTT_LOG: 20240520 163659.105 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a720 + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598cc0 + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597980 + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.105 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.105 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163659.105 5 RTI_1 -> PUBREC msgid: 2 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163659.105 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.105 Return code 1 from poll + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.105 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.105 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163659.105 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a5a0 + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163659.105 5 RTI_1 <- PUBREL msgid 2 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163659.105 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559a680 + + +MQTT_LOG: 20240520 163659.105 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163659.105 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a0f0 + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163659.105 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3200 bytes + + +MQTT_LOG: 20240520 163659.105 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3152 bytes + + +MQTT_LOG: 20240520 163659.105 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163659.105 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a650 + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a5f0 + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.105 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.105 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163659.105 5 RTI_1 -> PUBCOMP msgid 2 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163659.105 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163659.105 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2960 bytes + + +MQTT_LOG: 20240520 163659.105 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2928 bytes + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163659.105 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163659.105 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2848 bytes + + +MQTT_LOG: 20240520 163659.105 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 1 +DEBUG: RTI received federate ID: 1. +DEBUG: RTI received federation ID: Unidentified Federation. +DEBUG: RTI responding with MSG_TYPE_ACK to federate 1. +MQTT_LOG: 20240520 163659.105 (140737352902464) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (3) + +MQTT_LOG: 20240520 163659.105 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x55555559a5f0 + + +MQTT_LOG: 20240520 163659.105 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x55555559a460 + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163659.105 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163659.105 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a500 + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163659.105 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a0f0 + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163659.105 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a760 + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x55555559a620 + + +MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x555555597980 + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x55555559a6f0 + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (8)< Socket_writev:773 (43) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.105 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163659.105 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163659.105 5 RTI_1 -> PUBLISH msgid: 3 qos: 2 retained: 0 rc 0 payload len(1): ÿ + +MQTT_LOG: 20240520 163659.105 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163659.105 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163659.105 (140737352902464) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.105 Return code 1 from poll + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.148 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.148 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163659.148 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a4b0 + + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163659.148 5 RTI_1 <- PUBREC msgid: 3 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163659.148 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555597980 + + +MQTT_LOG: 20240520 163659.148 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.148 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a6f0 + + +MQTT_LOG: 20240520 163659.148 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.148 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163659.148 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.148 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3072 bytes + + +MQTT_LOG: 20240520 163659.148 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163659.148 5 RTI_1 -> PUBREL msgid: 3 (0) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163659.148 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3056 bytes + + +MQTT_LOG: 20240520 163659.148 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.148 Return code 1 from poll + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.148 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.148 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.148 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.149 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163659.149 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a4b0 + + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163659.149 5 RTI_1 <- PUBCOMP msgid:3 + +MQTT_LOG: 20240520 163659.149 PUBCOMP received from client RTI_1 for message id 3 - removing publication + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163659.149 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3056 bytes + + +MQTT_LOG: 20240520 163659.149 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163659.149 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163659.149 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163659.149 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2912 bytes + + +MQTT_LOG: 20240520 163659.149 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163659.149 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2800 bytes + + +MQTT_LOG: 20240520 163659.149 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.149 Return code 1 from poll + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.149 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.206 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.206 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163659.206 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163659.206 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559a4b0 + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163659.206 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a6f0 + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163659.206 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163659.206 5 RTI_1 <- PUBLISH msgid: 3 qos: 2 retained: 0 payload len(19):  + +MQTT_LOG: 20240520 163659.206 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163659.206 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a7a0 + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163659.206 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a830 + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163659.206 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 + + +MQTT_LOG: 20240520 163659.206 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a870 + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163659.206 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a650 + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.206 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a170 + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.206 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.206 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163659.206 5 RTI_1 -> PUBREC msgid: 3 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163659.206 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) + +DEBUG: RTI sent MSG_TYPE_ACK to federate 1. +DEBUG: RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate 1. +LOG: RECEIVING message from federateID 1 +MQTT_LOG: 20240520 163659.206 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.206 Return code 1 from poll + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.206 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.206 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163659.206 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a550 + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163659.206 5 RTI_1 <- PUBREL msgid 3 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163659.206 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599680 + + +MQTT_LOG: 20240520 163659.206 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163659.206 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a420 + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163659.206 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3200 bytes + + +MQTT_LOG: 20240520 163659.206 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3152 bytes + + +MQTT_LOG: 20240520 163659.206 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163659.206 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163659.206 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a6f0 + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.206 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598cc0 + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.206 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.206 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.206 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163659.206 5 RTI_1 -> PUBCOMP msgid 3 (0) + +MQTT_LOG: 20240520 163659.207 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163659.207 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163659.207 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163659.207 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.207 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163659.207 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2960 bytes + + +MQTT_LOG: 20240520 163659.207 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2928 bytes + + +MQTT_LOG: 20240520 163659.207 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163659.207 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163659.207 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163659.207 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163659.207 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2848 bytes + + +MQTT_LOG: 20240520 163659.207 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes + + +MQTT_LOG: 20240520 163659.207 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 1 +DEBUG: RTI got 1 upstreams and 0 downstreams from federate 1. +DEBUG: RTI received neighbor structure from federate 1. +DEBUG: RTI waiting for MSG_TYPE_UDP_PORT from federate 1. +LOG: RECEIVING message from federateID 1 +MQTT_LOG: 20240520 163659.207 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.207 Return code 1 from poll + +MQTT_LOG: 20240520 163659.207 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.207 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.207 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.207 (140737352902464) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.207 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.207 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.306 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.306 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163659.306 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163659.306 (140737352902464) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163659.306 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559a460 + + +MQTT_LOG: 20240520 163659.306 (140737352902464) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163659.306 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x5555555978a0 + + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163659.306 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163659.306 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163659.306 5 RTI_1 <- PUBLISH msgid: 4 qos: 2 retained: 0 payload len(3): þÿÿ + +MQTT_LOG: 20240520 163659.306 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163659.306 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a5a0 + + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163659.306 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a300 + + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163659.306 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598fc0 + + +MQTT_LOG: 20240520 163659.306 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a5f0 + + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163659.306 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555597700 + + +MQTT_LOG: 20240520 163659.306 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.306 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a170 + + +MQTT_LOG: 20240520 163659.306 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.306 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163659.306 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.306 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163659.306 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163659.306 5 RTI_1 -> PUBREC msgid: 4 (0) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163659.306 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.306 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.307 Return code 1 from poll + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.307 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.307 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163659.307 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a500 + + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163659.307 5 RTI_1 <- PUBREL msgid 4 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163659.307 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559a720 + + +MQTT_LOG: 20240520 163659.307 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163659.307 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555993c0 + + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163659.307 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163659.307 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163659.307 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163659.307 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163659.307 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555978a0 + + +MQTT_LOG: 20240520 163659.307 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.307 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598cc0 + + +MQTT_LOG: 20240520 163659.307 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.307 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163659.307 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.307 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163659.307 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163659.307 5 RTI_1 -> PUBCOMP msgid 4 (0) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163659.307 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163659.307 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163659.307 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163659.307 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2912 bytes + + +MQTT_LOG: 20240520 163659.307 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163659.307 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163659.307 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2880 bytes + + +MQTT_LOG: 20240520 163659.307 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163659.307 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163659.307 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163659.307 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes + + +MQTT_LOG: 20240520 163659.307 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 1 +DEBUG: RTI got MSG_TYPE_UDP_PORT 65535 from federate 1. +DEBUG: All federates have connected to RTI. +RTI: All expected federates have connected. Starting execution. +LOG: RECEIVING message from federateID 1 +MQTT_LOG: 20240520 163659.307 (140737341548096) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163659.307 (140737341548096) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.307 (140737341548096) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.307 (140737341548096) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.307 (140737341548096) (3)< Socket_continueWrites:1453 (0) + +RTI: Waiting for thread handling federate 0. +LOG: RECEIVING message from federateID -1 +MQTT_LOG: 20240520 163659.307 (140737333155392) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163659.307 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.307 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.307 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.307 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.307 Return code 1 from poll + +MQTT_LOG: 20240520 163659.307 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.307 (140737341548096) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.307 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.307 (140737341548096) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.307 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.307 (140737341548096) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.307 (140737341548096) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.307 (140737341548096) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.307 (140737341548096) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.307 (140737341548096) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.307 (140737341548096) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.307 (140737341548096) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.307 (140737341548096) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.407 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.407 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163659.407 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7fffe8000c40 + + +MQTT_LOG: 20240520 163659.407 (140737341548096) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163659.407 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffe8000d60 + + +MQTT_LOG: 20240520 163659.407 (140737341548096) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163659.407 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffe8000e60 + + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163659.407 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163659.407 (140737341548096) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163659.407 5 RTI_1 <- PUBLISH msgid: 5 qos: 2 retained: 0 payload len(9): “1$˜©VÑ + +MQTT_LOG: 20240520 163659.407 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffe8000f60 + + +MQTT_LOG: 20240520 163659.407 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe8001020 + + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163659.407 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80010a0 + + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163659.407 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001190 + + +MQTT_LOG: 20240520 163659.407 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffe8001290 + + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163659.407 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8001370 + + +MQTT_LOG: 20240520 163659.407 (140737341548096) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.407 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001450 + + +MQTT_LOG: 20240520 163659.407 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.407 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163659.407 (140737341548096) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.407 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163659.407 (140737341548096) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163659.407 5 RTI_1 -> PUBREC msgid: 5 (0) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163659.407 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.407 (140737341548096) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.407 (140737341548096) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.407 Return code 1 from poll + +MQTT_LOG: 20240520 163659.407 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.407 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.408 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.408 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163659.408 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec000d30 + + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163659.408 5 RTI_1 <- PUBREL msgid 5 + +MQTT_LOG: 20240520 163659.408 (140737341548096) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.408 (140737341548096) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163659.408 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffec000e30 + + +MQTT_LOG: 20240520 163659.408 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec000c60 + + +MQTT_LOG: 20240520 163659.408 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000fd0 + + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163659.408 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163659.408 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163659.408 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163659.408 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163659.408 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8000e60 + + +MQTT_LOG: 20240520 163659.408 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.408 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8000e30 + + +MQTT_LOG: 20240520 163659.408 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163659.408 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163659.408 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163659.408 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163659.408 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163659.408 5 RTI_1 -> PUBCOMP msgid 5 (0) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163659.408 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163659.408 (140737333155392) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163659.408 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163659.408 Return code 1 from poll + +MQTT_LOG: 20240520 163659.408 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.408 (140737341548096) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.408 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.408 (140737341548096) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163659.408 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163659.408 (140737341548096) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163659.408 (140737341548096) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163659.408 (140737341548096) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163659.408 (140737341548096) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163659.408 (140737341548096) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163659.408 (140737341548096) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163659.408 (140737341548096) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163659.408 (140737341548096) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163659.408 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.393 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163702.393 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7fffe8000c40 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163702.393 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffe8001500 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffe8001450 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.393 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163702.393 5 RTI_1 <- PUBLISH msgid: 6 qos: 2 retained: 0 payload len(1):  + +MQTT_LOG: 20240520 163702.393 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffe80015a0 + + +MQTT_LOG: 20240520 163702.393 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe8001660 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163702.393 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001190 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163702.393 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001720 + + +MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffe8001820 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8001900 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe80019e0 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.393 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3312 bytes + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.393 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3296 bytes + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.393 5 RTI_1 -> PUBREC msgid: 6 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163702.393 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTProtocol_keepalive:704 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTProtocol_keepalive:781 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163702.393 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3200 bytes + + +MQTT_LOG: 20240520 163702.393 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3168 bytes + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163702.393 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163702.393 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163702.393 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 3072 bytes + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 1 +DEBUG: RTI: Received message type 2 from federate 1. +DEBUG: RTI received timestamp message with time: 1716248219406840211. +DEBUG: RTI received timestamp message with time: 1716248219406840211. fro federate 1 +MQTT_LOG: 20240520 163702.393 (140737341548096) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (2)< MQTTProtocol_assignMsgId:104 (4) + +MQTT_LOG: 20240520 163702.393 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7fffe8000c40 + + +MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7fffe8000c10 + + +MQTT_LOG: 20240520 163702.393 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffe8000d60 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163702.393 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7fffe8001ae0 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163702.393 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe8001ba0 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163702.393 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8000cf0 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163702.393 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001bf0 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7fffe8001210 + + +MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7fffe8001d60 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7fffe8001e40 + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (8)< Socket_writev:773 (51) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.393 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3392 bytes + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163702.393 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3376 bytes + + +MQTT_LOG: 20240520 163702.393 5 RTI_1 -> PUBLISH msgid: 4 qos: 2 retained: 0 rc 0 payload len(9): “û¾Ó©VÑ + +MQTT_LOG: 20240520 163702.393 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3360 bytes + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163702.393 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3344 bytes + + +MQTT_LOG: 20240520 163702.393 (140737341548096) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163702.393 (140737341548096) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.393 (140737349940800) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163702.393 (140737349940800) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163702.393 (140737349940800) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163702.393 (140737349940800) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163702.393 (140737349940800) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163702.393 (140737349940800) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163702.393 (140737349940800) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163702.393 (140737349940800) (2)< MQTTProtocol_assignMsgId:104 (4) + +MQTT_LOG: 20240520 163702.393 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x5555555995c0 + + +MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7ffff0000c10 + + +MQTT_LOG: 20240520 163702.394 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555599130 + + +MQTT_LOG: 20240520 163702.394 (140737349940800) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163702.394 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7ffff0001000 + + +MQTT_LOG: 20240520 163702.394 (140737349940800) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163702.394 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599950 + + +MQTT_LOG: 20240520 163702.394 (140737349940800) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163702.394 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000f20 + + +MQTT_LOG: 20240520 163702.394 (140737349940800) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163702.394 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000c90 + + +MQTT_LOG: 20240520 163702.394 (140737349940800) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7ffff00010a0 + + +MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7ffff0001100 + + +MQTT_LOG: 20240520 163702.394 (140737349940800) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7ffff00011a0 + + +MQTT_LOG: 20240520 163702.394 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.394 (140737349940800) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.394 (140737349940800) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (8)< Socket_writev:773 (51) + +MQTT_LOG: 20240520 163702.394 (140737349940800) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.394 (140737349940800) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.394 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3648 bytes + + +MQTT_LOG: 20240520 163702.394 (140737349940800) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163702.394 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3632 bytes + + +MQTT_LOG: 20240520 163702.394 4 RTI_0 -> PUBLISH msgid: 4 qos: 2 retained: 0 rc 0 payload len(9): “û¾Ó©VÑ + +MQTT_LOG: 20240520 163702.394 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3616 bytes + + +MQTT_LOG: 20240520 163702.394 (140737349940800) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163702.394 (140737349940800) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163702.394 (140737349940800) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163702.394 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3600 bytes + + +MQTT_LOG: 20240520 163702.394 (140737349940800) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163702.394 (140737349940800) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163702.394 (140737349940800) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.394 Return code 1 from poll + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.394 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.394 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.394 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec000d30 + + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163702.394 5 RTI_1 <- PUBREL msgid 6 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163702.394 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffe80010a0 + + +MQTT_LOG: 20240520 163702.394 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec001090 + + +MQTT_LOG: 20240520 163702.394 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000e70 + + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163702.394 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3696 bytes + + +MQTT_LOG: 20240520 163702.394 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3648 bytes + + +MQTT_LOG: 20240520 163702.394 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3616 bytes + + +MQTT_LOG: 20240520 163702.394 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3536 bytes + + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8001450 + + +MQTT_LOG: 20240520 163702.394 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001340 + + +MQTT_LOG: 20240520 163702.394 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.394 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3536 bytes + + +MQTT_LOG: 20240520 163702.394 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.394 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3520 bytes + + +MQTT_LOG: 20240520 163702.394 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.394 5 RTI_1 -> PUBCOMP msgid 6 (0) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163702.394 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3504 bytes + + +MQTT_LOG: 20240520 163702.394 (140737333155392) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.394 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.394 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.394 Return code 2 from poll + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.394 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.394 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.394 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001ef0 + + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.394 (140737349940800) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163702.394 4 RTI_0 <- PUBREC msgid: 4 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8000d30 + + +MQTT_LOG: 20240520 163702.394 (140737341548096) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001cf0 + + +MQTT_LOG: 20240520 163702.394 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.394 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3536 bytes + + +MQTT_LOG: 20240520 163702.394 (140737341548096) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.394 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3520 bytes + + +MQTT_LOG: 20240520 163702.394 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.394 4 RTI_0 -> PUBREL msgid: 4 (0) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163702.394 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3504 bytes + + +MQTT_LOG: 20240520 163702.394 (140737341548096) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.394 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.394 (140737349940800) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.394 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.394 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.394 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.394 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.395 (140737349940800) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.395 (140737349940800) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.395 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.395 (140737349940800) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.395 (140737349940800) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.395 (140737349940800) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163702.395 (140737349940800) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.395 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555990e0 + + +MQTT_LOG: 20240520 163702.395 (140737349940800) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.395 (140737349940800) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163702.395 5 RTI_1 <- PUBREC msgid: 4 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.395 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001070 + + +MQTT_LOG: 20240520 163702.395 (140737349940800) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.395 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff00010d0 + + +MQTT_LOG: 20240520 163702.395 (140737349940800) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.395 (140737349940800) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.395 (140737349940800) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.395 (140737349940800) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.395 (140737349940800) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.395 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3536 bytes + + +MQTT_LOG: 20240520 163702.395 (140737349940800) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.395 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3520 bytes + + +MQTT_LOG: 20240520 163702.395 (140737349940800) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.395 5 RTI_1 -> PUBREL msgid: 4 (0) + +MQTT_LOG: 20240520 163702.395 (140737349940800) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163702.395 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3504 bytes + + +MQTT_LOG: 20240520 163702.395 (140737349940800) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163702.395 (140737349940800) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.395 (140737349940800) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.395 Return code 2 from poll + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.395 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.395 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.395 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.395 (140737333155392) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.395 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.395 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001ef0 + + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163702.395 4 RTI_0 <- PUBCOMP msgid:4 + +MQTT_LOG: 20240520 163702.395 PUBCOMP received from client RTI_0 for message id 4 - removing publication + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163702.395 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3504 bytes + + +MQTT_LOG: 20240520 163702.395 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3488 bytes + + +MQTT_LOG: 20240520 163702.395 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3440 bytes + + +MQTT_LOG: 20240520 163702.395 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3392 bytes + + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163702.395 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3360 bytes + + +MQTT_LOG: 20240520 163702.395 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163702.395 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 3248 bytes + + +MQTT_LOG: 20240520 163702.395 (140737349940800) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.395 (140737349940800) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.395 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.395 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.395 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.395 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.395 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.395 (140737333155392) (5)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163702.395 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80014c0 + + +MQTT_LOG: 20240520 163702.395 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffec000d30 + + +MQTT_LOG: 20240520 163702.395 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffec0010f0 + + +MQTT_LOG: 20240520 163702.395 (140737333155392) (5)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163702.395 (140737333155392) (4)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163702.395 (140737333155392) (3)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163702.395 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163702.395 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.395 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.395 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.395 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.395 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.395 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.395 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.395 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.395 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.395 Return code 1 from poll + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163702.395 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.395 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.436 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.436 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.436 (140737341548096) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.436 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.436 (140737341548096) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.436 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 4288 bytes + + +MQTT_LOG: 20240520 163702.436 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163702.436 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3232 bytes + + +MQTT_LOG: 20240520 163702.436 (140737341548096) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.436 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec000d30 + + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.436 (140737341548096) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163702.436 5 RTI_1 <- PUBCOMP msgid:4 + +MQTT_LOG: 20240520 163702.436 PUBCOMP received from client RTI_1 for message id 4 - removing publication + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163702.436 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3248 bytes + + +MQTT_LOG: 20240520 163702.436 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3232 bytes + + +MQTT_LOG: 20240520 163702.436 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163702.436 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163702.436 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163702.436 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163702.436 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163702.436 (140737341548096) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163702.436 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.436 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.436 Return code 1 from poll + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.436 (140737333155392) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163702.436 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.436 (140737333155392) (5)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163702.436 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000e30 + + +MQTT_LOG: 20240520 163702.436 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffe8001550 + + +MQTT_LOG: 20240520 163702.436 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffec001500 + + +MQTT_LOG: 20240520 163702.436 (140737333155392) (5)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (4)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163702.436 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163702.436 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.436 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.436 Return code 1 from poll + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.436 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.436 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.436 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.436 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.436 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.437 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< WebSocket_getdata:751 (-335538936) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163702.437 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7fffe80015a0 + + +MQTT_LOG: 20240520 163702.437 (140737333155392) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163702.437 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffe8001660 + + +MQTT_LOG: 20240520 163702.437 (140737333155392) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163702.437 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffec001a40 + + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.437 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3232 bytes + + +MQTT_LOG: 20240520 163702.437 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163702.437 4 RTI_0 <- PUBLISH msgid: 6 qos: 2 retained: 0 payload len(13): “û¾Ó©VÑ + +MQTT_LOG: 20240520 163702.437 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffe8000f60 + + +MQTT_LOG: 20240520 163702.437 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe8001020 + + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163702.437 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001b20 + + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163702.437 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001c10 + + +MQTT_LOG: 20240520 163702.437 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec001cc0 + + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.437 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001da0 + + +MQTT_LOG: 20240520 163702.437 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.437 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001e80 + + +MQTT_LOG: 20240520 163702.437 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.437 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3456 bytes + + +MQTT_LOG: 20240520 163702.437 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.437 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3440 bytes + + +MQTT_LOG: 20240520 163702.437 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.437 4 RTI_0 -> PUBREC msgid: 6 (0) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163702.437 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3424 bytes + + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.437 Return code 1 from poll + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163702.437 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000f20 + + +MQTT_LOG: 20240520 163702.437 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffe8001240 + + +MQTT_LOG: 20240520 163702.437 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffec0010f0 + + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (5)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (3)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.437 Return code 1 from poll + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.437 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.437 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.437 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 4432 bytes + + +MQTT_LOG: 20240520 163702.437 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 3424 bytes + + +MQTT_LOG: 20240520 163702.437 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3376 bytes + + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< WebSocket_getdata:751 (-335538936) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.437 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001240 + + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (3)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163702.437 4 RTI_0 <- PUBREL msgid 6 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163702.437 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffe8000cf0 + + +MQTT_LOG: 20240520 163702.437 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec000c60 + + +MQTT_LOG: 20240520 163702.437 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001a10 + + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163702.437 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3520 bytes + + +MQTT_LOG: 20240520 163702.437 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3472 bytes + + +MQTT_LOG: 20240520 163702.437 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3440 bytes + + +MQTT_LOG: 20240520 163702.437 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3360 bytes + + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.437 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001a40 + + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.437 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001a10 + + +MQTT_LOG: 20240520 163702.437 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.437 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3360 bytes + + +MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.437 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3344 bytes + + +MQTT_LOG: 20240520 163702.437 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.437 4 RTI_0 -> PUBCOMP msgid 6 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163702.437 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3328 bytes + + +MQTT_LOG: 20240520 163702.437 (140737341548096) (3)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.437 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.437 Return code 1 from poll + +MQTT_LOG: 20240520 163702.437 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.437 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.438 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.438 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.438 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.438 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.438 (140737349940800) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163702.438 (140737349940800) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.438 (140737349940800) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.438 (140737349940800) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.438 (140737349940800) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.438 (140737349940800) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.438 (140737349940800) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.438 (140737349940800) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.438 (140737349940800) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.438 (140737349940800) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.438 Return code 0 from poll + +MQTT_LOG: 20240520 163702.438 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.438 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.438 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.438 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.438 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.494 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.494 (140737349940800) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163702.494 (140737349940800) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.494 (140737349940800) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.494 (140737349940800) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.494 (140737349940800) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.494 (140737349940800) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.494 (140737349940800) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163702.494 (140737349940800) (0)< MQTTClient_waitForCompletion:2903 (0) + +LOG: RTI sent start time 1716248220406840211 to federate 0. +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163702.494 (140737349940800) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163702.494 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.494 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.494 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.494 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.494 Return code 0 from poll + +MQTT_LOG: 20240520 163702.494 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.494 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.494 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.494 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.494 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.495 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.495 (140737349940800) (2)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163702.495 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.495 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.495 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.495 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.495 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.495 (140737349940800) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163702.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163702.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3248 bytes + + +MQTT_LOG: 20240520 163702.495 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163702.495 (140737349940800) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163702.495 (140737349940800) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163702.495 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 3216 bytes + + +MQTT_LOG: 20240520 163702.495 (140737349940800) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163702.495 (140737349940800) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163702.495 (140737349940800) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163702.495 (140737349940800) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163702.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 3168 bytes + + +MQTT_LOG: 20240520 163702.495 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 3152 bytes + + +MQTT_LOG: 20240520 163702.495 (140737349940800) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI: Received message type 6 from federate 0. +LOG: RTI received from federate 0 the Next Event Tag (NET) (0, 0) +DEBUG: RTI: Updated the recorded next event tag for federate/enclave 0 to (0, 0) +LOG: RTI: Minimum upstream LTC for federate/enclave 1 is (7507123816447935597, 0)(adjusted by after delay). +DEBUG: ++++ Node 1 is in ZDC: 0 +DEBUG: ++++ Node 0 is in ZDC: 0 +DEBUG: RTI: Strict EIMT of fed/encl 1 at fed/encl 0 has tag (0, 0). +LOG: RTI: Earliest next event upstream of node 1 has tag (0, 0). +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163702.495 (140737349940800) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163702.495 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.495 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.495 Return code 0 from poll + +MQTT_LOG: 20240520 163702.495 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (0)< MQTTClient_waitForCompletion:2903 (0) + +LOG: RTI sent start time 1716248220406840211 to federate 1. +LOG: RECEIVING message from federateID 1 +MQTT_LOG: 20240520 163702.495 (140737341548096) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.495 Return code 0 from poll + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (2)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163702.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163702.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3056 bytes + + +MQTT_LOG: 20240520 163702.495 (140737341548096) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163702.495 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163702.495 (140737341548096) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163702.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2976 bytes + + +MQTT_LOG: 20240520 163702.495 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2960 bytes + + +MQTT_LOG: 20240520 163702.495 (140737341548096) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 1 +DEBUG: RTI: Received message type 25 from federate 1. +ERROR: RTI: Federate 1 reports an error and has exited. +MQTT_LOG: 20240520 163702.495 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.495 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (2)< MQTTProtocol_assignMsgId:104 (5) + +MQTT_LOG: 20240520 163702.495 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7fffe8000f60 + + +MQTT_LOG: 20240520 163702.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7fffec001a10 + + +MQTT_LOG: 20240520 163702.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffe8001ef0 + + +MQTT_LOG: 20240520 163702.495 (140737341548096) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163702.495 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7fffe8001ae0 + + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163702.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555996c0 + + +MQTT_LOG: 20240520 163702.495 (140737341548096) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163702.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001300 + + +MQTT_LOG: 20240520 163702.495 (140737341548096) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163702.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80010a0 + + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163702.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7fffe8001210 + + +MQTT_LOG: 20240520 163702.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7fffe8000e30 + + +MQTT_LOG: 20240520 163702.495 (140737341548096) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7fffe80017a0 + + +MQTT_LOG: 20240520 163702.495 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.495 (140737341548096) (8)< Socket_writev:773 (43) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163702.495 (140737341548096) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163702.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3264 bytes + + +MQTT_LOG: 20240520 163702.495 5 RTI_1 -> PUBLISH msgid: 5 qos: 2 retained: 0 rc 0 payload len(1): X + +MQTT_LOG: 20240520 163702.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3248 bytes + + +MQTT_LOG: 20240520 163702.495 (140737341548096) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163702.496 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3232 bytes + + +MQTT_LOG: 20240520 163702.496 (140737341548096) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.496 Return code 1 from poll + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.496 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.496 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.496 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3152 bytes + + +MQTT_LOG: 20240520 163702.496 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163702.496 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163702.496 (140737341548096) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.496 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001550 + + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163702.496 5 RTI_1 <- PUBREC msgid: 5 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.496 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8000e30 + + +MQTT_LOG: 20240520 163702.496 (140737341548096) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.496 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe80017a0 + + +MQTT_LOG: 20240520 163702.496 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.496 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163702.496 (140737341548096) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.496 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3072 bytes + + +MQTT_LOG: 20240520 163702.496 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.496 5 RTI_1 -> PUBREL msgid: 5 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163702.496 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3056 bytes + + +MQTT_LOG: 20240520 163702.496 (140737341548096) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.496 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.496 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.496 Return code 1 from poll + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.496 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.496 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.496 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001f30 + + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (2)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163702.496 5 RTI_1 <- PUBCOMP msgid:5 + +MQTT_LOG: 20240520 163702.496 PUBCOMP received from client RTI_1 for message id 5 - removing publication + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163702.496 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3056 bytes + + +MQTT_LOG: 20240520 163702.496 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163702.496 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163702.496 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163702.496 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2912 bytes + + +MQTT_LOG: 20240520 163702.496 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163702.496 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2800 bytes + + +MQTT_LOG: 20240520 163702.496 (140737333155392) (2)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.496 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.496 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.496 Return code 1 from poll + +MQTT_LOG: 20240520 163702.496 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.496 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.496 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.496 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.496 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.496 (140737349940800) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.496 (140737349940800) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163702.496 (140737349940800) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.497 (140737349940800) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.497 (140737349940800) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.497 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.497 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.497 (140737349940800) (5)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163702.497 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000e30 + + +MQTT_LOG: 20240520 163702.497 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffe8000fd0 + + +MQTT_LOG: 20240520 163702.497 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7ffff00013c0 + + +MQTT_LOG: 20240520 163702.497 (140737349940800) (5)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163702.497 (140737349940800) (4)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163702.497 (140737349940800) (3)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163702.497 (140737349940800) (2)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163702.497 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.497 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.497 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.497 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.497 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.497 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.497 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.497 Return code 1 from poll + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.497 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.497 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< WebSocket_getdata:751 (-268430392) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163702.497 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7fffe8000f60 + + +MQTT_LOG: 20240520 163702.497 (140737341548096) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163702.497 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffe8001550 + + +MQTT_LOG: 20240520 163702.497 (140737341548096) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163702.497 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffe80017a0 + + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.497 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163702.497 (140737341548096) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163702.497 4 RTI_0 <- PUBLISH msgid: 7 qos: 2 retained: 0 payload len(13): +“û¾Ó©VÑ + +MQTT_LOG: 20240520 163702.497 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0001000 + + +MQTT_LOG: 20240520 163702.497 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe80017d0 + + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163702.497 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001300 + + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163702.497 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80013a0 + + +MQTT_LOG: 20240520 163702.497 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffe8001160 + + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.497 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8001070 + + +MQTT_LOG: 20240520 163702.497 (140737341548096) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.497 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001340 + + +MQTT_LOG: 20240520 163702.497 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.497 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3264 bytes + + +MQTT_LOG: 20240520 163702.497 (140737341548096) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.497 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3248 bytes + + +MQTT_LOG: 20240520 163702.497 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.497 4 RTI_0 -> PUBREC msgid: 7 (0) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163702.497 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3232 bytes + + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.497 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.497 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.497 Return code 1 from poll + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.497 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.497 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.497 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.497 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.497 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.497 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< WebSocket_getdata:751 (-268430392) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.497 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001f30 + + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163702.497 4 RTI_0 <- PUBREL msgid 7 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163702.497 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffec001d30 + + +MQTT_LOG: 20240520 163702.497 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec001f80 + + +MQTT_LOG: 20240520 163702.497 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001ab0 + + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163702.497 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3328 bytes + + +MQTT_LOG: 20240520 163702.497 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163702.497 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3248 bytes + + +MQTT_LOG: 20240520 163702.497 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3168 bytes + + +MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.497 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe80017a0 + + +MQTT_LOG: 20240520 163702.497 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.497 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001cf0 + + +MQTT_LOG: 20240520 163702.497 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.497 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.497 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.498 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.498 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.498 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3168 bytes + + +MQTT_LOG: 20240520 163702.498 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.498 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3152 bytes + + +MQTT_LOG: 20240520 163702.498 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.498 4 RTI_0 -> PUBCOMP msgid 7 (0) + +MQTT_LOG: 20240520 163702.498 (140737333155392) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163702.498 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163702.498 (140737333155392) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163702.498 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.498 Return code 1 from poll + +MQTT_LOG: 20240520 163702.498 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.498 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.498 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.498 (140737349940800) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.498 (140737349940800) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.498 (140737349940800) (5)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163702.498 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0001210 + + +MQTT_LOG: 20240520 163702.498 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffe8001660 + + +MQTT_LOG: 20240520 163702.498 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7ffff00017d0 + + +MQTT_LOG: 20240520 163702.498 (140737349940800) (5)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (4)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163702.498 (140737349940800) (3)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163702.498 (140737349940800) (2)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163702.498 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.498 (140737349940800) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163702.498 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4176 bytes + + +MQTT_LOG: 20240520 163702.498 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4144 bytes + + +MQTT_LOG: 20240520 163702.498 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.498 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.498 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.498 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.498 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163702.498 (140737349940800) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163702.498 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 4112 bytes + + +MQTT_LOG: 20240520 163702.498 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.498 (140737349940800) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163702.498 (140737349940800) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163702.498 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 4064 bytes + + +MQTT_LOG: 20240520 163702.498 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 4048 bytes + + +MQTT_LOG: 20240520 163702.498 (140737349940800) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI: Received message type 10 from federate 0. +DEBUG: RTI handling stop_request from federate 0. +LOG: RTI received from federate 0 a MSG_TYPE_STOP_REQUEST message with tag (0, 1). +MQTT_LOG: 20240520 163702.498 Return code 1 from poll + +MQTT_LOG: 20240520 163702.498 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.498 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.498 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.498 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.498 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.498 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.498 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.498 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.597 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.597 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 4000 bytes + + +MQTT_LOG: 20240520 163702.597 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163702.597 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163702.597 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163702.597 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0001000 + + +MQTT_LOG: 20240520 163702.597 (140737333155392) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163702.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffe80017d0 + + +MQTT_LOG: 20240520 163702.597 (140737333155392) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163702.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffe8000e60 + + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3056 bytes + + +MQTT_LOG: 20240520 163702.597 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163702.597 4 RTI_0 <- PUBLISH msgid: 8 qos: 2 retained: 0 payload len(34):  + +MQTT_LOG: 20240520 163702.597 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffe8001ae0 + + +MQTT_LOG: 20240520 163702.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555996c0 + + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163702.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001e10 + + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163702.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001050 + + +MQTT_LOG: 20240520 163702.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffe8001ef0 + + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec000e00 + + +MQTT_LOG: 20240520 163702.597 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001c90 + + +MQTT_LOG: 20240520 163702.597 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3312 bytes + + +MQTT_LOG: 20240520 163702.597 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3296 bytes + + +MQTT_LOG: 20240520 163702.597 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.597 4 RTI_0 -> PUBREC msgid: 8 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163702.597 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.597 Return code 1 from poll + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.597 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.597 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001ba0 + + +MQTT_LOG: 20240520 163702.597 Return code 1 from poll + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (3)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163702.597 4 RTI_0 <- PUBREL msgid 8 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163702.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffe8001dd0 + + +MQTT_LOG: 20240520 163702.597 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec001500 + + +MQTT_LOG: 20240520 163702.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80013e0 + + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163702.597 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3376 bytes + + +MQTT_LOG: 20240520 163702.597 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3328 bytes + + +MQTT_LOG: 20240520 163702.597 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3296 bytes + + +MQTT_LOG: 20240520 163702.597 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3216 bytes + + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8000e60 + + +MQTT_LOG: 20240520 163702.597 (140737341548096) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001cf0 + + +MQTT_LOG: 20240520 163702.597 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3216 bytes + + +MQTT_LOG: 20240520 163702.597 (140737341548096) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3200 bytes + + +MQTT_LOG: 20240520 163702.597 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.597 4 RTI_0 -> PUBCOMP msgid 8 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163702.597 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163702.597 (140737341548096) (3)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (5)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163702.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001b20 + + +MQTT_LOG: 20240520 163702.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffe8000f10 + + +MQTT_LOG: 20240520 163702.597 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7ffff00017d0 + + +MQTT_LOG: 20240520 163702.597 (140737333155392) (5)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (4)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (0)< MQTTClient_waitForCompletion:2903 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (0)> MQTTClient_disconnect1:1929 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (1)> MQTTClient_closeSession:1095 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (2)> MQTTPacket_send_disconnect:516 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (3)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001e80 + + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (5)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (6)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.597 (140737341548096) (6)< Socket_writev:773 (2) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (5)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4240 bytes + + +MQTT_LOG: 20240520 163702.597 (140737341548096) (3)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.597 5 RTI_1 -> DISCONNECT (0) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (2)< MQTTPacket_send_disconnect:543 (0) + +MQTT_LOG: 20240520 163702.597 Return code 1 from poll + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.597 (140737333155392) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163702.597 (140737341548096) (2)> WebSocket_close:524 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (2)< WebSocket_close:572 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (2)> Socket_close:967 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> Socket_close_only:893 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< Socket_close_only:907 (0) + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> Socket_abortWrite:1355 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< Socket_abortWrite:1376 (0) + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> SocketBuffer_cleanup:153 + +MQTT_LOG: 20240520 163702.598 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 157, heap use now 4224 bytes + + +MQTT_LOG: 20240520 163702.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4144 bytes + + +MQTT_LOG: 20240520 163702.598 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4096 bytes + + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< SocketBuffer_cleanup:165 + +MQTT_LOG: 20240520 163702.598 Removed socket 5 + +MQTT_LOG: 20240520 163702.598 Removed socket 5 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (2)< Socket_close:1037 (0) + +MQTT_LOG: 20240520 163702.598 (140737341548096) (2)> MQTTClient_cleanSession:1131 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> MQTTPersistence_clear:170 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< MQTTPersistence_clear:174 (0) + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> MQTTClient_emptyMessageQueue:557 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< MQTTClient_emptyMessageQueue:572 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (2)< MQTTClient_cleanSession:1139 (0) + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< MQTTClient_closeSession:1123 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> MQTTClient_stop:1028 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< MQTTClient_stop:1063 (0) + +MQTT_LOG: 20240520 163702.598 (140737341548096) (0)< MQTTClient_disconnect1:1963 (0) + +MQTT_LOG: 20240520 163702.598 (140737341548096) (0)> MQTTClient_destroy:580 + +MQTT_LOG: 20240520 163702.598 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.598 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.598 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.598 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.598 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.598 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.598 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.598 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffe8000e60 + + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> MQTTPersistence_close:141 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< MQTTPersistence_close:157 (0) + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> MQTTClient_emptyMessageQueue:557 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< MQTTClient_emptyMessageQueue:572 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> MQTTProtocol_freeClient:934 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (2)> MQTTProtocol_freeMessageList:1020 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163702.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 4016 bytes + + +MQTT_LOG: 20240520 163702.598 (140737341548096) (2)< MQTTProtocol_freeMessageList:1023 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (2)> MQTTProtocol_freeMessageList:1020 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163702.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3968 bytes + + +MQTT_LOG: 20240520 163702.598 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.598 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.598 (140737341548096) (2)< MQTTProtocol_freeMessageList:1023 + +MQTT_LOG: 20240520 163702.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3920 bytes + + +MQTT_LOG: 20240520 163702.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3872 bytes + + +MQTT_LOG: 20240520 163702.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 940, heap use now 3824 bytes + + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< MQTTProtocol_freeClient:989 + +MQTT_LOG: 20240520 163702.598 Freeing 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3808 bytes + + +MQTT_LOG: 20240520 163702.598 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3504 bytes + + +MQTT_LOG: 20240520 163702.598 Removed client RTI_1 from bstate->clients, socket 0 + +MQTT_LOG: 20240520 163702.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 600, heap use now 3472 bytes + + +MQTT_LOG: 20240520 163702.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 603, heap use now 3456 bytes + + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> Thread_destroy_sem:371 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< Thread_destroy_sem:380 (0) + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> Thread_destroy_sem:371 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< Thread_destroy_sem:380 (0) + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> Thread_destroy_sem:371 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< Thread_destroy_sem:380 (0) + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> Thread_destroy_sem:371 + +MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< Thread_destroy_sem:380 (0) + +MQTT_LOG: 20240520 163702.598 Freeing 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3440 bytes + + +MQTT_LOG: 20240520 163702.598 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163702.598 (140737341548096) (0)< MQTTClient_destroy:617 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163702.598 (140737349940800) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163702.598 (140737349940800) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (2)< MQTTProtocol_assignMsgId:104 (5) + +MQTT_LOG: 20240520 163702.598 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x5555555995c0 + + +MQTT_LOG: 20240520 163702.598 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7fffe8001820 + + +MQTT_LOG: 20240520 163702.598 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffe8001550 + + +MQTT_LOG: 20240520 163702.598 (140737349940800) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163702.598 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7ffff0001550 + + +MQTT_LOG: 20240520 163702.598 (140737349940800) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163702.598 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff00015c0 + + +MQTT_LOG: 20240520 163702.598 (140737349940800) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163702.598 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000ee0 + + +MQTT_LOG: 20240520 163702.598 (140737349940800) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163702.598 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000c90 + + +MQTT_LOG: 20240520 163702.598 (140737349940800) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163702.598 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7ffff0001100 + + +MQTT_LOG: 20240520 163702.598 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7ffff0000c10 + + +MQTT_LOG: 20240520 163702.598 (140737349940800) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.598 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7ffff0000e00 + + +MQTT_LOG: 20240520 163702.598 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.598 (140737349940800) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.598 (140737349940800) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (8)< Socket_writev:773 (55) + +MQTT_LOG: 20240520 163702.598 (140737349940800) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.598 (140737349940800) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3632 bytes + + +MQTT_LOG: 20240520 163702.598 (140737349940800) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163702.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3616 bytes + + +MQTT_LOG: 20240520 163702.598 4 RTI_0 -> PUBLISH msgid: 5 qos: 2 retained: 0 rc 0 payload len(13): “û¾Ó©VÑ + +MQTT_LOG: 20240520 163702.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3600 bytes + + +MQTT_LOG: 20240520 163702.598 (140737349940800) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163702.598 (140737349940800) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163702.598 (140737349940800) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163702.598 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3584 bytes + + +MQTT_LOG: 20240520 163702.598 (140737349940800) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163702.598 (140737349940800) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163702.598 (140737349940800) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.598 (140737349940800) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.598 Return code 1 from poll + +MQTT_LOG: 20240520 163702.598 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.598 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.598 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.598 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.598 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.598 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.639 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.639 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.639 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3504 bytes + + +MQTT_LOG: 20240520 163702.639 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2496 bytes + + +MQTT_LOG: 20240520 163702.639 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2448 bytes + + +MQTT_LOG: 20240520 163702.639 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (3)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.639 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8000f10 + + +MQTT_LOG: 20240520 163702.639 (140737333155392) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (2)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163702.639 4 RTI_0 <- PUBREC msgid: 5 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (3)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.639 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001c90 + + +MQTT_LOG: 20240520 163702.639 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.639 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001cc0 + + +MQTT_LOG: 20240520 163702.639 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.639 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2496 bytes + + +MQTT_LOG: 20240520 163702.639 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.639 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2480 bytes + + +MQTT_LOG: 20240520 163702.639 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.639 4 RTI_0 -> PUBREL msgid: 5 (0) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (3)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163702.639 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2464 bytes + + +MQTT_LOG: 20240520 163702.639 (140737333155392) (2)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.639 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.639 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.639 Return code 1 from poll + +MQTT_LOG: 20240520 163702.639 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.639 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.639 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.639 (140737349940800) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.639 (140737349940800) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.639 (140737349940800) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.639 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.639 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.639 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.639 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.640 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.640 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.640 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.640 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff00016d0 + + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163702.640 4 RTI_0 <- PUBCOMP msgid:5 + +MQTT_LOG: 20240520 163702.640 PUBCOMP received from client RTI_0 for message id 5 - removing publication + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163702.640 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2464 bytes + + +MQTT_LOG: 20240520 163702.640 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2448 bytes + + +MQTT_LOG: 20240520 163702.640 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2400 bytes + + +MQTT_LOG: 20240520 163702.640 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2352 bytes + + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163702.640 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163702.640 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163702.640 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163702.640 (140737349940800) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.640 Return code 1 from poll + +MQTT_LOG: 20240520 163702.640 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.640 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.640 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.640 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.640 (140737333155392) (5)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163702.640 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001950 + + +MQTT_LOG: 20240520 163702.640 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffe8000f10 + + +MQTT_LOG: 20240520 163702.640 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7ffff00017d0 + + +MQTT_LOG: 20240520 163702.640 (140737333155392) (5)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (4)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163702.640 (140737333155392) (3)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163702.640 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163702.640 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.640 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.640 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.640 Return code 1 from poll + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.640 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.640 (140737349940800) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.698 (140737349940800) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.698 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.698 (140737349940800) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.698 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3248 bytes + + +MQTT_LOG: 20240520 163702.698 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163702.698 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163702.698 (140737349940800) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163702.698 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0001550 + + +MQTT_LOG: 20240520 163702.698 (140737349940800) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163702.698 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffe8000f10 + + +MQTT_LOG: 20240520 163702.698 (140737349940800) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163702.698 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0000c10 + + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.698 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163702.698 (140737349940800) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.698 (140737349940800) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163702.698 4 RTI_0 <- PUBLISH msgid: 9 qos: 2 retained: 0 payload len(13): “û¾Ó©VÑ + +MQTT_LOG: 20240520 163702.698 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x5555555995c0 + + +MQTT_LOG: 20240520 163702.698 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff00015c0 + + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163702.698 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0001210 + + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163702.698 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000ee0 + + +MQTT_LOG: 20240520 163702.698 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7ffff0000e70 + + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.698 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001720 + + +MQTT_LOG: 20240520 163702.698 (140737349940800) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.698 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001780 + + +MQTT_LOG: 20240520 163702.698 (140737349940800) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.698 (140737349940800) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.698 (140737349940800) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.698 (140737349940800) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.698 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2528 bytes + + +MQTT_LOG: 20240520 163702.698 (140737349940800) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.698 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2512 bytes + + +MQTT_LOG: 20240520 163702.698 (140737349940800) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.698 4 RTI_0 -> PUBREC msgid: 9 (0) + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163702.698 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2496 bytes + + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163702.698 (140737349940800) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.698 (140737349940800) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.698 Return code 1 from poll + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.698 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.698 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.698 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001f30 + + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163702.698 4 RTI_0 <- PUBREL msgid 9 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163702.698 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffec001ba0 + + +MQTT_LOG: 20240520 163702.698 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7ffff00013c0 + + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.698 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001c10 + + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163702.698 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2592 bytes + + +MQTT_LOG: 20240520 163702.698 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2544 bytes + + +MQTT_LOG: 20240520 163702.698 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2512 bytes + + +MQTT_LOG: 20240520 163702.698 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2432 bytes + + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.698 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0000c10 + + +MQTT_LOG: 20240520 163702.698 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.698 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff00011a0 + + +MQTT_LOG: 20240520 163702.698 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.698 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2432 bytes + + +MQTT_LOG: 20240520 163702.698 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.698 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2416 bytes + + +MQTT_LOG: 20240520 163702.698 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.698 4 RTI_0 -> PUBCOMP msgid 9 (0) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163702.698 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2400 bytes + + +MQTT_LOG: 20240520 163702.698 (140737333155392) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.698 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.699 Return code 0 from poll + +MQTT_LOG: 20240520 163702.699 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.699 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.699 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163702.699 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.699 (140737349940800) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163702.699 (140737349940800) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.699 (140737349940800) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.699 (140737349940800) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.699 (140737349940800) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.699 (140737349940800) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.699 (140737349940800) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163702.699 (140737349940800) (0)< MQTTClient_waitForCompletion:2903 (0) + +LOG: RTI sent to federates MSG_TYPE_STOP_GRANTED with tag (0, 1) +LOG: RTI forwarded to federates MSG_TYPE_STOP_REQUEST with tag (0, 1). +LOG: RTI received from federate 0 STOP reply tag (0, 1). +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163702.699 (140737349940800) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163702.699 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.699 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.699 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.699 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.699 Return code 0 from poll + +MQTT_LOG: 20240520 163702.699 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.700 (140737349940800) (2)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163702.700 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.700 (140737349940800) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163702.700 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2352 bytes + + +MQTT_LOG: 20240520 163702.700 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163702.700 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163702.700 (140737349940800) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163702.700 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163702.700 (140737349940800) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163702.700 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163702.700 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163702.700 (140737349940800) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI: Received message type 5 from federate 0. +LOG: RTI received message from federate 0 for federate 1 port 0 with intended tag (0, 0). Forwarding. +WARNING: RTI: Destination federate 1 is no longer connected. Dropping message. +LOG: Fed status: next_event (7507123816447935596, 4294967295), completed (7507123816447935597, 0), last_granted (7507123816447935597, 0), last_provisionally_granted (7507123816447935597, 0). +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163702.700 (140737349940800) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.700 Return code 0 from poll + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.700 (140737349940800) (2)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163702.700 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.700 (140737349940800) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163702.700 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2128 bytes + + +MQTT_LOG: 20240520 163702.700 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163702.700 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163702.700 (140737349940800) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163702.700 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163702.700 (140737349940800) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163702.700 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163702.700 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163702.700 (140737349940800) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI: Received message type 9 from federate 0. +LOG: RTI received from federate/enclave 0 the latest tag complete (LTC) (0, 0). +LOG: RTI: Minimum upstream LTC for federate/enclave 1 is (0, 0)(adjusted by after delay). +DEBUG: RTI: Strict EIMT of fed/encl 1 at fed/encl 0 has tag (0, 0). +LOG: RTI: Earliest next event upstream of node 1 has tag (0, 0). +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163702.700 (140737349940800) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.700 Return code 1 from poll + +MQTT_LOG: 20240520 163702.700 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.798 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.798 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163702.798 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x5555555995c0 + + +MQTT_LOG: 20240520 163702.798 (140737333155392) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163702.798 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffec001f30 + + +MQTT_LOG: 20240520 163702.798 (140737333155392) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163702.798 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff00011a0 + + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.798 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163702.798 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163702.798 4 RTI_0 <- PUBLISH msgid: 10 qos: 2 retained: 0 payload len(13): ÿÿÿÿÿÿÿÿÿÿÿ + +MQTT_LOG: 20240520 163702.798 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0001000 + + +MQTT_LOG: 20240520 163702.798 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555990e0 + + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163702.798 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000d00 + + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163702.798 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001a70 + + +MQTT_LOG: 20240520 163702.798 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec001af0 + + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.798 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec000e00 + + +MQTT_LOG: 20240520 163702.798 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.798 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec000eb0 + + +MQTT_LOG: 20240520 163702.798 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.798 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163702.798 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.798 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163702.798 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.798 4 RTI_0 -> PUBREC msgid: 10 (0) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163702.798 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.798 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.798 Return code 1 from poll + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.798 (140737349940800) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.798 (140737349940800) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.798 (140737349940800) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.798 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.798 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.798 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.798 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.798 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff0000c40 + + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.798 (140737349940800) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163702.798 4 RTI_0 <- PUBREL msgid 10 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163702.798 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7ffff0000c90 + + +MQTT_LOG: 20240520 163702.798 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7ffff00013c0 + + +MQTT_LOG: 20240520 163702.798 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000ee0 + + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163702.798 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163702.798 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163702.798 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163702.799 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163702.799 (140737349940800) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.799 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff00011a0 + + +MQTT_LOG: 20240520 163702.799 (140737349940800) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.799 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0000e00 + + +MQTT_LOG: 20240520 163702.799 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.799 (140737349940800) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.799 (140737349940800) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.799 (140737349940800) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.799 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163702.799 (140737349940800) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.799 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163702.799 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.799 4 RTI_0 -> PUBCOMP msgid 10 (0) + +MQTT_LOG: 20240520 163702.799 (140737349940800) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163702.799 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163702.799 (140737349940800) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163702.799 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.799 (140737349940800) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163702.799 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2128 bytes + + +MQTT_LOG: 20240520 163702.799 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163702.799 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163702.799 (140737349940800) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163702.799 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163702.799 (140737349940800) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163702.799 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163702.799 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163702.799 (140737349940800) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI: Received message type 6 from federate 0. +LOG: RTI received from federate 0 the Next Event Tag (NET) (7507123816447935596, 4294967295) +DEBUG: RTI: Updated the recorded next event tag for federate/enclave 0 to (7507123816447935596, 4294967295) +LOG: RTI: Minimum upstream LTC for federate/enclave 1 is (0, 0)(adjusted by after delay). +DEBUG: RTI: Strict EIMT of fed/encl 1 at fed/encl 0 has tag (7507123816447935596, 4294967295). +LOG: RTI: Earliest next event upstream of node 1 has tag (7507123816447935596, 4294967295). +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163702.799 (140737349940800) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.799 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.799 Return code 1 from poll + +MQTT_LOG: 20240520 163702.799 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.799 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.799 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.799 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.799 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.799 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.799 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.799 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.799 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.799 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.799 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.899 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.899 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163702.899 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x5555555995c0 + + +MQTT_LOG: 20240520 163702.899 (140737333155392) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163702.899 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffec0010f0 + + +MQTT_LOG: 20240520 163702.899 (140737333155392) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163702.899 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffec000eb0 + + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.899 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163702.899 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163702.899 4 RTI_0 <- PUBLISH msgid: 11 qos: 2 retained: 0 payload len(13): “û¾Ó©VÑ + +MQTT_LOG: 20240520 163702.899 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffe80015a0 + + +MQTT_LOG: 20240520 163702.899 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffec001190 + + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163702.899 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000dc0 + + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163702.899 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000d80 + + +MQTT_LOG: 20240520 163702.899 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec001e80 + + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.899 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001a10 + + +MQTT_LOG: 20240520 163702.899 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.899 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001be0 + + +MQTT_LOG: 20240520 163702.899 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.899 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163702.899 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.899 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163702.899 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.899 4 RTI_0 -> PUBREC msgid: 11 (0) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163702.899 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.899 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.899 Return code 1 from poll + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.899 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.899 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163702.899 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff00015c0 + + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163702.899 4 RTI_0 <- PUBREL msgid 11 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163702.899 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163702.899 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7ffff00013c0 + + +MQTT_LOG: 20240520 163702.899 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000dc0 + + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163702.899 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163702.899 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163702.899 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163702.899 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.899 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec000eb0 + + +MQTT_LOG: 20240520 163702.899 (140737349940800) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.899 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001c90 + + +MQTT_LOG: 20240520 163702.899 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.899 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163702.899 (140737349940800) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.899 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163702.899 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.899 4 RTI_0 -> PUBCOMP msgid 11 (0) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163702.899 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163702.899 (140737349940800) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.899 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.899 (140737349940800) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163702.900 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2128 bytes + + +MQTT_LOG: 20240520 163702.900 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163702.900 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163702.900 (140737349940800) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163702.900 (140737349940800) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163702.900 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163702.900 (140737349940800) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163702.900 (140737349940800) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163702.900 (140737349940800) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163702.900 (140737349940800) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163702.900 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163702.900 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163702.900 (140737349940800) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI: Received message type 9 from federate 0. +LOG: RTI received from federate/enclave 0 the latest tag complete (LTC) (0, 1). +LOG: RTI: Minimum upstream LTC for federate/enclave 1 is (0, 1)(adjusted by after delay). +DEBUG: RTI: Strict EIMT of fed/encl 1 at fed/encl 0 has tag (7507123816447935596, 4294967295). +LOG: RTI: Earliest next event upstream of node 1 has tag (7507123816447935596, 4294967295). +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163702.900 (140737349940800) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163702.900 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.900 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.900 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.900 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163702.900 Return code 1 from poll + +MQTT_LOG: 20240520 163702.900 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.999 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163702.999 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163702.999 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x5555555995c0 + + +MQTT_LOG: 20240520 163702.999 (140737333155392) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163702.999 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffec0011e0 + + +MQTT_LOG: 20240520 163702.999 (140737333155392) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163702.999 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffec001be0 + + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163702.999 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163702.999 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163702.999 4 RTI_0 <- PUBLISH msgid: 12 qos: 2 retained: 0 payload len(13): ÿÿÿÿÿÿÿÿÿÿÿ + +MQTT_LOG: 20240520 163702.999 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffec001230 + + +MQTT_LOG: 20240520 163702.999 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffec0010f0 + + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163702.999 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec0019d0 + + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163702.999 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000d80 + + +MQTT_LOG: 20240520 163702.999 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec000e00 + + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163702.999 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec0012f0 + + +MQTT_LOG: 20240520 163702.999 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.999 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001350 + + +MQTT_LOG: 20240520 163702.999 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163702.999 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163702.999 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163702.999 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163702.999 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163702.999 4 RTI_0 -> PUBREC msgid: 12 (0) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163702.999 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163702.999 Return code 1 from poll + +MQTT_LOG: 20240520 163702.999 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.999 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163702.999 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163702.999 (140737349940800) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163702.999 (140737349940800) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163702.999 (140737349940800) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163702.999 (140737349940800) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163702.999 (140737349940800) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163702.999 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163702.999 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.000 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.000 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163703.000 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001140 + + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163703.000 4 RTI_0 <- PUBREL msgid 12 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163703.000 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7ffff0000e30 + + +MQTT_LOG: 20240520 163703.000 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7ffff00013c0 + + +MQTT_LOG: 20240520 163703.000 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000d10 + + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163703.000 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163703.000 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163703.000 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163703.000 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163703.000 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001be0 + + +MQTT_LOG: 20240520 163703.000 (140737349940800) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.000 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001d70 + + +MQTT_LOG: 20240520 163703.000 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163703.000 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163703.000 (140737349940800) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163703.000 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163703.000 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163703.000 4 RTI_0 -> PUBCOMP msgid 12 (0) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163703.000 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163703.000 (140737349940800) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163703.000 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2128 bytes + + +MQTT_LOG: 20240520 163703.000 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163703.000 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163703.000 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163703.000 (140737349940800) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163703.000 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163703.000 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163703.000 (140737349940800) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI: Received message type 6 from federate 0. +LOG: RTI received from federate 0 the Next Event Tag (NET) (7507123816447935596, 4294967295) +DEBUG: RTI: Updated the recorded next event tag for federate/enclave 0 to (7507123816447935596, 4294967295) +LOG: RTI: Minimum upstream LTC for federate/enclave 1 is (0, 1)(adjusted by after delay). +DEBUG: RTI: Strict EIMT of fed/encl 1 at fed/encl 0 has tag (7507123816447935596, 4294967295). +LOG: RTI: Earliest next event upstream of node 1 has tag (7507123816447935596, 4294967295). +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163703.000 (140737349940800) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.000 Return code 1 from poll + +MQTT_LOG: 20240520 163703.000 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.000 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.000 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163703.000 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.000 (140737333155392) (5)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163703.000 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001b20 + + +MQTT_LOG: 20240520 163703.000 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffec0012a0 + + +MQTT_LOG: 20240520 163703.000 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffec001fe0 + + +MQTT_LOG: 20240520 163703.000 (140737333155392) (5)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (4)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163703.000 (140737333155392) (3)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163703.000 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163703.000 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.000 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.000 Return code 1 from poll + +MQTT_LOG: 20240520 163703.000 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163703.000 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.000 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.100 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.100 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163703.100 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163703.100 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163703.100 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1968 bytes + + +MQTT_LOG: 20240520 163703.100 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163703.100 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x5555555995c0 + + +MQTT_LOG: 20240520 163703.100 (140737333155392) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163703.100 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffec0012a0 + + +MQTT_LOG: 20240520 163703.100 (140737333155392) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163703.100 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffec001350 + + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163703.100 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163703.100 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163703.100 4 RTI_0 <- PUBLISH msgid: 13 qos: 2 retained: 0 payload len(1):  + +MQTT_LOG: 20240520 163703.100 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffec001eb0 + + +MQTT_LOG: 20240520 163703.100 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffec001140 + + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163703.100 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001b20 + + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163703.100 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000e30 + + +MQTT_LOG: 20240520 163703.100 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec001ba0 + + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163703.100 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec0019d0 + + +MQTT_LOG: 20240520 163703.100 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.100 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001010 + + +MQTT_LOG: 20240520 163703.100 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163703.100 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163703.100 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163703.100 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163703.100 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163703.100 4 RTI_0 -> PUBREC msgid: 13 (0) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163703.100 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.100 Return code 1 from poll + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.100 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.100 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163703.100 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001f30 + + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163703.100 4 RTI_0 <- PUBREL msgid 13 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163703.100 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163703.100 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7ffff00013c0 + + +MQTT_LOG: 20240520 163703.100 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0001130 + + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163703.100 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163703.100 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163703.100 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163703.100 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163703.100 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001350 + + +MQTT_LOG: 20240520 163703.100 (140737349940800) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.100 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001af0 + + +MQTT_LOG: 20240520 163703.100 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163703.100 (140737349940800) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163703.100 (140737349940800) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163703.100 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163703.100 (140737349940800) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163703.100 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163703.101 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163703.101 4 RTI_0 -> PUBCOMP msgid 13 (0) + +MQTT_LOG: 20240520 163703.101 (140737349940800) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163703.101 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163703.101 (140737349940800) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163703.101 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.101 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.101 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.101 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.101 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.101 (140737349940800) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163703.101 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2128 bytes + + +MQTT_LOG: 20240520 163703.101 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163703.101 Return code 1 from poll + +MQTT_LOG: 20240520 163703.101 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163703.101 (140737349940800) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163703.101 (140737349940800) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163703.101 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163703.101 (140737349940800) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163703.101 (140737349940800) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163703.101 (140737349940800) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163703.101 (140737349940800) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163703.101 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163703.101 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163703.101 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163703.101 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000cc0 + + +MQTT_LOG: 20240520 163703.101 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffec0011e0 + + +MQTT_LOG: 20240520 163703.101 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffec001fe0 + + +MQTT_LOG: 20240520 163703.101 (140737349940800) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI: Received message type 4 from federate 0. +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (4)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +RTI: Federate 0 thread exited. +RTI: Waiting for thread handling federate 1. +RTI: Federate 1 thread exited. +MQTT_LOG: 20240520 163703.101 (140737352902464) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163703.101 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163703.101 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (2) + +MQTT_LOG: 20240520 163703.101 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163703.101 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555598cc0 + + +MQTT_LOG: 20240520 163703.101 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x55555559a3e0 + + +MQTT_LOG: 20240520 163703.101 (140737352902464) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163703.101 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163703.101 (140737352902464) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163703.101 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a4b0 + + +MQTT_LOG: 20240520 163703.101 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163703.101 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555998d0 + + +MQTT_LOG: 20240520 163703.101 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163703.101 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e40 + + +MQTT_LOG: 20240520 163703.101 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163703.101 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x555555598f00 + + +MQTT_LOG: 20240520 163703.101 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163703.101 (140737352902464) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.101 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x555555599180 + + +MQTT_LOG: 20240520 163703.101 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.101 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163703.101 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (8)< Socket_writev:773 (34) + +MQTT_LOG: 20240520 163703.101 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163703.101 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163703.101 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3392 bytes + + +MQTT_LOG: 20240520 163703.101 (140737352902464) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163703.101 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3376 bytes + + +MQTT_LOG: 20240520 163703.101 3 RTI_RTI -> PUBLISH msgid: 2 qos: 2 retained: 0 rc 0 payload len(1): X + +MQTT_LOG: 20240520 163703.101 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3360 bytes + + +MQTT_LOG: 20240520 163703.101 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163703.101 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163703.101 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163703.101 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3344 bytes + + +MQTT_LOG: 20240520 163703.101 (140737352902464) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163703.101 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163703.101 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.101 Return code 1 from poll + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (2)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.101 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.101 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.101 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.101 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< WebSocket_getdata:751 (-335536152) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163703.101 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001140 + + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (2)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163703.101 3 RTI_RTI <- PUBREC msgid: 2 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163703.101 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001320 + + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.101 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec0012f0 + + +MQTT_LOG: 20240520 163703.101 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163703.101 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2352 bytes + + +MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163703.101 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2336 bytes + + +MQTT_LOG: 20240520 163703.101 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163703.101 3 RTI_RTI -> PUBREL msgid: 2 (0) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163703.101 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163703.101 (140737333155392) (2)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163703.101 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.101 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.102 Return code 1 from poll + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.102 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.102 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< WebSocket_getdata:751 (-335540328) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163703.102 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163703.102 (140737352902464) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163703.102 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x5555555997f0 + + +MQTT_LOG: 20240520 163703.102 (140737352902464) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163703.102 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x5555555991b0 + + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163703.102 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2416 bytes + + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163703.102 3 RTI_RTI <- PUBLISH msgid: 3 qos: 2 retained: 0 payload len(1): X + +MQTT_LOG: 20240520 163703.102 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555599510 + + +MQTT_LOG: 20240520 163703.102 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599950 + + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163703.102 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555977a0 + + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163703.102 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a300 + + +MQTT_LOG: 20240520 163703.102 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x5555555978a0 + + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163703.102 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598b70 + + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.102 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163703.102 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163703.102 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2640 bytes + + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163703.102 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2624 bytes + + +MQTT_LOG: 20240520 163703.102 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163703.102 3 RTI_RTI -> PUBREC msgid: 3 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163703.102 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2608 bytes + + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.102 Return code 1 from poll + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (2)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.102 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.102 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< WebSocket_getdata:751 (-335540328) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163703.102 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001140 + + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (2)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163703.102 3 RTI_RTI <- PUBCOMP msgid:2 + +MQTT_LOG: 20240520 163703.102 PUBCOMP received from client RTI_RTI for message id 2 - removing publication + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163703.102 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2576 bytes + + +MQTT_LOG: 20240520 163703.102 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2560 bytes + + +MQTT_LOG: 20240520 163703.102 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2528 bytes + + +MQTT_LOG: 20240520 163703.102 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2480 bytes + + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163703.102 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2448 bytes + + +MQTT_LOG: 20240520 163703.102 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163703.102 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2336 bytes + + +MQTT_LOG: 20240520 163703.102 (140737333155392) (2)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.102 Return code 1 from poll + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163703.102 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599a60 + + +MQTT_LOG: 20240520 163703.102 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163703.102 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x55555559ab50 + + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (5)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.102 Return code 1 from poll + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.102 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.102 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.144 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163703.144 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3376 bytes + + +MQTT_LOG: 20240520 163703.144 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163703.144 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163703.144 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< WebSocket_getdata:751 (-335540328) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163703.144 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163703.144 3 RTI_RTI <- PUBREL msgid 3 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163703.144 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555598390 + + +MQTT_LOG: 20240520 163703.144 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555775c0 + + +MQTT_LOG: 20240520 163703.144 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555992e0 + + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163703.144 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2464 bytes + + +MQTT_LOG: 20240520 163703.144 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2416 bytes + + +MQTT_LOG: 20240520 163703.144 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2384 bytes + + +MQTT_LOG: 20240520 163703.144 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163703.144 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991b0 + + +MQTT_LOG: 20240520 163703.144 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.144 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163703.144 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163703.144 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163703.144 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163703.144 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163703.144 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163703.144 3 RTI_RTI -> PUBCOMP msgid 3 (0) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163703.144 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163703.144 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.144 Return code 1 from poll + +MQTT_LOG: 20240520 163703.144 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (2)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (5)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163703.144 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598580 + + +MQTT_LOG: 20240520 163703.144 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x55555559a460 + + +MQTT_LOG: 20240520 163703.144 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffec0023f0 + + +MQTT_LOG: 20240520 163703.144 (140737333155392) (5)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (4)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (3)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163703.144 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3312 bytes + + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.144 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163703.144 (140737333155392) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163703.144 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 3248 bytes + + +MQTT_LOG: 20240520 163703.144 (140737333155392) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163703.144 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 3216 bytes + + +MQTT_LOG: 20240520 163703.144 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 3200 bytes + + +MQTT_LOG: 20240520 163703.144 (140737333155392) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID -1 +LOG: Received MQTT_RTI_RESIGNED message from federateID -1 +MQTT_LOG: 20240520 163703.144 (140737333155392) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (2)< MQTTProtocol_assignMsgId:104 (3) + +MQTT_LOG: 20240520 163703.144 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163703.144 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555599000 + + +MQTT_LOG: 20240520 163703.144 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffec001b20 + + +MQTT_LOG: 20240520 163703.144 (140737333155392) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163703.144 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x5555555995c0 + + +MQTT_LOG: 20240520 163703.144 (140737333155392) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163703.144 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a7a0 + + +MQTT_LOG: 20240520 163703.144 (140737333155392) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163703.144 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001230 + + +MQTT_LOG: 20240520 163703.144 (140737333155392) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163703.144 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001910 + + +MQTT_LOG: 20240520 163703.144 (140737333155392) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163703.144 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7fffec001be0 + + +MQTT_LOG: 20240520 163703.144 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7fffec001010 + + +MQTT_LOG: 20240520 163703.144 (140737333155392) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.144 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7fffec000e70 + + +MQTT_LOG: 20240520 163703.144 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (8)< Socket_writev:773 (34) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163703.144 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3504 bytes + + +MQTT_LOG: 20240520 163703.144 (140737333155392) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163703.144 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3488 bytes + + +MQTT_LOG: 20240520 163703.144 3 RTI_RTI -> PUBLISH msgid: 3 qos: 2 retained: 0 rc 0 payload len(1): X + +MQTT_LOG: 20240520 163703.144 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3472 bytes + + +MQTT_LOG: 20240520 163703.144 (140737333155392) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163703.144 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3456 bytes + + +MQTT_LOG: 20240520 163703.144 (140737333155392) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163703.144 (140737333155392) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.144 (140737333155392) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.144 Return code 1 from poll + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (3)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.144 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.144 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.188 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163703.188 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3376 bytes + + +MQTT_LOG: 20240520 163703.188 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163703.188 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163703.188 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (4)< WebSocket_getdata:751 (-335540328) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163703.188 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599950 + + +MQTT_LOG: 20240520 163703.188 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163703.188 3 RTI_RTI <- PUBREC msgid: 3 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163703.188 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163703.188 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.188 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598c20 + + +MQTT_LOG: 20240520 163703.188 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163703.188 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163703.188 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163703.188 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2352 bytes + + +MQTT_LOG: 20240520 163703.188 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163703.188 3 RTI_RTI -> PUBREL msgid: 3 (0) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163703.188 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2336 bytes + + +MQTT_LOG: 20240520 163703.188 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.188 Return code 1 from poll + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (3)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.188 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.188 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< WebSocket_getdata:751 (-335540328) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163703.188 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163703.188 (140737333155392) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163703.188 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffec001180 + + +MQTT_LOG: 20240520 163703.188 (140737333155392) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163703.188 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffec001010 + + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163703.188 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2416 bytes + + +MQTT_LOG: 20240520 163703.188 (140737333155392) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163703.188 3 RTI_RTI <- PUBLISH msgid: 4 qos: 2 retained: 0 payload len(1): X + +MQTT_LOG: 20240520 163703.188 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffec000f20 + + +MQTT_LOG: 20240520 163703.188 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffec001f30 + + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163703.188 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000e30 + + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163703.188 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001380 + + +MQTT_LOG: 20240520 163703.188 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec001da0 + + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163703.188 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001480 + + +MQTT_LOG: 20240520 163703.188 (140737333155392) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.188 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec002800 + + +MQTT_LOG: 20240520 163703.188 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.188 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.188 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163703.188 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2640 bytes + + +MQTT_LOG: 20240520 163703.188 (140737333155392) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163703.188 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2624 bytes + + +MQTT_LOG: 20240520 163703.188 (140737333155392) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163703.188 3 RTI_RTI -> PUBREC msgid: 4 (0) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163703.188 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2608 bytes + + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.188 Return code 1 from poll + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (3)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163703.188 (140737333155392) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.188 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.189 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.189 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.189 (140737333155392) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.189 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.189 (140737333155392) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< WebSocket_getdata:751 (-335540328) + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163703.189 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec0028b0 + + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163703.189 (140737333155392) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163703.189 3 RTI_RTI <- PUBCOMP msgid:3 + +MQTT_LOG: 20240520 163703.189 PUBCOMP received from client RTI_RTI for message id 3 - removing publication + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163703.189 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2576 bytes + + +MQTT_LOG: 20240520 163703.189 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2560 bytes + + +MQTT_LOG: 20240520 163703.189 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2528 bytes + + +MQTT_LOG: 20240520 163703.189 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2480 bytes + + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163703.189 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2448 bytes + + +MQTT_LOG: 20240520 163703.189 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163703.189 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2336 bytes + + +MQTT_LOG: 20240520 163703.189 (140737333155392) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163703.189 (140737333155392) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.189 (140737333155392) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.189 Return code 1 from poll + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.189 (140737352902464) (3)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163703.189 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.189 (140737352902464) (6)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163703.189 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598c80 + + +MQTT_LOG: 20240520 163703.189 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x555555599950 + + +MQTT_LOG: 20240520 163703.189 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffec0023f0 + + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.189 (140737352902464) (6)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (5)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163703.189 (140737352902464) (3)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163703.189 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.189 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.189 Return code 0 from poll + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.189 (140737352902464) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163703.189 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.189 (140737352902464) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) + +MQTT_LOG: 20240520 163703.189 (140737352902464) (0)> MQTTClient_disconnect1:1929 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.202 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.202 Return code 1 from poll + +MQTT_LOG: 20240520 163703.202 (140737333155392) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.202 (140737333155392) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.202 (140737333155392) (3)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163703.202 (140737333155392) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.202 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.202 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.202 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.202 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.202 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.202 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163703.202 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.202 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.202 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.202 (140737333155392) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163703.202 (140737333155392) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.202 (140737333155392) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.202 (140737333155392) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.202 (140737333155392) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.232 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163703.232 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3376 bytes + + +MQTT_LOG: 20240520 163703.232 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163703.232 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163703.232 (140737333155392) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< WebSocket_getdata:751 (-335540328) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163703.232 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599950 + + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (3)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163703.232 3 RTI_RTI <- PUBREL msgid 4 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163703.232 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffec001440 + + +MQTT_LOG: 20240520 163703.232 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555775c0 + + +MQTT_LOG: 20240520 163703.232 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001230 + + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163703.232 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2464 bytes + + +MQTT_LOG: 20240520 163703.232 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2416 bytes + + +MQTT_LOG: 20240520 163703.232 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2384 bytes + + +MQTT_LOG: 20240520 163703.232 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163703.232 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001010 + + +MQTT_LOG: 20240520 163703.232 (140737333155392) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.232 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001270 + + +MQTT_LOG: 20240520 163703.232 (140737333155392) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163703.232 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163703.232 (140737333155392) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163703.232 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163703.232 (140737333155392) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163703.232 3 RTI_RTI -> PUBCOMP msgid 4 (0) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163703.232 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163703.232 (140737333155392) (3)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.232 Return code 1 from poll + +MQTT_LOG: 20240520 163703.232 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.232 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.232 (140737352902464) (3)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163703.232 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.232 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.232 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.232 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.232 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.232 (140737352902464) (6)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163703.232 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599580 + + +MQTT_LOG: 20240520 163703.232 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x55555559a550 + + +MQTT_LOG: 20240520 163703.232 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x55555559ab50 + + +MQTT_LOG: 20240520 163703.232 (140737352902464) (6)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163703.232 (140737352902464) (5)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163703.232 (140737352902464) (4)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163703.232 (140737352902464) (3)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163703.232 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.232 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.232 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.232 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.232 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.232 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.232 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.232 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.232 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.232 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.232 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.232 Return code 0 from poll + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.232 (140737333155392) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (0)< MQTTClient_waitForCompletion:2903 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (0)> MQTTClient_disconnect1:1929 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTClient_closeSession:1095 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTPacket_send_disconnect:516 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.246 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec000e70 + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (4)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (5)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (6)> Socket_writev:721 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (6)< Socket_writev:773 (2) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (5)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (4)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3328 bytes + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163703.246 3 RTI_RTI -> DISCONNECT (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTPacket_send_disconnect:543 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> WebSocket_close:524 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< WebSocket_close:572 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> Socket_close:967 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> Socket_close_only:893 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< Socket_close_only:907 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> Socket_abortWrite:1355 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< Socket_abortWrite:1376 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> SocketBuffer_cleanup:153 + +MQTT_LOG: 20240520 163703.246 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 157, heap use now 3312 bytes + + +MQTT_LOG: 20240520 163703.246 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163703.246 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3232 bytes + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< SocketBuffer_cleanup:165 + +MQTT_LOG: 20240520 163703.246 Removed socket 3 + +MQTT_LOG: 20240520 163703.246 Removed socket 3 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< Socket_close:1037 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTClient_cleanSession:1131 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTPersistence_clear:170 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTPersistence_clear:174 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTClient_emptyMessageQueue:557 + +MQTT_LOG: 20240520 163703.246 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 565, heap use now 3200 bytes + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (4)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (4)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 567, heap use now 3168 bytes + + +MQTT_LOG: 20240520 163703.246 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 568, heap use now 3152 bytes + + +MQTT_LOG: 20240520 163703.246 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 366, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163703.246 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 370, heap use now 3056 bytes + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTClient_emptyMessageQueue:572 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTClient_cleanSession:1139 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTClient_closeSession:1123 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTClient_stop:1028 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTClient_stop:1063 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (0)< MQTTClient_disconnect1:1963 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (0)> MQTTClient_destroy:580 + +MQTT_LOG: 20240520 163703.246 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffec001010 + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTPersistence_close:141 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTPersistence_close:157 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTClient_emptyMessageQueue:557 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTClient_emptyMessageQueue:572 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTProtocol_freeClient:934 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTProtocol_freeMessageList:1020 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163703.246 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTProtocol_freeMessageList:1023 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTProtocol_freeMessageList:1020 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163703.246 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTProtocol_freeMessageList:1023 + +MQTT_LOG: 20240520 163703.246 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163703.246 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 940, heap use now 2848 bytes + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTProtocol_freeClient:989 + +MQTT_LOG: 20240520 163703.246 Freeing 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163703.246 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2528 bytes + + +MQTT_LOG: 20240520 163703.246 Removed client RTI_RTI from bstate->clients, socket 0 + +MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 600, heap use now 2496 bytes + + +MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 603, heap use now 2480 bytes + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> Thread_destroy_sem:371 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< Thread_destroy_sem:380 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> Thread_destroy_sem:371 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< Thread_destroy_sem:380 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> Thread_destroy_sem:371 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< Thread_destroy_sem:380 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> Thread_destroy_sem:371 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< Thread_destroy_sem:380 (0) + +MQTT_LOG: 20240520 163703.246 Freeing 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2464 bytes + + +MQTT_LOG: 20240520 163703.246 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (0)< MQTTClient_destroy:617 + +ERROR: MQTT receive failed. +FATAL ERROR: Error 11: Resource temporarily unavailable +MQTT_LOG: 20240520 163703.246 (140737333155392) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTProtocol_assignMsgId:104 (6) + +MQTT_LOG: 20240520 163703.246 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7fffec000f20 + + +MQTT_LOG: 20240520 163703.246 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7fffec001270 + + +MQTT_LOG: 20240520 163703.246 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffec0010f0 + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163703.246 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x5555555995c0 + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163703.246 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a7a0 + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163703.246 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec0014b0 + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163703.246 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001140 + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163703.246 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7fffec0019d0 + + +MQTT_LOG: 20240520 163703.246 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7fffec001f00 + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.246 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7fffec001480 + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (8)< Socket_writev:773 (43) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 2656 bytes + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 2640 bytes + + +MQTT_LOG: 20240520 163703.246 4 RTI_0 -> PUBLISH msgid: 6 qos: 2 retained: 0 rc 0 payload len(1):  + +MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 2624 bytes + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163703.246 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 2608 bytes + + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163703.246 (140737333155392) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.246 Return code 1 from poll + +MQTT_LOG: 20240520 163703.246 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.246 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.246 (140737352902464) (3)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163703.246 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.246 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.246 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.246 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.246 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.246 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.246 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.246 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.246 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.246 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.246 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.246 Return code 1 from poll + +MQTT_LOG: 20240520 163703.246 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.246 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.246 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163703.246 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.246 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.246 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.246 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.246 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.247 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.247 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163703.247 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 2528 bytes + + +MQTT_LOG: 20240520 163703.247 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 1520 bytes + + +MQTT_LOG: 20240520 163703.247 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1472 bytes + + +MQTT_LOG: 20240520 163703.247 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163703.247 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a550 + + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163703.247 4 RTI_0 <- PUBREC msgid: 6 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163703.247 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991e0 + + +MQTT_LOG: 20240520 163703.247 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.247 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597160 + + +MQTT_LOG: 20240520 163703.247 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163703.247 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1520 bytes + + +MQTT_LOG: 20240520 163703.247 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163703.247 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 1504 bytes + + +MQTT_LOG: 20240520 163703.247 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163703.247 4 RTI_0 -> PUBREL msgid: 6 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163703.247 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 1488 bytes + + +MQTT_LOG: 20240520 163703.247 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.247 Return code 1 from poll + +MQTT_LOG: 20240520 163703.247 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.247 (140737333155392) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163703.247 (140737333155392) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.247 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.247 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.247 (140737333155392) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163703.247 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163703.247 (140737333155392) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< WebSocket_getdata:751 (-268428312) + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163703.247 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a500 + + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163703.247 (140737333155392) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163703.247 4 RTI_0 <- PUBCOMP msgid:6 + +MQTT_LOG: 20240520 163703.247 PUBCOMP received from client RTI_0 for message id 6 - removing publication + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163703.247 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 1488 bytes + + +MQTT_LOG: 20240520 163703.247 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 1472 bytes + + +MQTT_LOG: 20240520 163703.247 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1424 bytes + + +MQTT_LOG: 20240520 163703.247 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1376 bytes + + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163703.247 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1344 bytes + + +MQTT_LOG: 20240520 163703.247 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1264 bytes + + +MQTT_LOG: 20240520 163703.247 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 1232 bytes + + +MQTT_LOG: 20240520 163703.247 (140737333155392) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163703.247 (140737333155392) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.247 (140737333155392) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.247 Return code 1 from poll + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (6)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163703.247 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599f90 + + +MQTT_LOG: 20240520 163703.247 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x55555559a550 + + +MQTT_LOG: 20240520 163703.247 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x55555559ab50 + + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (6)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (5)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (3)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.247 Return code 0 from poll + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.247 (140737352902464) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163703.303 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.303 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.303 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.303 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.303 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.303 (140737352902464) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163703.303 (140737352902464) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163703.303 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163703.303 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163703.303 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163703.303 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163703.303 Return code 0 from poll + +MQTT_LOG: 20240520 163703.303 (140737333155392) (4)> isReady:353 + +MQTT_LOG: 20240520 163703.303 (140737333155392) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163703.303 (140737333155392) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163703.303 (140737333155392) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163703.303 (140737333155392) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163703.303 (140737333155392) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163703.303 (140737333155392) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163703.303 (140737333155392) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163703.348 (140737333155392) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163703.348 (140737333155392) (0)< MQTTClient_waitForCompletion:2903 (0) + +LOG: RTI has sent failed signal to federate 0 due to abnormal termination. +RTI is exiting abnormally. +RTI: Number of federates: 2 +RTI: Clock sync: init +Starting RTI for 2 federates in federation ID Unidentified Federation. +---- System clock resolution: 1 nsec +LOG: Subscribing on topic Unidentified Federation_RTI. +LOG: PHYSICAL_TIME ON SUBSCRIBING TOPIC: 1716248233693742342 +RTI: Listening for federates. +LOG: RECEIVING message from federateID -1 +MQTT_LOG: 20240520 163713.693 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163713.693 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163713.693 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163713.693 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163713.693 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163713.693 Return code 1 from poll + +MQTT_LOG: 20240520 163713.693 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163713.693 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163713.693 (140737352902464) (2)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163713.693 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163713.693 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163713.693 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.458 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.458 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.458 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.458 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.458 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.458 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.458 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.458 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.458 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (3)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163716.458 (140737352902464) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163716.458 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163716.458 (140737352902464) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163716.458 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555597e10 + + +MQTT_LOG: 20240520 163716.458 (140737352902464) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163716.458 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555597cf0 + + +MQTT_LOG: 20240520 163716.458 (140737352902464) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.458 (140737352902464) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163716.458 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163716.458 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 1280 bytes + + +MQTT_LOG: 20240520 163716.458 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.458 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163716.459 3 RTI_RTI <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163716.459 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163716.459 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598300 + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163716.459 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555597d20 + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163716.459 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598390 + + +MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x5555555960e0 + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598510 + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x5555555985f0 + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.459 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1504 bytes + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.459 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 1488 bytes + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163716.459 3 RTI_RTI -> PUBREC msgid: 1 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163716.459 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 1472 bytes + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTProtocol_keepalive:704 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTProtocol_keepalive:781 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.459 Return code 1 from poll + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (2)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.459 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.459 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163716.459 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555986a0 + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163716.459 3 RTI_RTI <- PUBREL msgid 1 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163716.459 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555984a0 + + +MQTT_LOG: 20240520 163716.459 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163716.459 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598730 + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163716.459 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1568 bytes + + +MQTT_LOG: 20240520 163716.459 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1520 bytes + + +MQTT_LOG: 20240520 163716.459 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1488 bytes + + +MQTT_LOG: 20240520 163716.459 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1408 bytes + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555597cf0 + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597e90 + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.459 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1408 bytes + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.459 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 1392 bytes + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163716.459 3 RTI_RTI -> PUBCOMP msgid 1 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163716.459 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 1376 bytes + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163716.459 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1328 bytes + + +MQTT_LOG: 20240520 163716.459 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1296 bytes + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163716.459 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 1264 bytes + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163716.459 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 1232 bytes + + +MQTT_LOG: 20240520 163716.459 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 1216 bytes + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID -1 +LOG: Received MSG_TYPE_MQTT_JOIN message from federate 1. +DEBUG: Setting up MQTTServer_id for federate 1. +DEBUG: Setup MQTTServer_id for federate 1 as RTI_1. +DEBUG: Creating MQTTClient for federate 1. +MQTT_LOG: 20240520 163716.459 (140737352902464) (0)> MQTTClient_createWithOptions:375 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (2)> UTF8_validate:134 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (2)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163716.459 Allocating 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 438 ptr 0x555555598850 + + +MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555597cf0 + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163716.459 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555597c60 + + +MQTT_LOG: 20240520 163716.459 Allocating 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 489 ptr 0x555555598910 + + +MQTT_LOG: 20240520 163716.459 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555986a0 + + +MQTT_LOG: 20240520 163716.459 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555597ca0 + + +MQTT_LOG: 20240520 163716.459 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598300 + + +MQTT_LOG: 20240520 163716.459 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555977e0 + + +MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555597f80 + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTPersistence_create:56 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTPersistence_create:104 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTPersistence_initialize:119 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTPersistence_initialize:127 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTPersistence_restoreMessageQueue:877 + +MQTT_LOG: 20240520 163716.459 0 queued messages restored for client RTI_1 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTPersistence_restoreMessageQueue:918 (0) + +MQTT_LOG: 20240520 163716.459 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598540 + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (0)< MQTTClient_createWithOptions:522 (0) + +DEBUG: Connecting MQTTClient for federate 1. +MQTT_LOG: 20240520 163716.459 (140737352902464) (0)> MQTTClient_connectAll:1745 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTClient_connectURI:1504 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (2)> MQTTClient_connectURIVersion:1209 + +MQTT_LOG: 20240520 163716.459 Connecting to serverURI 127.0.0.1:1883 with MQTT version 4 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTProtocol_connect:227 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> MQTTProtocol_addressPort:63 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< MQTTProtocol_addressPort:101 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> Socket_new:1072 + +MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1082 ptr 0x555555598ba0 + + +MQTT_LOG: 20240520 163716.459 New socket 4 for 127.0.0.1:1883, port 1883 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> Socket_addSocket:272 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> Socket_setnonblocking:95 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< Socket_setnonblocking:100 (0) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< Socket_addSocket:314 (0) + +MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1200 ptr 0x555555598c50 + + +MQTT_LOG: 20240520 163716.459 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d30 + + +MQTT_LOG: 20240520 163716.459 Connect pending + +MQTT_LOG: 20240520 163716.459 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1233, heap use now 1968 bytes + + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< Socket_new:1235 (115) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTProtocol_connect:355 (115) + +MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.459 Return code 0 from poll + +MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163716.560 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163716.560 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1936 bytes + + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (3)> MQTTPacket_send_connect:55 + +MQTT_LOG: 20240520 163716.560 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 73 ptr 0x555555598cf0 + + +MQTT_LOG: 20240520 163716.560 (140737352902464) (4)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.560 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598c20 + + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (7)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (7)< Socket_writev:773 (19) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.560 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163716.560 (140737352902464) (4)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.560 4 RTI_1 -> CONNECT version 4 clean: 1 (0) + +MQTT_LOG: 20240520 163716.560 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 127, heap use now 1936 bytes + + +MQTT_LOG: 20240520 163716.560 (140737352902464) (3)< MQTTPacket_send_connect:129 (0) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (3)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.560 Return code 1 from poll + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.560 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.560 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> MQTTPacket_connack:148 + +MQTT_LOG: 20240520 163716.560 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 149 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< MQTTPacket_connack:176 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.560 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163716.561 4 RTI_1 <- CONNACK rc: 0 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTClient_cleanSession:1131 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTPersistence_clear:170 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTPersistence_clear:174 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTClient_emptyMessageQueue:557 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTClient_emptyMessageQueue:572 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTClient_cleanSession:1139 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTPacket_freeConnack:187 + +MQTT_LOG: 20240520 163716.561 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 190, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTPacket_freeConnack:191 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTClient_connectURIVersion:1477 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (1)< MQTTClient_connectURI:1702 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (0)< MQTTClient_connectAll:1910 (0) + +DEBUG: Connected, return code 0 + +DEBUG: Creating topic for federate 1. +LOG: Starting subscribe +MQTT_LOG: 20240520 163716.561 (140737352902464) (0)> MQTTClient_subscribe5:2180 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (1)> MQTTClient_subscribeMany5:2034 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (1) + +MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163716.561 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 + + +MQTT_LOG: 20240520 163716.561 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e40 + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTProtocol_subscribe:394 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTPacket_send_subscribe:235 + +MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 247 ptr 0x555555598f30 + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599030 + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< Socket_writev:773 (43) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.561 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2128 bytes + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.561 4 RTI_1 -> SUBSCRIBE msgid: 1 (0) + +MQTT_LOG: 20240520 163716.561 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 275, heap use now 2112 bytes + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTPacket_send_subscribe:277 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTProtocol_subscribe:396 (0) + +MQTT_LOG: 20240520 163716.561 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163716.561 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 2032 bytes + + +MQTT_LOG: 20240520 163716.561 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 1984 bytes + + +MQTT_LOG: 20240520 163716.561 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.561 Return code 1 from poll + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> isReady:353 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> isReady:353 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.561 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.561 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> MQTTPacket_suback:296 + +MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 297 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 326 ptr 0x555555598ba0 + + +MQTT_LOG: 20240520 163716.561 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598cf0 + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< MQTTPacket_suback:348 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTProtocol_handleSubacks:413 + +MQTT_LOG: 20240520 163716.561 4 RTI_1 <- SUBACK msgid: 1 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTPacket_freeSuback:697 + +MQTT_LOG: 20240520 163716.561 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 366, heap use now 2048 bytes + + +MQTT_LOG: 20240520 163716.561 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 370, heap use now 2032 bytes + + +MQTT_LOG: 20240520 163716.561 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163716.561 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 702, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTPacket_freeSuback:703 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTProtocol_handleSubacks:417 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (1)< MQTTClient_subscribeMany5:2154 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (0)< MQTTClient_subscribe5:2184 (0) + +DEBUG: Subscribed, return code 0 + +LOG: Subscribing on topic Unidentified Federation_fed_1_to_RTI. +LOG: Finished subscribe +LOG: Publishing MSG_TYPE_MQTT_ACCEPT message on topic Unidentified Federation_RTI_to_fed_1. +MQTT_LOG: 20240520 163716.561 (140737352902464) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (2) + +MQTT_LOG: 20240520 163716.561 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555598ba0 + + +MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163716.561 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599130 + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163716.561 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555990a0 + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163716.561 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598f80 + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (8)< Socket_writev:773 (45) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.561 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163716.561 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163716.561 4 RTI_1 -> PUBLISH msgid: 2 qos: 2 retained: 0 rc 0 payload len(3):  + +MQTT_LOG: 20240520 163716.561 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163716.561 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.561 Return code 1 from poll + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.561 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.561 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163716.561 4 RTI_1 <- PUBREC msgid: 2 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991e0 + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599240 + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.561 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.561 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163716.561 4 RTI_1 -> PUBREL msgid: 2 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163716.561 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.561 Return code 1 from poll + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.562 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.562 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.562 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.562 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.562 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163716.562 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.562 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163716.562 4 RTI_1 <- PUBCOMP msgid:2 + +MQTT_LOG: 20240520 163716.562 PUBCOMP received from client RTI_1 for message id 2 - removing publication + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163716.562 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163716.562 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163716.562 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2144 bytes + + +MQTT_LOG: 20240520 163716.562 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163716.562 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163716.562 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1984 bytes + + +MQTT_LOG: 20240520 163716.562 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163716.562 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163716.562 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.562 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.562 Return code 1 from poll + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.562 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.604 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.604 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163716.604 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163716.604 (140737352902464) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163716.604 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163716.604 (140737352902464) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163716.604 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599240 + + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163716.604 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2048 bytes + + +MQTT_LOG: 20240520 163716.604 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163716.604 4 RTI_1 <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(1):  + +MQTT_LOG: 20240520 163716.604 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163716.604 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555990e0 + + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163716.604 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 + + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163716.604 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d30 + + +MQTT_LOG: 20240520 163716.604 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555598b70 + + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163716.604 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598c20 + + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.604 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 + + +MQTT_LOG: 20240520 163716.604 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.604 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.604 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163716.604 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163716.604 4 RTI_1 -> PUBREC msgid: 1 (0) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163716.604 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.604 Return code 1 from poll + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.604 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.604 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.605 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163716.605 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163716.605 4 RTI_1 <- PUBREL msgid 1 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163716.605 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555986f0 + + +MQTT_LOG: 20240520 163716.605 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163716.605 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599060 + + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163716.605 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2336 bytes + + +MQTT_LOG: 20240520 163716.605 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163716.605 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163716.605 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163716.605 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599240 + + +MQTT_LOG: 20240520 163716.605 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.605 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163716.605 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.605 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163716.605 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.605 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2160 bytes + + +MQTT_LOG: 20240520 163716.605 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163716.605 4 RTI_1 -> PUBCOMP msgid 1 (0) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163716.605 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2144 bytes + + +MQTT_LOG: 20240520 163716.605 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.605 Return code 0 from poll + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163716.605 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.605 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.662 (140737352902464) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163716.662 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) + +LOG: RECEIVING message from federateID 1 +MQTT_LOG: 20240520 163716.662 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163716.662 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.662 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.662 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.662 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.662 Return code 0 from poll + +MQTT_LOG: 20240520 163716.662 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.662 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.662 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.662 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.662 (140737352902464) (2)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163716.662 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.662 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.662 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.662 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.662 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.662 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163716.662 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163716.663 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163716.663 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2032 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 1984 bytes + + +MQTT_LOG: 20240520 163716.663 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 1968 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 1 +LOG: Receiving MSG_TYPE_MQTT_ACCEPT_ACK message on topic Unidentified Federation_fed_1_to_RTI. +LOG: RECEIVING message from federateID 1 +MQTT_LOG: 20240520 163716.663 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.663 Return code 1 from poll + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.663 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.663 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163716.663 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163716.663 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x5555555981d0 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163716.663 4 RTI_1 <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(27):  + +MQTT_LOG: 20240520 163716.663 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163716.663 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163716.663 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e40 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163716.663 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e80 + + +MQTT_LOG: 20240520 163716.663 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555598fc0 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598f00 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163716.663 4 RTI_1 -> PUBREC msgid: 2 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163716.663 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.663 Return code 1 from poll + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.663 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.663 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163716.663 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555990e0 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163716.663 4 RTI_1 <- PUBREL msgid 2 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163716.663 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555990a0 + + +MQTT_LOG: 20240520 163716.663 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163716.663 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163716.663 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2384 bytes + + +MQTT_LOG: 20240520 163716.663 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2336 bytes + + +MQTT_LOG: 20240520 163716.663 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163716.663 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163716.663 4 RTI_1 -> PUBCOMP msgid 2 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163716.663 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163716.663 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2144 bytes + + +MQTT_LOG: 20240520 163716.663 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2112 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163716.663 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163716.663 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2032 bytes + + +MQTT_LOG: 20240520 163716.663 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 1 +DEBUG: RTI received federate ID: 1. +DEBUG: RTI received federation ID: Unidentified Federation. +DEBUG: RTI responding with MSG_TYPE_ACK to federate 1. +MQTT_LOG: 20240520 163716.663 (140737352902464) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (3) + +MQTT_LOG: 20240520 163716.663 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163716.663 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x5555555981d0 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163716.663 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163716.663 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163716.663 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163716.663 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555994d0 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x555555599240 + + +MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x555555599180 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (8)< Socket_writev:773 (43) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163716.663 4 RTI_1 -> PUBLISH msgid: 3 qos: 2 retained: 0 rc 0 payload len(1): ÿ + +MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163716.663 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163716.663 (140737352902464) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163716.663 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.663 Return code 1 from poll + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.708 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.708 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163716.708 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163716.708 4 RTI_1 <- PUBREC msgid: 3 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163716.708 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599180 + + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.708 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.708 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.708 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163716.708 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163716.708 4 RTI_1 -> PUBREL msgid: 3 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163716.708 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163716.708 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.708 Return code 1 from poll + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.708 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.708 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163716.708 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163716.708 4 RTI_1 <- PUBCOMP msgid:3 + +MQTT_LOG: 20240520 163716.708 PUBCOMP received from client RTI_1 for message id 3 - removing publication + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163716.708 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163716.709 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163716.709 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163716.709 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2128 bytes + + +MQTT_LOG: 20240520 163716.709 (140737352902464) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163716.709 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163716.709 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163716.709 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 1984 bytes + + +MQTT_LOG: 20240520 163716.709 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163716.709 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.709 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.709 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.709 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.709 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.709 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.709 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.709 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.709 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.709 Return code 0 from poll + +MQTT_LOG: 20240520 163716.709 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.709 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.764 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163716.764 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.764 (140737352902464) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163716.764 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.764 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.764 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.764 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.764 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.764 (140737352902464) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163716.764 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) + +DEBUG: RTI sent MSG_TYPE_ACK to federate 1. +DEBUG: RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate 1. +LOG: RECEIVING message from federateID 1 +MQTT_LOG: 20240520 163716.764 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163716.764 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.764 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.764 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.764 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.764 Return code 1 from poll + +MQTT_LOG: 20240520 163716.764 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.764 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.764 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.764 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.765 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.765 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163716.765 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163716.765 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163716.765 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163716.765 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163716.765 4 RTI_1 <- PUBLISH msgid: 3 qos: 2 retained: 0 payload len(19):  + +MQTT_LOG: 20240520 163716.765 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163716.765 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163716.765 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599060 + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163716.765 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555992e0 + + +MQTT_LOG: 20240520 163716.765 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555598fc0 + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163716.765 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.765 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599000 + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.765 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.765 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163716.765 4 RTI_1 -> PUBREC msgid: 3 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163716.765 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.765 Return code 1 from poll + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.765 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.765 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163716.765 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598f30 + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.765 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163716.765 4 RTI_1 <- PUBREL msgid 3 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163716.765 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599490 + + +MQTT_LOG: 20240520 163716.765 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163716.765 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599400 + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163716.765 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2384 bytes + + +MQTT_LOG: 20240520 163716.765 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2336 bytes + + +MQTT_LOG: 20240520 163716.765 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163716.765 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163716.766 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163716.766 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.766 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598f00 + + +MQTT_LOG: 20240520 163716.766 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.766 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163716.766 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.766 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.766 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163716.766 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.766 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163716.766 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163716.766 4 RTI_1 -> PUBCOMP msgid 3 (0) + +MQTT_LOG: 20240520 163716.766 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163716.766 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163716.766 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163716.766 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.766 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163716.766 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2144 bytes + + +MQTT_LOG: 20240520 163716.766 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2112 bytes + + +MQTT_LOG: 20240520 163716.766 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163716.766 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163716.766 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163716.766 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163716.766 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2032 bytes + + +MQTT_LOG: 20240520 163716.766 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163716.766 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 1 +DEBUG: RTI got 1 upstreams and 0 downstreams from federate 1. +DEBUG: RTI received neighbor structure from federate 1. +DEBUG: RTI waiting for MSG_TYPE_UDP_PORT from federate 1. +LOG: RECEIVING message from federateID 1 +MQTT_LOG: 20240520 163716.766 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.766 Return code 1 from poll + +MQTT_LOG: 20240520 163716.766 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.766 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.766 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.766 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.766 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.766 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.766 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.865 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163716.865 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163716.865 (140737352902464) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163716.865 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x5555555981d0 + + +MQTT_LOG: 20240520 163716.865 (140737352902464) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163716.865 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555598cc0 + + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163716.865 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163716.865 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163716.865 4 RTI_1 <- PUBLISH msgid: 4 qos: 2 retained: 0 payload len(3): þÿÿ + +MQTT_LOG: 20240520 163716.865 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163716.865 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555990e0 + + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163716.865 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599580 + + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163716.865 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598580 + + +MQTT_LOG: 20240520 163716.865 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163716.865 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599030 + + +MQTT_LOG: 20240520 163716.865 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.865 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599000 + + +MQTT_LOG: 20240520 163716.865 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.865 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163716.865 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.865 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163716.865 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163716.865 4 RTI_1 -> PUBREC msgid: 4 (0) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163716.865 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.865 Return code 1 from poll + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.866 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.866 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163716.866 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163716.866 4 RTI_1 <- PUBREL msgid 4 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163716.866 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555994d0 + + +MQTT_LOG: 20240520 163716.866 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163716.866 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d70 + + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163716.866 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163716.866 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163716.866 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163716.866 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163716.866 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598cc0 + + +MQTT_LOG: 20240520 163716.866 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.866 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598f00 + + +MQTT_LOG: 20240520 163716.866 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.866 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163716.866 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.866 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163716.866 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163716.866 4 RTI_1 -> PUBCOMP msgid 4 (0) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163716.866 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163716.866 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163716.866 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2128 bytes + + +MQTT_LOG: 20240520 163716.866 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163716.866 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163716.866 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163716.866 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163716.866 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163716.866 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163716.866 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163716.866 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 1 +DEBUG: RTI got MSG_TYPE_UDP_PORT 65535 from federate 1. +LOG: RECEIVING message from federateID -1 +MQTT_LOG: 20240520 163716.866 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +LOG: RECEIVING message from federateID 1 +MQTT_LOG: 20240520 163716.866 (140737349940800) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163716.866 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.866 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.866 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.866 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.966 Return code 1 from poll + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.966 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.966 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163716.966 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000c40 + + +MQTT_LOG: 20240520 163716.966 (140737349940800) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163716.966 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7ffff0000d60 + + +MQTT_LOG: 20240520 163716.966 (140737349940800) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163716.966 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0000e60 + + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163716.966 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163716.966 (140737349940800) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163716.966 4 RTI_1 <- PUBLISH msgid: 5 qos: 2 retained: 0 payload len(9): œž·®­VÑ + +MQTT_LOG: 20240520 163716.966 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163716.966 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 + + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163716.966 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00010a0 + + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163716.966 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0001190 + + +MQTT_LOG: 20240520 163716.966 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7ffff0001290 + + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163716.966 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001370 + + +MQTT_LOG: 20240520 163716.966 (140737349940800) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.966 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001450 + + +MQTT_LOG: 20240520 163716.966 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.966 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163716.966 (140737349940800) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.966 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163716.966 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163716.966 4 RTI_1 -> PUBREC msgid: 5 (0) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163716.966 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.966 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.966 Return code 1 from poll + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.966 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163716.966 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163716.966 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163716.966 4 RTI_1 <- PUBREL msgid 5 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163716.966 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555993c0 + + +MQTT_LOG: 20240520 163716.966 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163716.966 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 + + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163716.966 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163716.966 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163716.966 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163716.966 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163716.966 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0000e60 + + +MQTT_LOG: 20240520 163716.966 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.966 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0000e30 + + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163716.966 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163716.966 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163716.966 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163716.966 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163716.967 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163716.967 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163716.967 4 RTI_1 -> PUBCOMP msgid 5 (0) + +MQTT_LOG: 20240520 163716.967 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163716.967 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163716.967 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163716.967 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163716.967 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163716.967 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163716.967 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163716.967 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163716.967 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163716.967 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163716.967 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163716.967 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163716.967 Return code 1 from poll + +MQTT_LOG: 20240520 163716.967 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163716.967 (140737349940800) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163716.967 (140737349940800) (2)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163716.967 (140737349940800) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.028 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.028 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163717.028 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000c40 + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163717.028 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7ffff0001300 + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163717.028 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0001450 + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163717.028 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163717.028 3 RTI_RTI <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163717.028 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0001500 + + +MQTT_LOG: 20240520 163717.028 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001570 + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163717.028 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00010a0 + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163717.028 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00012c0 + + +MQTT_LOG: 20240520 163717.028 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7ffff0001670 + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163717.028 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001750 + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.028 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001830 + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.028 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2480 bytes + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.028 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2464 bytes + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163717.028 3 RTI_RTI -> PUBREC msgid: 2 (0) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163717.028 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2448 bytes + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163717.028 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163717.028 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2336 bytes + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163717.028 (140737349940800) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163717.028 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163717.028 (140737349940800) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163717.028 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163717.028 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163717.028 (140737349940800) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 1 +DEBUG: RTI: Received message type 2 from federate 1. +DEBUG: RTI received timestamp message with time: 1716248236965469852. +DEBUG: RTI received timestamp message with time: 1716248236965469852. fro federate 1 +MQTT_LOG: 20240520 163717.028 Return code 1 from poll + +MQTT_LOG: 20240520 163717.028 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.028 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.028 (140737352902464) (2)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163717.028 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.028 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.029 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.029 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163717.029 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff0000fd0 + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163717.029 3 RTI_RTI <- PUBREL msgid 2 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163717.029 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555598d70 + + +MQTT_LOG: 20240520 163717.029 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 + + +MQTT_LOG: 20240520 163717.029 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163717.029 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2352 bytes + + +MQTT_LOG: 20240520 163717.029 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163717.029 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163717.029 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163717.029 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001450 + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.029 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001340 + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.029 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.029 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163717.029 3 RTI_RTI -> PUBCOMP msgid 2 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163717.029 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2160 bytes + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163717.029 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2112 bytes + + +MQTT_LOG: 20240520 163717.029 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163717.029 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2048 bytes + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163717.029 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163717.029 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID -1 +LOG: Received MSG_TYPE_MQTT_JOIN message from federate 0. +DEBUG: Setting up MQTTServer_id for federate 0. +DEBUG: Setup MQTTServer_id for federate 0 as RTI_0. +DEBUG: Creating MQTTClient for federate 0. +MQTT_LOG: 20240520 163717.029 (140737352902464) (0)> MQTTClient_createWithOptions:375 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (2)> UTF8_validate:134 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (2)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163717.029 Allocating 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 438 ptr 0x555555599880 + + +MQTT_LOG: 20240520 163717.029 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7ffff0001340 + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163717.029 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598fc0 + + +MQTT_LOG: 20240520 163717.029 Allocating 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 489 ptr 0x555555599940 + + +MQTT_LOG: 20240520 163717.029 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555981d0 + + +MQTT_LOG: 20240520 163717.029 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163717.029 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163717.029 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555990e0 + + +MQTT_LOG: 20240520 163717.029 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x5555555991e0 + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTPersistence_create:56 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTPersistence_create:104 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTPersistence_initialize:119 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTPersistence_initialize:127 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTPersistence_restoreMessageQueue:877 + +MQTT_LOG: 20240520 163717.029 0 queued messages restored for client RTI_0 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTPersistence_restoreMessageQueue:918 (0) + +MQTT_LOG: 20240520 163717.029 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e80 + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (0)< MQTTClient_createWithOptions:522 (0) + +DEBUG: Connecting MQTTClient for federate 0. +MQTT_LOG: 20240520 163717.029 (140737352902464) (0)> MQTTClient_connectAll:1745 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTClient_connectURI:1504 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (2)> MQTTClient_connectURIVersion:1209 + +MQTT_LOG: 20240520 163717.029 Connecting to serverURI 127.0.0.1:1883 with MQTT version 4 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> MQTTProtocol_connect:227 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (4)> MQTTProtocol_addressPort:63 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (4)< MQTTProtocol_addressPort:101 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (4)> Socket_new:1072 + +MQTT_LOG: 20240520 163717.029 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1082 ptr 0x555555599a90 + + +MQTT_LOG: 20240520 163717.029 New socket 5 for 127.0.0.1:1883, port 1883 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> Socket_addSocket:272 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> Socket_setnonblocking:95 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< Socket_setnonblocking:100 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< Socket_addSocket:314 (0) + +MQTT_LOG: 20240520 163717.029 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1200 ptr 0x5555555978a0 + + +MQTT_LOG: 20240520 163717.029 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599b70 + + +MQTT_LOG: 20240520 163717.029 Connect pending + +MQTT_LOG: 20240520 163717.029 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1233, heap use now 2784 bytes + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (4)< Socket_new:1235 (115) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< MQTTProtocol_connect:355 (115) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.029 Return code 0 from poll + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163717.029 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2800 bytes + + +MQTT_LOG: 20240520 163717.029 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2784 bytes + + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (3)> MQTTPacket_send_connect:55 + +MQTT_LOG: 20240520 163717.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 73 ptr 0x555555597d60 + + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597980 + + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (7)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (7)< Socket_writev:773 (19) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.130 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2800 bytes + + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.130 5 RTI_0 -> CONNECT version 4 clean: 1 (0) + +MQTT_LOG: 20240520 163717.130 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 127, heap use now 2784 bytes + + +MQTT_LOG: 20240520 163717.130 (140737352902464) (3)< MQTTPacket_send_connect:129 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (3)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.130 Return code 1 from poll + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.130 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.130 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> MQTTPacket_connack:148 + +MQTT_LOG: 20240520 163717.130 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 149 ptr 0x555555599130 + + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< MQTTPacket_connack:176 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163717.130 5 RTI_0 <- CONNACK rc: 0 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (3)> MQTTClient_cleanSession:1131 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> MQTTPersistence_clear:170 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTPersistence_clear:174 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> MQTTClient_emptyMessageQueue:557 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTClient_emptyMessageQueue:572 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (3)< MQTTClient_cleanSession:1139 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (3)> MQTTPacket_freeConnack:187 + +MQTT_LOG: 20240520 163717.130 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 190, heap use now 2800 bytes + + +MQTT_LOG: 20240520 163717.130 (140737352902464) (3)< MQTTPacket_freeConnack:191 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (2)< MQTTClient_connectURIVersion:1477 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (1)< MQTTClient_connectURI:1702 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (0)< MQTTClient_connectAll:1910 (0) + +DEBUG: Connected, return code 0 + +DEBUG: Creating topic for federate 0. +LOG: Starting subscribe +MQTT_LOG: 20240520 163717.130 (140737352902464) (0)> MQTTClient_subscribe5:2180 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (1)> MQTTClient_subscribeMany5:2034 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (1) + +MQTT_LOG: 20240520 163717.130 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555599130 + + +MQTT_LOG: 20240520 163717.130 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163717.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599580 + + +MQTT_LOG: 20240520 163717.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599cb0 + + +MQTT_LOG: 20240520 163717.130 (140737352902464) (2)> MQTTProtocol_subscribe:394 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (3)> MQTTPacket_send_subscribe:235 + +MQTT_LOG: 20240520 163717.130 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 247 ptr 0x555555599d70 + + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599e40 + + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (7)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (7)< Socket_writev:773 (43) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.130 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2976 bytes + + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.130 5 RTI_0 -> SUBSCRIBE msgid: 1 (0) + +MQTT_LOG: 20240520 163717.130 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 275, heap use now 2960 bytes + + +MQTT_LOG: 20240520 163717.130 (140737352902464) (3)< MQTTPacket_send_subscribe:277 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (2)< MQTTProtocol_subscribe:396 (0) + +MQTT_LOG: 20240520 163717.130 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 2912 bytes + + +MQTT_LOG: 20240520 163717.130 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 2880 bytes + + +MQTT_LOG: 20240520 163717.130 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163717.130 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 2800 bytes + + +MQTT_LOG: 20240520 163717.130 (140737352902464) (2)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (3)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.130 Return code 1 from poll + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> isReady:353 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> isReady:353 + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> isReady:353 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.131 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.131 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> MQTTPacket_suback:296 + +MQTT_LOG: 20240520 163717.131 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 297 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163717.131 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555599130 + + +MQTT_LOG: 20240520 163717.131 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 326 ptr 0x555555597c30 + + +MQTT_LOG: 20240520 163717.131 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598f80 + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< MQTTPacket_suback:348 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (2)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (2)> MQTTProtocol_handleSubacks:413 + +MQTT_LOG: 20240520 163717.131 5 RTI_0 <- SUBACK msgid: 1 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> MQTTPacket_freeSuback:697 + +MQTT_LOG: 20240520 163717.131 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 366, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163717.131 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 370, heap use now 2880 bytes + + +MQTT_LOG: 20240520 163717.131 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2848 bytes + + +MQTT_LOG: 20240520 163717.131 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 702, heap use now 2800 bytes + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< MQTTPacket_freeSuback:703 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (2)< MQTTProtocol_handleSubacks:417 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (1)< MQTTClient_subscribeMany5:2154 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (0)< MQTTClient_subscribe5:2184 (0) + +DEBUG: Subscribed, return code 0 + +LOG: Subscribing on topic Unidentified Federation_fed_0_to_RTI. +LOG: Finished subscribe +LOG: Publishing MSG_TYPE_MQTT_ACCEPT message on topic Unidentified Federation_RTI_to_fed_0. +MQTT_LOG: 20240520 163717.131 (140737352902464) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (2) + +MQTT_LOG: 20240520 163717.131 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7ffff0001500 + + +MQTT_LOG: 20240520 163717.131 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555597c30 + + +MQTT_LOG: 20240520 163717.131 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555599130 + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163717.131 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163717.131 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599f40 + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163717.131 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599eb0 + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163717.131 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599dc0 + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163717.131 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x55555559a020 + + +MQTT_LOG: 20240520 163717.131 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x55555559a0c0 + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.131 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x55555559a1a0 + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (8)< Socket_writev:773 (45) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.131 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163717.131 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163717.131 5 RTI_0 -> PUBLISH msgid: 2 qos: 2 retained: 0 rc 0 payload len(3):  + +MQTT_LOG: 20240520 163717.131 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163717.131 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.131 Return code 1 from poll + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.131 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.131 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163717.131 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a250 + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163717.131 5 RTI_0 <- PUBREC msgid: 2 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163717.131 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599ff0 + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.131 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a050 + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.131 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.131 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3072 bytes + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163717.131 5 RTI_0 -> PUBREL msgid: 2 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163717.131 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3056 bytes + + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.131 Return code 1 from poll + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.132 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.132 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.132 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.132 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.132 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163717.132 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a250 + + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.132 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163717.132 5 RTI_0 <- PUBCOMP msgid:2 + +MQTT_LOG: 20240520 163717.132 PUBCOMP received from client RTI_0 for message id 2 - removing publication + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163717.132 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3056 bytes + + +MQTT_LOG: 20240520 163717.132 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163717.132 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163717.132 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163717.132 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2912 bytes + + +MQTT_LOG: 20240520 163717.132 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163717.132 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2800 bytes + + +MQTT_LOG: 20240520 163717.132 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163717.132 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.132 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.132 Return code 1 from poll + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.176 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.176 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163717.176 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163717.176 (140737352902464) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163717.176 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559a250 + + +MQTT_LOG: 20240520 163717.176 (140737352902464) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163717.176 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a050 + + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163717.176 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163717.176 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163717.176 5 RTI_0 <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(1):  + +MQTT_LOG: 20240520 163717.176 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0001500 + + +MQTT_LOG: 20240520 163717.176 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599ef0 + + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163717.176 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599cf0 + + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163717.176 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a0f0 + + +MQTT_LOG: 20240520 163717.176 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555597700 + + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163717.176 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555597980 + + +MQTT_LOG: 20240520 163717.176 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.176 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599f90 + + +MQTT_LOG: 20240520 163717.176 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.176 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163717.176 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.176 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163717.176 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163717.176 5 RTI_0 -> PUBREC msgid: 1 (0) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163717.176 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.176 Return code 1 from poll + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.176 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.176 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.177 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.177 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163717.177 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163717.177 5 RTI_0 <- PUBREL msgid 1 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163717.177 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599e00 + + +MQTT_LOG: 20240520 163717.177 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 + + +MQTT_LOG: 20240520 163717.177 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599b70 + + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163717.177 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163717.177 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163717.177 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163717.177 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163717.177 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a050 + + +MQTT_LOG: 20240520 163717.177 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.177 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a020 + + +MQTT_LOG: 20240520 163717.177 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.177 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163717.177 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.177 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163717.177 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163717.177 5 RTI_0 -> PUBCOMP msgid 1 (0) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163717.177 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163717.177 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.177 Return code 0 from poll + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.232 (140737352902464) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163717.232 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.232 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.232 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.232 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.232 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.232 (140737352902464) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163717.232 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) + +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163717.232 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163717.232 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.232 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.232 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.232 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.232 Return code 0 from poll + +MQTT_LOG: 20240520 163717.232 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.232 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.232 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.232 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.232 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.232 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (2)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163717.233 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163717.233 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2912 bytes + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163717.233 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2880 bytes + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163717.233 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163717.233 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +LOG: Receiving MSG_TYPE_MQTT_ACCEPT_ACK message on topic Unidentified Federation_fed_0_to_RTI. +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163717.233 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.233 Return code 1 from poll + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.233 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.233 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163717.233 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0001500 + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163717.233 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599130 + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163717.233 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a0c0 + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163717.233 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163717.233 5 RTI_0 <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(27):  + +MQTT_LOG: 20240520 163717.233 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163717.233 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599d70 + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163717.233 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598580 + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163717.233 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599b70 + + +MQTT_LOG: 20240520 163717.233 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555597d60 + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163717.233 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599a90 + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.233 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599f90 + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.233 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.233 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163717.233 5 RTI_0 -> PUBREC msgid: 2 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163717.233 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.233 Return code 1 from poll + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.233 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.233 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.234 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163717.234 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599f40 + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163717.234 5 RTI_0 <- PUBREL msgid 2 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163717.234 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559a130 + + +MQTT_LOG: 20240520 163717.234 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 + + +MQTT_LOG: 20240520 163717.234 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599e00 + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163717.234 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3200 bytes + + +MQTT_LOG: 20240520 163717.234 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3152 bytes + + +MQTT_LOG: 20240520 163717.234 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163717.234 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163717.234 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a0c0 + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.234 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a020 + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.234 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.234 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163717.234 5 RTI_0 -> PUBCOMP msgid 2 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163717.234 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163717.234 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2960 bytes + + +MQTT_LOG: 20240520 163717.234 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2928 bytes + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163717.234 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163717.234 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2848 bytes + + +MQTT_LOG: 20240520 163717.234 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI received federate ID: 0. +DEBUG: RTI received federation ID: Unidentified Federation. +DEBUG: RTI responding with MSG_TYPE_ACK to federate 0. +MQTT_LOG: 20240520 163717.234 (140737352902464) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (3) + +MQTT_LOG: 20240520 163717.234 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163717.234 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x55555559a020 + + +MQTT_LOG: 20240520 163717.234 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555599130 + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163717.234 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7ffff0001500 + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163717.234 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599d70 + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163717.234 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599e00 + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163717.234 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555597730 + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163717.234 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x55555559a050 + + +MQTT_LOG: 20240520 163717.234 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x555555599f90 + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.234 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x55555559a1a0 + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (8)< Socket_writev:773 (43) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.234 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163717.234 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163717.234 5 RTI_0 -> PUBLISH msgid: 3 qos: 2 retained: 0 rc 0 payload len(1): ÿ + +MQTT_LOG: 20240520 163717.234 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163717.234 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163717.234 (140737352902464) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.234 Return code 1 from poll + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.276 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.276 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163717.276 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163717.276 5 RTI_0 <- PUBREC msgid: 3 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163717.276 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599f90 + + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.276 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a1a0 + + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.276 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.276 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3072 bytes + + +MQTT_LOG: 20240520 163717.276 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163717.276 5 RTI_0 -> PUBREL msgid: 3 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163717.276 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3056 bytes + + +MQTT_LOG: 20240520 163717.276 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.276 Return code 1 from poll + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.276 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.276 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163717.276 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163717.276 5 RTI_0 <- PUBCOMP msgid:3 + +MQTT_LOG: 20240520 163717.276 PUBCOMP received from client RTI_0 for message id 3 - removing publication + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163717.276 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3056 bytes + + +MQTT_LOG: 20240520 163717.276 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163717.276 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163717.276 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163717.276 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2912 bytes + + +MQTT_LOG: 20240520 163717.276 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163717.276 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2800 bytes + + +MQTT_LOG: 20240520 163717.276 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.276 Return code 1 from poll + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.335 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.335 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163717.335 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0001500 + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163717.335 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163717.335 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a1a0 + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163717.335 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163717.335 5 RTI_0 <- PUBLISH msgid: 3 qos: 2 retained: 0 payload len(11):  + +MQTT_LOG: 20240520 163717.335 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163717.335 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a250 + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163717.335 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599490 + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163717.335 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599cb0 + + +MQTT_LOG: 20240520 163717.335 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a050 + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163717.335 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a020 + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.335 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597700 + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.335 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.335 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163717.335 5 RTI_0 -> PUBREC msgid: 3 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163717.335 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) + +DEBUG: RTI sent MSG_TYPE_ACK to federate 0. +DEBUG: RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate 0. +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163717.335 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.335 Return code 1 from poll + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.335 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.335 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163717.335 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599ef0 + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163717.335 5 RTI_0 <- PUBREL msgid 3 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163717.335 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555986f0 + + +MQTT_LOG: 20240520 163717.335 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 + + +MQTT_LOG: 20240520 163717.335 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598f80 + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163717.335 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163717.335 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163717.335 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163717.335 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163717.335 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a1a0 + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.335 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599a90 + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.335 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.335 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163717.335 5 RTI_0 -> PUBCOMP msgid 3 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163717.335 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163717.335 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163717.335 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2912 bytes + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163717.335 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2880 bytes + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163717.335 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163717.335 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes + + +MQTT_LOG: 20240520 163717.335 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI got 0 upstreams and 1 downstreams from federate 0. +DEBUG: RTI received neighbor structure from federate 0. +DEBUG: RTI waiting for MSG_TYPE_UDP_PORT from federate 0. +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163717.335 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.335 Return code 1 from poll + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.335 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.435 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.435 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163717.435 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163717.435 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599130 + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163717.435 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599b40 + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163717.435 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163717.435 5 RTI_0 <- PUBLISH msgid: 4 qos: 2 retained: 0 payload len(3): þÿÿ + +MQTT_LOG: 20240520 163717.435 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0001500 + + +MQTT_LOG: 20240520 163717.435 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599f40 + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163717.435 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599400 + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163717.435 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598f80 + + +MQTT_LOG: 20240520 163717.435 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555597700 + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163717.435 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a020 + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.435 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.435 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.435 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163717.435 5 RTI_0 -> PUBREC msgid: 4 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163717.435 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.435 Return code 1 from poll + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.435 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.435 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163717.435 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599d70 + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163717.435 5 RTI_0 <- PUBREL msgid 4 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163717.435 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555597d60 + + +MQTT_LOG: 20240520 163717.435 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 + + +MQTT_LOG: 20240520 163717.435 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555986f0 + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163717.435 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163717.435 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163717.435 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163717.435 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163717.435 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599b40 + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.435 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599a90 + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.435 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.435 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163717.435 5 RTI_0 -> PUBCOMP msgid 4 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163717.435 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163717.435 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163717.435 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2912 bytes + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163717.435 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163717.435 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2880 bytes + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163717.435 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163717.435 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163717.435 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes + + +MQTT_LOG: 20240520 163717.435 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI got MSG_TYPE_UDP_PORT 65535 from federate 0. +DEBUG: All federates have connected to RTI. +RTI: All expected federates have connected. Starting execution. +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163717.435 (140737341548096) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163717.436 (140737341548096) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.436 (140737341548096) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.436 (140737341548096) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.436 (140737341548096) (3)< Socket_continueWrites:1453 (0) + +LOG: RECEIVING message from federateID -1 +MQTT_LOG: 20240520 163717.436 (140737333155392) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163717.436 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.436 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.436 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.436 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +RTI: Waiting for thread handling federate 0. +MQTT_LOG: 20240520 163717.436 Return code 1 from poll + +MQTT_LOG: 20240520 163717.436 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.436 (140737341548096) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.436 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.436 (140737341548096) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.436 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.436 (140737341548096) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.436 (140737341548096) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.436 (140737341548096) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.436 (140737341548096) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.436 (140737341548096) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.536 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.536 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163717.536 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7fffe8000c40 + + +MQTT_LOG: 20240520 163717.536 (140737341548096) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163717.536 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffe8000d60 + + +MQTT_LOG: 20240520 163717.536 (140737341548096) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163717.536 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffe8000e60 + + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163717.536 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163717.536 (140737341548096) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163717.536 5 RTI_0 <- PUBLISH msgid: 5 qos: 2 retained: 0 payload len(9): ‘K¯Ð­VÑ + +MQTT_LOG: 20240520 163717.536 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffe8000f60 + + +MQTT_LOG: 20240520 163717.536 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe8001020 + + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163717.536 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80010a0 + + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163717.536 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001190 + + +MQTT_LOG: 20240520 163717.536 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffe8001290 + + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163717.536 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8001370 + + +MQTT_LOG: 20240520 163717.536 (140737341548096) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.536 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001450 + + +MQTT_LOG: 20240520 163717.536 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.536 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163717.536 (140737341548096) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.536 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163717.536 (140737341548096) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163717.536 5 RTI_0 -> PUBREC msgid: 5 (0) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163717.536 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.536 (140737341548096) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.536 Return code 1 from poll + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.536 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163717.536 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163717.536 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec000d30 + + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163717.536 5 RTI_0 <- PUBREL msgid 5 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163717.536 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffec000e30 + + +MQTT_LOG: 20240520 163717.536 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec000c60 + + +MQTT_LOG: 20240520 163717.536 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000fd0 + + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163717.536 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163717.536 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163717.536 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163717.536 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163717.536 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8000e60 + + +MQTT_LOG: 20240520 163717.536 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.536 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8000e30 + + +MQTT_LOG: 20240520 163717.536 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163717.536 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163717.536 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163717.536 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163717.536 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163717.536 5 RTI_0 -> PUBCOMP msgid 5 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163717.536 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163717.536 (140737333155392) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163717.536 Return code 1 from poll + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163717.536 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163717.536 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.582 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.582 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.582 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.582 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.582 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.582 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.582 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.582 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163719.582 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163719.582 (140737333155392) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163719.582 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7fffe8000f60 + + +MQTT_LOG: 20240520 163719.582 (140737333155392) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163719.582 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffec000d30 + + +MQTT_LOG: 20240520 163719.582 (140737333155392) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163719.582 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffe8000e30 + + +MQTT_LOG: 20240520 163719.582 (140737333155392) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.582 (140737333155392) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163719.582 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163719.582 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163719.582 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163719.582 5 RTI_0 <- PUBLISH msgid: 6 qos: 2 retained: 0 payload len(1):  + +MQTT_LOG: 20240520 163719.582 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffec001090 + + +MQTT_LOG: 20240520 163719.582 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe8000fd0 + + +MQTT_LOG: 20240520 163719.582 (140737333155392) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163719.582 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000d80 + + +MQTT_LOG: 20240520 163719.582 (140737333155392) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163719.582 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001170 + + +MQTT_LOG: 20240520 163719.582 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec001270 + + +MQTT_LOG: 20240520 163719.582 (140737333155392) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163719.582 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001350 + + +MQTT_LOG: 20240520 163719.582 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.582 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001430 + + +MQTT_LOG: 20240520 163719.582 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.582 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.582 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163719.583 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.583 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3312 bytes + + +MQTT_LOG: 20240520 163719.583 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3296 bytes + + +MQTT_LOG: 20240520 163719.583 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163719.583 5 RTI_0 -> PUBREC msgid: 6 (0) + +MQTT_LOG: 20240520 163719.583 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163719.583 (140737333155392) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163719.583 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163719.583 (140737333155392) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163719.583 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (3)> MQTTProtocol_keepalive:704 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (3)< MQTTProtocol_keepalive:781 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (4)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (4)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (4)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (4)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (4)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (4)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.583 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.583 Return code 1 from poll + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.583 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.583 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163719.583 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001500 + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163719.583 5 RTI_0 <- PUBREL msgid 6 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.583 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163719.583 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffe8001300 + + +MQTT_LOG: 20240520 163719.583 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffe8000b70 + + +MQTT_LOG: 20240520 163719.583 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80012c0 + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163719.583 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3376 bytes + + +MQTT_LOG: 20240520 163719.583 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3328 bytes + + +MQTT_LOG: 20240520 163719.583 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3296 bytes + + +MQTT_LOG: 20240520 163719.583 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3216 bytes + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8000e30 + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001160 + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3216 bytes + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3200 bytes + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163719.583 5 RTI_0 -> PUBCOMP msgid 6 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163719.583 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163719.583 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163719.583 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163719.583 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 3072 bytes + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163719.583 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI: Received message type 2 from federate 0. +DEBUG: RTI received timestamp message with time: 1716248237535349649. +DEBUG: RTI received timestamp message with time: 1716248237535349649. fro federate 0 +MQTT_LOG: 20240520 163719.583 (140737341548096) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< MQTTProtocol_assignMsgId:104 (4) + +MQTT_LOG: 20240520 163719.583 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7fffec001090 + + +MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7fffe8000e30 + + +MQTT_LOG: 20240520 163719.583 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffe8000d60 + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163719.583 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7fffe8000c40 + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163719.583 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe8000fd0 + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163719.583 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8000db0 + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163719.583 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8000cb0 + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7fffe8001210 + + +MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7fffe8001720 + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7fffe8001800 + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (8)< Socket_writev:773 (51) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3328 bytes + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3312 bytes + + +MQTT_LOG: 20240520 163719.583 5 RTI_0 -> PUBLISH msgid: 4 qos: 2 retained: 0 rc 0 payload len(9): ‘J ®VÑ + +MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3296 bytes + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163719.583 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163719.583 (140737341548096) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163719.583 (140737341548096) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.583 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.583 (140737349940800) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163719.583 (140737349940800) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163719.583 (140737349940800) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (2)< MQTTProtocol_assignMsgId:104 (4) + +MQTT_LOG: 20240520 163719.583 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7ffff0000c40 + + +MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7ffff0000c10 + + +MQTT_LOG: 20240520 163719.583 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7ffff0000d60 + + +MQTT_LOG: 20240520 163719.583 (140737349940800) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163719.583 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7ffff00018e0 + + +MQTT_LOG: 20240520 163719.583 (140737349940800) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163719.583 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0000f10 + + +MQTT_LOG: 20240520 163719.583 (140737349940800) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163719.583 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00012c0 + + +MQTT_LOG: 20240520 163719.583 (140737349940800) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163719.583 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00013a0 + + +MQTT_LOG: 20240520 163719.583 (140737349940800) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7ffff0000e60 + + +MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7ffff0001070 + + +MQTT_LOG: 20240520 163719.583 (140737349940800) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7ffff00015f0 + + +MQTT_LOG: 20240520 163719.583 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.583 (140737349940800) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163719.583 (140737349940800) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (8)< Socket_writev:773 (51) + +MQTT_LOG: 20240520 163719.583 (140737349940800) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.583 (140737349940800) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3584 bytes + + +MQTT_LOG: 20240520 163719.583 (140737349940800) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3568 bytes + + +MQTT_LOG: 20240520 163719.583 4 RTI_1 -> PUBLISH msgid: 4 qos: 2 retained: 0 rc 0 payload len(9): ‘J ®VÑ + +MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3552 bytes + + +MQTT_LOG: 20240520 163719.583 (140737349940800) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163719.583 (140737349940800) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163719.583 (140737349940800) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163719.583 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3536 bytes + + +MQTT_LOG: 20240520 163719.583 (140737349940800) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163719.583 (140737349940800) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163719.583 (140737349940800) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.583 (140737349940800) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.583 Return code 1 from poll + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.584 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.584 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163719.584 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff0000fd0 + + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163719.584 4 RTI_1 <- PUBREC msgid: 4 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163719.584 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001070 + + +MQTT_LOG: 20240520 163719.584 (140737349940800) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.584 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff00015f0 + + +MQTT_LOG: 20240520 163719.584 (140737349940800) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.584 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3536 bytes + + +MQTT_LOG: 20240520 163719.584 (140737349940800) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163719.584 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3520 bytes + + +MQTT_LOG: 20240520 163719.584 (140737349940800) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163719.584 4 RTI_1 -> PUBREL msgid: 4 (0) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163719.584 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3504 bytes + + +MQTT_LOG: 20240520 163719.584 (140737349940800) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.584 (140737349940800) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.584 (140737349940800) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.584 Return code 1 from poll + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.584 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.584 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163719.584 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001020 + + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163719.584 4 RTI_1 <- PUBCOMP msgid:4 + +MQTT_LOG: 20240520 163719.584 PUBCOMP received from client RTI_1 for message id 4 - removing publication + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163719.584 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3504 bytes + + +MQTT_LOG: 20240520 163719.584 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3488 bytes + + +MQTT_LOG: 20240520 163719.584 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3440 bytes + + +MQTT_LOG: 20240520 163719.584 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3392 bytes + + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163719.584 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3360 bytes + + +MQTT_LOG: 20240520 163719.584 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163719.584 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 3248 bytes + + +MQTT_LOG: 20240520 163719.584 (140737341548096) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.584 Return code 1 from poll + +MQTT_LOG: 20240520 163719.584 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.584 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.585 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.585 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.585 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.585 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.585 (140737333155392) (2)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163719.585 (140737333155392) (2)> MQTTTime_sleep:29 + +MQTT_LOG: 20240520 163719.585 (140737349940800) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.585 (140737349940800) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.585 Return code 1 from poll + +MQTT_LOG: 20240520 163719.585 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.585 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.585 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.585 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.585 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.585 (140737349940800) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.585 (140737349940800) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163719.585 (140737349940800) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.585 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.585 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.585 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.628 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.628 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163719.628 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff0000fd0 + + +MQTT_LOG: 20240520 163719.628 (140737349940800) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163719.628 5 RTI_0 <- PUBREC msgid: 4 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163719.628 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001290 + + +MQTT_LOG: 20240520 163719.628 (140737349940800) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.628 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001160 + + +MQTT_LOG: 20240520 163719.628 (140737349940800) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.628 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163719.628 (140737349940800) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163719.628 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3264 bytes + + +MQTT_LOG: 20240520 163719.628 (140737349940800) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163719.628 5 RTI_0 -> PUBREL msgid: 4 (0) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163719.628 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3248 bytes + + +MQTT_LOG: 20240520 163719.628 (140737349940800) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.628 (140737349940800) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.628 (140737349940800) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.628 Return code 1 from poll + +MQTT_LOG: 20240520 163719.628 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.628 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.628 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.628 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.628 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.628 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.628 (140737341548096) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163719.628 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.628 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.628 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.628 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.628 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.628 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.628 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163719.628 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.628 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.629 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163719.629 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001020 + + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163719.629 5 RTI_0 <- PUBCOMP msgid:4 + +MQTT_LOG: 20240520 163719.629 PUBCOMP received from client RTI_0 for message id 4 - removing publication + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163719.629 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3248 bytes + + +MQTT_LOG: 20240520 163719.629 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3232 bytes + + +MQTT_LOG: 20240520 163719.629 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163719.629 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163719.629 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163719.629 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163719.629 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163719.629 (140737341548096) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.629 Return code 1 from poll + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.629 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.629 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163719.629 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000c40 + + +MQTT_LOG: 20240520 163719.629 (140737349940800) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163719.629 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7ffff0000fd0 + + +MQTT_LOG: 20240520 163719.629 (140737349940800) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163719.629 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0001160 + + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163719.629 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163719.629 (140737349940800) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163719.629 4 RTI_1 <- PUBLISH msgid: 6 qos: 2 retained: 0 payload len(13): ‘J ®VÑ + +MQTT_LOG: 20240520 163719.629 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff00019a0 + + +MQTT_LOG: 20240520 163719.629 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001a60 + + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163719.629 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00016e0 + + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163719.629 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00013e0 + + +MQTT_LOG: 20240520 163719.629 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7ffff0000e30 + + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163719.629 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001210 + + +MQTT_LOG: 20240520 163719.629 (140737349940800) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.629 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001750 + + +MQTT_LOG: 20240520 163719.629 (140737349940800) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.629 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3312 bytes + + +MQTT_LOG: 20240520 163719.629 (140737349940800) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163719.629 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3296 bytes + + +MQTT_LOG: 20240520 163719.629 (140737349940800) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163719.629 4 RTI_1 -> PUBREC msgid: 6 (0) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163719.629 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.629 Return code 1 from poll + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.629 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.629 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.629 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.630 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163719.630 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8000d60 + + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (3)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163719.630 4 RTI_1 <- PUBREL msgid 6 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163719.630 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffe80016e0 + + +MQTT_LOG: 20240520 163719.630 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec000c60 + + +MQTT_LOG: 20240520 163719.630 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001630 + + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163719.630 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3376 bytes + + +MQTT_LOG: 20240520 163719.630 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3328 bytes + + +MQTT_LOG: 20240520 163719.630 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3296 bytes + + +MQTT_LOG: 20240520 163719.630 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3216 bytes + + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163719.630 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001160 + + +MQTT_LOG: 20240520 163719.630 (140737341548096) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.630 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001070 + + +MQTT_LOG: 20240520 163719.630 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.630 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3216 bytes + + +MQTT_LOG: 20240520 163719.630 (140737341548096) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163719.630 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3200 bytes + + +MQTT_LOG: 20240520 163719.630 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163719.630 4 RTI_1 -> PUBCOMP msgid 6 (0) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163719.630 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163719.630 (140737341548096) (3)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.630 Return code 1 from poll + +MQTT_LOG: 20240520 163719.630 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.630 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.630 (140737349940800) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163719.630 (140737349940800) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.630 (140737349940800) (6)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163719.630 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0001190 + + +MQTT_LOG: 20240520 163719.630 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7ffff0001950 + + +MQTT_LOG: 20240520 163719.630 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7ffff0001b00 + + +MQTT_LOG: 20240520 163719.630 (140737349940800) (6)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (5)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163719.630 (140737349940800) (4)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163719.630 (140737349940800) (3)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163719.630 (140737349940800) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.630 (140737349940800) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.630 (140737349940800) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.630 (140737349940800) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.630 Return code 0 from poll + +MQTT_LOG: 20240520 163719.684 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.684 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.684 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.684 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.684 (140737349940800) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.684 (140737349940800) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.684 (140737349940800) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163719.684 (140737349940800) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.684 (140737349940800) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.684 (140737349940800) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.684 (140737349940800) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.684 (140737349940800) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.684 (140737349940800) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163719.684 (140737349940800) (0)< MQTTClient_waitForCompletion:2903 (0) + +LOG: RTI sent start time 1716248238535349649 to federate 1. +LOG: RECEIVING message from federateID 1 +MQTT_LOG: 20240520 163719.684 (140737349940800) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163719.684 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.684 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.684 Return code 0 from poll + +MQTT_LOG: 20240520 163719.684 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.684 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (0)< MQTTClient_waitForCompletion:2903 (0) + +LOG: RTI sent start time 1716248238535349649 to federate 0. +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163719.685 (140737341548096) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.685 (140737333155392) (2)< MQTTTime_sleep:35 + +MQTT_LOG: 20240520 163719.685 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.685 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.685 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.685 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.685 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.685 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.685 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.685 Return code 0 from poll + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (2)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163719.685 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4224 bytes + + +MQTT_LOG: 20240520 163719.685 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4192 bytes + + +MQTT_LOG: 20240520 163719.685 (140737341548096) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163719.685 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 4160 bytes + + +MQTT_LOG: 20240520 163719.685 (140737341548096) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163719.685 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 4112 bytes + + +MQTT_LOG: 20240520 163719.685 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 4096 bytes + + +MQTT_LOG: 20240520 163719.685 (140737341548096) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI: Received message type 25 from federate 0. +ERROR: RTI: Federate 0 reports an error and has exited. +MQTT_LOG: 20240520 163719.685 (140737341548096) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (2)< MQTTProtocol_assignMsgId:104 (5) + +MQTT_LOG: 20240520 163719.685 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7ffff00019a0 + + +MQTT_LOG: 20240520 163719.685 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7ffff0001070 + + +MQTT_LOG: 20240520 163719.685 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffe8001240 + + +MQTT_LOG: 20240520 163719.685 (140737341548096) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163719.685 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7fffe8000c40 + + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163719.685 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001570 + + +MQTT_LOG: 20240520 163719.685 (140737341548096) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163719.685 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001300 + + +MQTT_LOG: 20240520 163719.685 (140737341548096) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163719.685 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80012c0 + + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163719.685 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7fffe8001160 + + +MQTT_LOG: 20240520 163719.685 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7fffe8000c10 + + +MQTT_LOG: 20240520 163719.685 (140737341548096) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.685 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7fffe8001450 + + +MQTT_LOG: 20240520 163719.685 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (8)< Socket_writev:773 (43) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.685 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 4416 bytes + + +MQTT_LOG: 20240520 163719.685 (140737341548096) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163719.685 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 4400 bytes + + +MQTT_LOG: 20240520 163719.685 5 RTI_0 -> PUBLISH msgid: 5 qos: 2 retained: 0 rc 0 payload len(1): X + +MQTT_LOG: 20240520 163719.685 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 4384 bytes + + +MQTT_LOG: 20240520 163719.685 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.685 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163719.685 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 4368 bytes + + +MQTT_LOG: 20240520 163719.685 (140737341548096) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163719.685 (140737341548096) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.685 Return code 1 from poll + +MQTT_LOG: 20240520 163719.685 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.685 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.685 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.685 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.685 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.685 (140737349940800) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.685 (140737349940800) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163719.685 (140737349940800) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.685 (140737349940800) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.685 (140737349940800) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.686 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.686 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (3)< WebSocket_getdata:751 (-268428536) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163719.686 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff0001a60 + + +MQTT_LOG: 20240520 163719.686 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.686 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (2)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163719.686 5 RTI_0 <- PUBREC msgid: 5 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (3)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163719.686 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001800 + + +MQTT_LOG: 20240520 163719.686 (140737349940800) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.686 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001160 + + +MQTT_LOG: 20240520 163719.686 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.686 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3376 bytes + + +MQTT_LOG: 20240520 163719.686 (140737349940800) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163719.686 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3360 bytes + + +MQTT_LOG: 20240520 163719.686 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163719.686 5 RTI_0 -> PUBREL msgid: 5 (0) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (3)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163719.686 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3344 bytes + + +MQTT_LOG: 20240520 163719.686 (140737349940800) (2)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163719.686 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3296 bytes + + +MQTT_LOG: 20240520 163719.686 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3264 bytes + + +MQTT_LOG: 20240520 163719.686 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163719.686 (140737349940800) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163719.686 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 3232 bytes + + +MQTT_LOG: 20240520 163719.686 (140737349940800) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163719.686 (140737349940800) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163719.686 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163719.686 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 3168 bytes + + +MQTT_LOG: 20240520 163719.686 (140737349940800) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 1 +DEBUG: RTI: Received message type 6 from federate 1. +MQTT_LOG: 20240520 163719.686 Return code 1 from poll + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.686 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.686 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< WebSocket_getdata:751 (-268428536) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163719.686 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001220 + + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (2)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163719.686 5 RTI_0 <- PUBCOMP msgid:5 + +MQTT_LOG: 20240520 163719.686 PUBCOMP received from client RTI_0 for message id 5 - removing publication + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163719.686 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3152 bytes + + +MQTT_LOG: 20240520 163719.686 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163719.686 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163719.686 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3040 bytes + + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163719.686 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163719.686 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2928 bytes + + +MQTT_LOG: 20240520 163719.686 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2896 bytes + + +MQTT_LOG: 20240520 163719.686 (140737333155392) (2)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.686 Return code 1 from poll + +MQTT_LOG: 20240520 163719.686 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.686 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.686 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.686 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.686 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.686 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.686 (140737341548096) (3)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163719.686 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.686 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.686 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.686 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.686 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.686 (140737341548096) (6)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163719.686 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80013e0 + + +MQTT_LOG: 20240520 163719.687 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7ffff0000d60 + + +MQTT_LOG: 20240520 163719.687 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffe80018f0 + + +MQTT_LOG: 20240520 163719.687 (140737341548096) (6)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163719.687 (140737341548096) (5)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163719.687 (140737341548096) (4)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163719.687 (140737341548096) (3)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163719.687 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.687 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.687 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.687 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.687 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.687 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.687 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.687 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.687 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.687 Return code 0 from poll + +MQTT_LOG: 20240520 163719.687 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.687 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.687 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.687 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (0)< MQTTClient_waitForCompletion:2903 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (0)> MQTTClient_disconnect1:1929 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> MQTTClient_closeSession:1095 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> MQTTPacket_send_disconnect:516 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.786 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001450 + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (4)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (5)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (6)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (6)< Socket_writev:773 (2) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (5)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (4)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3952 bytes + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163719.786 5 RTI_0 -> DISCONNECT (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTPacket_send_disconnect:543 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> WebSocket_close:524 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< WebSocket_close:572 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> Socket_close:967 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> Socket_close_only:893 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< Socket_close_only:907 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> Socket_abortWrite:1355 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< Socket_abortWrite:1376 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> SocketBuffer_cleanup:153 + +MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 157, heap use now 3936 bytes + + +MQTT_LOG: 20240520 163719.786 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3920 bytes + + +MQTT_LOG: 20240520 163719.786 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3872 bytes + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< SocketBuffer_cleanup:165 + +MQTT_LOG: 20240520 163719.786 Removed socket 5 + +MQTT_LOG: 20240520 163719.786 Removed socket 5 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< Socket_close:1037 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> MQTTClient_cleanSession:1131 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTPersistence_clear:170 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTPersistence_clear:174 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTClient_emptyMessageQueue:557 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTClient_emptyMessageQueue:572 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTClient_cleanSession:1139 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTClient_closeSession:1123 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> MQTTClient_stop:1028 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTClient_stop:1063 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (0)< MQTTClient_disconnect1:1963 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (0)> MQTTClient_destroy:580 + +MQTT_LOG: 20240520 163719.786 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7ffff0001b00 + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> MQTTPersistence_close:141 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTPersistence_close:157 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> MQTTClient_emptyMessageQueue:557 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTClient_emptyMessageQueue:572 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> MQTTProtocol_freeClient:934 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> MQTTProtocol_freeMessageList:1020 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163719.786 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3824 bytes + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTProtocol_freeMessageList:1023 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> MQTTProtocol_freeMessageList:1020 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163719.786 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3776 bytes + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTProtocol_freeMessageList:1023 + +MQTT_LOG: 20240520 163719.786 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3728 bytes + + +MQTT_LOG: 20240520 163719.786 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3680 bytes + + +MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 940, heap use now 3632 bytes + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTProtocol_freeClient:989 + +MQTT_LOG: 20240520 163719.786 Freeing 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3616 bytes + + +MQTT_LOG: 20240520 163719.786 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3312 bytes + + +MQTT_LOG: 20240520 163719.786 Removed client RTI_0 from bstate->clients, socket 0 + +MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 600, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 603, heap use now 3264 bytes + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> Thread_destroy_sem:371 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< Thread_destroy_sem:380 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> Thread_destroy_sem:371 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< Thread_destroy_sem:380 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> Thread_destroy_sem:371 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< Thread_destroy_sem:380 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> Thread_destroy_sem:371 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< Thread_destroy_sem:380 (0) + +MQTT_LOG: 20240520 163719.786 Freeing 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3248 bytes + + +MQTT_LOG: 20240520 163719.786 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (0)< MQTTClient_destroy:617 + +LOG: RTI: Minimum upstream LTC for federate/enclave 1 is (7507123798319426158, 4294967295)(adjusted by after delay). +MQTT_LOG: 20240520 163719.786 (140737341548096) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTProtocol_assignMsgId:104 (5) + +MQTT_LOG: 20240520 163719.786 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7ffff00019a0 + + +MQTT_LOG: 20240520 163719.786 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7ffff0001750 + + +MQTT_LOG: 20240520 163719.786 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x5555555990e0 + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163719.786 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7ffff00018e0 + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163719.786 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555981d0 + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163719.786 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80014c0 + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163719.786 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001190 + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163719.786 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7fffe8000ed0 + + +MQTT_LOG: 20240520 163719.786 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7fffe8000d20 + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.786 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7fffe80017c0 + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.786 (140737341548096) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.786 Return code 1 from poll + +MQTT_LOG: 20240520 163719.786 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.786 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.786 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.786 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.786 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.786 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.786 (140737333155392) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (8)< Socket_writev:773 (55) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3440 bytes + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3424 bytes + + +MQTT_LOG: 20240520 163719.786 4 RTI_1 -> PUBLISH msgid: 5 qos: 2 retained: 0 rc 0 payload len(13): ÿÿÿÿÿÿÿÿÿÿÿ + +MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3408 bytes + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163719.786 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3392 bytes + + +MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163719.786 (140737341548096) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163719.786 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.786 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.786 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.787 Return code 1 from poll + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.787 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.787 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163719.787 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163719.787 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163719.787 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163719.787 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff0000d60 + + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163719.787 4 RTI_1 <- PUBREC msgid: 5 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163719.787 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe80016f0 + + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.787 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8000cb0 + + +MQTT_LOG: 20240520 163719.787 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.787 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163719.787 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163719.787 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163719.787 4 RTI_1 -> PUBREL msgid: 5 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163719.787 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.787 Return code 1 from poll + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.787 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.787 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163719.787 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001220 + + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (2)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163719.787 4 RTI_1 <- PUBCOMP msgid:5 + +MQTT_LOG: 20240520 163719.787 PUBCOMP received from client RTI_1 for message id 5 - removing publication + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163719.787 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163719.787 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163719.787 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163719.787 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2128 bytes + + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163719.787 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163719.787 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163719.787 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 1984 bytes + + +MQTT_LOG: 20240520 163719.787 (140737333155392) (2)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.787 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.787 Return code 1 from poll + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163719.787 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001590 + + +MQTT_LOG: 20240520 163719.787 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7ffff0000d60 + + +MQTT_LOG: 20240520 163719.787 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffe80018f0 + + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (5)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.787 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.832 Return code 1 from poll + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.832 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.832 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163719.832 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163719.832 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163719.832 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1968 bytes + + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163719.832 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff00018e0 + + +MQTT_LOG: 20240520 163719.832 (140737333155392) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163719.832 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555598f30 + + +MQTT_LOG: 20240520 163719.832 (140737333155392) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163719.832 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffec001350 + + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163719.832 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163719.832 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163719.832 4 RTI_1 <- PUBLISH msgid: 7 qos: 2 retained: 0 payload len(13): ‘J ®VÑ + +MQTT_LOG: 20240520 163719.832 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffe8000c40 + + +MQTT_LOG: 20240520 163719.832 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0000f10 + + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163719.832 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000f20 + + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163719.832 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001380 + + +MQTT_LOG: 20240520 163719.832 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec000d00 + + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163719.832 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec000eb0 + + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.832 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001140 + + +MQTT_LOG: 20240520 163719.832 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.832 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163719.832 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163719.832 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163719.832 4 RTI_1 -> PUBREC msgid: 7 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163719.832 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163719.832 Return code 1 from poll + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.832 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163719.832 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163719.832 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001500 + + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (3)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163719.832 4 RTI_1 <- PUBREL msgid 7 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163719.832 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffe80014c0 + + +MQTT_LOG: 20240520 163719.832 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffe8000b70 + + +MQTT_LOG: 20240520 163719.832 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80017f0 + + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163719.832 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163719.832 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163719.832 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163719.832 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163719.832 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001350 + + +MQTT_LOG: 20240520 163719.832 (140737341548096) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.832 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001370 + + +MQTT_LOG: 20240520 163719.832 (140737341548096) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163719.832 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163719.832 (140737341548096) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163719.832 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163719.832 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163719.832 4 RTI_1 -> PUBCOMP msgid 7 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163719.832 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163719.832 (140737341548096) (3)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.832 Return code 1 from poll + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> SocketBuffer_interrupted:262 + +MQTT_LOG: 20240520 163719.832 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec0012a0 + + +MQTT_LOG: 20240520 163719.832 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7ffff0001a10 + + +MQTT_LOG: 20240520 163719.832 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffe80018f0 + + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< SocketBuffer_interrupted:278 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (4)< Socket_getch:641 (-22) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< WebSocket_getch:628 (-22) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.832 (140737333155392) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.832 Return code 0 from poll + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> isReady:353 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.832 (140737341548096) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163719.832 (140737341548096) (0)< MQTTClient_waitForCompletion:2903 (0) + +LOG: RTI sent to federate 1 the tag advance grant (TAG) (7507123798319426158, 4294967295). +LOG: RTI received from federate 1 the Next Event Tag (NET) (0, 0) +RTI: Federate 0 thread exited. +RTI: Waiting for thread handling federate 1. +DEBUG: RTI: Updated the recorded next event tag for federate/enclave 1 to (0, 0) +LOG: RTI: Minimum upstream LTC for federate/enclave 1 is (7507123798319426158, 4294967295)(adjusted by after delay). +DEBUG: ++++ Node 1 is in ZDC: 0 +DEBUG: ++++ Node 0 is in ZDC: 0 +DEBUG: RTI: Strict EIMT of fed/encl 1 at fed/encl 0 has tag (7507123798319426158, 4294967295). +LOG: RTI: Earliest next event upstream of node 1 has tag (7507123798319426158, 4294967295). +LOG: RECEIVING message from federateID 1 +MQTT_LOG: 20240520 163719.832 (140737349940800) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.888 Return code 0 from poll + +MQTT_LOG: 20240520 163719.888 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.888 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.888 (140737349940800) (2)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163719.888 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163719.888 (140737349940800) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163719.888 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3216 bytes + + +MQTT_LOG: 20240520 163719.888 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163719.888 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163719.888 (140737349940800) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163719.888 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 3152 bytes + + +MQTT_LOG: 20240520 163719.888 (140737349940800) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163719.888 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163719.888 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163719.888 (140737349940800) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 1 +DEBUG: RTI: Received message type 9 from federate 1. +LOG: RTI received from federate/enclave 1 the latest tag complete (LTC) (0, 0). +LOG: RECEIVING message from federateID 1 +MQTT_LOG: 20240520 163719.888 (140737349940800) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163719.888 Return code 1 from poll + +MQTT_LOG: 20240520 163719.888 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163719.888 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163719.888 (140737349940800) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163719.888 (140737349940800) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163720.060 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163720.060 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163720.060 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163720.060 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163720.060 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1968 bytes + + +MQTT_LOG: 20240520 163720.060 (140737349940800) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163720.060 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000c40 + + +MQTT_LOG: 20240520 163720.060 (140737349940800) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163720.060 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7ffff0001a10 + + +MQTT_LOG: 20240520 163720.060 (140737349940800) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163720.060 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0001800 + + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163720.060 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163720.060 (140737349940800) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163720.060 4 RTI_1 <- PUBLISH msgid: 8 qos: 2 retained: 0 payload len(1):  + +MQTT_LOG: 20240520 163720.060 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff00019a0 + + +MQTT_LOG: 20240520 163720.060 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001ab0 + + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163720.060 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0001780 + + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163720.060 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00011d0 + + +MQTT_LOG: 20240520 163720.060 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7ffff0001070 + + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163720.060 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001450 + + +MQTT_LOG: 20240520 163720.060 (140737349940800) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163720.060 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001210 + + +MQTT_LOG: 20240520 163720.060 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163720.060 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163720.060 (140737349940800) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163720.060 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163720.060 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163720.060 4 RTI_1 -> PUBREC msgid: 8 (0) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163720.060 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163720.060 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163720.060 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163720.060 Return code 1 from poll + +MQTT_LOG: 20240520 163720.060 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163720.060 (140737333155392) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163720.060 (140737333155392) (3)> isReady:353 + +MQTT_LOG: 20240520 163720.060 (140737333155392) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163720.060 (140737333155392) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163720.060 (140737333155392) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163720.060 (140737333155392) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163720.060 (140737333155392) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163720.060 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163720.060 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163720.060 (140737333155392) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163720.060 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163720.060 (140737333155392) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163720.061 (140737333155392) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163720.061 (140737333155392) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163720.061 (140737333155392) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163720.061 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163720.061 (140737333155392) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163720.061 (140737333155392) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163720.061 (140737333155392) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163720.061 (140737333155392) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163720.061 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec000d30 + + +MQTT_LOG: 20240520 163720.061 (140737333155392) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163720.061 (140737333155392) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163720.061 4 RTI_1 <- PUBREL msgid 8 + +MQTT_LOG: 20240520 163720.061 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163720.061 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163720.061 (140737333155392) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163720.061 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffec000d80 + + +MQTT_LOG: 20240520 163720.061 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec0014e0 + + +MQTT_LOG: 20240520 163720.061 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec0012e0 + + +MQTT_LOG: 20240520 163720.061 (140737333155392) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163720.061 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163720.061 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163720.061 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163720.061 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163720.061 (140737333155392) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163720.061 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001800 + + +MQTT_LOG: 20240520 163720.061 (140737333155392) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163720.061 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0000c10 + + +MQTT_LOG: 20240520 163720.061 (140737333155392) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163720.061 (140737333155392) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163720.061 (140737333155392) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163720.061 (140737333155392) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163720.061 (140737333155392) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163720.061 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163720.061 (140737333155392) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163720.061 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163720.061 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163720.061 4 RTI_1 -> PUBCOMP msgid 8 (0) + +MQTT_LOG: 20240520 163720.061 (140737333155392) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163720.061 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163720.061 (140737333155392) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163720.061 (140737333155392) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20RTI: Number of federates: 2 +RTI: Clock sync: init +Starting RTI for 2 federates in federation ID Unidentified Federation. +---- System clock resolution: 1 nsec +LOG: Subscribing on topic Unidentified Federation_RTI. +LOG: PHYSICAL_TIME ON SUBSCRIBING TOPIC: 1716248246739416840 +RTI: Listening for federates. +LOG: RECEIVING message from federateID -1 +MQTT_LOG: 20240520 163726.739 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163726.739 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163726.739 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163726.739 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163726.739 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163726.739 Return code 1 from poll + +MQTT_LOG: 20240520 163726.739 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163726.739 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163726.739 (140737352902464) (2)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163726.739 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163726.739 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163726.739 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.428 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.428 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163728.428 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163728.428 (140737352902464) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163728.428 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555597e10 + + +MQTT_LOG: 20240520 163728.428 (140737352902464) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163728.428 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555597cf0 + + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163728.428 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 1280 bytes + + +MQTT_LOG: 20240520 163728.428 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163728.428 3 RTI_RTI <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163728.428 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163728.428 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598300 + + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163728.428 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555597d20 + + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163728.428 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598390 + + +MQTT_LOG: 20240520 163728.428 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x5555555960e0 + + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.428 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598510 + + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.428 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x5555555985f0 + + +MQTT_LOG: 20240520 163728.428 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.428 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1504 bytes + + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.428 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 1488 bytes + + +MQTT_LOG: 20240520 163728.428 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.428 3 RTI_RTI -> PUBREC msgid: 1 (0) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163728.428 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 1472 bytes + + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.428 Return code 1 from poll + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (2)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.428 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.428 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.429 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163728.429 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555986a0 + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163728.429 3 RTI_RTI <- PUBREL msgid 1 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163728.429 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555984a0 + + +MQTT_LOG: 20240520 163728.429 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163728.429 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598730 + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163728.429 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1568 bytes + + +MQTT_LOG: 20240520 163728.429 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1520 bytes + + +MQTT_LOG: 20240520 163728.429 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1488 bytes + + +MQTT_LOG: 20240520 163728.429 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1408 bytes + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.429 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555597cf0 + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.429 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597e90 + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.429 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1408 bytes + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.429 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 1392 bytes + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.429 3 RTI_RTI -> PUBCOMP msgid 1 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163728.429 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 1376 bytes + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163728.429 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1328 bytes + + +MQTT_LOG: 20240520 163728.429 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1296 bytes + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163728.429 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 1264 bytes + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163728.429 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 1232 bytes + + +MQTT_LOG: 20240520 163728.429 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 1216 bytes + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID -1 +LOG: Received MSG_TYPE_MQTT_JOIN message from federate 0. +DEBUG: Setting up MQTTServer_id for federate 0. +DEBUG: Setup MQTTServer_id for federate 0 as RTI_0. +DEBUG: Creating MQTTClient for federate 0. +MQTT_LOG: 20240520 163728.429 (140737352902464) (0)> MQTTClient_createWithOptions:375 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (2)> UTF8_validate:134 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (2)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163728.429 Allocating 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 438 ptr 0x555555598850 + + +MQTT_LOG: 20240520 163728.429 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555597cf0 + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163728.429 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555597c60 + + +MQTT_LOG: 20240520 163728.429 Allocating 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 489 ptr 0x555555598910 + + +MQTT_LOG: 20240520 163728.429 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555986a0 + + +MQTT_LOG: 20240520 163728.429 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555597ca0 + + +MQTT_LOG: 20240520 163728.429 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598300 + + +MQTT_LOG: 20240520 163728.429 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555977e0 + + +MQTT_LOG: 20240520 163728.429 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555597f80 + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTPersistence_create:56 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTPersistence_create:104 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTPersistence_initialize:119 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTPersistence_initialize:127 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTPersistence_restoreMessageQueue:877 + +MQTT_LOG: 20240520 163728.429 0 queued messages restored for client RTI_0 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTPersistence_restoreMessageQueue:918 (0) + +MQTT_LOG: 20240520 163728.429 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598540 + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (0)< MQTTClient_createWithOptions:522 (0) + +DEBUG: Connecting MQTTClient for federate 0. +MQTT_LOG: 20240520 163728.429 (140737352902464) (0)> MQTTClient_connectAll:1745 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTClient_connectURI:1504 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (2)> MQTTClient_connectURIVersion:1209 + +MQTT_LOG: 20240520 163728.429 Connecting to serverURI 127.0.0.1:1883 with MQTT version 4 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> MQTTProtocol_connect:227 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (4)> MQTTProtocol_addressPort:63 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (4)< MQTTProtocol_addressPort:101 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (4)> Socket_new:1072 + +MQTT_LOG: 20240520 163728.429 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1082 ptr 0x555555598ba0 + + +MQTT_LOG: 20240520 163728.429 New socket 4 for 127.0.0.1:1883, port 1883 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (5)> Socket_addSocket:272 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> Socket_setnonblocking:95 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< Socket_setnonblocking:100 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (5)< Socket_addSocket:314 (0) + +MQTT_LOG: 20240520 163728.429 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1200 ptr 0x555555598c50 + + +MQTT_LOG: 20240520 163728.429 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d30 + + +MQTT_LOG: 20240520 163728.429 Connect pending + +MQTT_LOG: 20240520 163728.429 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1233, heap use now 1968 bytes + + +MQTT_LOG: 20240520 163728.429 (140737352902464) (4)< Socket_new:1235 (115) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< MQTTProtocol_connect:355 (115) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.429 Return code 0 from poll + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163728.429 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163728.429 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1936 bytes + + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (3)> MQTTPacket_send_connect:55 + +MQTT_LOG: 20240520 163728.530 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 73 ptr 0x555555598cf0 + + +MQTT_LOG: 20240520 163728.530 (140737352902464) (4)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.530 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598c20 + + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (7)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (7)< Socket_writev:773 (19) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.530 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163728.530 (140737352902464) (4)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.530 4 RTI_0 -> CONNECT version 4 clean: 1 (0) + +MQTT_LOG: 20240520 163728.530 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 127, heap use now 1936 bytes + + +MQTT_LOG: 20240520 163728.530 (140737352902464) (3)< MQTTPacket_send_connect:129 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (3)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.530 Return code 1 from poll + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.530 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.530 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> MQTTPacket_connack:148 + +MQTT_LOG: 20240520 163728.530 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 149 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< MQTTPacket_connack:176 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163728.530 4 RTI_0 <- CONNACK rc: 0 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (3)> MQTTClient_cleanSession:1131 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (4)> MQTTPersistence_clear:170 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (4)< MQTTPersistence_clear:174 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (4)> MQTTClient_emptyMessageQueue:557 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (4)< MQTTClient_emptyMessageQueue:572 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (3)< MQTTClient_cleanSession:1139 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (3)> MQTTPacket_freeConnack:187 + +MQTT_LOG: 20240520 163728.530 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 190, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163728.530 (140737352902464) (3)< MQTTPacket_freeConnack:191 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (2)< MQTTClient_connectURIVersion:1477 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (1)< MQTTClient_connectURI:1702 (0) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (0)< MQTTClient_connectAll:1910 (0) + +DEBUG: Connected, return code 0 + +DEBUG: Creating topic for federate 0. +LOG: Starting subscribe +MQTT_LOG: 20240520 163728.530 (140737352902464) (0)> MQTTClient_subscribe5:2180 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (1)> MQTTClient_subscribeMany5:2034 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163728.530 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163728.530 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (1) + +MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163728.531 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 + + +MQTT_LOG: 20240520 163728.531 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e40 + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTProtocol_subscribe:394 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTPacket_send_subscribe:235 + +MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 247 ptr 0x555555598f30 + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599030 + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< Socket_writev:773 (43) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.531 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2128 bytes + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.531 4 RTI_0 -> SUBSCRIBE msgid: 1 (0) + +MQTT_LOG: 20240520 163728.531 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 275, heap use now 2112 bytes + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< MQTTPacket_send_subscribe:277 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< MQTTProtocol_subscribe:396 (0) + +MQTT_LOG: 20240520 163728.531 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163728.531 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 2032 bytes + + +MQTT_LOG: 20240520 163728.531 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 1984 bytes + + +MQTT_LOG: 20240520 163728.531 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.531 Return code 1 from poll + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> isReady:353 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> isReady:353 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.531 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.531 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> MQTTPacket_suback:296 + +MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 297 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 326 ptr 0x555555598ba0 + + +MQTT_LOG: 20240520 163728.531 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598cf0 + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< MQTTPacket_suback:348 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< MQTTClient_waitfor:2764 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTProtocol_handleSubacks:413 + +MQTT_LOG: 20240520 163728.531 4 RTI_0 <- SUBACK msgid: 1 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTPacket_freeSuback:697 + +MQTT_LOG: 20240520 163728.531 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 366, heap use now 2048 bytes + + +MQTT_LOG: 20240520 163728.531 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 370, heap use now 2032 bytes + + +MQTT_LOG: 20240520 163728.531 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163728.531 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 702, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< MQTTPacket_freeSuback:703 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< MQTTProtocol_handleSubacks:417 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (1)< MQTTClient_subscribeMany5:2154 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (0)< MQTTClient_subscribe5:2184 (0) + +DEBUG: Subscribed, return code 0 + +LOG: Subscribing on topic Unidentified Federation_fed_0_to_RTI. +LOG: Finished subscribe +LOG: Publishing MSG_TYPE_MQTT_ACCEPT message on topic Unidentified Federation_RTI_to_fed_0. +MQTT_LOG: 20240520 163728.531 (140737352902464) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (2) + +MQTT_LOG: 20240520 163728.531 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555598ba0 + + +MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555598bd0 + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163728.531 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599130 + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163728.531 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555990a0 + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163728.531 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598f80 + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (8)< Socket_writev:773 (45) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.531 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163728.531 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163728.531 4 RTI_0 -> PUBLISH msgid: 2 qos: 2 retained: 0 rc 0 payload len(3):  + +MQTT_LOG: 20240520 163728.531 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163728.531 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.531 Return code 1 from poll + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.531 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.531 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163728.531 4 RTI_0 <- PUBREC msgid: 2 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991e0 + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599240 + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.531 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.531 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.531 4 RTI_0 -> PUBREL msgid: 2 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163728.531 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.532 Return code 1 from poll + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.532 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.532 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163728.532 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163728.532 4 RTI_0 <- PUBCOMP msgid:2 + +MQTT_LOG: 20240520 163728.532 PUBCOMP received from client RTI_0 for message id 2 - removing publication + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163728.532 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163728.532 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163728.532 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2144 bytes + + +MQTT_LOG: 20240520 163728.532 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163728.532 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163728.532 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1984 bytes + + +MQTT_LOG: 20240520 163728.532 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 1952 bytes + + +MQTT_LOG: 20240520 163728.532 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.532 Return code 1 from poll + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.532 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.532 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.576 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.576 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163728.576 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163728.576 (140737352902464) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163728.576 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163728.576 (140737352902464) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163728.576 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599240 + + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163728.576 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2048 bytes + + +MQTT_LOG: 20240520 163728.576 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163728.576 4 RTI_0 <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(1):  + +MQTT_LOG: 20240520 163728.576 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163728.576 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555990e0 + + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163728.576 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 + + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163728.576 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d30 + + +MQTT_LOG: 20240520 163728.576 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555598b70 + + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.576 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598c20 + + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.576 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 + + +MQTT_LOG: 20240520 163728.576 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.576 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.576 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163728.576 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.576 4 RTI_0 -> PUBREC msgid: 1 (0) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163728.576 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.576 Return code 1 from poll + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.576 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.577 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163728.577 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163728.577 4 RTI_0 <- PUBREL msgid 1 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163728.577 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555986f0 + + +MQTT_LOG: 20240520 163728.577 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163728.577 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599060 + + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163728.577 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2336 bytes + + +MQTT_LOG: 20240520 163728.577 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163728.577 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163728.577 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.577 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599240 + + +MQTT_LOG: 20240520 163728.577 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.577 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163728.577 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.577 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163728.577 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.577 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2160 bytes + + +MQTT_LOG: 20240520 163728.577 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.577 4 RTI_0 -> PUBCOMP msgid 1 (0) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163728.577 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2144 bytes + + +MQTT_LOG: 20240520 163728.577 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.577 Return code 0 from poll + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (3)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.577 (140737352902464) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) + +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163728.577 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163728.577 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.632 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.632 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.632 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.632 Return code 0 from poll + +MQTT_LOG: 20240520 163728.632 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.632 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.632 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.632 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.632 (140737352902464) (2)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163728.632 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.632 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.632 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.632 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.632 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.632 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163728.632 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163728.632 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163728.632 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163728.632 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163728.632 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163728.633 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2032 bytes + + +MQTT_LOG: 20240520 163728.633 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163728.633 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163728.633 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163728.633 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163728.633 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 1984 bytes + + +MQTT_LOG: 20240520 163728.633 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 1968 bytes + + +MQTT_LOG: 20240520 163728.633 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +LOG: Receiving MSG_TYPE_MQTT_ACCEPT_ACK message on topic Unidentified Federation_fed_0_to_RTI. +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163728.633 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163728.633 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.633 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.633 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.633 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.633 Return code 1 from poll + +MQTT_LOG: 20240520 163728.633 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.633 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.633 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.633 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.633 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.633 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.634 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.634 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163728.634 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163728.634 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x5555555981d0 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163728.634 4 RTI_0 <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(27):  + +MQTT_LOG: 20240520 163728.634 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163728.634 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163728.634 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e40 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163728.634 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e80 + + +MQTT_LOG: 20240520 163728.634 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555598fc0 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598f00 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.634 4 RTI_0 -> PUBREC msgid: 2 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163728.634 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.634 Return code 1 from poll + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.634 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.634 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163728.634 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555990e0 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163728.634 4 RTI_0 <- PUBREL msgid 2 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163728.634 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555990a0 + + +MQTT_LOG: 20240520 163728.634 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163728.634 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163728.634 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2384 bytes + + +MQTT_LOG: 20240520 163728.634 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2336 bytes + + +MQTT_LOG: 20240520 163728.634 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163728.634 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2208 bytes + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.634 4 RTI_0 -> PUBCOMP msgid 2 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163728.634 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163728.634 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2144 bytes + + +MQTT_LOG: 20240520 163728.634 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2112 bytes + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163728.634 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163728.634 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2032 bytes + + +MQTT_LOG: 20240520 163728.634 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI received federate ID: 0. +DEBUG: RTI received federation ID: Unidentified Federation. +DEBUG: RTI responding with MSG_TYPE_ACK to federate 0. +MQTT_LOG: 20240520 163728.634 (140737352902464) (0)> MQTTClient_publishMessage5:2498 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (1)> MQTTClient_publish5:2349 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> UTF8_validate:134 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (3) + +MQTT_LOG: 20240520 163728.634 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163728.634 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x5555555981d0 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTProtocol_startPublish:176 + +MQTT_LOG: 20240520 163728.634 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTProtocol_createMessage:210 + +MQTT_LOG: 20240520 163728.634 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163728.634 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTProtocol_createMessage:251 + +MQTT_LOG: 20240520 163728.634 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555994d0 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> MQTTPacket_send_publish:861 + +MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x555555599240 + + +MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x555555599180 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> MQTTPacket_sends:259 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (8)< Socket_writev:773 (43) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 2320 bytes + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< MQTTPacket_sends:289 (0) + +MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163728.634 4 RTI_0 -> PUBLISH msgid: 3 qos: 2 retained: 0 rc 0 payload len(1): ÿ + +MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) + +MQTT_LOG: 20240520 163728.634 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163728.634 (140737352902464) (1)< MQTTClient_publish5:2473 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (1)> MQTTClient_yield:2832 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.634 Return code 1 from poll + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.676 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.676 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163728.676 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 + +MQTT_LOG: 20240520 163728.676 4 RTI_0 <- PUBREC msgid: 3 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTPacket_send_pubrel:758 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.676 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599180 + + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.676 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.676 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.676 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.676 4 RTI_0 -> PUBREL msgid: 3 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) + +MQTT_LOG: 20240520 163728.676 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.676 Return code 1 from poll + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.676 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.676 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163728.676 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 + +MQTT_LOG: 20240520 163728.676 4 RTI_0 <- PUBCOMP msgid:3 + +MQTT_LOG: 20240520 163728.676 PUBCOMP received from client RTI_0 for message id 3 - removing publication + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTProtocol_removePublication:297 + +MQTT_LOG: 20240520 163728.676 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163728.676 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2224 bytes + + +MQTT_LOG: 20240520 163728.676 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163728.676 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2128 bytes + + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTProtocol_removePublication:312 + +MQTT_LOG: 20240520 163728.676 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2096 bytes + + +MQTT_LOG: 20240520 163728.676 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163728.676 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 1984 bytes + + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.676 Return code 1 from poll + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.716 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.716 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163728.716 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163728.716 (140737352902464) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163728.716 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x5555555986f0 + + +MQTT_LOG: 20240520 163728.716 (140737352902464) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163728.716 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163728.716 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2064 bytes + + +MQTT_LOG: 20240520 163728.716 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163728.716 3 RTI_RTI <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163728.716 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163728.716 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163728.716 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598cf0 + + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163728.716 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555990a0 + + +MQTT_LOG: 20240520 163728.716 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555599240 + + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.716 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.716 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598b70 + + +MQTT_LOG: 20240520 163728.716 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.716 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2288 bytes + + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.716 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163728.716 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.716 3 RTI_RTI -> PUBREC msgid: 2 (0) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163728.716 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.716 Return code 1 from poll + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (3)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.716 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.716 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.717 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163728.717 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555981d0 + + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163728.717 3 RTI_RTI <- PUBREL msgid 2 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163728.717 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555598620 + + +MQTT_LOG: 20240520 163728.717 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163728.717 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598c80 + + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163728.717 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2352 bytes + + +MQTT_LOG: 20240520 163728.717 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163728.717 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163728.717 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.717 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163728.717 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.717 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598f00 + + +MQTT_LOG: 20240520 163728.717 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.717 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163728.717 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.717 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163728.717 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.717 3 RTI_RTI -> PUBCOMP msgid 2 (0) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163728.717 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2160 bytes + + +MQTT_LOG: 20240520 163728.717 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (2)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (3)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.717 Return code 1 from poll + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> isReady:353 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (3)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (3)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.717 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.717 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.734 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (5)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (6)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (7)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.734 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (7)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (6)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (5)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (5)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (6)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (6)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (6)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (6)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (5)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163728.734 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163728.734 (140737352902464) (5)> readUTFlen:387 + +MQTT_LOG: 20240520 163728.734 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x5555555981d0 + + +MQTT_LOG: 20240520 163728.734 (140737352902464) (5)< readUTFlen:401 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163728.734 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555598cc0 + + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163728.734 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163728.734 (140737352902464) (3)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163728.734 4 RTI_0 <- PUBLISH msgid: 3 qos: 2 retained: 0 payload len(11):  + +MQTT_LOG: 20240520 163728.734 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163728.734 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555990e0 + + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163728.734 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 + + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163728.734 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d70 + + +MQTT_LOG: 20240520 163728.734 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (5)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.734 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599680 + + +MQTT_LOG: 20240520 163728.734 (140737352902464) (6)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.734 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599760 + + +MQTT_LOG: 20240520 163728.734 (140737352902464) (7)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (7)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (7)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (8)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (9)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (9)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (8)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (7)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.734 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2480 bytes + + +MQTT_LOG: 20240520 163728.734 (140737352902464) (6)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.734 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2464 bytes + + +MQTT_LOG: 20240520 163728.734 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.734 4 RTI_0 -> PUBREC msgid: 3 (0) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163728.734 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2448 bytes + + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (3)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (3)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (2)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.734 (140737352902464) (1)< MQTTClient_yield:2856 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) + +DEBUG: RTI sent MSG_TYPE_ACK to federate 0. +DEBUG: RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate 0. +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163728.734 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.734 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.735 Return code 1 from poll + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.735 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.735 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163728.735 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599130 + + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163728.735 4 RTI_0 <- PUBREL msgid 3 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163728.735 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599640 + + +MQTT_LOG: 20240520 163728.735 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 + + +MQTT_LOG: 20240520 163728.735 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599850 + + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163728.735 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2544 bytes + + +MQTT_LOG: 20240520 163728.735 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2496 bytes + + +MQTT_LOG: 20240520 163728.735 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2464 bytes + + +MQTT_LOG: 20240520 163728.735 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2384 bytes + + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.735 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598cc0 + + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.735 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598f00 + + +MQTT_LOG: 20240520 163728.735 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.735 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2384 bytes + + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.735 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163728.735 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.735 4 RTI_0 -> PUBCOMP msgid 3 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163728.735 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2352 bytes + + +MQTT_LOG: 20240520 163728.735 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163728.735 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163728.735 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163728.735 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163728.735 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163728.735 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163728.735 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163728.735 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163728.735 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI got 0 upstreams and 1 downstreams from federate 0. +DEBUG: RTI received neighbor structure from federate 0. +DEBUG: RTI waiting for MSG_TYPE_UDP_PORT from federate 0. +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163728.735 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.735 Return code 1 from poll + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.735 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.835 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.835 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.835 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163728.835 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 + + +MQTT_LOG: 20240520 163728.835 (140737352902464) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163728.835 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555598f30 + + +MQTT_LOG: 20240520 163728.835 (140737352902464) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163728.835 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599360 + + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163728.835 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2256 bytes + + +MQTT_LOG: 20240520 163728.835 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.835 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163728.835 4 RTI_0 <- PUBLISH msgid: 4 qos: 2 retained: 0 payload len(3): þÿÿ + +MQTT_LOG: 20240520 163728.835 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163728.835 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599440 + + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163728.835 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555997d0 + + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163728.835 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599850 + + +MQTT_LOG: 20240520 163728.835 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555599030 + + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.835 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991e0 + + +MQTT_LOG: 20240520 163728.835 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.835 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599210 + + +MQTT_LOG: 20240520 163728.835 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.835 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.835 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.835 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.835 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2480 bytes + + +MQTT_LOG: 20240520 163728.835 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.835 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2464 bytes + + +MQTT_LOG: 20240520 163728.835 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.835 4 RTI_0 -> PUBREC msgid: 4 (0) + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163728.835 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2448 bytes + + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163728.835 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTProtocol_keepalive:704 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTProtocol_keepalive:781 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (4)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (4)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (4)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (4)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.835 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.835 Return code 1 from poll + +MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.836 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.836 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163728.836 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163728.836 4 RTI_0 <- PUBREL msgid 4 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163728.836 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599490 + + +MQTT_LOG: 20240520 163728.836 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 + + +MQTT_LOG: 20240520 163728.836 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 + + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163728.836 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2544 bytes + + +MQTT_LOG: 20240520 163728.836 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2496 bytes + + +MQTT_LOG: 20240520 163728.836 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2464 bytes + + +MQTT_LOG: 20240520 163728.836 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2384 bytes + + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.836 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599360 + + +MQTT_LOG: 20240520 163728.836 (140737352902464) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.836 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598cc0 + + +MQTT_LOG: 20240520 163728.836 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.836 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2384 bytes + + +MQTT_LOG: 20240520 163728.836 (140737352902464) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.836 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2368 bytes + + +MQTT_LOG: 20240520 163728.836 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.836 4 RTI_0 -> PUBCOMP msgid 4 (0) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163728.836 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2352 bytes + + +MQTT_LOG: 20240520 163728.836 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163728.836 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes + + +MQTT_LOG: 20240520 163728.836 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2272 bytes + + +MQTT_LOG: 20240520 163728.836 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163728.836 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163728.836 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2240 bytes + + +MQTT_LOG: 20240520 163728.836 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163728.836 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2192 bytes + + +MQTT_LOG: 20240520 163728.836 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2176 bytes + + +MQTT_LOG: 20240520 163728.836 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI got MSG_TYPE_UDP_PORT 65535 from federate 0. +LOG: RECEIVING message from federateID -1 +MQTT_LOG: 20240520 163728.836 (140737352902464) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< Socket_continueWrites:1453 (0) + +LOG: RECEIVING message from federateID 0 +MQTT_LOG: 20240520 163728.836 (140737349940800) (0)> MQTTClient_receive:2777 + +MQTT_LOG: 20240520 163728.836 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.836 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.837 Return code 0 from poll + +MQTT_LOG: 20240520 163728.837 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (2)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163728.837 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2112 bytes + + +MQTT_LOG: 20240520 163728.837 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2080 bytes + + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163728.837 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2048 bytes + + +MQTT_LOG: 20240520 163728.837 (140737352902464) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163728.837 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes + + +MQTT_LOG: 20240520 163728.837 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes + + +MQTT_LOG: 20240520 163728.837 (140737352902464) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID -1 +LOG: Received MSG_TYPE_MQTT_JOIN message from federate 1. +DEBUG: Setting up MQTTServer_id for federate 1. +DEBUG: Setup MQTTServer_id for federate 1 as RTI_1. +DEBUG: Creating MQTTClient for federate 1. +MQTT_LOG: 20240520 163728.837 (140737352902464) (0)> MQTTClient_createWithOptions:375 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> UTF8_validateString:160 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (2)> UTF8_validate:134 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (2)< UTF8_validate:146 (1) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< UTF8_validateString:165 (1) + +MQTT_LOG: 20240520 163728.837 Allocating 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 438 ptr 0x555555599bb0 + + +MQTT_LOG: 20240520 163728.837 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555599360 + + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163728.837 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555998d0 + + +MQTT_LOG: 20240520 163728.837 Allocating 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 489 ptr 0x555555599c70 + + +MQTT_LOG: 20240520 163728.837 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555990e0 + + +MQTT_LOG: 20240520 163728.837 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598f30 + + +MQTT_LOG: 20240520 163728.837 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598df0 + + +MQTT_LOG: 20240520 163728.837 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555981d0 + + +MQTT_LOG: 20240520 163728.837 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x5555555992b0 + + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTStrncpy:1085 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTStrncpy:1095 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> Thread_create_sem:227 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< Thread_create_sem:245 (0) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTPersistence_create:56 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTPersistence_create:104 (0) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTPersistence_initialize:119 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTPersistence_initialize:127 (0) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTPersistence_restoreMessageQueue:877 + +MQTT_LOG: 20240520 163728.837 0 queued messages restored for client RTI_1 + +MQTT_LOG: 20240520 163728.837 (140737349940800) (3)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.837 (140737349940800) (3)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTPersistence_restoreMessageQueue:918 (0) + +MQTT_LOG: 20240520 163728.837 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599580 + + +MQTT_LOG: 20240520 163728.837 (140737352902464) (0)< MQTTClient_createWithOptions:522 (0) + +DEBUG: Connecting MQTTClient for federate 1. +MQTT_LOG: 20240520 163728.837 (140737352902464) (0)> MQTTClient_connectAll:1745 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTClient_connectURI:1504 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (2)> MQTTClient_connectURIVersion:1209 + +MQTT_LOG: 20240520 163728.837 Connecting to serverURI 127.0.0.1:1883 with MQTT version 4 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (3)> MQTTProtocol_connect:227 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (4)> MQTTProtocol_addressPort:63 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (4)< MQTTProtocol_addressPort:101 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (4)> Socket_new:1072 + +MQTT_LOG: 20240520 163728.837 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1082 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163728.837 New socket 5 for 127.0.0.1:1883, port 1883 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (5)> Socket_addSocket:272 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (6)> Socket_setnonblocking:95 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (6)< Socket_setnonblocking:100 (0) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (5)< Socket_addSocket:314 (0) + +MQTT_LOG: 20240520 163728.837 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1200 ptr 0x5555555978a0 + + +MQTT_LOG: 20240520 163728.837 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555996f0 + + +MQTT_LOG: 20240520 163728.837 Connect pending + +MQTT_LOG: 20240520 163728.837 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1233, heap use now 2784 bytes + + +MQTT_LOG: 20240520 163728.837 (140737352902464) (4)< Socket_new:1235 (115) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (3)< MQTTProtocol_connect:355 (115) + +MQTT_LOG: 20240520 163728.837 (140737352902464) (3)> MQTTClient_waitfor:2662 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.837 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.837 Return code 1 from poll + +MQTT_LOG: 20240520 163728.837 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.837 (140737349940800) (3)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.837 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.837 (140737349940800) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.837 (140737349940800) (2)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.837 (140737349940800) (2)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.837 (140737349940800) (3)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.837 (140737349940800) (4)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.837 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.837 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.837 (140737349940800) (5)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.837 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (5)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (4)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (4)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (5)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (6)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.936 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (6)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (5)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (4)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (4)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (5)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (5)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (5)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (5)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (4)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163728.936 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000c40 + + +MQTT_LOG: 20240520 163728.936 (140737349940800) (4)> readUTFlen:387 + +MQTT_LOG: 20240520 163728.936 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7ffff0000d60 + + +MQTT_LOG: 20240520 163728.936 (140737349940800) (4)< readUTFlen:401 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163728.936 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0000e60 + + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163728.936 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163728.936 (140737349940800) (2)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (2)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163728.936 4 RTI_0 <- PUBLISH msgid: 5 qos: 2 retained: 0 payload len(9): ¤Â/x°VÑ + +MQTT_LOG: 20240520 163728.936 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163728.936 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 + + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163728.936 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00010a0 + + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163728.936 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0001190 + + +MQTT_LOG: 20240520 163728.936 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7ffff0001290 + + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (4)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.936 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001370 + + +MQTT_LOG: 20240520 163728.936 (140737349940800) (5)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.936 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001450 + + +MQTT_LOG: 20240520 163728.936 (140737349940800) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (6)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (7)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (8)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (8)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (7)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (6)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.936 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3168 bytes + + +MQTT_LOG: 20240520 163728.936 (140737349940800) (5)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.936 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3152 bytes + + +MQTT_LOG: 20240520 163728.936 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.936 4 RTI_0 -> PUBREC msgid: 5 (0) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163728.936 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (2)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (1)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.936 (140737349940800) (2)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.936 Return code 1 from poll + +MQTT_LOG: 20240520 163728.936 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.936 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.936 (140737352902464) (5)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163728.936 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.936 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.936 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.936 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.936 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163728.936 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163728.936 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163728.936 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163728.936 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163728.936 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163728.936 (140737352902464) (6)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163728.936 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599130 + + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> isReady:353 + +MQTT_LOG: 20240520 163728.936 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163728.936 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< isReady:365 (1) + +MQTT_LOG: 20240520 163728.936 (140737349940800) (2)< Socket_getReadySocket:604 (5) + +MQTT_LOG: 20240520 163728.936 (140737352902464) (6)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163728.936 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163728.937 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163728.937 4 RTI_0 <- PUBREL msgid 5 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163728.937 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555598e40 + + +MQTT_LOG: 20240520 163728.937 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 + + +MQTT_LOG: 20240520 163728.937 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599490 + + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163728.937 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163728.937 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes + + +MQTT_LOG: 20240520 163728.937 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163728.937 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163728.937 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0000e60 + + +MQTT_LOG: 20240520 163728.937 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.937 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0000e30 + + +MQTT_LOG: 20240520 163728.937 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163728.937 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163728.937 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163728.937 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163728.937 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes + + +MQTT_LOG: 20240520 163728.937 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163728.937 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163728.937 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163728.937 4 RTI_0 -> PUBCOMP msgid 5 (0) + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163728.937 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163728.937 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163728.937 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.937 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163728.937 (140737349940800) (2)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.937 (140737349940800) (3)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.937 (140737349940800) (3)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.937 (140737349940800) (2)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.937 (140737349940800) (1)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.937 (140737349940800) (1)> MQTTClient_deliverMessage:671 + +MQTT_LOG: 20240520 163728.937 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2944 bytes + + +MQTT_LOG: 20240520 163728.937 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2912 bytes + + +MQTT_LOG: 20240520 163728.937 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) + +MQTT_LOG: 20240520 163728.937 (140737349940800) (0)< MQTTClient_receive:2820 (0) + +LOG: Successfully received message, return code 0 + +MQTT_LOG: 20240520 163728.937 (140737349940800) (0)> MQTTClient_free:634 + +MQTT_LOG: 20240520 163728.937 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2880 bytes + + +MQTT_LOG: 20240520 163728.937 (140737349940800) (0)< MQTTClient_free:636 + +MQTT_LOG: 20240520 163728.937 (140737349940800) (0)> MQTTClient_freeMessage:623 + +MQTT_LOG: 20240520 163728.937 (140737349940800) (1)> MQTTProperties_free:401 + +MQTT_LOG: 20240520 163728.937 (140737349940800) (1)< MQTTProperties_free:424 + +MQTT_LOG: 20240520 163728.937 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2832 bytes + + +MQTT_LOG: 20240520 163728.937 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes + + +MQTT_LOG: 20240520 163728.937 (140737349940800) (0)< MQTTClient_freeMessage:628 + +LOG: RECEIVED message from federateID 0 +DEBUG: RTI: Received message type 2 from federate 0. +DEBUG: RTI received timestamp message with time: 1716248248935498404. +DEBUG: RTI received timestamp message with time: 1716248248935498404. fro federate 0 +MQTT_LOG: 20240520 163728.937 Return code 0 from poll + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163728.937 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163728.937 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163728.937 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163729.037 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163729.037 Return code 0 from poll + +MQTT_LOG: 20240520 163729.037 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.037 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.037 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.037 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.037 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.037 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.037 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163729.037 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163729.037 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163729.037 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163729.037 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163729.037 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163729.037 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163729.037 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163729.037 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163729.037 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163729.037 Return code 0 from poll + +MQTT_LOG: 20240520 163729.037 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.239 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.239 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.239 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.239 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.239 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.239 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163729.239 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163729.239 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163729.239 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163729.239 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163729.239 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163729.239 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163729.239 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163729.239 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163729.239 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163729.239 Return code 1 from poll + +MQTT_LOG: 20240520 163729.239 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.239 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163729.239 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163729.239 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163729.318 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163729.318 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163729.318 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163729.318 (140737352902464) (7)> readUTFlen:387 + +MQTT_LOG: 20240520 163729.318 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7ffff00010a0 + + +MQTT_LOG: 20240520 163729.318 (140737352902464) (7)< readUTFlen:401 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163729.318 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0000e30 + + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163729.318 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2880 bytes + + +MQTT_LOG: 20240520 163729.318 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163729.318 3 RTI_RTI <- PUBLISH msgid: 3 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163729.318 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163729.318 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 + + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163729.318 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598f80 + + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163729.318 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598ec0 + + +MQTT_LOG: 20240520 163729.318 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555597700 + + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163729.318 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599e30 + + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163729.318 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599ed0 + + +MQTT_LOG: 20240520 163729.318 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163729.318 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3104 bytes + + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163729.318 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163729.318 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163729.318 3 RTI_RTI -> PUBREC msgid: 3 (0) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163729.318 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3072 bytes + + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163729.318 Return code 1 from poll + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163729.318 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163729.319 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163729.319 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599f80 + + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163729.319 3 RTI_RTI <- PUBREL msgid 3 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163729.319 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555995c0 + + +MQTT_LOG: 20240520 163729.319 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 + + +MQTT_LOG: 20240520 163729.319 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a010 + + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163729.319 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3168 bytes + + +MQTT_LOG: 20240520 163729.319 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3120 bytes + + +MQTT_LOG: 20240520 163729.319 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3088 bytes + + +MQTT_LOG: 20240520 163729.319 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163729.319 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0000e30 + + +MQTT_LOG: 20240520 163729.319 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163729.319 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001160 + + +MQTT_LOG: 20240520 163729.319 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163729.319 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3008 bytes + + +MQTT_LOG: 20240520 163729.319 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163729.319 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2992 bytes + + +MQTT_LOG: 20240520 163729.319 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163729.319 3 RTI_RTI -> PUBCOMP msgid 3 (0) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163729.319 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2976 bytes + + +MQTT_LOG: 20240520 163729.319 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163729.319 Return code 0 from poll + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.420 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.420 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163729.420 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163729.420 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163729.420 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163729.420 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163729.420 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163729.420 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163729.420 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163729.420 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163729.420 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163729.420 Return code 0 from poll + +MQTT_LOG: 20240520 163729.420 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.420 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.420 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.420 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.420 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.420 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.420 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163729.420 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163729.520 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163729.520 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163729.520 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163729.520 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163729.520 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163729.520 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163729.520 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163729.520 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163729.520 Return code 0 from poll + +MQTT_LOG: 20240520 163729.520 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.520 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.520 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.520 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.520 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.520 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.520 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163729.520 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163729.520 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163729.520 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163729.520 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163729.621 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163729.621 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163729.621 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163729.621 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163729.621 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163729.621 Return code 0 from poll + +MQTT_LOG: 20240520 163729.621 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.621 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.621 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.621 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.621 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.621 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.621 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163729.621 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163729.621 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163729.621 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163729.621 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163729.621 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163729.621 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163729.621 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163729.722 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163729.722 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163729.722 Return code 0 from poll + +MQTT_LOG: 20240520 163729.722 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.722 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.722 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.722 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.722 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.722 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.722 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163729.722 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163729.722 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163729.722 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163729.722 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163729.722 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163729.722 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163729.722 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163729.722 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163729.722 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163729.722 Return code 1 from poll + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163729.919 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163729.919 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163729.919 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163729.919 (140737352902464) (7)> readUTFlen:387 + +MQTT_LOG: 20240520 163729.919 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555598f80 + + +MQTT_LOG: 20240520 163729.919 (140737352902464) (7)< readUTFlen:401 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163729.919 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0001160 + + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163729.919 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3056 bytes + + +MQTT_LOG: 20240520 163729.919 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163729.919 3 RTI_RTI <- PUBLISH msgid: 4 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163729.919 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163729.919 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 + + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163729.919 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599600 + + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163729.919 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a0d0 + + +MQTT_LOG: 20240520 163729.919 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a180 + + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163729.919 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a260 + + +MQTT_LOG: 20240520 163729.919 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163729.919 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a340 + + +MQTT_LOG: 20240520 163729.919 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163729.919 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3280 bytes + + +MQTT_LOG: 20240520 163729.919 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163729.919 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3264 bytes + + +MQTT_LOG: 20240520 163729.919 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163729.919 3 RTI_RTI -> PUBREC msgid: 4 (0) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163729.919 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3248 bytes + + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163729.919 Return code 1 from poll + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163729.919 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163729.919 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163729.920 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163729.920 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163729.920 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a3f0 + + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163729.920 3 RTI_RTI <- PUBREL msgid 4 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163729.920 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559a1f0 + + +MQTT_LOG: 20240520 163729.920 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555599910 + + +MQTT_LOG: 20240520 163729.920 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a480 + + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163729.920 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3344 bytes + + +MQTT_LOG: 20240520 163729.920 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3296 bytes + + +MQTT_LOG: 20240520 163729.920 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3264 bytes + + +MQTT_LOG: 20240520 163729.920 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163729.920 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001160 + + +MQTT_LOG: 20240520 163729.920 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163729.920 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163729.920 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163729.920 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3184 bytes + + +MQTT_LOG: 20240520 163729.920 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163729.920 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3168 bytes + + +MQTT_LOG: 20240520 163729.920 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163729.920 3 RTI_RTI -> PUBCOMP msgid 4 (0) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163729.920 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3152 bytes + + +MQTT_LOG: 20240520 163729.920 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163729.920 Return code 0 from poll + +MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.021 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.021 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.021 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.021 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.021 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.021 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163730.021 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163730.021 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163730.021 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163730.021 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163730.021 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163730.021 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163730.021 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163730.021 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163730.021 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163730.021 Return code 0 from poll + +MQTT_LOG: 20240520 163730.021 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.021 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.021 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.021 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.122 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.122 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.122 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163730.122 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163730.122 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163730.122 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163730.122 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163730.122 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163730.122 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163730.122 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163730.122 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163730.122 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163730.122 Return code 0 from poll + +MQTT_LOG: 20240520 163730.122 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.122 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.122 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.122 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.122 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.122 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.122 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163730.223 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163730.223 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163730.223 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163730.223 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163730.223 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163730.223 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163730.223 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163730.223 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163730.223 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163730.223 Return code 0 from poll + +MQTT_LOG: 20240520 163730.223 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.223 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.223 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.223 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.223 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.223 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.223 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163730.223 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163730.223 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163730.223 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163730.324 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163730.324 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163730.324 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163730.324 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163730.324 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163730.324 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163730.324 Return code 0 from poll + +MQTT_LOG: 20240520 163730.324 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.324 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.324 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.324 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.324 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.324 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.324 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163730.324 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163730.324 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163730.324 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163730.324 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163730.324 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163730.324 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163730.425 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163730.425 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163730.425 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163730.425 Return code 1 from poll + +MQTT_LOG: 20240520 163730.425 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.425 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163730.425 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163730.425 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163730.425 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163730.425 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163730.425 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163730.425 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163730.425 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163730.425 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163730.425 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163730.425 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163730.425 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163730.425 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163730.425 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163730.425 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163730.521 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163730.521 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)> readUTFlen:387 + +MQTT_LOG: 20240520 163730.521 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599600 + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< readUTFlen:401 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163730.521 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163730.521 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3232 bytes + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163730.521 3 RTI_RTI <- PUBLISH msgid: 5 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163730.521 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163730.521 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163730.521 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a110 + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163730.521 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a540 + + +MQTT_LOG: 20240520 163730.521 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a5f0 + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163730.521 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a6d0 + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163730.521 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a7b0 + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163730.521 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3456 bytes + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163730.521 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3440 bytes + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163730.521 3 RTI_RTI -> PUBREC msgid: 5 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163730.521 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3424 bytes + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163730.521 Return code 1 from poll + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163730.521 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163730.521 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163730.521 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a860 + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163730.521 3 RTI_RTI <- PUBREL msgid 5 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163730.521 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559a660 + + +MQTT_LOG: 20240520 163730.521 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559a8b0 + + +MQTT_LOG: 20240520 163730.521 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a950 + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163730.521 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3520 bytes + + +MQTT_LOG: 20240520 163730.521 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3472 bytes + + +MQTT_LOG: 20240520 163730.521 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3440 bytes + + +MQTT_LOG: 20240520 163730.521 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3360 bytes + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163730.521 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599390 + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163730.521 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599ea0 + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163730.521 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3360 bytes + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163730.521 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3344 bytes + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163730.521 3 RTI_RTI -> PUBCOMP msgid 5 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163730.521 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3328 bytes + + +MQTT_LOG: 20240520 163730.521 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.522 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163730.522 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163730.522 Return code 0 from poll + +MQTT_LOG: 20240520 163730.522 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.522 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.522 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.522 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.522 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.522 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.522 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163730.522 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163730.522 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163730.522 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163730.522 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163730.522 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163730.522 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163730.522 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163730.522 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163730.522 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163730.522 Return code 0 from poll + +MQTT_LOG: 20240520 163730.724 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.724 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.724 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.724 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.724 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.724 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.724 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163730.724 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163730.724 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163730.724 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163730.724 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163730.724 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163730.724 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163730.724 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163730.724 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163730.724 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163730.724 Return code 0 from poll + +MQTT_LOG: 20240520 163730.724 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.724 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.724 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.825 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.825 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.825 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.825 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163730.825 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163730.825 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163730.825 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163730.825 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163730.825 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163730.825 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163730.825 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163730.825 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163730.825 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163730.825 Return code 0 from poll + +MQTT_LOG: 20240520 163730.825 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.825 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.825 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.825 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.825 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.825 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.926 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163730.926 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163730.926 (140737352902464) (6)> MQTTProtocol_keepalive:704 + +MQTT_LOG: 20240520 163730.926 (140737352902464) (6)< MQTTProtocol_keepalive:781 + +MQTT_LOG: 20240520 163730.926 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163730.926 (140737352902464) (7)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163730.926 (140737352902464) (7)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163730.926 (140737352902464) (7)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163730.926 (140737352902464) (7)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163730.926 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163730.926 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163730.926 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163730.926 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163730.926 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163730.926 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163730.926 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163730.926 Return code 0 from poll + +MQTT_LOG: 20240520 163730.926 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163730.926 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163730.926 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.026 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.026 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.026 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.026 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163731.026 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163731.026 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163731.026 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163731.026 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163731.026 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163731.026 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163731.026 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163731.026 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163731.026 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163731.026 Return code 1 from poll + +MQTT_LOG: 20240520 163731.026 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.026 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163731.026 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163731.026 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163731.026 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163731.026 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163731.122 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163731.122 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163731.122 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> readUTFlen:387 + +MQTT_LOG: 20240520 163731.122 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559a110 + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< readUTFlen:401 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163731.122 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599ea0 + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163731.122 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3408 bytes + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163731.122 3 RTI_RTI <- PUBLISH msgid: 6 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163731.122 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163731.122 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163731.122 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a580 + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163731.122 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559aa10 + + +MQTT_LOG: 20240520 163731.122 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559aac0 + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163731.122 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559aba0 + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163731.122 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559ac80 + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163731.122 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3632 bytes + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163731.122 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3616 bytes + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163731.122 3 RTI_RTI -> PUBREC msgid: 6 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163731.122 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3600 bytes + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163731.122 Return code 1 from poll + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163731.122 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163731.122 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163731.122 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559ad30 + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163731.122 3 RTI_RTI <- PUBREL msgid 6 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163731.122 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559ab30 + + +MQTT_LOG: 20240520 163731.122 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559ad80 + + +MQTT_LOG: 20240520 163731.122 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559ae20 + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163731.122 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3696 bytes + + +MQTT_LOG: 20240520 163731.122 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3648 bytes + + +MQTT_LOG: 20240520 163731.122 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3616 bytes + + +MQTT_LOG: 20240520 163731.122 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3536 bytes + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163731.122 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599ea0 + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163731.122 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a310 + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163731.122 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3536 bytes + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163731.122 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3520 bytes + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163731.122 3 RTI_RTI -> PUBCOMP msgid 6 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163731.122 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3504 bytes + + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163731.122 Return code 0 from poll + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163731.223 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163731.223 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163731.223 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163731.223 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163731.223 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163731.223 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163731.223 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163731.223 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163731.223 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163731.223 Return code 0 from poll + +MQTT_LOG: 20240520 163731.223 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.223 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.223 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.223 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.223 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.223 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.223 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163731.223 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163731.223 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163731.223 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163731.324 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163731.324 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163731.324 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163731.324 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163731.324 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163731.324 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163731.324 Return code 0 from poll + +MQTT_LOG: 20240520 163731.324 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.324 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.324 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.324 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.324 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.324 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.324 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163731.324 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163731.324 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163731.324 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163731.324 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163731.324 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163731.324 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163731.425 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163731.425 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163731.425 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163731.425 Return code 0 from poll + +MQTT_LOG: 20240520 163731.425 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.425 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.425 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.425 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.425 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.425 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.425 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163731.425 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163731.425 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163731.425 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163731.425 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163731.425 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163731.425 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163731.425 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163731.425 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163731.425 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163731.627 Return code 0 from poll + +MQTT_LOG: 20240520 163731.627 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.627 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.627 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.627 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.627 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.627 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.627 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163731.627 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163731.627 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163731.627 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163731.627 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163731.627 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163731.627 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163731.627 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163731.627 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163731.627 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163731.627 Return code 1 from poll + +MQTT_LOG: 20240520 163731.627 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.627 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163731.724 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163731.724 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163731.724 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> readUTFlen:387 + +MQTT_LOG: 20240520 163731.724 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559a580 + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< readUTFlen:401 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163731.724 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a310 + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163731.724 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3584 bytes + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163731.724 3 RTI_RTI <- PUBLISH msgid: 7 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163731.724 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163731.724 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163731.724 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559aaf0 + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163731.724 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559aee0 + + +MQTT_LOG: 20240520 163731.724 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559af90 + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163731.724 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559b070 + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163731.724 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559b150 + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163731.724 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3808 bytes + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163731.724 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3792 bytes + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163731.724 3 RTI_RTI -> PUBREC msgid: 7 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163731.724 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3776 bytes + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163731.724 Return code 1 from poll + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163731.724 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163731.724 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163731.724 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559b200 + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163731.724 3 RTI_RTI <- PUBREL msgid 7 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163731.724 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559b000 + + +MQTT_LOG: 20240520 163731.724 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559b250 + + +MQTT_LOG: 20240520 163731.724 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559b2f0 + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163731.724 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3872 bytes + + +MQTT_LOG: 20240520 163731.724 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3824 bytes + + +MQTT_LOG: 20240520 163731.724 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3792 bytes + + +MQTT_LOG: 20240520 163731.724 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3712 bytes + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163731.724 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a310 + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163731.724 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a780 + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163731.724 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3712 bytes + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163731.724 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3696 bytes + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163731.724 3 RTI_RTI -> PUBCOMP msgid 7 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163731.724 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3680 bytes + + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163731.724 Return code 0 from poll + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.825 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.825 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.825 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.825 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163731.825 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163731.825 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163731.825 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163731.825 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163731.825 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163731.825 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163731.825 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163731.825 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163731.825 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163731.825 Return code 0 from poll + +MQTT_LOG: 20240520 163731.825 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.825 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.825 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.825 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.825 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.825 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.926 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163731.926 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163731.926 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163731.926 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163731.926 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163731.926 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163731.926 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163731.926 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163731.926 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163731.926 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163731.926 Return code 0 from poll + +MQTT_LOG: 20240520 163731.926 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.926 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.926 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.926 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.926 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163731.926 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163731.926 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163731.926 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163731.926 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163732.026 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163732.026 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163732.026 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163732.026 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163732.026 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163732.026 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163732.026 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163732.026 Return code 0 from poll + +MQTT_LOG: 20240520 163732.026 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.026 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.026 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.026 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.026 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.026 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.026 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163732.026 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163732.026 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163732.026 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163732.026 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163732.026 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163732.127 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163732.127 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163732.127 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163732.127 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163732.127 Return code 0 from poll + +MQTT_LOG: 20240520 163732.127 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.127 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.127 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.127 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.127 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.127 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.127 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163732.127 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163732.127 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163732.127 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163732.127 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163732.127 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163732.127 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163732.127 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163732.127 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163732.228 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163732.228 Return code 1 from poll + +MQTT_LOG: 20240520 163732.228 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.228 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163732.228 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163732.228 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163732.228 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163732.228 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163732.228 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163732.228 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163732.228 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163732.228 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163732.228 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163732.228 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163732.228 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163732.228 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163732.228 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163732.228 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163732.228 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163732.228 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163732.325 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163732.325 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (7)> readUTFlen:387 + +MQTT_LOG: 20240520 163732.325 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559aaf0 + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (7)< readUTFlen:401 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163732.325 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a780 + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163732.325 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3760 bytes + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163732.325 3 RTI_RTI <- PUBLISH msgid: 8 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163732.325 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163732.325 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163732.325 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559afc0 + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163732.325 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559b3b0 + + +MQTT_LOG: 20240520 163732.325 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559b460 + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163732.325 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559b540 + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163732.325 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559b620 + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163732.325 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3984 bytes + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163732.325 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3968 bytes + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163732.325 3 RTI_RTI -> PUBREC msgid: 8 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163732.325 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3952 bytes + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163732.325 Return code 1 from poll + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163732.325 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163732.325 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163732.325 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559b6d0 + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163732.325 3 RTI_RTI <- PUBREL msgid 8 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163732.325 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559b4d0 + + +MQTT_LOG: 20240520 163732.325 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559b720 + + +MQTT_LOG: 20240520 163732.325 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559b7c0 + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163732.325 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4048 bytes + + +MQTT_LOG: 20240520 163732.325 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4000 bytes + + +MQTT_LOG: 20240520 163732.325 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3968 bytes + + +MQTT_LOG: 20240520 163732.325 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3888 bytes + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163732.325 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a780 + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163732.325 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559ac50 + + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163732.325 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163732.325 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3888 bytes + + +MQTT_LOG: 20240520 163732.326 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163732.326 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3872 bytes + + +MQTT_LOG: 20240520 163732.326 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163732.326 3 RTI_RTI -> PUBCOMP msgid 8 (0) + +MQTT_LOG: 20240520 163732.326 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163732.326 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3856 bytes + + +MQTT_LOG: 20240520 163732.326 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163732.326 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163732.326 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163732.326 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163732.326 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163732.326 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163732.326 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163732.326 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163732.326 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.326 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.326 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.326 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.326 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163732.326 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163732.426 Return code 0 from poll + +MQTT_LOG: 20240520 163732.426 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.426 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.426 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.426 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.426 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.426 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.426 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163732.426 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163732.426 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163732.426 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163732.426 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163732.426 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163732.426 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163732.426 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163732.426 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163732.426 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163732.426 Return code 0 from poll + +MQTT_LOG: 20240520 163732.426 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.426 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.527 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.527 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.527 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.527 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.527 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163732.527 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163732.527 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163732.527 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163732.527 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163732.527 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163732.527 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163732.527 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163732.527 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163732.527 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163732.527 Return code 0 from poll + +MQTT_LOG: 20240520 163732.527 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.527 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.527 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.527 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.527 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.628 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.628 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163732.628 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163732.628 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163732.628 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163732.628 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163732.628 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163732.628 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163732.628 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163732.628 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163732.628 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163732.628 Return code 0 from poll + +MQTT_LOG: 20240520 163732.628 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.628 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.628 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.628 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.628 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.628 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.628 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163732.628 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163732.729 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163732.729 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163732.729 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163732.729 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163732.729 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163732.729 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163732.729 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163732.729 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163732.729 Return code 0 from poll + +MQTT_LOG: 20240520 163732.729 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.729 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.729 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.729 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.729 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.729 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.729 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163732.729 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163732.729 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163732.729 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163732.729 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163732.830 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163732.830 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163732.830 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163732.830 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163732.830 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163732.830 Return code 1 from poll + +MQTT_LOG: 20240520 163732.830 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.830 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163732.830 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163732.830 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163732.830 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163732.830 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163732.830 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163732.830 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163732.830 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163732.830 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163732.830 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163732.830 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163732.830 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163732.830 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163732.926 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163732.926 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> readUTFlen:387 + +MQTT_LOG: 20240520 163732.926 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559afc0 + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< readUTFlen:401 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163732.926 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559ac50 + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163732.926 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3936 bytes + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163732.926 3 RTI_RTI <- PUBLISH msgid: 9 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163732.926 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163732.926 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163732.926 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559b490 + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163732.926 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559b880 + + +MQTT_LOG: 20240520 163732.926 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559b930 + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163732.926 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559ba10 + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163732.926 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559baf0 + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163732.926 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4160 bytes + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163732.926 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4144 bytes + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163732.926 3 RTI_RTI -> PUBREC msgid: 9 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163732.926 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 4128 bytes + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTProtocol_keepalive:704 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTProtocol_keepalive:781 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163732.926 Return code 1 from poll + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163732.926 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163732.926 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163732.926 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559bba0 + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163732.926 3 RTI_RTI <- PUBREL msgid 9 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163732.926 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559b9a0 + + +MQTT_LOG: 20240520 163732.926 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559bbf0 + + +MQTT_LOG: 20240520 163732.926 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559bc90 + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163732.926 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4224 bytes + + +MQTT_LOG: 20240520 163732.926 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4176 bytes + + +MQTT_LOG: 20240520 163732.926 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4144 bytes + + +MQTT_LOG: 20240520 163732.926 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4064 bytes + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163732.926 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559ac50 + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163732.926 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559b120 + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163732.926 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4064 bytes + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163732.926 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4048 bytes + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163732.926 3 RTI_RTI -> PUBCOMP msgid 9 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163732.926 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 4032 bytes + + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163732.926 Return code 0 from poll + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163733.027 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163733.027 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163733.027 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163733.027 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163733.027 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163733.027 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163733.027 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163733.027 Return code 0 from poll + +MQTT_LOG: 20240520 163733.027 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.027 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.027 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.027 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.027 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.027 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.027 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163733.027 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163733.027 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163733.027 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163733.027 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163733.027 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163733.128 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163733.128 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163733.128 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163733.128 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163733.128 Return code 0 from poll + +MQTT_LOG: 20240520 163733.128 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.128 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.128 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.128 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.128 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.128 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.128 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163733.128 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163733.128 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163733.128 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163733.128 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163733.128 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163733.128 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163733.128 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163733.128 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163733.229 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163733.229 Return code 0 from poll + +MQTT_LOG: 20240520 163733.229 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.229 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.229 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.229 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.229 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.229 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.229 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163733.229 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163733.229 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163733.229 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163733.229 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163733.229 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163733.229 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163733.229 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163733.229 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163733.229 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163733.229 Return code 0 from poll + +MQTT_LOG: 20240520 163733.229 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.431 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.431 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.431 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.431 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.431 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.431 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163733.431 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163733.431 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163733.431 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163733.431 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163733.431 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163733.431 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163733.431 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163733.431 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163733.431 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163733.431 Return code 1 from poll + +MQTT_LOG: 20240520 163733.431 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.431 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163733.431 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163733.431 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163733.528 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163733.528 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163733.528 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163733.528 (140737352902464) (7)> readUTFlen:387 + +MQTT_LOG: 20240520 163733.528 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559b490 + + +MQTT_LOG: 20240520 163733.528 (140737352902464) (7)< readUTFlen:401 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163733.528 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559b120 + + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163733.528 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 4112 bytes + + +MQTT_LOG: 20240520 163733.528 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163733.528 3 RTI_RTI <- PUBLISH msgid: 10 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163733.528 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163733.528 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 + + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163733.528 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559b960 + + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163733.528 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559bd50 + + +MQTT_LOG: 20240520 163733.528 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559be00 + + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163733.528 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559bee0 + + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163733.528 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559bfc0 + + +MQTT_LOG: 20240520 163733.528 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163733.528 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4336 bytes + + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163733.528 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4320 bytes + + +MQTT_LOG: 20240520 163733.528 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163733.528 3 RTI_RTI -> PUBREC msgid: 10 (0) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163733.528 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 4304 bytes + + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163733.528 Return code 1 from poll + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163733.528 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163733.529 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163733.529 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559c070 + + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163733.529 3 RTI_RTI <- PUBREL msgid 10 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163733.529 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559be70 + + +MQTT_LOG: 20240520 163733.529 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559c0c0 + + +MQTT_LOG: 20240520 163733.529 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559c160 + + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163733.529 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4400 bytes + + +MQTT_LOG: 20240520 163733.529 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4352 bytes + + +MQTT_LOG: 20240520 163733.529 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4320 bytes + + +MQTT_LOG: 20240520 163733.529 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4240 bytes + + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163733.529 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559b120 + + +MQTT_LOG: 20240520 163733.529 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163733.529 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559b5f0 + + +MQTT_LOG: 20240520 163733.529 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163733.529 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4240 bytes + + +MQTT_LOG: 20240520 163733.529 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163733.529 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4224 bytes + + +MQTT_LOG: 20240520 163733.529 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163733.529 3 RTI_RTI -> PUBCOMP msgid 10 (0) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163733.529 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 4208 bytes + + +MQTT_LOG: 20240520 163733.529 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163733.529 Return code 0 from poll + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.630 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.630 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163733.630 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163733.630 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163733.630 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163733.630 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163733.630 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163733.630 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163733.630 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163733.630 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163733.630 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163733.630 Return code 0 from poll + +MQTT_LOG: 20240520 163733.630 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.630 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.630 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.630 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.630 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.630 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.630 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163733.630 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163733.730 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163733.730 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163733.730 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163733.730 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163733.730 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163733.730 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163733.730 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163733.730 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163733.730 Return code 0 from poll + +MQTT_LOG: 20240520 163733.730 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.730 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.730 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.730 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.730 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.730 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.730 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163733.730 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163733.730 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163733.730 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163733.730 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163733.831 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163733.831 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163733.831 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163733.831 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163733.831 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163733.831 Return code 0 from poll + +MQTT_LOG: 20240520 163733.831 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.831 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.831 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.831 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.831 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.831 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.831 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163733.831 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163733.831 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163733.831 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163733.831 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163733.831 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163733.831 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163733.831 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163733.932 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163733.932 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163733.932 Return code 0 from poll + +MQTT_LOG: 20240520 163733.932 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.932 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.932 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.932 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.932 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163733.932 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163733.932 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163733.932 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163733.932 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163733.932 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163733.932 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163733.932 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163733.932 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163733.932 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163733.932 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163733.932 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163733.932 Return code 1 from poll + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163734.130 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163734.130 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163734.130 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> readUTFlen:387 + +MQTT_LOG: 20240520 163734.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559b960 + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< readUTFlen:401 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163734.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559b5f0 + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163734.130 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 4288 bytes + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163734.130 3 RTI_RTI <- PUBLISH msgid: 11 qos: 2 retained: 0 payload len(3):  + +MQTT_LOG: 20240520 163734.130 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163734.130 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163734.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559be30 + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163734.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559c220 + + +MQTT_LOG: 20240520 163734.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559c2d0 + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163734.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559c3b0 + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163734.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559c490 + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163734.130 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4512 bytes + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163734.130 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4496 bytes + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163734.130 3 RTI_RTI -> PUBREC msgid: 11 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163734.130 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 4480 bytes + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163734.130 Return code 1 from poll + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163734.130 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163734.130 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163734.130 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559c540 + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163734.130 3 RTI_RTI <- PUBREL msgid 11 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163734.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559c340 + + +MQTT_LOG: 20240520 163734.130 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559c590 + + +MQTT_LOG: 20240520 163734.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559c630 + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163734.130 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4576 bytes + + +MQTT_LOG: 20240520 163734.130 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4528 bytes + + +MQTT_LOG: 20240520 163734.130 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4496 bytes + + +MQTT_LOG: 20240520 163734.130 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4416 bytes + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163734.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559b5f0 + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163734.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559bac0 + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163734.130 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4416 bytes + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163734.130 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4400 bytes + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163734.130 3 RTI_RTI -> PUBCOMP msgid 11 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163734.130 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 4384 bytes + + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163734.130 Return code 0 from poll + +MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.231 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.231 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.231 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.231 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.231 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.231 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163734.231 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163734.231 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163734.231 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163734.231 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163734.231 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163734.231 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163734.231 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163734.231 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163734.231 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163734.231 Return code 0 from poll + +MQTT_LOG: 20240520 163734.231 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.231 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.231 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.231 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.332 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.332 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.332 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163734.332 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163734.332 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163734.332 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163734.332 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163734.332 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163734.332 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163734.332 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163734.332 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163734.332 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163734.332 Return code 0 from poll + +MQTT_LOG: 20240520 163734.332 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.332 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.332 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.332 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.332 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.332 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.332 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163734.433 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163734.433 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163734.433 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163734.433 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163734.433 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163734.433 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163734.433 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163734.433 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163734.433 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163734.433 Return code 0 from poll + +MQTT_LOG: 20240520 163734.433 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.433 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.433 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.433 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.433 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.433 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.433 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163734.433 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163734.433 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163734.433 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163734.534 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163734.534 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163734.534 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163734.534 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163734.534 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163734.534 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163734.534 Return code 0 from poll + +MQTT_LOG: 20240520 163734.534 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.534 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.534 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.534 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.534 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.534 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.534 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163734.534 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163734.534 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163734.534 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163734.534 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163734.534 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163734.534 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163734.635 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163734.635 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163734.635 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163734.635 Return code 1 from poll + +MQTT_LOG: 20240520 163734.635 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.635 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163734.635 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163734.635 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163734.635 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163734.635 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163734.635 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163734.635 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163734.635 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163734.635 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163734.635 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163734.635 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163734.635 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163734.635 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163734.635 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163734.635 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163734.702 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163734.702 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)> readUTFlen:387 + +MQTT_LOG: 20240520 163734.702 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559be30 + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< readUTFlen:401 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163734.702 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559bac0 + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163734.702 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 4464 bytes + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163734.702 3 RTI_RTI <- PUBLISH msgid: 12 qos: 2 retained: 0 payload len(1):  + +MQTT_LOG: 20240520 163734.702 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163734.702 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163734.702 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559c300 + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163734.702 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559c6f0 + + +MQTT_LOG: 20240520 163734.702 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559c7a0 + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163734.702 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559c880 + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163734.702 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559c960 + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163734.702 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4688 bytes + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163734.702 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4672 bytes + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163734.702 3 RTI_RTI -> PUBREC msgid: 12 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163734.702 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 4656 bytes + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163734.702 Return code 1 from poll + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< Socket_getReadySocket:604 (3) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163734.702 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163734.702 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163734.702 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559ca10 + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163734.702 3 RTI_RTI <- PUBREL msgid 12 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163734.702 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559c810 + + +MQTT_LOG: 20240520 163734.702 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559ca60 + + +MQTT_LOG: 20240520 163734.702 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559cb00 + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163734.702 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4752 bytes + + +MQTT_LOG: 20240520 163734.702 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4704 bytes + + +MQTT_LOG: 20240520 163734.702 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4672 bytes + + +MQTT_LOG: 20240520 163734.702 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4592 bytes + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163734.702 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559bac0 + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163734.702 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559bf90 + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163734.702 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4592 bytes + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163734.702 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4576 bytes + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163734.702 3 RTI_RTI -> PUBCOMP msgid 12 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163734.702 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 4560 bytes + + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163734.702 Return code 0 from poll + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163734.702 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163734.702 Return code 0 from poll + +MQTT_LOG: 20240520 163734.904 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.904 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.904 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.904 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.904 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.904 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.904 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163734.904 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163734.904 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163734.904 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163734.904 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163734.904 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163734.904 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163734.904 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163734.904 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163734.904 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163734.904 Return code 0 from poll + +MQTT_LOG: 20240520 163734.904 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163734.904 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163734.904 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.004 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.004 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163735.004 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (6)> MQTTProtocol_keepalive:704 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (6)< MQTTProtocol_keepalive:781 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (7)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (7)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (7)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (7)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163735.004 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163735.004 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163735.004 Return code 0 from poll + +MQTT_LOG: 20240520 163735.105 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.105 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.105 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.105 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.105 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.105 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.105 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163735.105 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163735.105 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163735.105 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163735.105 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163735.105 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163735.105 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163735.105 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163735.105 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163735.105 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163735.105 Return code 1 from poll + +MQTT_LOG: 20240520 163735.105 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.105 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.105 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.151 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163735.151 (140737352902464) (5)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163735.151 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163735.151 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163735.151 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163735.151 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163735.151 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163735.151 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163735.151 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163735.151 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163735.151 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163735.151 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163735.151 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163735.151 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163735.151 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163735.151 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163735.151 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163735.151 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163735.151 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163735.151 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPacket_publish:562 + +MQTT_LOG: 20240520 163735.152 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)> readUTFlen:387 + +MQTT_LOG: 20240520 163735.152 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559ca10 + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< readUTFlen:401 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_publish:603 + +MQTT_LOG: 20240520 163735.152 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559bf90 + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPersistence_putPacket:458 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) + +MQTT_LOG: 20240520 163735.152 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 4656 bytes + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 + +MQTT_LOG: 20240520 163735.152 4 RTI_0 <- PUBLISH msgid: 6 qos: 2 retained: 0 payload len(1):  + +MQTT_LOG: 20240520 163735.152 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 + + +MQTT_LOG: 20240520 163735.152 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559c070 + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTProtocol_storePublication:266 + +MQTT_LOG: 20240520 163735.152 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559c1e0 + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTProtocol_storePublication:287 + +MQTT_LOG: 20240520 163735.152 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599490 + + +MQTT_LOG: 20240520 163735.152 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559cc80 + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPacket_send_pubrec:737 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163735.152 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559cd60 + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163735.152 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559ce40 + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163735.152 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4880 bytes + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163735.152 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4864 bytes + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163735.152 4 RTI_0 -> PUBREC msgid: 6 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPacket_freePublish:614 + +MQTT_LOG: 20240520 163735.152 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 4848 bytes + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_freePublish:620 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163735.152 Return code 1 from poll + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< isReady:365 (1) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (5)< Socket_getReadySocket:604 (4) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (5)> MQTTPacket_Factory:112 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)> Socket_getch:620 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163735.152 queueChar: index is now 1, headerlen 1 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPacket_decode:336 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)> WebSocket_getch:591 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> Socket_getch:620 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> SocketBuffer_queueChar:314 + +MQTT_LOG: 20240520 163735.152 queueChar: index is now 2, headerlen 2 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< SocketBuffer_queueChar:339 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< Socket_getch:641 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< WebSocket_getch:628 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_decode:352 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> WebSocket_getdata:672 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)> Socket_getdata:658 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> SocketBuffer_getQueuedData:180 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< SocketBuffer_getQueuedData:214 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> SocketBuffer_complete:289 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< SocketBuffer_complete:299 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< Socket_getdata:692 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPacket_ack:800 + +MQTT_LOG: 20240520 163735.152 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559cef0 + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_ack:840 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (5)< MQTTPacket_Factory:179 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 + +MQTT_LOG: 20240520 163735.152 4 RTI_0 <- PUBREL msgid 6 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> Protocol_processPublication:1150 + +MQTT_LOG: 20240520 163735.152 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559ccf0 + + +MQTT_LOG: 20240520 163735.152 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559cf40 + + +MQTT_LOG: 20240520 163735.152 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559cfe0 + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< Protocol_processPublication:1197 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPersistence_remove:550 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPersistence_remove:608 (0) + +MQTT_LOG: 20240520 163735.152 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4944 bytes + + +MQTT_LOG: 20240520 163735.152 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4896 bytes + + +MQTT_LOG: 20240520 163735.152 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4864 bytes + + +MQTT_LOG: 20240520 163735.152 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4784 bytes + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)> MQTTPacket_send_ack:654 + +MQTT_LOG: 20240520 163735.152 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559bf90 + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> MQTTPacket_send:201 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163735.152 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559c460 + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> MQTTPacket_encode:304 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< MQTTPacket_encode:317 (1) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> WebSocket_putdatas:944 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (10)> Socket_putdatas:797 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (11)> Socket_writev:721 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (11)< Socket_writev:773 (4) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (10)< Socket_putdatas:852 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< WebSocket_putdatas:975 (0) + +MQTT_LOG: 20240520 163735.152 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4784 bytes + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< MQTTPacket_send:236 (0) + +MQTT_LOG: 20240520 163735.152 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4768 bytes + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) + +MQTT_LOG: 20240520 163735.152 4 RTI_0 -> PUBCOMP msgid 6 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) + +MQTT_LOG: 20240520 163735.152 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 4752 bytes + + +MQTT_LOG: 20240520 163735.152 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163735.152 Return code 0 from poll + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.253 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.253 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.253 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163735.253 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163735.253 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163735.253 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163735.253 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163735.253 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163735.253 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163735.253 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163735.253 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163735.253 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163735.253 Return code 0 from poll + +MQTT_LOG: 20240520 163735.253 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.253 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.253 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.253 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.253 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.253 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.253 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163735.353 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163735.353 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163735.353 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163735.353 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163735.353 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163735.353 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163735.353 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163735.353 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163735.353 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163735.353 Return code 0 from poll + +MQTT_LOG: 20240520 163735.353 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.353 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.353 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.353 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.353 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.353 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.353 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163735.353 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163735.353 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163735.353 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163735.454 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163735.454 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163735.454 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163735.454 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163735.454 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163735.454 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163735.454 Return code 0 from poll + +MQTT_LOG: 20240520 163735.454 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.454 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.454 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.454 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.454 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.454 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.454 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163735.454 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163735.454 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163735.454 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163735.454 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163735.454 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163735.454 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163735.555 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163735.555 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163735.555 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163735.555 Return code 0 from poll + +MQTT_LOG: 20240520 163735.555 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.555 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.555 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.555 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.555 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.555 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.555 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163735.555 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163735.555 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163735.555 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163735.555 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163735.555 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163735.555 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163735.555 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163735.555 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163735.555 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163735.757 Return code 0 from poll + +MQTT_LOG: 20240520 163735.757 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.757 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.757 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.757 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.757 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.757 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.757 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163735.757 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163735.757 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163735.757 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163735.757 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163735.757 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163735.757 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163735.757 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163735.757 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163735.757 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163735.757 Return code 0 from poll + +MQTT_LOG: 20240520 163735.757 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.757 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.857 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.857 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.857 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.857 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.857 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163735.857 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163735.857 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163735.857 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163735.857 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163735.857 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163735.857 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163735.857 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163735.857 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163735.857 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163735.857 Return code 0 from poll + +MQTT_LOG: 20240520 163735.857 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.857 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.857 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.857 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.857 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.958 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.958 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163735.958 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163735.958 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163735.958 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163735.958 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163735.958 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163735.958 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163735.958 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163735.958 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163735.958 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163735.958 Return code 0 from poll + +MQTT_LOG: 20240520 163735.958 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.958 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.958 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.958 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.958 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163735.958 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163735.958 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163735.958 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163736.059 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163736.059 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163736.059 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163736.059 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163736.059 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163736.059 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163736.059 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163736.059 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163736.059 Return code 0 from poll + +MQTT_LOG: 20240520 163736.059 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.059 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.059 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.059 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.059 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.059 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.059 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163736.059 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163736.059 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163736.059 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163736.059 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163736.160 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163736.160 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163736.160 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163736.160 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163736.160 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163736.160 Return code 0 from poll + +MQTT_LOG: 20240520 163736.160 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.160 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.160 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.160 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.160 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.160 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.160 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163736.160 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163736.160 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163736.160 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163736.160 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163736.160 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163736.160 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163736.160 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163736.260 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163736.260 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163736.260 Return code 0 from poll + +MQTT_LOG: 20240520 163736.260 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.260 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.260 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.260 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.260 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.260 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.260 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163736.260 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163736.260 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163736.260 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163736.260 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163736.260 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163736.260 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163736.260 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163736.260 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163736.260 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163736.260 Return code 0 from poll + +MQTT_LOG: 20240520 163736.462 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.462 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.462 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.462 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.462 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.462 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.462 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163736.462 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163736.462 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163736.462 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163736.462 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163736.462 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163736.462 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163736.462 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163736.462 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163736.462 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163736.462 Return code 0 from poll + +MQTT_LOG: 20240520 163736.462 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.462 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.462 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.563 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.563 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.563 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.563 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163736.563 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163736.563 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163736.563 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163736.563 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163736.563 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163736.563 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163736.563 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163736.563 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163736.563 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163736.563 Return code 0 from poll + +MQTT_LOG: 20240520 163736.563 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.563 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.563 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.563 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.563 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.563 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.664 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163736.664 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163736.664 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163736.664 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163736.664 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163736.664 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163736.664 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163736.664 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163736.664 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163736.664 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163736.664 Return code 0 from poll + +MQTT_LOG: 20240520 163736.664 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.664 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.664 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.664 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.664 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.664 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.664 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163736.664 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163736.664 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163736.765 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163736.765 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163736.765 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163736.765 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163736.765 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163736.765 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163736.765 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163736.765 Return code 0 from poll + +MQTT_LOG: 20240520 163736.765 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.765 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.765 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.765 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.765 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.765 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.765 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163736.765 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163736.765 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163736.765 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163736.765 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163736.765 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163736.866 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163736.866 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163736.866 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163736.866 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163736.866 Return code 0 from poll + +MQTT_LOG: 20240520 163736.866 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.866 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.866 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.866 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.866 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.866 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.866 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163736.866 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163736.866 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163736.866 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163736.866 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163736.866 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163736.866 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163736.866 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163736.866 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163736.966 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163736.966 Return code 0 from poll + +MQTT_LOG: 20240520 163736.966 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.966 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.966 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.966 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.966 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163736.966 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163736.966 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163736.966 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163736.966 (140737352902464) (6)> MQTTProtocol_keepalive:704 + +MQTT_LOG: 20240520 163736.966 (140737352902464) (6)< MQTTProtocol_keepalive:781 + +MQTT_LOG: 20240520 163736.966 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163736.966 (140737352902464) (7)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163736.966 (140737352902464) (7)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163736.966 (140737352902464) (7)> MQTTProtocol_retries:795 + +MQTT_LOG: 20240520 163736.966 (140737352902464) (7)< MQTTProtocol_retries:862 + +MQTT_LOG: 20240520 163736.966 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163736.966 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163736.966 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163737.067 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163737.067 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163737.067 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163737.067 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163737.067 Return code 0 from poll + +MQTT_LOG: 20240520 163737.067 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.067 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.067 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.067 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.067 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.067 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.067 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163737.067 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163737.067 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163737.067 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163737.067 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163737.067 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163737.067 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163737.067 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163737.067 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163737.168 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163737.168 Return code 0 from poll + +MQTT_LOG: 20240520 163737.168 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.168 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.168 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.168 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.168 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.168 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.168 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163737.168 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163737.168 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163737.168 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163737.168 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163737.168 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163737.168 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163737.168 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163737.168 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163737.168 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163737.168 Return code 0 from poll + +MQTT_LOG: 20240520 163737.168 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.370 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.370 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.370 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.370 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.370 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.370 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163737.370 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163737.370 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163737.370 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163737.370 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163737.370 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163737.370 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163737.370 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163737.370 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163737.370 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163737.370 Return code 0 from poll + +MQTT_LOG: 20240520 163737.370 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.370 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.370 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.370 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.470 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.470 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.470 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163737.470 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163737.470 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163737.470 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163737.470 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163737.470 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163737.470 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163737.470 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163737.470 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163737.470 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163737.470 Return code 0 from poll + +MQTT_LOG: 20240520 163737.470 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.470 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.470 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.470 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.470 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.470 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.470 (140737352902464) (5)< Socket_getReadySocket:604 (0) + +MQTT_LOG: 20240520 163737.571 (140737352902464) (5)> MQTTClient_retry:2545 + +MQTT_LOG: 20240520 163737.571 (140737352902464) (6)> MQTTProtocol_retry:905 + +MQTT_LOG: 20240520 163737.571 (140737352902464) (6)< MQTTProtocol_retry:924 + +MQTT_LOG: 20240520 163737.571 (140737352902464) (5)< MQTTClient_retry:2555 + +MQTT_LOG: 20240520 163737.571 (140737352902464) (4)< MQTTClient_cycle:2650 (0) + +MQTT_LOG: 20240520 163737.571 (140737352902464) (4)> MQTTClient_cycle:2566 + +MQTT_LOG: 20240520 163737.571 (140737352902464) (5)> Socket_getReadySocket:495 + +MQTT_LOG: 20240520 163737.571 (140737352902464) (6)> Socket_continueWrites:1402 + +MQTT_LOG: 20240520 163737.571 (140737352902464) (6)< Socket_continueWrites:1453 (0) + +MQTT_LOG: 20240520 163737.571 Return code 0 from poll + +MQTT_LOG: 20240520 163737.571 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.571 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.571 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.571 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.571 (140737352902464) (6)> isReady:353 + +MQTT_LOG: 20240520 163737.571 (140737352902464) (6)< isReady:365 (0) + +MQTT_LOG: 20240520 163737.571 (140737352902464) (5) \ No newline at end of file diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index d5de61819..469bdbbb1 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -27,8 +27,8 @@ int MQTT_connect_with_retry(MQTTClient client, MQTTClient_connectOptions* conn_o int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos); void log_callback(enum MQTTCLIENT_TRACE_LEVELS level, char* message) { - (void)level; // Explicitly mark the parameter as unused - lf_print("MQTT_LOG: %s\n", message); + (void)level; // Explicitly mark the parameter as unused + lf_print("MQTT_LOG: %s\n", message); } /** @@ -127,49 +127,67 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { // Set the trace callback function MQTTClient_setTraceCallback(log_callback); - // Step1: The listener first waits for a MSG_TYPE_MQTT_JOIN message, through the topic federationID_listenerID. - unsigned char buffer[1 + sizeof(uint16_t)]; - read_from_netdrv_fail_on_error(listener_netdrv, buffer, 1 + sizeof(uint16_t), NULL, "MQTT receive failed."); - if (buffer[0] != MSG_TYPE_MQTT_JOIN) { - lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_JOIN."); - } - uint16_t fed_id = extract_uint16(buffer + 1); - LF_PRINT_LOG("Received MSG_TYPE_MQTT_JOIN message from federate %d.", fed_id); - - // The conncetor netdriver connects to the broker. - connector_nedrv->my_federate_id = (int)fed_id; - LF_PRINT_DEBUG("Setting up MQTTServer_id for federate %d.", fed_id); - set_MQTTServer_id(connector_priv, listener_netdrv->my_federate_id, connector_nedrv->my_federate_id); - LF_PRINT_DEBUG("Setup MQTTServer_id for federate %d as %s.", fed_id, connector_priv->client_id); + instant_t start_connect = lf_time_physical(); int rc; - LF_PRINT_DEBUG("Creating MQTTClient for federate %d.", fed_id); - if ((rc = MQTTClient_create(&connector_priv->client, ADDRESS, connector_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, - NULL)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to create client, return code %d\n", rc); - } - connector_priv->conn_opts.keepAliveInterval = 20; - connector_priv->conn_opts.cleansession = 1; - LF_PRINT_DEBUG("Connecting MQTTClient for federate %d.", fed_id); - if ((rc = MQTT_connect_with_retry(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { - MQTTClient_destroy(&connector_priv->client); - lf_print_error_and_exit("Failed to connect, return code %d\n", rc); - } - LF_PRINT_DEBUG("Connected, return code %d\n", rc); - LF_PRINT_DEBUG("Creating topic for federate %d.", fed_id); - // Subscribe to topic: federationID_fedID_to_listenerID - // This is the channel where the federate sends messages to the listener. - char* topic_to_subscribe = - create_topic_federation_id_A_to_B(connector_nedrv->federation_id, fed_id, listener_netdrv->my_federate_id); - LF_PRINT_LOG("Starting subscribe"); - if ((rc = MQTT_subscribe_with_retry(connector_priv->client, (const char*)topic_to_subscribe, QOS)) != - MQTTCLIENT_SUCCESS) { - MQTTClient_disconnect(connector_priv->client, TIMEOUT); - MQTTClient_destroy(&connector_priv->client); - lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); + unsigned char buffer[1 + sizeof(uint16_t)]; + uint16_t fed_id = 1000; //TODO: FIX. + char* topic_to_subscribe = NULL; + while (1) { + if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { + lf_print_error("Failed to connect with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); + break; + } + // Step1: The listener first waits for a MSG_TYPE_MQTT_JOIN message, through the topic federationID_listenerID. + + read_from_netdrv_fail_on_error(listener_netdrv, buffer, 1 + sizeof(uint16_t), NULL, "MQTT receive failed."); + if (buffer[0] != MSG_TYPE_MQTT_JOIN) { + lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_JOIN."); + } + fed_id = extract_uint16(buffer + 1); + LF_PRINT_LOG("Received MSG_TYPE_MQTT_JOIN message from federate %d.", fed_id); + + // The conncetor netdriver connects to the broker. + connector_nedrv->my_federate_id = (int)fed_id; + LF_PRINT_DEBUG("Setting up MQTTServer_id for federate %d.", fed_id); + set_MQTTServer_id(connector_priv, listener_netdrv->my_federate_id, connector_nedrv->my_federate_id); + LF_PRINT_DEBUG("Setup MQTTServer_id for federate %d as %s.", fed_id, connector_priv->client_id); + + LF_PRINT_DEBUG("Creating topic for federate %d.", fed_id); + // Subscribe to topic: federationID_fedID_to_listenerID + // This is the channel where the federate sends messages to the listener. + topic_to_subscribe = + create_topic_federation_id_A_to_B(connector_nedrv->federation_id, fed_id, listener_netdrv->my_federate_id); + + LF_PRINT_DEBUG("Creating MQTTClient for federate %d.", fed_id); + if ((rc = MQTTClient_create(&connector_priv->client, ADDRESS, connector_priv->client_id, + MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { + lf_print_error("Failed to create client, return code %d\n", rc); + continue; + } + connector_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; + connector_priv->conn_opts.cleansession = MQTTcleansession; + LF_PRINT_DEBUG("Connecting MQTTClient for federate %d.", fed_id); + if ((rc = MQTT_connect_with_retry(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + MQTTClient_destroy(&connector_priv->client); + lf_print_error("Failed to connect, return code %d\n", rc); + continue; + } + LF_PRINT_DEBUG("Connected, return code %d\n", rc); + LF_PRINT_LOG("Starting subscribe"); + if ((rc = MQTT_subscribe_with_retry(connector_priv->client, (const char*)topic_to_subscribe, QOS)) != + MQTTCLIENT_SUCCESS) { + MQTTClient_disconnect(connector_priv->client, TIMEOUT); + MQTTClient_destroy(&connector_priv->client); + free(topic_to_subscribe); + lf_print_error("Failed to subscribe, return code %d\n", rc); + continue; + } + LF_PRINT_DEBUG("Subscribed, return code %d\n", rc); + LF_PRINT_LOG("Subscribing on topic %s.", topic_to_subscribe); + LF_PRINT_LOG("Finished subscribe"); + break; } - LF_PRINT_DEBUG("Subscribed, return code %d\n", rc); - LF_PRINT_LOG("Subscribing on topic %s.", topic_to_subscribe); - LF_PRINT_LOG("Finished subscribe"); + // Step2: The listener sends a MSG_TYPE_MQTT_ACCEPT message to the federate. // Publish to topic: federationID_listenerID_to_fedID connector_priv->topic_name = (const char*)create_topic_federation_id_A_to_B(connector_nedrv->federation_id, @@ -275,6 +293,7 @@ int connect_to_netdrv(netdrv_t* drv) { if (message) { MQTTClient_freeMessage(&message); } + lf_sleep(MSEC(2000)); continue; } else if (message == NULL) { // This means the call succeeded but no message was received within the timeout @@ -282,6 +301,7 @@ int connect_to_netdrv(netdrv_t* drv) { if (topicName) { MQTTClient_free(topicName); } + lf_sleep(MSEC(2000)); continue; } else { // Successfully received a message @@ -579,7 +599,8 @@ int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos) { LF_PRINT_LOG("Max retries reached. Giving up.\n"); return rc; } - lf_print_warning("Could not subscribe to topic. Will try again every " PRINTF_TIME " nanoseconds.\n", CONNECT_RETRY_INTERVAL); + lf_print_warning("Could not subscribe to topic. Will try again every " PRINTF_TIME " nanoseconds.\n", + CONNECT_RETRY_INTERVAL); lf_sleep(CONNECT_RETRY_INTERVAL); } return MQTTCLIENT_SUCCESS; From 72a6c03843cdb90a9b0001f1775cd763e7cd1aa6 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Mon, 20 May 2024 17:58:40 -0700 Subject: [PATCH 234/262] Take the read outside from the while loop --- core/federated/network/lf_mqtt_support.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 469bdbbb1..15a64158d 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -130,22 +130,22 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { instant_t start_connect = lf_time_physical(); int rc; unsigned char buffer[1 + sizeof(uint16_t)]; - uint16_t fed_id = 1000; //TODO: FIX. + uint16_t fed_id = 1000; // TODO: FIX. char* topic_to_subscribe = NULL; + // Step1: The listener first waits for a MSG_TYPE_MQTT_JOIN message, through the topic federationID_listenerID. + + read_from_netdrv_fail_on_error(listener_netdrv, buffer, 1 + sizeof(uint16_t), NULL, "MQTT receive failed."); + if (buffer[0] != MSG_TYPE_MQTT_JOIN) { + lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_JOIN."); + } + fed_id = extract_uint16(buffer + 1); + LF_PRINT_LOG("Received MSG_TYPE_MQTT_JOIN message from federate %d.", fed_id); + while (1) { if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { lf_print_error("Failed to connect with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); break; } - // Step1: The listener first waits for a MSG_TYPE_MQTT_JOIN message, through the topic federationID_listenerID. - - read_from_netdrv_fail_on_error(listener_netdrv, buffer, 1 + sizeof(uint16_t), NULL, "MQTT receive failed."); - if (buffer[0] != MSG_TYPE_MQTT_JOIN) { - lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_JOIN."); - } - fed_id = extract_uint16(buffer + 1); - LF_PRINT_LOG("Received MSG_TYPE_MQTT_JOIN message from federate %d.", fed_id); - // The conncetor netdriver connects to the broker. connector_nedrv->my_federate_id = (int)fed_id; LF_PRINT_DEBUG("Setting up MQTTServer_id for federate %d.", fed_id); @@ -169,6 +169,7 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { LF_PRINT_DEBUG("Connecting MQTTClient for federate %d.", fed_id); if ((rc = MQTT_connect_with_retry(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { MQTTClient_destroy(&connector_priv->client); + free(topic_to_subscribe); lf_print_error("Failed to connect, return code %d\n", rc); continue; } From 00dc72f29035a8314dea6f0586bfbde9a57b5113 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 21 May 2024 13:12:56 -0700 Subject: [PATCH 235/262] Fix to establish communication first, then do the fedID etc.. hanshake. --- core/federated/RTI/rti_remote.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 243a5dd6d..42a89186e 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1358,10 +1358,13 @@ static bool authenticate_federate(netdrv_t* fed_netdrv) { #endif void lf_connect_to_federates(netdrv_t* rti_netdrv) { + netdrv_t* netdrv_array[rti_remote->base.number_of_scheduling_nodes]; + // Connect with the federates first, before receiving fed_id, connection_info, and udp port. for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { - - netdrv_t* fed_netdrv = establish_communication_session(rti_netdrv); - + netdrv_array[i] = establish_communication_session(rti_netdrv); + } + for (int i = 0; i < rti_remote->base.number_of_scheduling_nodes; i++) { + netdrv_t* fed_netdrv = netdrv_array[i]; // Wait for the first message from the federate when RTI -a option is on. #ifdef __RTI_AUTH__ if (rti_remote->authentication_enabled) { From 1b0e985eb74b61df433c3673d7ba34e17175d199 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 21 May 2024 13:13:14 -0700 Subject: [PATCH 236/262] Remove MQTT connect with retries. --- core/federated/network/lf_mqtt_support.c | 187 +++++++++++------------ 1 file changed, 91 insertions(+), 96 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 15a64158d..88ba98b4e 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -23,8 +23,8 @@ static char* create_topic_federation_id_listener_id(const char* federation_id, i static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, int B); static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id); static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id); -int MQTT_connect_with_retry(MQTTClient client, MQTTClient_connectOptions* conn_opts); -int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos); +// int MQTT_connect_with_retry(MQTTClient client, MQTTClient_connectOptions* conn_opts); +// int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos); void log_callback(enum MQTTCLIENT_TRACE_LEVELS level, char* message) { (void)level; // Explicitly mark the parameter as unused @@ -58,7 +58,7 @@ void close_netdrv(netdrv_t* drv) { drv->my_federate_id); int rc; if ((rc = MQTTClient_disconnect(MQTT_priv->client, 10000)) != MQTTCLIENT_SUCCESS) { - printf("Failed to disconnect, return code %d\n", rc); + lf_print("Failed to disconnect, return code %d", rc); } MQTTClient_destroy(&MQTT_priv->client); } @@ -84,20 +84,20 @@ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { int rc; if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to create client, return code %d\n", rc); + lf_print_error_and_exit("Failed to create client, return code %d", rc); } MQTT_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; MQTT_priv->conn_opts.cleansession = MQTTcleansession; - if ((rc = MQTT_connect_with_retry(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { MQTTClient_destroy(&MQTT_priv->client); - lf_print_error_and_exit("Failed to connect, return code %d\n", rc); + lf_print_error_and_exit("Failed to connect, return code %d", rc); } MQTT_priv->topic_name = (const char*)create_topic_federation_id_listener_id(drv->federation_id, drv->my_federate_id); - if ((rc = MQTT_subscribe_with_retry(MQTT_priv->client, MQTT_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { + if ((rc = MQTTClient_subscribe(MQTT_priv->client, MQTT_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { MQTTClient_disconnect(MQTT_priv->client, TIMEOUT); MQTTClient_destroy(&MQTT_priv->client); - lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); + lf_print_error_and_exit("Failed to subscribe, return code %d", rc); } int64_t current_physical_time = lf_time_physical(); LF_PRINT_LOG("Subscribing on topic %s.", MQTT_priv->topic_name); @@ -122,15 +122,14 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { netdrv_t* connector_nedrv = initialize_netdrv(-2, listener_netdrv->federation_id); MQTT_priv_t* connector_priv = (MQTT_priv_t*)connector_nedrv->priv; - // Set the trace level to maximum verbosity - MQTTClient_setTraceLevel(MQTTCLIENT_TRACE_MAXIMUM); - // Set the trace callback function - MQTTClient_setTraceCallback(log_callback); + // // Set the trace level to maximum verbosity + // MQTTClient_setTraceLevel(MQTTCLIENT_TRACE_MAXIMUM); + // // Set the trace callback function + // MQTTClient_setTraceCallback(log_callback); - instant_t start_connect = lf_time_physical(); int rc; unsigned char buffer[1 + sizeof(uint16_t)]; - uint16_t fed_id = 1000; // TODO: FIX. + // uint16_t fed_id = 1000; // TODO: FIX. char* topic_to_subscribe = NULL; // Step1: The listener first waits for a MSG_TYPE_MQTT_JOIN message, through the topic federationID_listenerID. @@ -138,54 +137,52 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { if (buffer[0] != MSG_TYPE_MQTT_JOIN) { lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_JOIN."); } - fed_id = extract_uint16(buffer + 1); + uint16_t fed_id = extract_uint16(buffer + 1); LF_PRINT_LOG("Received MSG_TYPE_MQTT_JOIN message from federate %d.", fed_id); + // The conncetor netdriver connects to the broker. + connector_nedrv->my_federate_id = (int)fed_id; + LF_PRINT_DEBUG("Setting up MQTTServer_id for federate %d.", fed_id); + set_MQTTServer_id(connector_priv, listener_netdrv->my_federate_id, connector_nedrv->my_federate_id); + LF_PRINT_DEBUG("Setup MQTTServer_id for federate %d as %s.", fed_id, connector_priv->client_id); + + LF_PRINT_DEBUG("Creating topic for federate %d.", fed_id); + // Subscribe to topic: federationID_fedID_to_listenerID + // This is the channel where the federate sends messages to the listener. + topic_to_subscribe = + create_topic_federation_id_A_to_B(connector_nedrv->federation_id, fed_id, listener_netdrv->my_federate_id); + + LF_PRINT_DEBUG("Creating MQTTClient for federate %d.", fed_id); + if ((rc = MQTTClient_create(&connector_priv->client, ADDRESS, connector_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, + NULL)) != MQTTCLIENT_SUCCESS) { + lf_print_error("Failed to create client, return code %d", rc); + } + connector_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; + connector_priv->conn_opts.cleansession = MQTTcleansession; + instant_t start_connect = lf_time_physical(); while (1) { if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { lf_print_error("Failed to connect with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); break; } - // The conncetor netdriver connects to the broker. - connector_nedrv->my_federate_id = (int)fed_id; - LF_PRINT_DEBUG("Setting up MQTTServer_id for federate %d.", fed_id); - set_MQTTServer_id(connector_priv, listener_netdrv->my_federate_id, connector_nedrv->my_federate_id); - LF_PRINT_DEBUG("Setup MQTTServer_id for federate %d as %s.", fed_id, connector_priv->client_id); - - LF_PRINT_DEBUG("Creating topic for federate %d.", fed_id); - // Subscribe to topic: federationID_fedID_to_listenerID - // This is the channel where the federate sends messages to the listener. - topic_to_subscribe = - create_topic_federation_id_A_to_B(connector_nedrv->federation_id, fed_id, listener_netdrv->my_federate_id); - - LF_PRINT_DEBUG("Creating MQTTClient for federate %d.", fed_id); - if ((rc = MQTTClient_create(&connector_priv->client, ADDRESS, connector_priv->client_id, - MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { - lf_print_error("Failed to create client, return code %d\n", rc); - continue; - } - connector_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; - connector_priv->conn_opts.cleansession = MQTTcleansession; LF_PRINT_DEBUG("Connecting MQTTClient for federate %d.", fed_id); - if ((rc = MQTT_connect_with_retry(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + if ((rc = MQTTClient_connect(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { MQTTClient_destroy(&connector_priv->client); free(topic_to_subscribe); - lf_print_error("Failed to connect, return code %d\n", rc); + lf_print_error("Failed to connect, return code %d", rc); continue; } - LF_PRINT_DEBUG("Connected, return code %d\n", rc); + LF_PRINT_DEBUG("Connected, return code %d", rc); LF_PRINT_LOG("Starting subscribe"); - if ((rc = MQTT_subscribe_with_retry(connector_priv->client, (const char*)topic_to_subscribe, QOS)) != + if ((rc = MQTTClient_subscribe(connector_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { MQTTClient_disconnect(connector_priv->client, TIMEOUT); MQTTClient_destroy(&connector_priv->client); free(topic_to_subscribe); - lf_print_error("Failed to subscribe, return code %d\n", rc); + lf_print_error("Failed to subscribe, return code %d", rc); continue; } - LF_PRINT_DEBUG("Subscribed, return code %d\n", rc); - LF_PRINT_LOG("Subscribing on topic %s.", topic_to_subscribe); - LF_PRINT_LOG("Finished subscribe"); + LF_PRINT_DEBUG("Subscribed on topic %s, return code %d", topic_to_subscribe, rc); break; } @@ -220,14 +217,14 @@ void create_connector(netdrv_t* drv) { int rc; if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to create client, return code %d\n", rc); + lf_print_error_and_exit("Failed to create client, return code %d", rc); } MQTT_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; MQTT_priv->conn_opts.cleansession = MQTTcleansession; - if ((rc = MQTT_connect_with_retry(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { MQTTClient_destroy(&MQTT_priv->client); - lf_print_error_and_exit("Failed to connect, return code %d\n", rc); + lf_print_error_and_exit("Failed to connect, return code %d", rc); } } /** @@ -249,11 +246,11 @@ int connect_to_netdrv(netdrv_t* drv) { char* topic_to_subscribe = create_topic_federation_id_A_to_B(drv->federation_id, MQTT_priv->target_id, drv->my_federate_id); - if ((rc = MQTT_subscribe_with_retry(MQTT_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { + if ((rc = MQTTClient_subscribe(MQTT_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { MQTTClient_disconnect(MQTT_priv->client, TIMEOUT); MQTTClient_destroy(&MQTT_priv->client); free(topic_to_subscribe); - lf_print_error_and_exit("Failed to subscribe, return code %d\n", rc); + lf_print_error_and_exit("Failed to subscribe, return code %d", rc); } LF_PRINT_LOG("Subscribed on topic %s.", topic_to_subscribe); @@ -287,7 +284,7 @@ int connect_to_netdrv(netdrv_t* drv) { MQTTClient_message* message = NULL; temp_rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 500); if (temp_rc != MQTTCLIENT_SUCCESS) { - lf_print_error("Failed to receive MSG_TYPE_MQTT_ACCEPT message, return code %d\n", temp_rc); + lf_print_error("Failed to receive MSG_TYPE_MQTT_ACCEPT message, return code %d", temp_rc); if (topicName) { MQTTClient_free(topicName); } @@ -306,7 +303,7 @@ int connect_to_netdrv(netdrv_t* drv) { continue; } else { // Successfully received a message - lf_print_log("Successfully received MSG_TYPE_MQTT_ACCEPT message, return code %d\n", temp_rc); + lf_print_log("Successfully received MSG_TYPE_MQTT_ACCEPT message, return code %d", temp_rc); memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); if (topicName) { MQTTClient_free(topicName); @@ -327,7 +324,7 @@ int connect_to_netdrv(netdrv_t* drv) { // Compare the received federateID with my federateID. uint16_t temp_fed_id = extract_uint16(buffer + 1); if (drv->my_federate_id != temp_fed_id) { - lf_print_error_and_exit("Wrong federate ID. Received %d\n", temp_fed_id); + lf_print_error_and_exit("Wrong federate ID. Received %d", temp_fed_id); } // Step3: Send MSG_TYPE_MQTT_ACCEPT_ACK message to the listener. @@ -361,12 +358,12 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { if ((rc = MQTTClient_publishMessage(MQTT_priv->client, MQTT_priv->topic_name, &pubmsg, &token)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to publish message, return code %d\n", rc); + lf_print_error_and_exit("Failed to publish message, return code %d", rc); } // LF_PRINT_DEBUG("Message publishing on topic %s is %.*s", MQTT_priv->topic_name, pubmsg.payloadlen, // (char*)(pubmsg.payload)); if ((rc = MQTTClient_waitForCompletion(MQTT_priv->client, token, TIMEOUT)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to complete publish message, return code %d\n", rc); + lf_print_error_and_exit("Failed to complete publish message, return code %d", rc); } int bytes_written = pubmsg.payloadlen; return bytes_written; @@ -381,14 +378,10 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len MQTTClient_message* message = NULL; int rc; LF_PRINT_LOG("RECEIVING message from federateID %d", drv->my_federate_id); - // if ((rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 1000000)) != MQTTCLIENT_SUCCESS) { - // lf_print_error_and_exit("Failed to receive message, return code %d\n", rc); - // } - // while (1) { rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 1000000); if (rc != MQTTCLIENT_SUCCESS) { - lf_print_error("Failed to receive message, return code %d\n", rc); + lf_print_error("Failed to receive message, return code %d", rc); if (topicName) { MQTTClient_free(topicName); } @@ -396,7 +389,6 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len MQTTClient_freeMessage(&message); } return -1; - // continue; } else if (message == NULL) { // This means the call succeeded but no message was received within the timeout lf_print_log("No message received within the timeout period."); @@ -404,10 +396,9 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len MQTTClient_free(topicName); } return -1; - // continue; } else { // Successfully received a message - lf_print_log("Successfully received message, return code %d\n", rc); + lf_print_log("Successfully received message, return code %d", rc); memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); int bytes_read = message->payloadlen; if (topicName) { @@ -421,7 +412,6 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len LF_PRINT_LOG("Received MQTT_RTI_RESIGNED message from federateID %d", drv->my_federate_id); return 0; } - return bytes_read; } } @@ -572,37 +562,42 @@ static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id) static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id) { sprintf(MQTT_priv->client_id, "%d", client_id); } -int MQTT_connect_with_retry(MQTTClient client, MQTTClient_connectOptions* conn_opts) { - int rc; - int retries = 0; - - while ((rc = MQTTClient_connect(client, conn_opts)) != MQTTCLIENT_SUCCESS) { - LF_PRINT_LOG("Failed to connect to MQTT broker, return code %d\n", rc); - retries++; - if (retries >= MAX_RETRIES) { - LF_PRINT_LOG("Max retries reached. Giving up.\n"); - return rc; - } - lf_print_warning("Could not connect. Will try again every " PRINTF_TIME " nanoseconds.\n", CONNECT_RETRY_INTERVAL); - lf_sleep(CONNECT_RETRY_INTERVAL); - } - return MQTTCLIENT_SUCCESS; -} - -int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos) { - int rc; - int retries = 0; - - while ((rc = MQTTClient_subscribe(client, topic, qos)) != MQTTCLIENT_SUCCESS) { - LF_PRINT_LOG("Failed to subscribe to MQTT broker, return code %d\n", rc); - retries++; - if (retries >= MAX_RETRIES) { - LF_PRINT_LOG("Max retries reached. Giving up.\n"); - return rc; - } - lf_print_warning("Could not subscribe to topic. Will try again every " PRINTF_TIME " nanoseconds.\n", - CONNECT_RETRY_INTERVAL); - lf_sleep(CONNECT_RETRY_INTERVAL); - } - return MQTTCLIENT_SUCCESS; -} \ No newline at end of file +// int MQTT_connect_with_retry(MQTTClient client, MQTTClient_connectOptions* conn_opts) { +// int rc; +// int retries = 0; +// instant_t start_connect = lf_time_physical(); +// while (1) { +// if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { +// lf_print_error("Failed to connect with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); +// break; +// } +// if ((rc = MQTTClient_connect(client, conn_opts)) != MQTTCLIENT_SUCCESS) { +// LF_PRINT_LOG("Failed to connect to MQTT broker, return code %d", rc); +// retries++; +// if (retries >= MAX_RETRIES) { +// LF_PRINT_LOG("Max retries reached. Giving up."); +// return rc; +// } +// lf_print_warning("Could not connect. Will try again every " PRINTF_TIME " nanoseconds.", +// CONNECT_RETRY_INTERVAL); lf_sleep(CONNECT_RETRY_INTERVAL); +// } +// return MQTTCLIENT_SUCCESS; +// } + +// int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos) { +// int rc; +// int retries = 0; + +// while ((rc = MQTTClient_subscribe(client, topic, qos)) != MQTTCLIENT_SUCCESS) { +// LF_PRINT_LOG("Failed to subscribe to MQTT broker, return code %d", rc); +// retries++; +// if (retries >= MAX_RETRIES) { +// LF_PRINT_LOG("Max retries reached. Giving up."); +// return rc; +// } +// lf_print_warning("Could not subscribe to topic. Will try again every " PRINTF_TIME " nanoseconds.", +// CONNECT_RETRY_INTERVAL); +// lf_sleep(CONNECT_RETRY_INTERVAL); +// } +// return MQTTCLIENT_SUCCESS; +// } \ No newline at end of file From ca5798e68cb23b5a52f2e1a1e6126ae676a0f4ff Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 21 May 2024 13:35:04 -0700 Subject: [PATCH 237/262] Change message name from MQTT_RTI_RESIGNED to MQTT_RESIGNED. --- include/core/federated/network/type/lf_mqtt_support.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/core/federated/network/type/lf_mqtt_support.h b/include/core/federated/network/type/lf_mqtt_support.h index 41869b453..3f5cedc5f 100644 --- a/include/core/federated/network/type/lf_mqtt_support.h +++ b/include/core/federated/network/type/lf_mqtt_support.h @@ -7,7 +7,7 @@ #define MQTTkeepAliveInterval 20 #define MQTTcleansession 1 -#define MQTT_RTI_RESIGNED 88 +#define MQTT_RESIGNED 88 typedef struct MQTT_priv_t { MQTTClient client; From 28e699956bea52ab3f220f3f8939159da1470ce6 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 21 May 2024 13:35:36 -0700 Subject: [PATCH 238/262] Better close_netdrv() on MQTT support && Minor fix --- core/federated/RTI/rti_remote.c | 29 +++--------- core/federated/network/lf_mqtt_support.c | 60 +++++++++++++----------- core/federated/network/netdriver.c | 1 + 3 files changed, 40 insertions(+), 50 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 42a89186e..6206a1806 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -628,7 +628,8 @@ void handle_timestamp(federate_info_t* my_fed, unsigned char* buffer) { tracepoint_rti_from_federate(receive_TIMESTAMP, my_fed->enclave.id, &tag); } LF_PRINT_DEBUG("RTI received timestamp message with time: " PRINTF_TIME ".", timestamp); - LF_PRINT_DEBUG("RTI received timestamp message with time: " PRINTF_TIME ". fro federate %d", timestamp, my_fed->fed_netdrv->my_federate_id); + LF_PRINT_DEBUG("RTI received timestamp message with time: " PRINTF_TIME ". fro federate %d", timestamp, + my_fed->fed_netdrv->my_federate_id); LF_MUTEX_LOCK(&rti_mutex); rti_remote->num_feds_proposed_start++; @@ -883,23 +884,6 @@ static void handle_federate_resign(federate_info_t* my_fed) { // Indicate that there will no further events from this federate. my_fed->enclave.next_event = FOREVER_TAG; - // TODO: Needs discussion. - // // According to this: https://stackoverflow.com/questions/4160347/close-vs-shutdown-socket, - // // the close should happen when receiving a 0 length message from the other end. - // // Here, we just signal the other side that no further writes to the socket are - // // forthcoming, which should result in the other end getting a zero-length reception. - // shutdown(my_fed->socket, SHUT_WR); - - // // Wait for the federate to send an EOF or a socket error to occur. - // // Discard any incoming bytes. Normally, this read should return 0 because - // // the federate is resigning and should itself invoke shutdown. - // unsigned char buffer[10]; - // while (read(my_fed->socket, buffer, 10) > 0) - ; - - // // We can now safely close the socket. - // close(my_fed->socket); // from unistd.h - close_netdrv(my_fed->fed_netdrv); // Check downstream federates to see whether they should now be granted a TAG. @@ -1090,7 +1074,7 @@ static int32_t receive_and_check_fed_id_message(netdrv_t* netdrv) { } } federate_info_t* fed = GET_FED_INFO(fed_id); - netdrv->my_federate_id = (uint16_t) fed_id; + netdrv->my_federate_id = (uint16_t)fed_id; fed->fed_netdrv = netdrv; // TODO: Make this work for only TCP. @@ -1518,10 +1502,9 @@ void initialize_RTI(rti_remote_t* rti) { rti_remote->base.tracing_enabled = false; rti_remote->stop_in_progress = false; -// #ifdef OPENSSL_REQUIRED -// OPENSSL_init_crypto(OPENSSL_INIT_NO_ATEXIT, NULL); -// #endif - + // #ifdef OPENSSL_REQUIRED + // OPENSSL_init_crypto(OPENSSL_INIT_NO_ATEXIT, NULL); + // #endif } void free_scheduling_nodes(scheduling_node_t** scheduling_nodes, uint16_t number_of_scheduling_nodes) { diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 88ba98b4e..674cc48d9 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -52,13 +52,16 @@ netdrv_t* initialize_netdrv(int my_federate_id, const char* federation_id) { void close_netdrv(netdrv_t* drv) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; - unsigned char buffer[1]; - buffer[0] = MQTT_RTI_RESIGNED; - write_to_netdrv_fail_on_error(drv, 1, buffer, NULL, "Failed to send MQTT_RTI_RESIGNED to federate %d", - drv->my_federate_id); + // If target_id is available (not -2, which means the listener netdriver), it sends a MQTT_RESIGNED messaged. + if (MQTT_priv->target_id != -2) { + unsigned char buffer[1]; + buffer[0] = MQTT_RESIGNED; + write_to_netdrv_fail_on_error(drv, 1, buffer, NULL, "Failed to send MQTT_RESIGNED message."); + LF_PRINT_DEBUG("Sending MQTT_RESIGNED message."); + } int rc; if ((rc = MQTTClient_disconnect(MQTT_priv->client, 10000)) != MQTTCLIENT_SUCCESS) { - lf_print("Failed to disconnect, return code %d", rc); + lf_print("Failed to disconnect, return code %d.", rc); } MQTTClient_destroy(&MQTT_priv->client); } @@ -79,25 +82,29 @@ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { if (port == 0) { } // JUST TO PASS COMPILER. MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; + + // Target is not available for listeners. We set it to -2 if it is uninitialized or unavailable. This is used when + // close_netdrv() is called. + MQTT_priv->target_id = -2; // If RTI calls this, it will be -1. If federate server calls, it will be it's federate ID. set_MQTTServer_id(MQTT_priv, drv->my_federate_id, drv->my_federate_id); int rc; if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to create client, return code %d", rc); + lf_print_error_and_exit("Failed to create client, return code %d.", rc); } MQTT_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; MQTT_priv->conn_opts.cleansession = MQTTcleansession; if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { MQTTClient_destroy(&MQTT_priv->client); - lf_print_error_and_exit("Failed to connect, return code %d", rc); + lf_print_error_and_exit("Failed to connect, return code %d. Check if MQTT broker is available.", rc); } MQTT_priv->topic_name = (const char*)create_topic_federation_id_listener_id(drv->federation_id, drv->my_federate_id); if ((rc = MQTTClient_subscribe(MQTT_priv->client, MQTT_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { MQTTClient_disconnect(MQTT_priv->client, TIMEOUT); MQTTClient_destroy(&MQTT_priv->client); - lf_print_error_and_exit("Failed to subscribe, return code %d", rc); + lf_print_error_and_exit("Failed to subscribe, return code %d.", rc); } int64_t current_physical_time = lf_time_physical(); LF_PRINT_LOG("Subscribing on topic %s.", MQTT_priv->topic_name); @@ -129,7 +136,6 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { int rc; unsigned char buffer[1 + sizeof(uint16_t)]; - // uint16_t fed_id = 1000; // TODO: FIX. char* topic_to_subscribe = NULL; // Step1: The listener first waits for a MSG_TYPE_MQTT_JOIN message, through the topic federationID_listenerID. @@ -155,7 +161,7 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { LF_PRINT_DEBUG("Creating MQTTClient for federate %d.", fed_id); if ((rc = MQTTClient_create(&connector_priv->client, ADDRESS, connector_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { - lf_print_error("Failed to create client, return code %d", rc); + lf_print_error("Failed to create client, return code %d.", rc); } connector_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; connector_priv->conn_opts.cleansession = MQTTcleansession; @@ -169,20 +175,20 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { if ((rc = MQTTClient_connect(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { MQTTClient_destroy(&connector_priv->client); free(topic_to_subscribe); - lf_print_error("Failed to connect, return code %d", rc); + lf_print_error("Failed to connect, return code %d.", rc); continue; } - LF_PRINT_DEBUG("Connected, return code %d", rc); + LF_PRINT_DEBUG("Connected, return code %d.", rc); LF_PRINT_LOG("Starting subscribe"); if ((rc = MQTTClient_subscribe(connector_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { MQTTClient_disconnect(connector_priv->client, TIMEOUT); MQTTClient_destroy(&connector_priv->client); free(topic_to_subscribe); - lf_print_error("Failed to subscribe, return code %d", rc); + lf_print_error("Failed to subscribe, return code %d.", rc); continue; } - LF_PRINT_DEBUG("Subscribed on topic %s, return code %d", topic_to_subscribe, rc); + LF_PRINT_DEBUG("Subscribed on topic %s, return code %d.", topic_to_subscribe, rc); break; } @@ -217,14 +223,14 @@ void create_connector(netdrv_t* drv) { int rc; if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to create client, return code %d", rc); + lf_print_error_and_exit("Failed to create client, return code %d.", rc); } MQTT_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; MQTT_priv->conn_opts.cleansession = MQTTcleansession; if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { MQTTClient_destroy(&MQTT_priv->client); - lf_print_error_and_exit("Failed to connect, return code %d", rc); + lf_print_error_and_exit("Failed to connect, return code %d. Check if MQTT broker is available.", rc); } } /** @@ -250,7 +256,7 @@ int connect_to_netdrv(netdrv_t* drv) { MQTTClient_disconnect(MQTT_priv->client, TIMEOUT); MQTTClient_destroy(&MQTT_priv->client); free(topic_to_subscribe); - lf_print_error_and_exit("Failed to subscribe, return code %d", rc); + lf_print_error_and_exit("Failed to subscribe, return code %d.", rc); } LF_PRINT_LOG("Subscribed on topic %s.", topic_to_subscribe); @@ -284,7 +290,7 @@ int connect_to_netdrv(netdrv_t* drv) { MQTTClient_message* message = NULL; temp_rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 500); if (temp_rc != MQTTCLIENT_SUCCESS) { - lf_print_error("Failed to receive MSG_TYPE_MQTT_ACCEPT message, return code %d", temp_rc); + lf_print_error("Failed to receive MSG_TYPE_MQTT_ACCEPT message, return code %d.", temp_rc); if (topicName) { MQTTClient_free(topicName); } @@ -303,7 +309,7 @@ int connect_to_netdrv(netdrv_t* drv) { continue; } else { // Successfully received a message - lf_print_log("Successfully received MSG_TYPE_MQTT_ACCEPT message, return code %d", temp_rc); + lf_print_log("Successfully received MSG_TYPE_MQTT_ACCEPT message, return code %d.", temp_rc); memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); if (topicName) { MQTTClient_free(topicName); @@ -358,12 +364,12 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { if ((rc = MQTTClient_publishMessage(MQTT_priv->client, MQTT_priv->topic_name, &pubmsg, &token)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to publish message, return code %d", rc); + lf_print_error_and_exit("Failed to publish message, return code %d.", rc); } // LF_PRINT_DEBUG("Message publishing on topic %s is %.*s", MQTT_priv->topic_name, pubmsg.payloadlen, // (char*)(pubmsg.payload)); if ((rc = MQTTClient_waitForCompletion(MQTT_priv->client, token, TIMEOUT)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to complete publish message, return code %d", rc); + lf_print_error_and_exit("Failed to complete publish message, return code %d.", rc); } int bytes_written = pubmsg.payloadlen; return bytes_written; @@ -381,7 +387,7 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 1000000); if (rc != MQTTCLIENT_SUCCESS) { - lf_print_error("Failed to receive message, return code %d", rc); + lf_print_error("Failed to receive message, return code %d.", rc); if (topicName) { MQTTClient_free(topicName); } @@ -398,7 +404,7 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len return -1; } else { // Successfully received a message - lf_print_log("Successfully received message, return code %d", rc); + lf_print_log("Successfully received message, return code %d.", rc); memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); int bytes_read = message->payloadlen; if (topicName) { @@ -408,8 +414,8 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len MQTTClient_freeMessage(&message); } LF_PRINT_LOG("RECEIVED message from federateID %d", drv->my_federate_id); - if (buffer[0] == MQTT_RTI_RESIGNED) { - LF_PRINT_LOG("Received MQTT_RTI_RESIGNED message from federateID %d", drv->my_federate_id); + if (buffer[0] == MQTT_RESIGNED) { + LF_PRINT_LOG("Received MQTT_RESIGNED message from federateID %d", drv->my_federate_id); return 0; } return bytes_read; @@ -572,7 +578,7 @@ static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id) { sprintf(M // break; // } // if ((rc = MQTTClient_connect(client, conn_opts)) != MQTTCLIENT_SUCCESS) { -// LF_PRINT_LOG("Failed to connect to MQTT broker, return code %d", rc); +// LF_PRINT_LOG("Failed to connect to MQTT broker, return code %d.", rc); // retries++; // if (retries >= MAX_RETRIES) { // LF_PRINT_LOG("Max retries reached. Giving up."); @@ -589,7 +595,7 @@ static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id) { sprintf(M // int retries = 0; // while ((rc = MQTTClient_subscribe(client, topic, qos)) != MQTTCLIENT_SUCCESS) { -// LF_PRINT_LOG("Failed to subscribe to MQTT broker, return code %d", rc); +// LF_PRINT_LOG("Failed to subscribe to MQTT broker, return code %d.", rc); // retries++; // if (retries >= MAX_RETRIES) { // LF_PRINT_LOG("Max retries reached. Giving up."); diff --git a/core/federated/network/netdriver.c b/core/federated/network/netdriver.c index 3bf11e141..68d2f9074 100644 --- a/core/federated/network/netdriver.c +++ b/core/federated/network/netdriver.c @@ -33,6 +33,7 @@ int write_to_netdrv_close_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha // Netdrv has probably been closed from the other side. // Shut down and close the netdrv from this side. close_netdrv(drv); + return -1; } return bytes_written; } From ab44dc3ed95f4f57757a39b548df159a2a034955 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 21 May 2024 15:03:25 -0700 Subject: [PATCH 239/262] Update comments from socket to netdriver --- core/federated/RTI/rti_remote.c | 9 +- core/federated/RTI/rti_remote.h | 42 ++++------ core/federated/federate.c | 134 ++++++++++++++---------------- include/core/federated/federate.h | 88 +++++++++----------- 4 files changed, 118 insertions(+), 155 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 6206a1806..1b77d2da0 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1432,19 +1432,18 @@ void initialize_federate(federate_info_t* fed, uint16_t id) { fed->in_transit_message_tags = pqueue_tag_init(10); } -int start_rti_server(uint16_t port) { - int rc; +int start_rti_server(uint16_t user_specified_port) { _lf_initialize_clock(); // Initialize RTI's netdriver. The ID is -1 for the RTI. rti_remote->rti_netdrv = initialize_netdrv(-1, rti_remote->federation_id); - // Create the RTI's netdriver. - rc = create_listener(rti_remote->rti_netdrv, RTI, port); // 0 for RTI + // Create the RTI's netdriver. The user_specified_port will be 0 when not specified. + create_listener(rti_remote->rti_netdrv, RTI, user_specified_port); // 0 for RTI lf_print("RTI: Listening for federates."); // Create the clocksync's netdriver. if (rti_remote->clock_sync_global_status >= clock_sync_on) { rti_remote->clock_sync_socket = create_clock_sync_server(&rti_remote->clock_sync_port); } - return rc; + return 1; } void wait_for_federates(netdrv_t* netdrv) { diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index 5494e0545..a9796e016 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -42,9 +42,6 @@ /** Time allowed for federates to reply to stop request. */ #define MAX_TIME_FOR_REPLY_TO_STOP_REQUEST SEC(30) -// TODO: Need to be fixed later. -// #include "lf_socket_support.h" - ///////////////////////////////////////////// //// Data structures @@ -68,13 +65,6 @@ typedef struct federate_info_t { pqueue_tag_t* in_transit_message_tags; // Record of in-transit messages to this federate that are not // yet processed. This record is ordered based on the time // value of each message for a more efficient access. - // char server_hostname[INET_ADDRSTRLEN]; // Human-readable IP address and - // int32_t server_port; // port number of the socket server of the federate - // // if it has any incoming direct connections from other federates. - // // The port number will be -1 if there is no server or if the - // // RTI has not been informed of the port number. - // struct in_addr server_ip_addr; // Information about the IP address of the socket - // // server of the federate. netdrv_t* fed_netdrv; // The netdriver that the RTI handling each federate. } federate_info_t; @@ -109,7 +99,7 @@ typedef struct rti_remote_t { * This gets set to true exactly once before the program exits. * It is marked volatile because the write is not guarded by a mutex. * The main thread makes this true, then calls shutdown and close on - * the socket, which will cause accept() to return with an error code + * the netdriver, which will cause accept() to return with an error code * in respond_to_erroneous_connections(). */ volatile bool all_federates_exited; @@ -124,7 +114,7 @@ typedef struct rti_remote_t { netdrv_t* rti_netdrv; /************* TCP server information *************/ - /** The desired port specified by the user on the command line. */ + /** The desired port specified by the user on the command line. This only works for TCP connections.*/ uint16_t user_specified_port; /************* Clock synchronization server information *************/ @@ -265,7 +255,7 @@ void handle_stop_request_reply(federate_info_t* fed, unsigned char* buffer); * Handle address query messages. * This function reads the body of a MSG_TYPE_ADDRESS_QUERY (@see net_common.h) message * which is the requested destination federate ID and replies with the stored - * port value for the socket server of that federate. The port values + * port value for the netdriver server of that federate. The port values * are initialized to -1. If no MSG_TYPE_ADDRESS_ADVERTISEMENT message has been received from * the destination federate, the RTI will simply reply with -1 for the port. * The sending federate is responsible for checking back with the RTI after a @@ -281,7 +271,7 @@ void handle_address_query(uint16_t fed_id, unsigned char* buffer); * field of the _RTI.federates[federate_id] array of structs. * * The server_hostname and server_ip_addr fields are assigned - * in lf_connect_to_federates() upon accepting the socket + * in lf_connect_to_federates() upon accepting the netdriver * from the remote federate. * * This function assumes the caller does not hold the mutex. @@ -340,13 +330,13 @@ void* clock_synchronization_thread(void* noargs); /** * Thread handling TCP communication with a federate. * @param fed A pointer to the federate's struct that has the - * socket descriptor for the federate. + * netdriver for the federate. */ void* federate_info_thread_TCP(void* fed); /** - * Send a MSG_TYPE_REJECT message to the specified socket and close the socket. - * @param socket_id Pointer to the socket ID. + * Send a MSG_TYPE_REJECT message to the specified netdriver and close the netdriver. + * @param netdrv Pointer to the netdriver. * @param error_code An error code. */ // TODO: Update comments. @@ -356,7 +346,7 @@ void send_reject(netdrv_t* netdrv, unsigned char error_code); * Wait for one incoming connection request from each federate, * and upon receiving it, create a thread to communicate with * that federate. Return when all federates have connected. - * @param socket_descriptor The socket on which to accept connections. + * @param rti_netdrv The netdriver on which to accept connections. */ // TODO: Update comments. void lf_connect_to_federates(netdrv_t* rti_netdrv); @@ -375,17 +365,17 @@ void* respond_to_erroneous_connections(void* nothing); void initialize_federate(federate_info_t* fed, uint16_t id); /** - * Start the socket server for the runtime infrastructure (RTI). - * @param port The port on which to listen for socket connections, or + * Start the netdriver server for the runtime infrastructure (RTI). + * @param user_specified_port The port on which to listen for netdriver connections, or * 0 to use the default port range. */ -int start_rti_server(uint16_t port); +int start_rti_server(uint16_t user_specified_port); -// /** -// * Start the runtime infrastructure (RTI) interaction with the federates -// * and wait for the federates to exit. -// * @param netdrv The netdrv returned by start_rti_server(). -// */ +/** + * Start the runtime infrastructure (RTI) interaction with the federates + * and wait for the federates to exit. + * @param netdrv The netdrv returned by start_rti_server(). + */ void wait_for_federates(netdrv_t* netdrv); /** diff --git a/core/federated/federate.c b/core/federated/federate.c index db7b8cb52..8a89b9a74 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -77,23 +77,18 @@ int max_level_allowed_to_advance; * and the _fed global variable refers to that instance. */ -// TODO: DONGHA: Need to change socket_related. socket_TCP_RTI, server_socket, server_port -federate_instance_t _fed = { - // .socket_TCP_RTI = -1, - .number_of_inbound_p2p_connections = 0, - .inbound_netdriv_listeners = NULL, - .number_of_outbound_p2p_connections = 0, - .inbound_p2p_handling_thread_id = 0, - .server_socket = -1, - .server_port = -1, - .last_TAG = {.time = NEVER, .microstep = 0u}, - .is_last_TAG_provisional = false, - .has_upstream = false, - .has_downstream = false, - .received_stop_request_from_rti = false, - .last_sent_LTC = {.time = NEVER, .microstep = 0u}, - .last_sent_NET = {.time = NEVER, .microstep = 0u}, - .min_delay_from_physical_action_to_federate_output = NEVER}; +federate_instance_t _fed = {.number_of_inbound_p2p_connections = 0, + .inbound_netdriv_listeners = NULL, + .number_of_outbound_p2p_connections = 0, + .inbound_p2p_handling_thread_id = 0, + .last_TAG = {.time = NEVER, .microstep = 0u}, + .is_last_TAG_provisional = false, + .has_upstream = false, + .has_downstream = false, + .received_stop_request_from_rti = false, + .last_sent_LTC = {.time = NEVER, .microstep = 0u}, + .last_sent_NET = {.time = NEVER, .microstep = 0u}, + .min_delay_from_physical_action_to_federate_output = NEVER}; // TODO: DONGHA: Need to change host and port. federation_metadata_t federation_metadata = { @@ -140,7 +135,7 @@ static void send_tag(unsigned char type, tag_t tag) { LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); if (_fed.netdrv_to_rti == NULL) { - lf_print_warning("Socket is no longer connected. Dropping message."); + lf_print_warning("Netdriver is no longer connected. Dropping message."); LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); return; } @@ -154,8 +149,8 @@ static void send_tag(unsigned char type, tag_t tag) { } /** - * Return true if either the socket to the RTI is broken or the socket is - * alive and the first unread byte on the socket's queue is MSG_TYPE_FAILED. + * Return true if either the netdriver to the RTI is broken or the netdriver is + * alive and the first unread byte on the netdriver's queue is MSG_TYPE_FAILED. */ static bool rti_failed() { unsigned char first_byte; @@ -377,15 +372,15 @@ static trigger_handle_t schedule_message_received_from_network_locked(environmen } /** - * Close the socket that receives incoming messages from the + * Close the netdriver that receives incoming messages from the * specified federate ID. This function should be called when a read - * of incoming socket fails or when an EOF is received. + * of incoming netdriver fails or when an EOF is received. * It can also be called when the receiving end wants to stop communication, * in which case, flag should be 1. * * @param fed_id The ID of the peer federate sending messages to this * federate. - * @param flag 0 if an EOF was received, -1 if a socket error occurred, 1 otherwise. + * @param flag 0 if an EOF was received, -1 if a netdriver error occurred, 1 otherwise. */ static void close_inbound_netdrv(int fed_id, int flag) { LF_MUTEX_LOCK(&netdrv_mutex); @@ -453,7 +448,7 @@ static bool handle_message_now(environment_t* env, trigger_t* trigger, tag_t int * Handle a message being received from a remote federate. * * This function assumes the caller does not hold the mutex lock. - * @param socket Pointer to the socket to read the message from. + * @param netdrv Pointer to the netdrv to read the message from. * @param fed_id The sending federate ID or -1 if the centralized coordination. * @return 0 for success, -1 for failure. */ @@ -509,9 +504,9 @@ static int handle_message(netdrv_t* netdrv, int fed_id, unsigned char* buffer, s * will not advance to the tag of the message if it is in the future, or * the tag will not advance at all if the tag of the message is * now or in the past. - * @param socket Pointer to the socket to read the message from. + * @param netdrv Pointer to the netdrv to read the message from. * @param fed_id The sending federate ID or -1 if the centralized coordination. - * @return 0 on successfully reading the message, -1 on failure (e.g. due to socket closed). + * @return 0 on successfully reading the message, -1 on failure (e.g. due to netdrv closed). */ static int handle_tagged_message(netdrv_t* netdrv, int fed_id, unsigned char* buffer, ssize_t bytes_read) { // Environment is always the one corresponding to the top-level scheduling enclave. @@ -640,10 +635,10 @@ static int handle_tagged_message(netdrv_t* netdrv, int fed_id, unsigned char* bu if (lf_tag_compare(env->current_tag, env->stop_tag) >= 0 && env->execution_started) { lf_print_error("Received message too late. Already at stop tag.\n" " Current tag is " PRINTF_TAG " and intended tag is " PRINTF_TAG ".\n" - " Discarding message and closing the socket.", + " Discarding message and closing the netdrv.", env->current_tag.time - start_time, env->current_tag.microstep, intended_tag.time - start_time, intended_tag.microstep); - // Close socket, reading any incoming data and discarding it. + // Close netdrv, reading any incoming data and discarding it. close_inbound_netdrv(fed_id, 1); } else { // Need to use intended_tag here, not actual_tag, so that STP violations are detected. @@ -673,7 +668,7 @@ static int handle_tagged_message(netdrv_t* netdrv, int fed_id, unsigned char* bu * This just sets the last known status tag of the port specified * in the message. * - * @param socket Pointer to the socket to read the message from + * @param buffer * @param fed_id The sending federate ID or -1 if the centralized coordination. * @return 0 for success, -1 for failure to complete the read. */ @@ -711,10 +706,9 @@ static int handle_port_absent_message(unsigned char* buffer, int fed_id) { * peer federate and calls the appropriate handling function for * each message type. If an error occurs or an EOF is received * from the peer, then this procedure sets the corresponding - * socket in _fed.sockets_for_inbound_p2p_connections + * netdrv in _fed.netdrv_for_inbound_p2p_connections * to -1 and returns, terminating the thread. * @param _args The remote federate ID (cast to void*). - * @param fed_id_ptr A pointer to a uint16_t containing federate ID being listened to. * This procedure frees the memory pointed to before returning. */ static void* listen_to_federates(void* _args) { @@ -733,15 +727,15 @@ static void* listen_to_federates(void* _args) { // Listen for messages from the federate. while (1) { - bool socket_closed = false; + bool netdrv_closed = false; // Read one byte to get the message type. LF_PRINT_DEBUG("Waiting for a P2P message on netdrv"); ssize_t bytes_read = read_from_netdrv_close_on_error(netdrv, buffer, FED_COM_BUFFER_SIZE); if (bytes_read <= 0) { - // Socket has been closed. - lf_print("Socket from federate %d is closed.", fed_id); + // netdrv has been closed. + lf_print("Netdriver from federate %d is closed.", fed_id); // Stop listening to this federate. - socket_closed = true; + netdrv_closed = true; break; } LF_PRINT_DEBUG("Received a P2P message on netdrv of type %d.", buffer[0]); @@ -752,27 +746,27 @@ static void* listen_to_federates(void* _args) { if (handle_message(netdrv, fed_id, buffer + 1, bytes_read - 1)) { // Failed to complete the reading of a message on a physical connection. lf_print_warning("Failed to complete reading of message on physical connection."); - socket_closed = true; + netdrv_closed = true; } break; case MSG_TYPE_P2P_TAGGED_MESSAGE: LF_PRINT_LOG("Received tagged message from federate %d.", fed_id); if (handle_tagged_message(netdrv, fed_id, buffer + 1, bytes_read - 1)) { // P2P tagged messages are only used in decentralized coordination, and - // it is not a fatal error if the socket is closed before the whole message is read. + // it is not a fatal error if the netdriver is closed before the whole message is read. // But this thread should exit. lf_print_warning("Failed to complete reading of tagged message."); - socket_closed = true; + netdrv_closed = true; } break; case MSG_TYPE_PORT_ABSENT: LF_PRINT_LOG("Received port absent message from federate %d.", fed_id); if (handle_port_absent_message(buffer + 1, fed_id)) { // P2P tagged messages are only used in decentralized coordination, and - // it is not a fatal error if the socket is closed before the whole message is read. + // it is not a fatal error if the netdriver is closed before the whole message is read. // But this thread should exit. lf_print_warning("Failed to complete reading of tagged message."); - socket_closed = true; + netdrv_closed = true; } break; default: @@ -784,8 +778,8 @@ static void* listen_to_federates(void* _args) { tracepoint_federate_from_federate(receive_UNIDENTIFIED, _lf_my_fed_id, fed_id, NULL); break; // while loop } - if (socket_closed) { - // NOTE: For decentralized execution, once this socket is closed, we could + if (netdrv_closed) { + // NOTE: For decentralized execution, once this netdriver is closed, we could // update last known tags of all ports connected to the specified federate to FOREVER_TAG, // which would eliminate the need to wait for STAA to assume an input is absent. // However, at this time, we don't know which ports correspond to which upstream federates. @@ -799,12 +793,12 @@ static void* listen_to_federates(void* _args) { } /** - * Close the socket that sends outgoing messages to the + * Close the netdriver that sends outgoing messages to the * specified federate ID. This function acquires the lf_outbound_netdrv_mutex mutex lock * if _lf_normal_termination is true and otherwise proceeds without the lock. * @param fed_id The ID of the peer federate receiving messages from this * federate, or -1 if the RTI (centralized coordination). - * @param flag 0 if the socket has received EOF, 1 if not, -1 if abnormal termination. + * @param flag 0 if the netdriver has received EOF, 1 if not, -1 if abnormal termination. */ // TODO: DONGHA: NEED TO FIX static void close_outbound_netdrv(int fed_id, int flag) { @@ -926,7 +920,7 @@ static instant_t get_start_time_from_rti(instant_t my_physical_time) { // Send the timestamp marker first. send_time(MSG_TYPE_TIMESTAMP, my_physical_time); - // Read bytes from the socket. We need 9 bytes. + // Read bytes from the netdriver. We need 9 bytes. // Buffer for message ID plus timestamp. size_t buffer_length = 1 + sizeof(instant_t); unsigned char buffer[buffer_length]; @@ -1329,7 +1323,7 @@ static void handle_stop_request_message(unsigned char* buffer) { // or we have previously sent a stop request to the RTI, // then we have already blocked tag advance in enclaves. // Do not do this twice. The record of whether the first has occurred - // is guarded by the outbound socket mutex. + // is guarded by the outbound netdriver mutex. // The second is guarded by the global mutex. // Note that the RTI should not send stop requests more than once to federates. LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); @@ -1491,7 +1485,7 @@ static void* listen_to_rti_TCP(void* args) { break; case MSG_TYPE_CLOCK_SYNC_T1: case MSG_TYPE_CLOCK_SYNC_T4: - lf_print_error("Federate %d received unexpected clock sync message from RTI on TCP socket.", _lf_my_fed_id); + lf_print_error("Federate %d received unexpected clock sync message from RTI on netdriver.", _lf_my_fed_id); break; default: lf_print_error_and_exit("Received from RTI an unrecognized TCP message type: %hhx.", buffer[0]); @@ -1556,12 +1550,13 @@ static bool bounded_NET(tag_t* tag) { // An empty version of this function is code generated for unfederated execution. /** - * Close sockets used to communicate with other federates, if they are open, + * Close netdrivers used to communicate with other federates, if they are open, * and send a MSG_TYPE_RESIGN message to the RTI. This implements the function * defined in reactor.h. For unfederated execution, the code generator * generates an empty implementation. * @param env The environment of the federate */ +//TODO: Fix here. void lf_terminate_execution(environment_t* env) { assert(env != GLOBAL_ENVIRONMENT); @@ -1577,29 +1572,29 @@ void lf_terminate_execution(environment_t* env) { } } - LF_PRINT_DEBUG("Closing incoming P2P sockets."); - // Close any incoming P2P sockets that are still open. + LF_PRINT_DEBUG("Closing incoming P2P netdrivers."); + // Close any incoming P2P netdrivers that are still open. for (int i = 0; i < NUMBER_OF_FEDERATES; i++) { close_inbound_netdrv(i, 1); - // Ignore errors. Mark the socket closed. + // Ignore errors. Mark the netdriver closed. _fed.netdrv_for_inbound_p2p_connections[i] = NULL; } // Check for all outgoing physical connections in - // _fed.sockets_for_outbound_p2p_connections and + // _fed.netdrv_for_outbound_p2p_connections and // if the socket ID is not -1, the connection is still open. - // Send an EOF by closing the socket here. + // Send an EOF by closing the netdriver here. for (int i = 0; i < NUMBER_OF_FEDERATES; i++) { // Close outbound connections, in case they have not closed themselves. // This will result in EOF being sent to the remote federate, except for - // abnormal termination, in which case it will just close the socket. + // abnormal termination, in which case it will just close the netdriver. int flag = _lf_normal_termination ? 1 : -1; close_outbound_netdrv(i, flag); } - LF_PRINT_DEBUG("Waiting for inbound p2p socket listener threads."); - // Wait for each inbound socket listener thread to close. + LF_PRINT_DEBUG("Waiting for inbound p2p netdrviers listener threads."); + // Wait for each inbound netdriver listener thread to close. if (_fed.number_of_inbound_p2p_connections > 0 && _fed.inbound_netdriv_listeners != NULL) { LF_PRINT_LOG("Waiting for %zu threads listening for incoming messages to exit.", _fed.number_of_inbound_p2p_connections); @@ -1609,7 +1604,7 @@ void lf_terminate_execution(environment_t* env) { } } - LF_PRINT_DEBUG("Waiting for RTI's socket listener threads."); + LF_PRINT_DEBUG("Waiting for RTI's netdriver listener threads."); // Wait for the thread listening for messages from the RTI to close. lf_thread_join(_fed.RTI_netdrv_listener, NULL); @@ -1633,13 +1628,13 @@ void send_address_advertisement_to_RTI(netdrv_t* fed_netdrv, netdrv_t* rti_netdr buffer[0] = MSG_TYPE_ADDRESS_ADVERTISEMENT; encode_int32(get_my_port(fed_netdrv), &(buffer[1])); - // No need for a mutex because we have the only handle on this socket. + // No need for a mutex because we have the only handle on this netdriver. write_to_netdrv_fail_on_error(rti_netdrv, sizeof(int32_t) + 1, (unsigned char*)buffer, NULL, "Failed to send address advertisement."); LF_PRINT_DEBUG("Sent port %d to the RTI.", get_my_port(fed_netdrv)); #elif defined(COMM_TYPE_MQTT) -// Do not send port. + // Do not send port. if (fed_netdrv == NULL) { } // JUST TO PASS COMPILER. if (rti_netdrv == NULL) { @@ -1844,7 +1839,7 @@ void lf_connect_to_rti(const char* hostname, int port) { // Trace the event when tracing is enabled tracepoint_federate_to_rti(send_FED_ID, _lf_my_fed_id, NULL); - // No need for a mutex here because no other threads are writing to this socket. + // No need for a mutex here because no other threads are writing to this netdriver. if (write_to_netdrv(_fed.netdrv_to_rti, 2 + sizeof(uint16_t) + federation_id_length, buffer) <= 0) { continue; // Try again, possibly on a new port. } @@ -1904,17 +1899,11 @@ void lf_connect_to_rti(const char* hostname, int port) { } // TODO: DONGHA: NEED to make specified port work. +// specified_port is 0 on default. void lf_create_server(int specified_port) { - assert(specified_port <= UINT16_MAX && specified_port >= 0); - uint16_t port = (uint16_t)specified_port; - LF_PRINT_LOG("Creating a socket server on port %d.", port); - netdrv_t* my_netdrv = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); create_listener(my_netdrv, FED, specified_port); // 1 for FED - // TODO: NEED to fix. - LF_PRINT_LOG("Server for communicating with other federates started using port %d.", get_my_port(my_netdrv)); - // Set the global server netdriver. _fed.my_netdrv = my_netdrv; @@ -1978,7 +1967,7 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { unsigned char buffer[256]; // TODO: NEED TO CHECK. Doesn't allow super long federation IDs. ssize_t bytes_read = read_from_netdrv(client_fed_netdrv, (unsigned char*)&buffer, header_length); if (bytes_read <= 0 || buffer[0] != MSG_TYPE_P2P_SENDING_FED_ID) { - lf_print_warning("Federate received invalid first message on P2P socket. Closing socket."); + lf_print_warning("Federate received invalid first message on P2P netdriver. Closing netdriver."); if (bytes_read > 0) { // Wrong message received. unsigned char response[2]; @@ -1999,7 +1988,7 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { // bytes_read = read_from_netdrv(client_fed_netdrv, (unsigned char*)remote_federation_id, federation_id_length); if (bytes_read <= 0 || (strncmp(federation_metadata.federation_id, (const char*)buffer + header_length, strnlen(federation_metadata.federation_id, 255)) != 0)) { - lf_print_warning("Received invalid federation ID. Closing socket."); + lf_print_warning("Received invalid federation ID. Closing netdriver."); if (bytes_read > 0) { unsigned char response[2]; response[0] = MSG_TYPE_REJECT; @@ -2021,10 +2010,10 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { tracepoint_federate_to_federate(receive_FED_ID, _lf_my_fed_id, remote_fed_id, NULL); // Once we record the socket_id here, all future calls to close() on - // the socket should be done while holding the netdrv_mutex, and this array + // the netdriver should be done while holding the netdrv_mutex, and this array // element should be reset to -1 during that critical section. // Otherwise, there can be race condition where, during termination, - // two threads attempt to simultaneously close the socket. + // two threads attempt to simultaneously close the netdriver. _fed.netdrv_for_inbound_p2p_connections[remote_fed_id] = client_fed_netdrv; // Send an MSG_TYPE_ACK message. @@ -2373,7 +2362,7 @@ int lf_send_stop_request_to_rti(tag_t stop_tag) { stop_tag.microstep); if (_fed.netdrv_to_rti == NULL) { - lf_print_warning("Socket is no longer connected. Dropping message."); + lf_print_warning("Netdriver is no longer connected. Dropping message."); LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); return -1; } @@ -2444,7 +2433,6 @@ int lf_send_tagged_message(environment_t* env, interval_t additional_delay, int LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); netdrv_t* netdrv; - // int* socket; if (message_type == MSG_TYPE_P2P_TAGGED_MESSAGE) { netdrv = _fed.netdrv_for_outbound_p2p_connections[federate]; tracepoint_federate_to_federate(send_P2P_TAGGED_MSG, _lf_my_fed_id, federate, ¤t_message_intended_tag); diff --git a/include/core/federated/federate.h b/include/core/federated/federate.h index 4999317e9..ade48477b 100644 --- a/include/core/federated/federate.h +++ b/include/core/federated/federate.h @@ -32,22 +32,15 @@ * Structure that a federate instance uses to keep track of its own state. */ typedef struct federate_instance_t { - netdrv_t* netdrv_to_rti; // socket_TCP_RTI; - netdrv_t* my_netdrv; // server_socket; server_port; - netdrv_t* netdrv_for_inbound_p2p_connections - [NUMBER_OF_FEDERATES]; // sockets_for_inbound_p2p_connections[NUMBER_OF_FEDERATES]; - netdrv_t* netdrv_for_outbound_p2p_connections - [NUMBER_OF_FEDERATES]; // sockets_for_outbound_p2p_connections[NUMBER_OF_FEDERATES]; - /** - * The TCP socket descriptor for this federate to communicate with the RTI. + * The netdriver for this federate to communicate with the RTI. * This is set by lf_connect_to_rti(), which must be called before other * functions that communicate with the rti are called. */ - // int socket_TCP_RTI; + int netdrv_to_rti; /** - * Thread listening for incoming TCP messages from the RTI. + * Thread listening for incoming messages from the RTI. */ lf_thread_t RTI_netdrv_listener; @@ -73,57 +66,50 @@ typedef struct federate_instance_t { size_t number_of_outbound_p2p_connections; /** - * An array that holds the socket descriptors for inbound + * An array that holds the netdriver descriptors for inbound * connections from each federate. The index will be the federate * ID of the remote sending federate. This is initialized at startup - * to -1 and is set to a socket ID by lf_handle_p2p_connections_from_federates() - * when the socket is opened. + * to -1 and is set to a socket ID by lf_handle_p2p_connections_from_federates() // TODO: check. + * when the netdriver is opened. * - * @note There will not be an inbound socket unless a physical connection + * @note There will not be an inbound netdriver unless a physical connection * or a p2p logical connection (by setting the coordination target property * to "distributed") is specified in the Lingua Franca program where this * federate is the destination. Multiple incoming p2p connections from the - * same remote federate will use the same socket. + * same remote federate will use the same netdriver. */ - // int sockets_for_inbound_p2p_connections[NUMBER_OF_FEDERATES]; + netdrv_t* netdrv_for_inbound_p2p_connections[NUMBER_OF_FEDERATES]; /** - * An array that holds the socket descriptors for outbound direct + * An array that holds the netdrivers for outbound direct * connections to each remote federate. The index will be the federate * ID of the remote receiving federate. This is initialized at startup - * to -1 and is set to a socket ID by lf_connect_to_federate() - * when the socket is opened. + * to -1 and is set to a socket ID by lf_connect_to_federate() // TODO: check. + * when the netdriver is opened. * - * @note This federate will not open an outbound socket unless a physical + * @note This federate will not open an outbound netdriver unless a physical * connection or a p2p logical connection (by setting the coordination target * property to "distributed") is specified in the Lingua Franca * program where this federate acts as the source. Multiple outgoing p2p - * connections to the same remote federate will use the same socket. + * connections to the same remote federate will use the same netdriver. */ - // int sockets_for_outbound_p2p_connections[NUMBER_OF_FEDERATES]; + netdrv_t* netdrv_for_outbound_p2p_connections[NUMBER_OF_FEDERATES]; /** - * Thread ID for a thread that accepts sockets and then supervises - * listening to those sockets for incoming P2P (physical) connections. + * Thread ID for a thread that accepts netdrivers and then supervises + * listening to those netdrivers for incoming P2P (physical) connections. */ lf_thread_t inbound_p2p_handling_thread_id; /** - * A socket descriptor for the socket server of the federate. + * A netdriver for the server of the federate. * This is assigned in lf_create_server(). - * This socket is used to listen to incoming physical connections from + * This netdriver is used to listen to incoming physical connections from * remote federates. Once an incoming connection is accepted, the - * opened socket will be stored in - * federate_sockets_for_inbound_p2p_connections. - */ - int server_socket; - - /** - * The port used for the server socket to listen for messages from other federates. - * The federate informs the RTI of this port once it has created its socket server by - * sending an ADDRESS_AD message (@see rti.h). + * opened netdriver will be stored in + * federate_netdrv_for_inbound_p2p_connections. */ - int server_port; + netdrv_t* my_netdrv; /** * Most recent tag advance grant (TAG) received from the RTI, or NEVER if none @@ -215,7 +201,7 @@ typedef enum parse_rti_code_t { SUCCESS, INVALID_PORT, INVALID_HOST, INVALID_USE // Global variables /** - * Mutex lock held while performing socket write and close operations. + * Mutex lock held while performing netdriver write and close operations. */ extern lf_mutex_t lf_outbound_netdrv_mutex; @@ -239,10 +225,10 @@ extern lf_cond_t lf_current_tag_changed; * to send messages directly to the specified federate. * This function first sends an MSG_TYPE_ADDRESS_QUERY message to the RTI to obtain * the IP address and port number of the specified federate. It then attempts - * to establish a socket connection to the specified federate. + * to establish a netdriver connection to the specified federate. * If this fails, the program exits. If it succeeds, it sets element [id] of - * the _fed.sockets_for_outbound_p2p_connections global array to - * refer to the socket for communicating directly with the federate. + * the _fed.netdrv_for_outbound_p2p_connections global array to + * refer to the netdriver for communicating directly with the federate. * @param remote_federate_id The ID of the remote federate. */ void lf_connect_to_federate(uint16_t); @@ -250,12 +236,12 @@ void lf_connect_to_federate(uint16_t); /** * @brief Connect to the RTI at the specified host and port. * - * This will return the socket descriptor for the connection. + * This will return the netdriver for the connection. * If port_number is 0, then start at RTI_DEFAULT_PORT and increment * the port number on each attempt. If an attempt fails, wait CONNECT_RETRY_INTERVAL * and try again. If it fails after CONNECT_TIMEOUT, the program exits. - * If it succeeds, it sets the _fed.socket_TCP_RTI global variable to refer to - * the socket for communicating with the RTI. + * If it succeeds, it sets the _fed.netdrv_TCP_RTI global variable to refer to + * the netdriver for communicating with the RTI. * @param hostname A hostname, such as "localhost". * @param port_number A port number or 0 to start with the default. */ @@ -265,8 +251,8 @@ void lf_connect_to_rti(const char* hostname, int port_number); * @brief Create a server to listen to incoming P2P connections. * * Such connections are used for physical connections or any connection if using - * decentralized coordination. This function only handles the creation of the server socket. - * The bound port for the server socket is then sent to the RTI by sending an + * decentralized coordination. This function only handles the creation of the server netdriver. + * For TCP connections, the bound port for the server netdriver is then sent to the RTI by sending an * MSG_TYPE_ADDRESS_ADVERTISEMENT message (@see net_common.h). * This function expects no response from the RTI. * @@ -293,8 +279,8 @@ void lf_enqueue_port_absent_reactions(environment_t* env); * * This thread accepts connections from federates that send messages directly * to this one (not through the RTI). This thread starts a thread for - * each accepted socket connection to read messages and, once it has opened all expected - * sockets, exits. + * each accepted netdriver connection to read messages and, once it has opened all expected + * netdrivers, exits. * @param ignored No argument needed for this thread. */ void* lf_handle_p2p_connections_from_federates(void*); @@ -333,7 +319,7 @@ void lf_reset_status_fields_on_input_port_triggers(); * @brief Send a message to another federate. * * This function is used for physical connections - * between federates. If the socket connection to the remote federate or the RTI has been broken, + * between federates. If the netdriver connection to the remote federate or the RTI has been broken, * then this returns -1 without sending. Otherwise, it returns 0. * * This method assumes that the caller does not hold the lf_outbound_netdrv_mutex lock, @@ -438,7 +424,7 @@ void lf_send_port_absent_to_federate(environment_t* env, interval_t additional_d * * The payload is the specified tag plus one microstep. If this federate has previously * received a stop request from the RTI, then do not send the message and - * return 1. Return -1 if the socket is disconnected. Otherwise, return 0. + * return 1. Return -1 if the netdriver is disconnected. Otherwise, return 0. * @return 0 if the message is sent. */ int lf_send_stop_request_to_rti(tag_t stop_tag); @@ -450,7 +436,7 @@ int lf_send_stop_request_to_rti(tag_t stop_tag); * If the delayed tag falls after the timeout time, then the message is not sent and -1 is returned. * The caller can reuse or free the memory storing the message after this returns. * - * If the message fails to send (e.g. the socket connection is broken), then the + * If the message fails to send (e.g. the netdriver connection is broken), then the * response depends on the message_type. For MSG_TYPE_TAGGED_MESSAGE, the message is * supposed to go via the RTI, and failure to communicate with the RTI is a critical failure. * In this case, the program will exit with an error message. If the message type is @@ -509,7 +495,7 @@ void lf_stall_advance_level_federation(environment_t* env, size_t level); * @brief Synchronize the start with other federates via the RTI. * * This assumes that a connection to the RTI is already made - * and _lf_rti_socket_TCP is valid. It then sends the current logical + * and netdrv_to_rti is valid. It then sends the current logical * time to the RTI and waits for the RTI to respond with a specified * time. It starts a thread to listen for messages from the RTI. */ From 69e1403f7f1296fb470010c8ea4326b2a0b71e95 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 21 May 2024 15:03:41 -0700 Subject: [PATCH 240/262] Update create_TCP_server for better port handling. --- core/federated/network/socket_common.c | 35 ++++++++++++++++++-------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index 713fe823d..95c50eb66 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "util.h" #include "net_common.h" @@ -87,10 +88,15 @@ int create_real_time_tcp_socket_errexit() { return sock; } +// The port will be 0, for both RTI and federate server when nothing is specified. +// If the RTI port is 0 (not specified), it will use RTI_DEFAULT_PORT as default. +// If the federate server's port is 0 (not specified), the OS will assign the port. int create_TCP_server(socket_priv_t* priv, int server_type, uint16_t port) { - // Federate always has a specified port. The RTI can get a specified port by user input. + assert(port <= UINT16_MAX && port >= 0); uint16_t specified_port = port; - if (specified_port == 0 && server_type == 0) { // 0 for RTI + + // When server type is RTI, and port is not specified, set port as RTI_DEFAULT_PORT. + if (server_type == 0 && specified_port == 0) { // 0 for RTI port = RTI_DEFAULT_PORT; } @@ -108,24 +114,30 @@ int create_TCP_server(socket_priv_t* priv, int server_type, uint16_t port) { server_fd.sin_port = htons(port); int result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); - // Try repeatedly to bind to a port. - int count = 1; + // If bind failed, try repeatedly to bind to a port. + int count = 1; while (result != 0 && count++ < PORT_BIND_RETRY_LIMIT) { + // If port is not specified, we try the incremented port number. if (specified_port == 0) { lf_print_warning("Failed to get port %d.", port); port++; - if (port >= RTI_DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) + // If the RTI server's port is incremented until the upper bound, we retry the RTI_DEFAULT_PORT. + if (server_type == 0 && port >= RTI_DEFAULT_PORT + MAX_NUM_PORT_ADDRESSES) { port = RTI_DEFAULT_PORT; + } lf_print_warning("Try again with port %d.", port); server_fd.sin_port = htons(port); // Do not sleep. - } else { - lf_print("RTI failed to get port %d. Will try again.", port); + } + // If the port is specified, we do not increment and try again after a PORT_BIND_RETRY_INTERVAL. + else { + lf_print("Failed to get port %d. Will try again.", port); lf_sleep(PORT_BIND_RETRY_INTERVAL); } result = bind(priv->socket_descriptor, (struct sockaddr*)&server_fd, sizeof(server_fd)); } + if (result != 0) { lf_print_error_and_exit("Failed to bind the socket. Port %d is not available. ", port); } @@ -135,8 +147,8 @@ int create_TCP_server(socket_priv_t* priv, int server_type, uint16_t port) { listen(priv->socket_descriptor, 128); // Set the port into priv->port. - if (specified_port == 0 && server_type == 1) { // 1 for FED - // Need to retrieve the port number assigned by the OS. + // If the federate server has no specified port, we need to retrieve the port number assigned by the OS. + if (server_type == 1 && specified_port == 0) { // 1 for FED struct sockaddr_in assigned; socklen_t addr_len = sizeof(assigned); if (getsockname(priv->socket_descriptor, (struct sockaddr*)&assigned, &addr_len) < 0) { @@ -146,6 +158,8 @@ int create_TCP_server(socket_priv_t* priv, int server_type, uint16_t port) { } else { priv->port = port; } + + LF_PRINT_LOG("Server for communicating with other federates started using port %d.", priv->port); return 1; } @@ -250,7 +264,8 @@ int connect_to_socket(int sock, char* hostname, int port, uint16_t user_specifie if (user_specified_port == 0) { used_port++; } - lf_print_warning("Could not connect. Will try again every " PRINTF_TIME " nanoseconds.\n", CONNECT_RETRY_INTERVAL); + lf_print_warning("Could not connect. Will try again every " PRINTF_TIME " nanoseconds.\n", + CONNECT_RETRY_INTERVAL); continue; } else { break; From 2b25a95f0ff7077c70bfbb70aad1b4cecd09bd03 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 21 May 2024 15:06:16 -0700 Subject: [PATCH 241/262] Minor fix. --- include/core/federated/federate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/core/federated/federate.h b/include/core/federated/federate.h index ade48477b..480e22914 100644 --- a/include/core/federated/federate.h +++ b/include/core/federated/federate.h @@ -37,7 +37,7 @@ typedef struct federate_instance_t { * This is set by lf_connect_to_rti(), which must be called before other * functions that communicate with the rti are called. */ - int netdrv_to_rti; + netdrv_t* netdrv_to_rti; /** * Thread listening for incoming messages from the RTI. From 2d93e2cff0fbffbdcdb9f35c11f77f5a0e255bec Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 21 May 2024 16:32:28 -0700 Subject: [PATCH 242/262] Add MQTTClient_receive to retry. --- core/federated/network/RTI.log | 40979 --------------------- core/federated/network/lf_mqtt_support.c | 38 +- 2 files changed, 37 insertions(+), 40980 deletions(-) delete mode 100644 core/federated/network/RTI.log diff --git a/core/federated/network/RTI.log b/core/federated/network/RTI.log deleted file mode 100644 index 8df942320..000000000 --- a/core/federated/network/RTI.log +++ /dev/null @@ -1,40979 +0,0 @@ -RTI: Number of federates: 2 -RTI: Clock sync: init -Starting RTI for 2 federates in federation ID Unidentified Federation. ----- System clock resolution: 1 nsec -LOG: Subscribing on topic Unidentified Federation_RTI. -LOG: PHYSICAL_TIME ON SUBSCRIBING TOPIC: 1716248216825098740 -RTI: Listening for federates. -LOG: RECEIVING message from federateID -1 -MQTT_LOG: 20240520 163656.825 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163656.825 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163656.825 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163656.825 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163656.825 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163656.825 Return code 1 from poll - -MQTT_LOG: 20240520 163656.825 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163656.825 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163656.825 (140737352902464) (2)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163656.825 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163656.825 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163656.825 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.494 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.494 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.494 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.494 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.494 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.494 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.494 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.494 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.494 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (3)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163658.494 (140737352902464) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163658.494 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163658.494 (140737352902464) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163658.494 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555597e10 - - -MQTT_LOG: 20240520 163658.494 (140737352902464) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163658.494 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555597cf0 - - -MQTT_LOG: 20240520 163658.494 (140737352902464) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.494 (140737352902464) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163658.494 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163658.494 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 1280 bytes - - -MQTT_LOG: 20240520 163658.494 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.494 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163658.495 3 RTI_RTI <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163658.495 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163658.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598300 - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163658.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555597d20 - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163658.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598390 - - -MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x5555555960e0 - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598510 - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x5555555985f0 - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1504 bytes - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 1488 bytes - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163658.495 3 RTI_RTI -> PUBREC msgid: 1 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163658.495 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 1472 bytes - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.495 Return code 1 from poll - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (2)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.495 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.495 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163658.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555986a0 - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163658.495 3 RTI_RTI <- PUBREL msgid 1 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163658.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555984a0 - - -MQTT_LOG: 20240520 163658.495 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163658.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598730 - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163658.495 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1568 bytes - - -MQTT_LOG: 20240520 163658.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1520 bytes - - -MQTT_LOG: 20240520 163658.495 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1488 bytes - - -MQTT_LOG: 20240520 163658.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1408 bytes - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555597cf0 - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597e90 - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1408 bytes - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 1392 bytes - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163658.495 3 RTI_RTI -> PUBCOMP msgid 1 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163658.495 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 1376 bytes - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163658.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1328 bytes - - -MQTT_LOG: 20240520 163658.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1296 bytes - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163658.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 1264 bytes - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163658.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 1232 bytes - - -MQTT_LOG: 20240520 163658.495 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 1216 bytes - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID -1 -LOG: Received MSG_TYPE_MQTT_JOIN message from federate 0. -DEBUG: Setting up MQTTServer_id for federate 0. -DEBUG: Setup MQTTServer_id for federate 0 as RTI_0. -DEBUG: Creating MQTTClient for federate 0. -MQTT_LOG: 20240520 163658.495 (140737352902464) (0)> MQTTClient_createWithOptions:375 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (2)> UTF8_validate:134 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (2)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163658.495 Allocating 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 438 ptr 0x555555598850 - - -MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555597cf0 - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163658.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555597c60 - - -MQTT_LOG: 20240520 163658.495 Allocating 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 489 ptr 0x555555598910 - - -MQTT_LOG: 20240520 163658.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555986a0 - - -MQTT_LOG: 20240520 163658.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555597ca0 - - -MQTT_LOG: 20240520 163658.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598300 - - -MQTT_LOG: 20240520 163658.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555977e0 - - -MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555597f80 - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTPersistence_create:56 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTPersistence_create:104 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTPersistence_initialize:119 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTPersistence_initialize:127 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTPersistence_restoreMessageQueue:877 - -MQTT_LOG: 20240520 163658.495 0 queued messages restored for client RTI_0 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)< MQTTPersistence_restoreMessageQueue:918 (0) - -MQTT_LOG: 20240520 163658.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598540 - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (0)< MQTTClient_createWithOptions:522 (0) - -DEBUG: Connecting MQTTClient for federate 0. -MQTT_LOG: 20240520 163658.495 (140737352902464) (0)> MQTTClient_connectAll:1745 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (1)> MQTTClient_connectURI:1504 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (2)> MQTTClient_connectURIVersion:1209 - -MQTT_LOG: 20240520 163658.495 Connecting to serverURI 127.0.0.1:1883 with MQTT version 4 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTProtocol_connect:227 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> MQTTProtocol_addressPort:63 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)< MQTTProtocol_addressPort:101 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> Socket_new:1072 - -MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1082 ptr 0x555555598ba0 - - -MQTT_LOG: 20240520 163658.495 New socket 4 for 127.0.0.1:1883, port 1883 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> Socket_addSocket:272 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> Socket_setnonblocking:95 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< Socket_setnonblocking:100 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)< Socket_addSocket:314 (0) - -MQTT_LOG: 20240520 163658.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1200 ptr 0x555555598c50 - - -MQTT_LOG: 20240520 163658.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d30 - - -MQTT_LOG: 20240520 163658.495 Connect pending - -MQTT_LOG: 20240520 163658.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1233, heap use now 1968 bytes - - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)< Socket_new:1235 (115) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)< MQTTProtocol_connect:355 (115) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (3)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.495 Return code 0 from poll - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.495 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163658.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163658.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1936 bytes - - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (3)> MQTTPacket_send_connect:55 - -MQTT_LOG: 20240520 163658.596 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 73 ptr 0x555555598cf0 - - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.596 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598c20 - - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (7)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (7)< Socket_writev:773 (19) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.596 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.596 4 RTI_0 -> CONNECT version 4 clean: 1 (0) - -MQTT_LOG: 20240520 163658.596 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 127, heap use now 1936 bytes - - -MQTT_LOG: 20240520 163658.596 (140737352902464) (3)< MQTTPacket_send_connect:129 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (3)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.596 Return code 1 from poll - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.596 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.596 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> MQTTPacket_connack:148 - -MQTT_LOG: 20240520 163658.596 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 149 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< MQTTPacket_connack:176 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163658.596 4 RTI_0 <- CONNACK rc: 0 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (3)> MQTTClient_cleanSession:1131 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> MQTTPersistence_clear:170 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTPersistence_clear:174 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> MQTTClient_emptyMessageQueue:557 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTClient_emptyMessageQueue:572 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (3)< MQTTClient_cleanSession:1139 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (3)> MQTTPacket_freeConnack:187 - -MQTT_LOG: 20240520 163658.596 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 190, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163658.596 (140737352902464) (3)< MQTTPacket_freeConnack:191 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (2)< MQTTClient_connectURIVersion:1477 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (1)< MQTTClient_connectURI:1702 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (0)< MQTTClient_connectAll:1910 (0) - -DEBUG: Connected, return code 0 - -DEBUG: Creating topic for federate 0. -LOG: Starting subscribe -MQTT_LOG: 20240520 163658.596 (140737352902464) (0)> MQTTClient_subscribe5:2180 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (1)> MQTTClient_subscribeMany5:2034 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (1) - -MQTT_LOG: 20240520 163658.596 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163658.596 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163658.596 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 - - -MQTT_LOG: 20240520 163658.596 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e40 - - -MQTT_LOG: 20240520 163658.596 (140737352902464) (2)> MQTTProtocol_subscribe:394 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (3)> MQTTPacket_send_subscribe:235 - -MQTT_LOG: 20240520 163658.596 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 247 ptr 0x555555598f30 - - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.596 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599030 - - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (7)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (7)< Socket_writev:773 (43) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (6)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.596 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2128 bytes - - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.596 4 RTI_0 -> SUBSCRIBE msgid: 1 (0) - -MQTT_LOG: 20240520 163658.596 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 275, heap use now 2112 bytes - - -MQTT_LOG: 20240520 163658.596 (140737352902464) (3)< MQTTPacket_send_subscribe:277 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (2)< MQTTProtocol_subscribe:396 (0) - -MQTT_LOG: 20240520 163658.596 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163658.596 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 2032 bytes - - -MQTT_LOG: 20240520 163658.596 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 1984 bytes - - -MQTT_LOG: 20240520 163658.596 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163658.596 (140737352902464) (2)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (3)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (4)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.596 Return code 1 from poll - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> isReady:353 - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.596 (140737352902464) (5)> isReady:353 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (5)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.597 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (5)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.597 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (5)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (5)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (6)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (7)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (7)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (7)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (7)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (6)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (5)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (5)> MQTTPacket_suback:296 - -MQTT_LOG: 20240520 163658.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 297 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163658.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163658.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 326 ptr 0x555555598ba0 - - -MQTT_LOG: 20240520 163658.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598cf0 - - -MQTT_LOG: 20240520 163658.597 (140737352902464) (5)< MQTTPacket_suback:348 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (5)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (5)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (3)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (2)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (2)> MQTTProtocol_handleSubacks:413 - -MQTT_LOG: 20240520 163658.597 4 RTI_0 <- SUBACK msgid: 1 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (3)> MQTTPacket_freeSuback:697 - -MQTT_LOG: 20240520 163658.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 366, heap use now 2048 bytes - - -MQTT_LOG: 20240520 163658.597 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 370, heap use now 2032 bytes - - -MQTT_LOG: 20240520 163658.597 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163658.597 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 702, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163658.597 (140737352902464) (3)< MQTTPacket_freeSuback:703 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (2)< MQTTProtocol_handleSubacks:417 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (1)< MQTTClient_subscribeMany5:2154 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (0)< MQTTClient_subscribe5:2184 (0) - -DEBUG: Subscribed, return code 0 - -LOG: Subscribing on topic Unidentified Federation_fed_0_to_RTI. -LOG: Finished subscribe -LOG: Publishing MSG_TYPE_MQTT_ACCEPT message on topic Unidentified Federation_RTI_to_fed_0. -MQTT_LOG: 20240520 163658.597 (140737352902464) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (2) - -MQTT_LOG: 20240520 163658.597 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163658.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555598ba0 - - -MQTT_LOG: 20240520 163658.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163658.597 (140737352902464) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163658.597 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163658.597 (140737352902464) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163658.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599130 - - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163658.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555990a0 - - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163658.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598f80 - - -MQTT_LOG: 20240520 163658.597 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163658.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163658.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163658.597 (140737352902464) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163658.597 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (8)< Socket_writev:773 (45) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163658.597 (140737352902464) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163658.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163658.597 4 RTI_0 -> PUBLISH msgid: 2 qos: 2 retained: 0 rc 0 payload len(3):  - -MQTT_LOG: 20240520 163658.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163658.597 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163658.597 (140737352902464) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.597 Return code 1 from poll - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.597 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.597 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.598 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.598 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163658.598 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163658.598 4 RTI_0 <- PUBREC msgid: 2 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163658.598 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991e0 - - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.598 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599240 - - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163658.598 4 RTI_0 -> PUBREL msgid: 2 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163658.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.598 Return code 1 from poll - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.598 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.598 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163658.598 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163658.598 4 RTI_0 <- PUBCOMP msgid:2 - -MQTT_LOG: 20240520 163658.598 PUBCOMP received from client RTI_0 for message id 2 - removing publication - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163658.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163658.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163658.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2144 bytes - - -MQTT_LOG: 20240520 163658.598 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163658.598 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163658.598 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1984 bytes - - -MQTT_LOG: 20240520 163658.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.598 Return code 1 from poll - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.598 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.598 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.639 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.639 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.639 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.639 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.639 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.639 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.639 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.639 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.639 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.639 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.639 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.639 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.639 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.639 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.639 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.639 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.639 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.639 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.639 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.639 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163658.640 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163658.640 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163658.640 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599240 - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163658.640 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2048 bytes - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163658.640 4 RTI_0 <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(1):  - -MQTT_LOG: 20240520 163658.640 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163658.640 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555990e0 - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163658.640 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163658.640 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d30 - - -MQTT_LOG: 20240520 163658.640 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555598b70 - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163658.640 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598c20 - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.640 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.640 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.640 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163658.640 4 RTI_0 -> PUBREC msgid: 1 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163658.640 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.640 Return code 1 from poll - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.640 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.640 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163658.640 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163658.640 4 RTI_0 <- PUBREL msgid 1 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163658.640 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555986f0 - - -MQTT_LOG: 20240520 163658.640 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163658.640 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599060 - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163658.640 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2336 bytes - - -MQTT_LOG: 20240520 163658.640 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163658.640 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163658.640 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163658.640 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599240 - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.640 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.640 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.640 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2160 bytes - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163658.640 4 RTI_0 -> PUBCOMP msgid 1 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163658.640 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2144 bytes - - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.640 Return code 0 from poll - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.640 (140737352902464) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) - -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163658.640 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163658.640 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.698 Return code 0 from poll - -MQTT_LOG: 20240520 163658.698 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.698 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.698 (140737352902464) (2)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163658.698 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.698 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163658.698 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163658.698 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163658.698 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163658.698 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163658.698 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2032 bytes - - -MQTT_LOG: 20240520 163658.698 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163658.698 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 1984 bytes - - -MQTT_LOG: 20240520 163658.698 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 1968 bytes - - -MQTT_LOG: 20240520 163658.698 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -LOG: Receiving MSG_TYPE_MQTT_ACCEPT_ACK message on topic Unidentified Federation_fed_0_to_RTI. -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163658.698 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.698 Return code 1 from poll - -MQTT_LOG: 20240520 163658.698 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.698 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.698 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.698 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.698 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.699 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.699 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163658.699 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163658.699 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x5555555981d0 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163658.699 4 RTI_0 <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(27):  - -MQTT_LOG: 20240520 163658.699 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163658.699 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163658.699 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e40 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163658.699 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e80 - - -MQTT_LOG: 20240520 163658.699 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555598fc0 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598f00 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163658.699 4 RTI_0 -> PUBREC msgid: 2 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163658.699 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.699 Return code 1 from poll - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.699 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.699 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163658.699 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555990e0 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163658.699 4 RTI_0 <- PUBREL msgid 2 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163658.699 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555990a0 - - -MQTT_LOG: 20240520 163658.699 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163658.699 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163658.699 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2384 bytes - - -MQTT_LOG: 20240520 163658.699 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2336 bytes - - -MQTT_LOG: 20240520 163658.699 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163658.699 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163658.699 4 RTI_0 -> PUBCOMP msgid 2 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163658.699 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163658.699 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2144 bytes - - -MQTT_LOG: 20240520 163658.699 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2112 bytes - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163658.699 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163658.699 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2032 bytes - - -MQTT_LOG: 20240520 163658.699 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI received federate ID: 0. -DEBUG: RTI received federation ID: Unidentified Federation. -DEBUG: RTI responding with MSG_TYPE_ACK to federate 0. -MQTT_LOG: 20240520 163658.699 (140737352902464) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (3) - -MQTT_LOG: 20240520 163658.699 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163658.699 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x5555555981d0 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163658.699 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163658.699 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163658.699 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163658.699 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555994d0 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x555555599240 - - -MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x555555599180 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.699 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (8)< Socket_writev:773 (43) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163658.699 4 RTI_0 -> PUBLISH msgid: 3 qos: 2 retained: 0 rc 0 payload len(1): ÿ - -MQTT_LOG: 20240520 163658.699 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163658.699 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163658.699 (140737352902464) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.699 Return code 1 from poll - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.699 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163658.699 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.711 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.711 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.711 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.711 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.711 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.711 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.711 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.711 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.711 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163658.711 (140737352902464) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163658.711 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163658.711 (140737352902464) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163658.711 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555598580 - - -MQTT_LOG: 20240520 163658.711 (140737352902464) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163658.711 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555598cc0 - - -MQTT_LOG: 20240520 163658.711 (140737352902464) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.711 (140737352902464) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163658.711 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163658.711 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163658.712 3 RTI_RTI <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163658.712 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x5555555995c0 - - -MQTT_LOG: 20240520 163658.712 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599630 - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163658.712 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598c80 - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163658.712 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599490 - - -MQTT_LOG: 20240520 163658.712 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163658.712 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555997c0 - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.712 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x5555555998a0 - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.712 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2544 bytes - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.712 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2528 bytes - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163658.712 3 RTI_RTI -> PUBREC msgid: 2 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163658.712 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2512 bytes - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.712 Return code 1 from poll - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.712 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.712 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163658.712 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599950 - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163658.712 3 RTI_RTI <- PUBREL msgid 2 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163658.712 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599750 - - -MQTT_LOG: 20240520 163658.712 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163658.712 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555999e0 - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163658.712 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2608 bytes - - -MQTT_LOG: 20240520 163658.712 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2560 bytes - - -MQTT_LOG: 20240520 163658.712 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2528 bytes - - -MQTT_LOG: 20240520 163658.712 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2448 bytes - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163658.712 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598cc0 - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.712 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.712 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2448 bytes - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.712 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2432 bytes - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163658.712 3 RTI_RTI -> PUBCOMP msgid 2 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163658.712 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2416 bytes - - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.712 Return code 1 from poll - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.712 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.712 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.739 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.739 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163658.739 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599950 - - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163658.739 4 RTI_0 <- PUBREC msgid: 3 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163658.739 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991e0 - - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.739 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.739 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2448 bytes - - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.739 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2432 bytes - - -MQTT_LOG: 20240520 163658.739 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163658.739 4 RTI_0 -> PUBREL msgid: 3 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163658.739 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2416 bytes - - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.739 Return code 1 from poll - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.739 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.739 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163658.739 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599950 - - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163658.739 4 RTI_0 <- PUBCOMP msgid:3 - -MQTT_LOG: 20240520 163658.739 PUBCOMP received from client RTI_0 for message id 3 - removing publication - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163658.739 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2416 bytes - - -MQTT_LOG: 20240520 163658.739 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2400 bytes - - -MQTT_LOG: 20240520 163658.739 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2352 bytes - - -MQTT_LOG: 20240520 163658.739 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163658.739 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163658.739 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163658.739 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2160 bytes - - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.739 Return code 1 from poll - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.739 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.800 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.800 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163658.800 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163658.800 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163658.800 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555598cc0 - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163658.800 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163658.800 4 RTI_0 <- PUBLISH msgid: 3 qos: 2 retained: 0 payload len(11):  - -MQTT_LOG: 20240520 163658.800 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x5555555995c0 - - -MQTT_LOG: 20240520 163658.800 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598f30 - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163658.800 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598db0 - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163658.800 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555992e0 - - -MQTT_LOG: 20240520 163658.800 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555599240 - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163658.800 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598b70 - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.800 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599360 - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.800 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2480 bytes - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.800 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2464 bytes - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163658.800 4 RTI_0 -> PUBREC msgid: 3 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163658.800 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2448 bytes - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) - -DEBUG: RTI sent MSG_TYPE_ACK to federate 0. -DEBUG: RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate 0. -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163658.800 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.800 Return code 1 from poll - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.800 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.800 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163658.800 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599630 - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163658.800 4 RTI_0 <- PUBREL msgid 3 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163658.800 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599270 - - -MQTT_LOG: 20240520 163658.800 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 - - -MQTT_LOG: 20240520 163658.800 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555994d0 - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163658.800 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2544 bytes - - -MQTT_LOG: 20240520 163658.800 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2496 bytes - - -MQTT_LOG: 20240520 163658.800 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2464 bytes - - -MQTT_LOG: 20240520 163658.800 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2384 bytes - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163658.800 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598cc0 - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.800 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x5555555991e0 - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.800 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2384 bytes - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.800 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163658.800 4 RTI_0 -> PUBCOMP msgid 3 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163658.800 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2352 bytes - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163658.800 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163658.800 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163658.800 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163658.800 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163658.800 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163658.800 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI got 0 upstreams and 1 downstreams from federate 0. -DEBUG: RTI received neighbor structure from federate 0. -DEBUG: RTI waiting for MSG_TYPE_UDP_PORT from federate 0. -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163658.800 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.800 Return code 1 from poll - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.800 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.800 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.800 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.900 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163658.900 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x5555555995c0 - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163658.900 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163658.900 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x5555555991e0 - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163658.900 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163658.900 4 RTI_0 <- PUBLISH msgid: 4 qos: 2 retained: 0 payload len(3): þÿÿ - -MQTT_LOG: 20240520 163658.900 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163658.900 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163658.900 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555998d0 - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163658.900 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555994d0 - - -MQTT_LOG: 20240520 163658.900 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555599000 - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163658.900 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599360 - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.900 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599870 - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.900 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2480 bytes - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.900 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2464 bytes - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163658.900 4 RTI_0 -> PUBREC msgid: 4 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163658.900 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2448 bytes - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTProtocol_keepalive:704 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTProtocol_keepalive:781 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.900 Return code 1 from poll - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.900 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.900 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163658.900 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555981d0 - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163658.900 4 RTI_0 <- PUBREL msgid 4 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163658.900 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599680 - - -MQTT_LOG: 20240520 163658.900 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 - - -MQTT_LOG: 20240520 163658.900 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598ec0 - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163658.900 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2544 bytes - - -MQTT_LOG: 20240520 163658.900 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2496 bytes - - -MQTT_LOG: 20240520 163658.900 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2464 bytes - - -MQTT_LOG: 20240520 163658.900 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2384 bytes - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163658.900 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991e0 - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.900 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163658.900 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2384 bytes - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163658.900 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163658.900 4 RTI_0 -> PUBCOMP msgid 4 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163658.900 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2352 bytes - - -MQTT_LOG: 20240520 163658.900 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.900 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.900 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163658.900 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163658.901 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163658.901 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163658.901 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163658.901 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163658.901 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163658.901 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI got MSG_TYPE_UDP_PORT 65535 from federate 0. -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163658.901 (140737349940800) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163658.901 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.901 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.901 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.901 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -LOG: RECEIVING message from federateID -1 -MQTT_LOG: 20240520 163658.901 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.901 Return code 0 from poll - -MQTT_LOG: 20240520 163658.901 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (2)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163658.901 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2112 bytes - - -MQTT_LOG: 20240520 163658.901 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163658.901 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2048 bytes - - -MQTT_LOG: 20240520 163658.901 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163658.901 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163658.901 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163658.901 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID -1 -LOG: Received MSG_TYPE_MQTT_JOIN message from federate 1. -DEBUG: Setting up MQTTServer_id for federate 1. -DEBUG: Setup MQTTServer_id for federate 1 as RTI_1. -DEBUG: Creating MQTTClient for federate 1. -MQTT_LOG: 20240520 163658.901 (140737352902464) (0)> MQTTClient_createWithOptions:375 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (2)> UTF8_validate:134 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (2)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163658.901 Allocating 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 438 ptr 0x555555599d40 - - -MQTT_LOG: 20240520 163658.901 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555598ba0 - - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163658.901 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599710 - - -MQTT_LOG: 20240520 163658.901 Allocating 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 489 ptr 0x555555599e00 - - -MQTT_LOG: 20240520 163658.901 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163658.901 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555981d0 - - -MQTT_LOG: 20240520 163658.901 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163658.901 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163658.901 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x5555555997c0 - - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTPersistence_create:56 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTPersistence_create:104 (0) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTPersistence_initialize:119 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTPersistence_initialize:127 (0) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTPersistence_restoreMessageQueue:877 - -MQTT_LOG: 20240520 163658.901 0 queued messages restored for client RTI_1 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)< MQTTPersistence_restoreMessageQueue:918 (0) - -MQTT_LOG: 20240520 163658.901 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555997f0 - - -MQTT_LOG: 20240520 163658.901 (140737352902464) (0)< MQTTClient_createWithOptions:522 (0) - -DEBUG: Connecting MQTTClient for federate 1. -MQTT_LOG: 20240520 163658.901 (140737352902464) (0)> MQTTClient_connectAll:1745 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (1)> MQTTClient_connectURI:1504 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (2)> MQTTClient_connectURIVersion:1209 - -MQTT_LOG: 20240520 163658.901 Connecting to serverURI 127.0.0.1:1883 with MQTT version 4 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (3)> MQTTProtocol_connect:227 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (4)> MQTTProtocol_addressPort:63 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (4)< MQTTProtocol_addressPort:101 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (4)> Socket_new:1072 - -MQTT_LOG: 20240520 163658.901 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1082 ptr 0x555555599870 - - -MQTT_LOG: 20240520 163658.901 New socket 5 for 127.0.0.1:1883, port 1883 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (5)> Socket_addSocket:272 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (6)> Socket_setnonblocking:95 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (6)< Socket_setnonblocking:100 (0) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (5)< Socket_addSocket:314 (0) - -MQTT_LOG: 20240520 163658.901 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1200 ptr 0x5555555978a0 - - -MQTT_LOG: 20240520 163658.901 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598fc0 - - -MQTT_LOG: 20240520 163658.901 Connect pending - -MQTT_LOG: 20240520 163658.901 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1233, heap use now 2784 bytes - - -MQTT_LOG: 20240520 163658.901 (140737352902464) (4)< Socket_new:1235 (115) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (3)< MQTTProtocol_connect:355 (115) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (3)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163658.901 Return code 1 from poll - -MQTT_LOG: 20240520 163658.901 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (5)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163658.901 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163658.901 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163658.901 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.001 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163659.001 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (7)> readUTFlen:387 - -MQTT_LOG: 20240520 163659.001 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599130 - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (7)< readUTFlen:401 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163659.001 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599360 - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163659.001 4 RTI_0 <- PUBLISH msgid: 5 qos: 2 retained: 0 payload len(9): |%ê©VÑ - -MQTT_LOG: 20240520 163659.001 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x5555555995c0 - - -MQTT_LOG: 20240520 163659.001 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599950 - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163659.001 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a000 - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163659.001 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a0f0 - - -MQTT_LOG: 20240520 163659.001 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a1f0 - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163659.001 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a2d0 - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.001 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a3b0 - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3168 bytes - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3152 bytes - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163659.001 4 RTI_0 -> PUBREC msgid: 5 (0) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163659.001 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.001 Return code 1 from poll - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.001 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.001 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163659.001 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff0000c40 - - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163659.001 4 RTI_0 <- PUBREL msgid 5 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163659.001 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7ffff0000d40 - - -MQTT_LOG: 20240520 163659.001 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7ffff0000b70 - - -MQTT_LOG: 20240520 163659.001 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000ee0 - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3232 bytes - - -MQTT_LOG: 20240520 163659.001 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3216 bytes - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163659.001 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163659.001 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163659.001 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163659.001 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163659.001 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599360 - - -MQTT_LOG: 20240520 163659.001 (140737349940800) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.001 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599870 - - -MQTT_LOG: 20240520 163659.001 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163659.001 (140737349940800) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163659.001 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163659.001 4 RTI_0 -> PUBCOMP msgid 5 (0) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163659.001 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163659.001 (140737349940800) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163659.001 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163659.001 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2912 bytes - - -MQTT_LOG: 20240520 163659.001 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163659.001 (140737349940800) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163659.001 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2880 bytes - - -MQTT_LOG: 20240520 163659.001 (140737349940800) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163659.001 (140737349940800) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163659.001 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes - - -MQTT_LOG: 20240520 163659.001 (140737349940800) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI: Received message type 2 from federate 0. -DEBUG: RTI received timestamp message with time: 1716248219000382844. -DEBUG: RTI received timestamp message with time: 1716248219000382844. fro federate 0 -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (3)> MQTTPacket_send_connect:55 - -MQTT_LOG: 20240520 163659.001 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 73 ptr 0x5555555994d0 - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (4)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.001 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597c30 - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (7)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.001 (140737352902464) (7)< Socket_writev:773 (19) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (6)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.001 (140737352902464) (5)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.001 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2800 bytes - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (4)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.001 5 RTI_1 -> CONNECT version 4 clean: 1 (0) - -MQTT_LOG: 20240520 163659.001 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 127, heap use now 2784 bytes - - -MQTT_LOG: 20240520 163659.001 (140737352902464) (3)< MQTTPacket_send_connect:129 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (3)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.002 Return code 1 from poll - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.002 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.002 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> MQTTPacket_connack:148 - -MQTT_LOG: 20240520 163659.002 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 149 ptr 0x55555559a460 - - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< MQTTPacket_connack:176 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163659.002 5 RTI_1 <- CONNACK rc: 0 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (3)> MQTTClient_cleanSession:1131 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> MQTTPersistence_clear:170 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)< MQTTPersistence_clear:174 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> MQTTClient_emptyMessageQueue:557 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)< MQTTClient_emptyMessageQueue:572 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (3)< MQTTClient_cleanSession:1139 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (3)> MQTTPacket_freeConnack:187 - -MQTT_LOG: 20240520 163659.002 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 190, heap use now 2800 bytes - - -MQTT_LOG: 20240520 163659.002 (140737352902464) (3)< MQTTPacket_freeConnack:191 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (2)< MQTTClient_connectURIVersion:1477 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (1)< MQTTClient_connectURI:1702 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (0)< MQTTClient_connectAll:1910 (0) - -DEBUG: Connected, return code 0 - -DEBUG: Creating topic for federate 1. -LOG: Starting subscribe -MQTT_LOG: 20240520 163659.002 (140737352902464) (0)> MQTTClient_subscribe5:2180 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (1)> MQTTClient_subscribeMany5:2034 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (1) - -MQTT_LOG: 20240520 163659.002 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x55555559a460 - - -MQTT_LOG: 20240520 163659.002 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x55555559a4b0 - - -MQTT_LOG: 20240520 163659.002 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a340 - - -MQTT_LOG: 20240520 163659.002 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 - - -MQTT_LOG: 20240520 163659.002 (140737352902464) (2)> MQTTProtocol_subscribe:394 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (3)> MQTTPacket_send_subscribe:235 - -MQTT_LOG: 20240520 163659.002 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 247 ptr 0x55555559a500 - - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.002 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a1f0 - - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (7)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (7)< Socket_writev:773 (43) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (6)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.002 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2976 bytes - - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.002 5 RTI_1 -> SUBSCRIBE msgid: 1 (0) - -MQTT_LOG: 20240520 163659.002 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 275, heap use now 2960 bytes - - -MQTT_LOG: 20240520 163659.002 (140737352902464) (3)< MQTTPacket_send_subscribe:277 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (2)< MQTTProtocol_subscribe:396 (0) - -MQTT_LOG: 20240520 163659.002 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 2912 bytes - - -MQTT_LOG: 20240520 163659.002 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 2880 bytes - - -MQTT_LOG: 20240520 163659.002 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163659.002 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 2800 bytes - - -MQTT_LOG: 20240520 163659.002 (140737352902464) (2)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (3)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.002 Return code 1 from poll - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> isReady:353 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> isReady:353 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)> isReady:353 - -MQTT_LOG: 20240520 163659.002 (140737352902464) (5)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.002 (140737352902464) (4)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.003 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.003 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> MQTTPacket_suback:296 - -MQTT_LOG: 20240520 163659.003 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 297 ptr 0x55555559a4b0 - - -MQTT_LOG: 20240520 163659.003 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x55555559a460 - - -MQTT_LOG: 20240520 163659.003 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 326 ptr 0x55555559a380 - - -MQTT_LOG: 20240520 163659.003 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a3e0 - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< MQTTPacket_suback:348 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> MQTTProtocol_handleSubacks:413 - -MQTT_LOG: 20240520 163659.003 5 RTI_1 <- SUBACK msgid: 1 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTPacket_freeSuback:697 - -MQTT_LOG: 20240520 163659.003 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 366, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163659.003 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 370, heap use now 2880 bytes - - -MQTT_LOG: 20240520 163659.003 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2848 bytes - - -MQTT_LOG: 20240520 163659.003 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 702, heap use now 2800 bytes - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTPacket_freeSuback:703 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< MQTTProtocol_handleSubacks:417 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (1)< MQTTClient_subscribeMany5:2154 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (0)< MQTTClient_subscribe5:2184 (0) - -DEBUG: Subscribed, return code 0 - -LOG: Subscribing on topic Unidentified Federation_fed_1_to_RTI. -LOG: Finished subscribe -LOG: Publishing MSG_TYPE_MQTT_ACCEPT message on topic Unidentified Federation_RTI_to_fed_1. -MQTT_LOG: 20240520 163659.003 (140737352902464) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (2) - -MQTT_LOG: 20240520 163659.003 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163659.003 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x55555559a380 - - -MQTT_LOG: 20240520 163659.003 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x55555559a460 - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163659.003 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163659.003 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a5a0 - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163659.003 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555999a0 - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163659.003 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a130 - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163659.003 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x55555559a5f0 - - -MQTT_LOG: 20240520 163659.003 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x55555559a650 - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.003 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x55555559a6f0 - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (8)< Socket_writev:773 (45) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.003 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163659.003 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163659.003 5 RTI_1 -> PUBLISH msgid: 2 qos: 2 retained: 0 rc 0 payload len(3):  - -MQTT_LOG: 20240520 163659.003 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163659.003 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.003 Return code 1 from poll - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.003 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.003 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163659.003 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a7a0 - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163659.003 5 RTI_1 <- PUBREC msgid: 2 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163659.003 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a2a0 - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.003 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a620 - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.003 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.003 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3072 bytes - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163659.003 5 RTI_1 -> PUBREL msgid: 2 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163659.003 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3056 bytes - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.003 Return code 1 from poll - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.003 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.003 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163659.003 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a7a0 - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163659.003 5 RTI_1 <- PUBCOMP msgid:2 - -MQTT_LOG: 20240520 163659.003 PUBCOMP received from client RTI_1 for message id 2 - removing publication - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163659.003 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3056 bytes - - -MQTT_LOG: 20240520 163659.003 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163659.003 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163659.003 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163659.003 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2912 bytes - - -MQTT_LOG: 20240520 163659.003 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163659.003 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2800 bytes - - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.003 Return code 1 from poll - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.003 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.003 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.048 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.048 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163659.048 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163659.048 (140737352902464) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163659.048 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559a7a0 - - -MQTT_LOG: 20240520 163659.048 (140737352902464) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163659.048 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a620 - - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163659.048 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163659.048 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163659.048 5 RTI_1 <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(1):  - -MQTT_LOG: 20240520 163659.048 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163659.048 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a550 - - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163659.048 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598ec0 - - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163659.048 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 - - -MQTT_LOG: 20240520 163659.048 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a3b0 - - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163659.048 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a1f0 - - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.048 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597980 - - -MQTT_LOG: 20240520 163659.048 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.048 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.048 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163659.048 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163659.048 5 RTI_1 -> PUBREC msgid: 1 (0) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163659.048 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.048 Return code 1 from poll - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.048 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.048 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.049 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163659.049 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a4b0 - - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163659.049 5 RTI_1 <- PUBREL msgid 1 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163659.049 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559a0f0 - - -MQTT_LOG: 20240520 163659.049 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163659.049 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599400 - - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163659.049 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163659.049 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163659.049 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163659.049 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163659.049 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a620 - - -MQTT_LOG: 20240520 163659.049 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.049 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a5f0 - - -MQTT_LOG: 20240520 163659.049 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.049 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163659.049 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.049 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163659.049 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163659.049 5 RTI_1 -> PUBCOMP msgid 1 (0) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163659.049 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163659.049 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.049 Return code 0 from poll - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163659.049 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.049 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.103 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.103 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.103 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.103 (140737352902464) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163659.103 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) - -LOG: RECEIVING message from federateID 1 -MQTT_LOG: 20240520 163659.103 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163659.103 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.103 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.103 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.103 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.103 Return code 0 from poll - -MQTT_LOG: 20240520 163659.103 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.103 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.103 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.103 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.103 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.103 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.103 (140737352902464) (2)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163659.103 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.103 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163659.104 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163659.104 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2912 bytes - - -MQTT_LOG: 20240520 163659.104 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163659.104 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2880 bytes - - -MQTT_LOG: 20240520 163659.104 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163659.104 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163659.104 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes - - -MQTT_LOG: 20240520 163659.104 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 1 -LOG: Receiving MSG_TYPE_MQTT_ACCEPT_ACK message on topic Unidentified Federation_fed_1_to_RTI. -LOG: RECEIVING message from federateID 1 -MQTT_LOG: 20240520 163659.104 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.104 Return code 1 from poll - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.104 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.104 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163659.104 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163659.104 (140737352902464) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163659.104 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559a460 - - -MQTT_LOG: 20240520 163659.104 (140737352902464) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163659.104 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a650 - - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163659.104 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163659.104 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.104 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163659.104 5 RTI_1 <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(27):  - -MQTT_LOG: 20240520 163659.104 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163659.104 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a500 - - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163659.104 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598580 - - -MQTT_LOG: 20240520 163659.104 (140737352902464) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163659.104 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599400 - - -MQTT_LOG: 20240520 163659.105 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a720 - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598cc0 - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597980 - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.105 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.105 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163659.105 5 RTI_1 -> PUBREC msgid: 2 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163659.105 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.105 Return code 1 from poll - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.105 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.105 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163659.105 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a5a0 - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163659.105 5 RTI_1 <- PUBREL msgid 2 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163659.105 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559a680 - - -MQTT_LOG: 20240520 163659.105 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163659.105 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a0f0 - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163659.105 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3200 bytes - - -MQTT_LOG: 20240520 163659.105 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3152 bytes - - -MQTT_LOG: 20240520 163659.105 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163659.105 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a650 - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a5f0 - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.105 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.105 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163659.105 5 RTI_1 -> PUBCOMP msgid 2 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163659.105 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163659.105 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2960 bytes - - -MQTT_LOG: 20240520 163659.105 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2928 bytes - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163659.105 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163659.105 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2848 bytes - - -MQTT_LOG: 20240520 163659.105 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 1 -DEBUG: RTI received federate ID: 1. -DEBUG: RTI received federation ID: Unidentified Federation. -DEBUG: RTI responding with MSG_TYPE_ACK to federate 1. -MQTT_LOG: 20240520 163659.105 (140737352902464) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (3) - -MQTT_LOG: 20240520 163659.105 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x55555559a5f0 - - -MQTT_LOG: 20240520 163659.105 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x55555559a460 - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163659.105 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163659.105 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a500 - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163659.105 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a0f0 - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163659.105 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a760 - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x55555559a620 - - -MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x555555597980 - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.105 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x55555559a6f0 - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (8)< Socket_writev:773 (43) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.105 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163659.105 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163659.105 5 RTI_1 -> PUBLISH msgid: 3 qos: 2 retained: 0 rc 0 payload len(1): ÿ - -MQTT_LOG: 20240520 163659.105 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163659.105 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163659.105 (140737352902464) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.105 Return code 1 from poll - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.105 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.105 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.148 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.148 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163659.148 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a4b0 - - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163659.148 5 RTI_1 <- PUBREC msgid: 3 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163659.148 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555597980 - - -MQTT_LOG: 20240520 163659.148 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.148 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a6f0 - - -MQTT_LOG: 20240520 163659.148 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.148 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163659.148 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.148 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3072 bytes - - -MQTT_LOG: 20240520 163659.148 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163659.148 5 RTI_1 -> PUBREL msgid: 3 (0) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163659.148 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3056 bytes - - -MQTT_LOG: 20240520 163659.148 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.148 Return code 1 from poll - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.148 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.148 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.148 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.149 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163659.149 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a4b0 - - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163659.149 5 RTI_1 <- PUBCOMP msgid:3 - -MQTT_LOG: 20240520 163659.149 PUBCOMP received from client RTI_1 for message id 3 - removing publication - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163659.149 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3056 bytes - - -MQTT_LOG: 20240520 163659.149 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163659.149 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163659.149 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163659.149 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2912 bytes - - -MQTT_LOG: 20240520 163659.149 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163659.149 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2800 bytes - - -MQTT_LOG: 20240520 163659.149 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.149 Return code 1 from poll - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.149 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.149 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.206 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.206 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163659.206 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163659.206 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559a4b0 - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163659.206 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a6f0 - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163659.206 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163659.206 5 RTI_1 <- PUBLISH msgid: 3 qos: 2 retained: 0 payload len(19):  - -MQTT_LOG: 20240520 163659.206 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163659.206 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a7a0 - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163659.206 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a830 - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163659.206 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 - - -MQTT_LOG: 20240520 163659.206 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a870 - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163659.206 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a650 - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.206 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a170 - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.206 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.206 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163659.206 5 RTI_1 -> PUBREC msgid: 3 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163659.206 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) - -DEBUG: RTI sent MSG_TYPE_ACK to federate 1. -DEBUG: RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate 1. -LOG: RECEIVING message from federateID 1 -MQTT_LOG: 20240520 163659.206 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.206 Return code 1 from poll - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.206 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.206 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163659.206 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a550 - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163659.206 5 RTI_1 <- PUBREL msgid 3 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163659.206 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599680 - - -MQTT_LOG: 20240520 163659.206 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163659.206 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a420 - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163659.206 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3200 bytes - - -MQTT_LOG: 20240520 163659.206 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3152 bytes - - -MQTT_LOG: 20240520 163659.206 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163659.206 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163659.206 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a6f0 - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.206 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598cc0 - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.206 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.206 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.206 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.206 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163659.206 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163659.206 5 RTI_1 -> PUBCOMP msgid 3 (0) - -MQTT_LOG: 20240520 163659.207 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163659.207 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163659.207 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163659.207 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.207 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163659.207 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2960 bytes - - -MQTT_LOG: 20240520 163659.207 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2928 bytes - - -MQTT_LOG: 20240520 163659.207 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163659.207 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163659.207 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163659.207 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163659.207 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2848 bytes - - -MQTT_LOG: 20240520 163659.207 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes - - -MQTT_LOG: 20240520 163659.207 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 1 -DEBUG: RTI got 1 upstreams and 0 downstreams from federate 1. -DEBUG: RTI received neighbor structure from federate 1. -DEBUG: RTI waiting for MSG_TYPE_UDP_PORT from federate 1. -LOG: RECEIVING message from federateID 1 -MQTT_LOG: 20240520 163659.207 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.207 Return code 1 from poll - -MQTT_LOG: 20240520 163659.207 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.207 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.207 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.207 (140737352902464) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.207 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.207 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.306 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.306 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163659.306 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163659.306 (140737352902464) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163659.306 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559a460 - - -MQTT_LOG: 20240520 163659.306 (140737352902464) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163659.306 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x5555555978a0 - - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163659.306 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163659.306 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163659.306 5 RTI_1 <- PUBLISH msgid: 4 qos: 2 retained: 0 payload len(3): þÿÿ - -MQTT_LOG: 20240520 163659.306 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163659.306 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a5a0 - - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163659.306 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a300 - - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163659.306 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598fc0 - - -MQTT_LOG: 20240520 163659.306 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a5f0 - - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163659.306 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555597700 - - -MQTT_LOG: 20240520 163659.306 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.306 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a170 - - -MQTT_LOG: 20240520 163659.306 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.306 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163659.306 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.306 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163659.306 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163659.306 5 RTI_1 -> PUBREC msgid: 4 (0) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163659.306 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.306 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.306 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.307 Return code 1 from poll - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.307 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.307 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163659.307 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a500 - - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163659.307 5 RTI_1 <- PUBREL msgid 4 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163659.307 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559a720 - - -MQTT_LOG: 20240520 163659.307 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163659.307 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555993c0 - - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163659.307 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163659.307 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163659.307 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163659.307 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163659.307 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555978a0 - - -MQTT_LOG: 20240520 163659.307 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.307 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598cc0 - - -MQTT_LOG: 20240520 163659.307 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.307 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163659.307 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.307 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163659.307 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163659.307 5 RTI_1 -> PUBCOMP msgid 4 (0) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163659.307 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163659.307 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163659.307 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163659.307 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2912 bytes - - -MQTT_LOG: 20240520 163659.307 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163659.307 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163659.307 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2880 bytes - - -MQTT_LOG: 20240520 163659.307 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163659.307 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163659.307 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163659.307 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes - - -MQTT_LOG: 20240520 163659.307 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 1 -DEBUG: RTI got MSG_TYPE_UDP_PORT 65535 from federate 1. -DEBUG: All federates have connected to RTI. -RTI: All expected federates have connected. Starting execution. -LOG: RECEIVING message from federateID 1 -MQTT_LOG: 20240520 163659.307 (140737341548096) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163659.307 (140737341548096) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.307 (140737341548096) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.307 (140737341548096) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.307 (140737341548096) (3)< Socket_continueWrites:1453 (0) - -RTI: Waiting for thread handling federate 0. -LOG: RECEIVING message from federateID -1 -MQTT_LOG: 20240520 163659.307 (140737333155392) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163659.307 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.307 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.307 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.307 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.307 Return code 1 from poll - -MQTT_LOG: 20240520 163659.307 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.307 (140737341548096) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.307 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.307 (140737341548096) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.307 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.307 (140737341548096) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.307 (140737341548096) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.307 (140737341548096) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.307 (140737341548096) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.307 (140737341548096) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.307 (140737341548096) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.307 (140737341548096) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.307 (140737341548096) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.407 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.407 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163659.407 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7fffe8000c40 - - -MQTT_LOG: 20240520 163659.407 (140737341548096) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163659.407 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffe8000d60 - - -MQTT_LOG: 20240520 163659.407 (140737341548096) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163659.407 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffe8000e60 - - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163659.407 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163659.407 (140737341548096) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163659.407 5 RTI_1 <- PUBLISH msgid: 5 qos: 2 retained: 0 payload len(9): “1$˜©VÑ - -MQTT_LOG: 20240520 163659.407 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffe8000f60 - - -MQTT_LOG: 20240520 163659.407 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe8001020 - - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163659.407 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80010a0 - - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163659.407 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001190 - - -MQTT_LOG: 20240520 163659.407 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffe8001290 - - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163659.407 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8001370 - - -MQTT_LOG: 20240520 163659.407 (140737341548096) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.407 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001450 - - -MQTT_LOG: 20240520 163659.407 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.407 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163659.407 (140737341548096) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.407 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163659.407 (140737341548096) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163659.407 5 RTI_1 -> PUBREC msgid: 5 (0) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163659.407 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.407 (140737341548096) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.407 (140737341548096) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.407 Return code 1 from poll - -MQTT_LOG: 20240520 163659.407 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.407 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.408 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.408 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163659.408 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec000d30 - - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163659.408 5 RTI_1 <- PUBREL msgid 5 - -MQTT_LOG: 20240520 163659.408 (140737341548096) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.408 (140737341548096) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163659.408 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffec000e30 - - -MQTT_LOG: 20240520 163659.408 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec000c60 - - -MQTT_LOG: 20240520 163659.408 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000fd0 - - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163659.408 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163659.408 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163659.408 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163659.408 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163659.408 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8000e60 - - -MQTT_LOG: 20240520 163659.408 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.408 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8000e30 - - -MQTT_LOG: 20240520 163659.408 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163659.408 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163659.408 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163659.408 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163659.408 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163659.408 5 RTI_1 -> PUBCOMP msgid 5 (0) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163659.408 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163659.408 (140737333155392) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163659.408 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163659.408 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163659.408 Return code 1 from poll - -MQTT_LOG: 20240520 163659.408 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.408 (140737341548096) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.408 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.408 (140737341548096) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163659.408 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163659.408 (140737341548096) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163659.408 (140737341548096) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163659.408 (140737341548096) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163659.408 (140737341548096) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163659.408 (140737341548096) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163659.408 (140737341548096) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163659.408 (140737341548096) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163659.408 (140737341548096) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163659.408 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.393 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163702.393 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7fffe8000c40 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163702.393 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffe8001500 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffe8001450 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.393 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163702.393 5 RTI_1 <- PUBLISH msgid: 6 qos: 2 retained: 0 payload len(1):  - -MQTT_LOG: 20240520 163702.393 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffe80015a0 - - -MQTT_LOG: 20240520 163702.393 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe8001660 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163702.393 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001190 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163702.393 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001720 - - -MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffe8001820 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8001900 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe80019e0 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.393 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3312 bytes - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.393 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3296 bytes - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.393 5 RTI_1 -> PUBREC msgid: 6 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163702.393 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTProtocol_keepalive:704 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTProtocol_keepalive:781 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163702.393 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3200 bytes - - -MQTT_LOG: 20240520 163702.393 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3168 bytes - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163702.393 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163702.393 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163702.393 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 3072 bytes - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 1 -DEBUG: RTI: Received message type 2 from federate 1. -DEBUG: RTI received timestamp message with time: 1716248219406840211. -DEBUG: RTI received timestamp message with time: 1716248219406840211. fro federate 1 -MQTT_LOG: 20240520 163702.393 (140737341548096) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (2)< MQTTProtocol_assignMsgId:104 (4) - -MQTT_LOG: 20240520 163702.393 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7fffe8000c40 - - -MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7fffe8000c10 - - -MQTT_LOG: 20240520 163702.393 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffe8000d60 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163702.393 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7fffe8001ae0 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163702.393 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe8001ba0 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163702.393 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8000cf0 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163702.393 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001bf0 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7fffe8001210 - - -MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7fffe8001d60 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.393 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7fffe8001e40 - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (8)< Socket_writev:773 (51) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.393 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3392 bytes - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163702.393 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3376 bytes - - -MQTT_LOG: 20240520 163702.393 5 RTI_1 -> PUBLISH msgid: 4 qos: 2 retained: 0 rc 0 payload len(9): “û¾Ó©VÑ - -MQTT_LOG: 20240520 163702.393 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3360 bytes - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163702.393 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3344 bytes - - -MQTT_LOG: 20240520 163702.393 (140737341548096) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163702.393 (140737341548096) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.393 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.393 (140737349940800) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163702.393 (140737349940800) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163702.393 (140737349940800) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163702.393 (140737349940800) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163702.393 (140737349940800) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163702.393 (140737349940800) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163702.393 (140737349940800) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163702.393 (140737349940800) (2)< MQTTProtocol_assignMsgId:104 (4) - -MQTT_LOG: 20240520 163702.393 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x5555555995c0 - - -MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7ffff0000c10 - - -MQTT_LOG: 20240520 163702.394 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555599130 - - -MQTT_LOG: 20240520 163702.394 (140737349940800) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163702.394 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7ffff0001000 - - -MQTT_LOG: 20240520 163702.394 (140737349940800) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163702.394 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599950 - - -MQTT_LOG: 20240520 163702.394 (140737349940800) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163702.394 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000f20 - - -MQTT_LOG: 20240520 163702.394 (140737349940800) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163702.394 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000c90 - - -MQTT_LOG: 20240520 163702.394 (140737349940800) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7ffff00010a0 - - -MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7ffff0001100 - - -MQTT_LOG: 20240520 163702.394 (140737349940800) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7ffff00011a0 - - -MQTT_LOG: 20240520 163702.394 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.394 (140737349940800) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.394 (140737349940800) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (8)< Socket_writev:773 (51) - -MQTT_LOG: 20240520 163702.394 (140737349940800) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.394 (140737349940800) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.394 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3648 bytes - - -MQTT_LOG: 20240520 163702.394 (140737349940800) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163702.394 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3632 bytes - - -MQTT_LOG: 20240520 163702.394 4 RTI_0 -> PUBLISH msgid: 4 qos: 2 retained: 0 rc 0 payload len(9): “û¾Ó©VÑ - -MQTT_LOG: 20240520 163702.394 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3616 bytes - - -MQTT_LOG: 20240520 163702.394 (140737349940800) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163702.394 (140737349940800) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163702.394 (140737349940800) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163702.394 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3600 bytes - - -MQTT_LOG: 20240520 163702.394 (140737349940800) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163702.394 (140737349940800) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163702.394 (140737349940800) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.394 Return code 1 from poll - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.394 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.394 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.394 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec000d30 - - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163702.394 5 RTI_1 <- PUBREL msgid 6 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163702.394 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffe80010a0 - - -MQTT_LOG: 20240520 163702.394 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec001090 - - -MQTT_LOG: 20240520 163702.394 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000e70 - - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163702.394 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3696 bytes - - -MQTT_LOG: 20240520 163702.394 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3648 bytes - - -MQTT_LOG: 20240520 163702.394 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3616 bytes - - -MQTT_LOG: 20240520 163702.394 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3536 bytes - - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8001450 - - -MQTT_LOG: 20240520 163702.394 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001340 - - -MQTT_LOG: 20240520 163702.394 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.394 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3536 bytes - - -MQTT_LOG: 20240520 163702.394 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.394 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3520 bytes - - -MQTT_LOG: 20240520 163702.394 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.394 5 RTI_1 -> PUBCOMP msgid 6 (0) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163702.394 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3504 bytes - - -MQTT_LOG: 20240520 163702.394 (140737333155392) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.394 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.394 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.394 Return code 2 from poll - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.394 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.394 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.394 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001ef0 - - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.394 (140737349940800) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163702.394 4 RTI_0 <- PUBREC msgid: 4 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8000d30 - - -MQTT_LOG: 20240520 163702.394 (140737341548096) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.394 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001cf0 - - -MQTT_LOG: 20240520 163702.394 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.394 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3536 bytes - - -MQTT_LOG: 20240520 163702.394 (140737341548096) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.394 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3520 bytes - - -MQTT_LOG: 20240520 163702.394 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.394 4 RTI_0 -> PUBREL msgid: 4 (0) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163702.394 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3504 bytes - - -MQTT_LOG: 20240520 163702.394 (140737341548096) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.394 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.394 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.394 (140737349940800) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.394 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.394 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.394 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.394 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.395 (140737349940800) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.395 (140737349940800) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.395 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.395 (140737349940800) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.395 (140737349940800) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.395 (140737349940800) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163702.395 (140737349940800) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.395 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555990e0 - - -MQTT_LOG: 20240520 163702.395 (140737349940800) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.395 (140737349940800) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163702.395 5 RTI_1 <- PUBREC msgid: 4 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.395 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001070 - - -MQTT_LOG: 20240520 163702.395 (140737349940800) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.395 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff00010d0 - - -MQTT_LOG: 20240520 163702.395 (140737349940800) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.395 (140737349940800) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.395 (140737349940800) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.395 (140737349940800) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.395 (140737349940800) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.395 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3536 bytes - - -MQTT_LOG: 20240520 163702.395 (140737349940800) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.395 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3520 bytes - - -MQTT_LOG: 20240520 163702.395 (140737349940800) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.395 5 RTI_1 -> PUBREL msgid: 4 (0) - -MQTT_LOG: 20240520 163702.395 (140737349940800) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163702.395 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3504 bytes - - -MQTT_LOG: 20240520 163702.395 (140737349940800) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163702.395 (140737349940800) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.395 (140737349940800) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.395 Return code 2 from poll - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.395 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.395 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.395 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.395 (140737333155392) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.395 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.395 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001ef0 - - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163702.395 4 RTI_0 <- PUBCOMP msgid:4 - -MQTT_LOG: 20240520 163702.395 PUBCOMP received from client RTI_0 for message id 4 - removing publication - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163702.395 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3504 bytes - - -MQTT_LOG: 20240520 163702.395 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3488 bytes - - -MQTT_LOG: 20240520 163702.395 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3440 bytes - - -MQTT_LOG: 20240520 163702.395 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3392 bytes - - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163702.395 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3360 bytes - - -MQTT_LOG: 20240520 163702.395 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163702.395 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 3248 bytes - - -MQTT_LOG: 20240520 163702.395 (140737349940800) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.395 (140737349940800) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.395 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.395 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.395 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.395 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.395 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.395 (140737333155392) (5)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163702.395 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80014c0 - - -MQTT_LOG: 20240520 163702.395 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffec000d30 - - -MQTT_LOG: 20240520 163702.395 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffec0010f0 - - -MQTT_LOG: 20240520 163702.395 (140737333155392) (5)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163702.395 (140737333155392) (4)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163702.395 (140737333155392) (3)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163702.395 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163702.395 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.395 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.395 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.395 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.395 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.395 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.395 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.395 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.395 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.395 Return code 1 from poll - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163702.395 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.395 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.436 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.436 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.436 (140737341548096) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.436 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.436 (140737341548096) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.436 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 4288 bytes - - -MQTT_LOG: 20240520 163702.436 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163702.436 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3232 bytes - - -MQTT_LOG: 20240520 163702.436 (140737341548096) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.436 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec000d30 - - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.436 (140737341548096) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163702.436 5 RTI_1 <- PUBCOMP msgid:4 - -MQTT_LOG: 20240520 163702.436 PUBCOMP received from client RTI_1 for message id 4 - removing publication - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163702.436 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3248 bytes - - -MQTT_LOG: 20240520 163702.436 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3232 bytes - - -MQTT_LOG: 20240520 163702.436 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163702.436 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163702.436 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163702.436 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163702.436 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163702.436 (140737341548096) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163702.436 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.436 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.436 Return code 1 from poll - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.436 (140737333155392) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163702.436 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.436 (140737333155392) (5)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163702.436 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000e30 - - -MQTT_LOG: 20240520 163702.436 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffe8001550 - - -MQTT_LOG: 20240520 163702.436 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffec001500 - - -MQTT_LOG: 20240520 163702.436 (140737333155392) (5)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (4)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163702.436 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163702.436 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.436 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.436 Return code 1 from poll - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.436 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.436 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.436 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.436 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.436 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.436 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.437 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< WebSocket_getdata:751 (-335538936) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163702.437 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7fffe80015a0 - - -MQTT_LOG: 20240520 163702.437 (140737333155392) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163702.437 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffe8001660 - - -MQTT_LOG: 20240520 163702.437 (140737333155392) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163702.437 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffec001a40 - - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.437 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3232 bytes - - -MQTT_LOG: 20240520 163702.437 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163702.437 4 RTI_0 <- PUBLISH msgid: 6 qos: 2 retained: 0 payload len(13): “û¾Ó©VÑ - -MQTT_LOG: 20240520 163702.437 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffe8000f60 - - -MQTT_LOG: 20240520 163702.437 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe8001020 - - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163702.437 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001b20 - - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163702.437 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001c10 - - -MQTT_LOG: 20240520 163702.437 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec001cc0 - - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.437 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001da0 - - -MQTT_LOG: 20240520 163702.437 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.437 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001e80 - - -MQTT_LOG: 20240520 163702.437 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.437 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3456 bytes - - -MQTT_LOG: 20240520 163702.437 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.437 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3440 bytes - - -MQTT_LOG: 20240520 163702.437 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.437 4 RTI_0 -> PUBREC msgid: 6 (0) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163702.437 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3424 bytes - - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.437 Return code 1 from poll - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163702.437 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000f20 - - -MQTT_LOG: 20240520 163702.437 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffe8001240 - - -MQTT_LOG: 20240520 163702.437 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffec0010f0 - - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (5)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (3)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.437 Return code 1 from poll - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.437 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.437 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.437 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 4432 bytes - - -MQTT_LOG: 20240520 163702.437 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 3424 bytes - - -MQTT_LOG: 20240520 163702.437 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3376 bytes - - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< WebSocket_getdata:751 (-335538936) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.437 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001240 - - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (3)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163702.437 4 RTI_0 <- PUBREL msgid 6 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163702.437 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffe8000cf0 - - -MQTT_LOG: 20240520 163702.437 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec000c60 - - -MQTT_LOG: 20240520 163702.437 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001a10 - - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163702.437 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3520 bytes - - -MQTT_LOG: 20240520 163702.437 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3472 bytes - - -MQTT_LOG: 20240520 163702.437 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3440 bytes - - -MQTT_LOG: 20240520 163702.437 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3360 bytes - - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.437 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001a40 - - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.437 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.437 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001a10 - - -MQTT_LOG: 20240520 163702.437 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.437 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3360 bytes - - -MQTT_LOG: 20240520 163702.437 (140737341548096) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.437 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3344 bytes - - -MQTT_LOG: 20240520 163702.437 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.437 4 RTI_0 -> PUBCOMP msgid 6 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163702.437 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3328 bytes - - -MQTT_LOG: 20240520 163702.437 (140737341548096) (3)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.437 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.437 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.437 Return code 1 from poll - -MQTT_LOG: 20240520 163702.437 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.437 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.438 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.438 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.438 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.438 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.438 (140737349940800) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163702.438 (140737349940800) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.438 (140737349940800) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.438 (140737349940800) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.438 (140737349940800) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.438 (140737349940800) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.438 (140737349940800) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.438 (140737349940800) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.438 (140737349940800) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.438 (140737349940800) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.438 Return code 0 from poll - -MQTT_LOG: 20240520 163702.438 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.438 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.438 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.438 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.438 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.494 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.494 (140737349940800) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163702.494 (140737349940800) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.494 (140737349940800) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.494 (140737349940800) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.494 (140737349940800) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.494 (140737349940800) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.494 (140737349940800) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163702.494 (140737349940800) (0)< MQTTClient_waitForCompletion:2903 (0) - -LOG: RTI sent start time 1716248220406840211 to federate 0. -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163702.494 (140737349940800) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163702.494 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.494 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.494 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.494 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.494 Return code 0 from poll - -MQTT_LOG: 20240520 163702.494 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.494 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.494 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.494 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.494 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.495 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.495 (140737349940800) (2)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163702.495 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.495 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.495 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.495 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.495 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.495 (140737349940800) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163702.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163702.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3248 bytes - - -MQTT_LOG: 20240520 163702.495 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163702.495 (140737349940800) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163702.495 (140737349940800) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163702.495 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 3216 bytes - - -MQTT_LOG: 20240520 163702.495 (140737349940800) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163702.495 (140737349940800) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163702.495 (140737349940800) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163702.495 (140737349940800) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163702.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 3168 bytes - - -MQTT_LOG: 20240520 163702.495 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 3152 bytes - - -MQTT_LOG: 20240520 163702.495 (140737349940800) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI: Received message type 6 from federate 0. -LOG: RTI received from federate 0 the Next Event Tag (NET) (0, 0) -DEBUG: RTI: Updated the recorded next event tag for federate/enclave 0 to (0, 0) -LOG: RTI: Minimum upstream LTC for federate/enclave 1 is (7507123816447935597, 0)(adjusted by after delay). -DEBUG: ++++ Node 1 is in ZDC: 0 -DEBUG: ++++ Node 0 is in ZDC: 0 -DEBUG: RTI: Strict EIMT of fed/encl 1 at fed/encl 0 has tag (0, 0). -LOG: RTI: Earliest next event upstream of node 1 has tag (0, 0). -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163702.495 (140737349940800) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163702.495 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.495 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.495 Return code 0 from poll - -MQTT_LOG: 20240520 163702.495 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (0)< MQTTClient_waitForCompletion:2903 (0) - -LOG: RTI sent start time 1716248220406840211 to federate 1. -LOG: RECEIVING message from federateID 1 -MQTT_LOG: 20240520 163702.495 (140737341548096) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.495 Return code 0 from poll - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (2)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163702.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163702.495 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3056 bytes - - -MQTT_LOG: 20240520 163702.495 (140737341548096) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163702.495 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163702.495 (140737341548096) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163702.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2976 bytes - - -MQTT_LOG: 20240520 163702.495 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2960 bytes - - -MQTT_LOG: 20240520 163702.495 (140737341548096) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 1 -DEBUG: RTI: Received message type 25 from federate 1. -ERROR: RTI: Federate 1 reports an error and has exited. -MQTT_LOG: 20240520 163702.495 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.495 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (2)< MQTTProtocol_assignMsgId:104 (5) - -MQTT_LOG: 20240520 163702.495 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7fffe8000f60 - - -MQTT_LOG: 20240520 163702.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7fffec001a10 - - -MQTT_LOG: 20240520 163702.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffe8001ef0 - - -MQTT_LOG: 20240520 163702.495 (140737341548096) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163702.495 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7fffe8001ae0 - - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163702.495 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555996c0 - - -MQTT_LOG: 20240520 163702.495 (140737341548096) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163702.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001300 - - -MQTT_LOG: 20240520 163702.495 (140737341548096) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163702.495 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80010a0 - - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163702.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7fffe8001210 - - -MQTT_LOG: 20240520 163702.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7fffe8000e30 - - -MQTT_LOG: 20240520 163702.495 (140737341548096) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.495 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7fffe80017a0 - - -MQTT_LOG: 20240520 163702.495 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.495 (140737341548096) (8)< Socket_writev:773 (43) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163702.495 (140737341548096) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163702.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3264 bytes - - -MQTT_LOG: 20240520 163702.495 5 RTI_1 -> PUBLISH msgid: 5 qos: 2 retained: 0 rc 0 payload len(1): X - -MQTT_LOG: 20240520 163702.495 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3248 bytes - - -MQTT_LOG: 20240520 163702.495 (140737341548096) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163702.495 (140737341548096) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163702.496 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3232 bytes - - -MQTT_LOG: 20240520 163702.496 (140737341548096) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.496 Return code 1 from poll - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.496 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.496 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.496 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3152 bytes - - -MQTT_LOG: 20240520 163702.496 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163702.496 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163702.496 (140737341548096) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.496 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001550 - - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163702.496 5 RTI_1 <- PUBREC msgid: 5 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.496 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8000e30 - - -MQTT_LOG: 20240520 163702.496 (140737341548096) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.496 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe80017a0 - - -MQTT_LOG: 20240520 163702.496 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.496 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163702.496 (140737341548096) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.496 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3072 bytes - - -MQTT_LOG: 20240520 163702.496 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.496 5 RTI_1 -> PUBREL msgid: 5 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163702.496 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3056 bytes - - -MQTT_LOG: 20240520 163702.496 (140737341548096) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.496 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.496 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.496 Return code 1 from poll - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.496 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.496 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.496 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001f30 - - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (2)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163702.496 5 RTI_1 <- PUBCOMP msgid:5 - -MQTT_LOG: 20240520 163702.496 PUBCOMP received from client RTI_1 for message id 5 - removing publication - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163702.496 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3056 bytes - - -MQTT_LOG: 20240520 163702.496 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163702.496 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163702.496 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163702.496 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2912 bytes - - -MQTT_LOG: 20240520 163702.496 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163702.496 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2800 bytes - - -MQTT_LOG: 20240520 163702.496 (140737333155392) (2)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.496 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.496 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.496 Return code 1 from poll - -MQTT_LOG: 20240520 163702.496 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.496 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.496 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.496 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.496 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.496 (140737349940800) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.496 (140737349940800) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163702.496 (140737349940800) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.497 (140737349940800) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.497 (140737349940800) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.497 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.497 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.497 (140737349940800) (5)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163702.497 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000e30 - - -MQTT_LOG: 20240520 163702.497 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffe8000fd0 - - -MQTT_LOG: 20240520 163702.497 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7ffff00013c0 - - -MQTT_LOG: 20240520 163702.497 (140737349940800) (5)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163702.497 (140737349940800) (4)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163702.497 (140737349940800) (3)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163702.497 (140737349940800) (2)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163702.497 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.497 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.497 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.497 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.497 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.497 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.497 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.497 Return code 1 from poll - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.497 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.497 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< WebSocket_getdata:751 (-268430392) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163702.497 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7fffe8000f60 - - -MQTT_LOG: 20240520 163702.497 (140737341548096) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163702.497 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffe8001550 - - -MQTT_LOG: 20240520 163702.497 (140737341548096) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163702.497 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffe80017a0 - - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.497 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163702.497 (140737341548096) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163702.497 4 RTI_0 <- PUBLISH msgid: 7 qos: 2 retained: 0 payload len(13): -“û¾Ó©VÑ - -MQTT_LOG: 20240520 163702.497 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0001000 - - -MQTT_LOG: 20240520 163702.497 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe80017d0 - - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163702.497 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001300 - - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163702.497 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80013a0 - - -MQTT_LOG: 20240520 163702.497 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffe8001160 - - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.497 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8001070 - - -MQTT_LOG: 20240520 163702.497 (140737341548096) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.497 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001340 - - -MQTT_LOG: 20240520 163702.497 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.497 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3264 bytes - - -MQTT_LOG: 20240520 163702.497 (140737341548096) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.497 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3248 bytes - - -MQTT_LOG: 20240520 163702.497 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.497 4 RTI_0 -> PUBREC msgid: 7 (0) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163702.497 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3232 bytes - - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.497 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.497 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.497 Return code 1 from poll - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.497 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.497 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.497 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.497 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.497 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.497 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< WebSocket_getdata:751 (-268430392) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.497 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001f30 - - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163702.497 4 RTI_0 <- PUBREL msgid 7 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163702.497 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffec001d30 - - -MQTT_LOG: 20240520 163702.497 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec001f80 - - -MQTT_LOG: 20240520 163702.497 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001ab0 - - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163702.497 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3328 bytes - - -MQTT_LOG: 20240520 163702.497 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163702.497 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3248 bytes - - -MQTT_LOG: 20240520 163702.497 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3168 bytes - - -MQTT_LOG: 20240520 163702.497 (140737333155392) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.497 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe80017a0 - - -MQTT_LOG: 20240520 163702.497 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.497 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001cf0 - - -MQTT_LOG: 20240520 163702.497 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.497 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.497 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.498 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.498 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.498 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3168 bytes - - -MQTT_LOG: 20240520 163702.498 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.498 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3152 bytes - - -MQTT_LOG: 20240520 163702.498 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.498 4 RTI_0 -> PUBCOMP msgid 7 (0) - -MQTT_LOG: 20240520 163702.498 (140737333155392) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163702.498 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163702.498 (140737333155392) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163702.498 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.498 Return code 1 from poll - -MQTT_LOG: 20240520 163702.498 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.498 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.498 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.498 (140737349940800) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.498 (140737349940800) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.498 (140737349940800) (5)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163702.498 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0001210 - - -MQTT_LOG: 20240520 163702.498 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffe8001660 - - -MQTT_LOG: 20240520 163702.498 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7ffff00017d0 - - -MQTT_LOG: 20240520 163702.498 (140737349940800) (5)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (4)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163702.498 (140737349940800) (3)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163702.498 (140737349940800) (2)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163702.498 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.498 (140737349940800) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163702.498 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4176 bytes - - -MQTT_LOG: 20240520 163702.498 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4144 bytes - - -MQTT_LOG: 20240520 163702.498 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.498 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.498 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.498 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.498 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163702.498 (140737349940800) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163702.498 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 4112 bytes - - -MQTT_LOG: 20240520 163702.498 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.498 (140737349940800) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163702.498 (140737349940800) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163702.498 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 4064 bytes - - -MQTT_LOG: 20240520 163702.498 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 4048 bytes - - -MQTT_LOG: 20240520 163702.498 (140737349940800) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI: Received message type 10 from federate 0. -DEBUG: RTI handling stop_request from federate 0. -LOG: RTI received from federate 0 a MSG_TYPE_STOP_REQUEST message with tag (0, 1). -MQTT_LOG: 20240520 163702.498 Return code 1 from poll - -MQTT_LOG: 20240520 163702.498 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.498 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.498 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.498 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.498 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.498 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.498 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.498 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.597 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.597 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 4000 bytes - - -MQTT_LOG: 20240520 163702.597 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163702.597 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163702.597 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163702.597 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0001000 - - -MQTT_LOG: 20240520 163702.597 (140737333155392) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163702.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffe80017d0 - - -MQTT_LOG: 20240520 163702.597 (140737333155392) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163702.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffe8000e60 - - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3056 bytes - - -MQTT_LOG: 20240520 163702.597 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163702.597 4 RTI_0 <- PUBLISH msgid: 8 qos: 2 retained: 0 payload len(34):  - -MQTT_LOG: 20240520 163702.597 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffe8001ae0 - - -MQTT_LOG: 20240520 163702.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555996c0 - - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163702.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001e10 - - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163702.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001050 - - -MQTT_LOG: 20240520 163702.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffe8001ef0 - - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec000e00 - - -MQTT_LOG: 20240520 163702.597 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001c90 - - -MQTT_LOG: 20240520 163702.597 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3312 bytes - - -MQTT_LOG: 20240520 163702.597 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3296 bytes - - -MQTT_LOG: 20240520 163702.597 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.597 4 RTI_0 -> PUBREC msgid: 8 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163702.597 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.597 Return code 1 from poll - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.597 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.597 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001ba0 - - -MQTT_LOG: 20240520 163702.597 Return code 1 from poll - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (3)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163702.597 4 RTI_0 <- PUBREL msgid 8 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163702.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffe8001dd0 - - -MQTT_LOG: 20240520 163702.597 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec001500 - - -MQTT_LOG: 20240520 163702.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80013e0 - - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163702.597 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3376 bytes - - -MQTT_LOG: 20240520 163702.597 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3328 bytes - - -MQTT_LOG: 20240520 163702.597 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3296 bytes - - -MQTT_LOG: 20240520 163702.597 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3216 bytes - - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8000e60 - - -MQTT_LOG: 20240520 163702.597 (140737341548096) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001cf0 - - -MQTT_LOG: 20240520 163702.597 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3216 bytes - - -MQTT_LOG: 20240520 163702.597 (140737341548096) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3200 bytes - - -MQTT_LOG: 20240520 163702.597 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.597 4 RTI_0 -> PUBCOMP msgid 8 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163702.597 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163702.597 (140737341548096) (3)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (5)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163702.597 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001b20 - - -MQTT_LOG: 20240520 163702.597 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffe8000f10 - - -MQTT_LOG: 20240520 163702.597 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7ffff00017d0 - - -MQTT_LOG: 20240520 163702.597 (140737333155392) (5)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (4)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (0)< MQTTClient_waitForCompletion:2903 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (0)> MQTTClient_disconnect1:1929 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (1)> MQTTClient_closeSession:1095 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (2)> MQTTPacket_send_disconnect:516 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (3)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.597 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001e80 - - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (5)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (6)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.597 (140737341548096) (6)< Socket_writev:773 (2) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (5)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (4)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.597 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4240 bytes - - -MQTT_LOG: 20240520 163702.597 (140737341548096) (3)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.597 5 RTI_1 -> DISCONNECT (0) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (2)< MQTTPacket_send_disconnect:543 (0) - -MQTT_LOG: 20240520 163702.597 Return code 1 from poll - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.597 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.597 (140737333155392) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163702.597 (140737341548096) (2)> WebSocket_close:524 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (2)< WebSocket_close:572 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (2)> Socket_close:967 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> Socket_close_only:893 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< Socket_close_only:907 (0) - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> Socket_abortWrite:1355 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< Socket_abortWrite:1376 (0) - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> SocketBuffer_cleanup:153 - -MQTT_LOG: 20240520 163702.598 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 157, heap use now 4224 bytes - - -MQTT_LOG: 20240520 163702.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4144 bytes - - -MQTT_LOG: 20240520 163702.598 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4096 bytes - - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< SocketBuffer_cleanup:165 - -MQTT_LOG: 20240520 163702.598 Removed socket 5 - -MQTT_LOG: 20240520 163702.598 Removed socket 5 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (2)< Socket_close:1037 (0) - -MQTT_LOG: 20240520 163702.598 (140737341548096) (2)> MQTTClient_cleanSession:1131 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> MQTTPersistence_clear:170 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< MQTTPersistence_clear:174 (0) - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> MQTTClient_emptyMessageQueue:557 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< MQTTClient_emptyMessageQueue:572 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (2)< MQTTClient_cleanSession:1139 (0) - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< MQTTClient_closeSession:1123 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> MQTTClient_stop:1028 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< MQTTClient_stop:1063 (0) - -MQTT_LOG: 20240520 163702.598 (140737341548096) (0)< MQTTClient_disconnect1:1963 (0) - -MQTT_LOG: 20240520 163702.598 (140737341548096) (0)> MQTTClient_destroy:580 - -MQTT_LOG: 20240520 163702.598 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.598 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.598 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.598 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.598 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.598 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.598 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.598 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffe8000e60 - - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> MQTTPersistence_close:141 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< MQTTPersistence_close:157 (0) - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> MQTTClient_emptyMessageQueue:557 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< MQTTClient_emptyMessageQueue:572 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> MQTTProtocol_freeClient:934 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (2)> MQTTProtocol_freeMessageList:1020 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163702.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 4016 bytes - - -MQTT_LOG: 20240520 163702.598 (140737341548096) (2)< MQTTProtocol_freeMessageList:1023 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (2)> MQTTProtocol_freeMessageList:1020 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163702.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3968 bytes - - -MQTT_LOG: 20240520 163702.598 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.598 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.598 (140737341548096) (2)< MQTTProtocol_freeMessageList:1023 - -MQTT_LOG: 20240520 163702.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3920 bytes - - -MQTT_LOG: 20240520 163702.598 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3872 bytes - - -MQTT_LOG: 20240520 163702.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 940, heap use now 3824 bytes - - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< MQTTProtocol_freeClient:989 - -MQTT_LOG: 20240520 163702.598 Freeing 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3808 bytes - - -MQTT_LOG: 20240520 163702.598 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3504 bytes - - -MQTT_LOG: 20240520 163702.598 Removed client RTI_1 from bstate->clients, socket 0 - -MQTT_LOG: 20240520 163702.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 600, heap use now 3472 bytes - - -MQTT_LOG: 20240520 163702.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 603, heap use now 3456 bytes - - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> Thread_destroy_sem:371 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< Thread_destroy_sem:380 (0) - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> Thread_destroy_sem:371 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< Thread_destroy_sem:380 (0) - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> Thread_destroy_sem:371 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< Thread_destroy_sem:380 (0) - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)> Thread_destroy_sem:371 - -MQTT_LOG: 20240520 163702.598 (140737341548096) (1)< Thread_destroy_sem:380 (0) - -MQTT_LOG: 20240520 163702.598 Freeing 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3440 bytes - - -MQTT_LOG: 20240520 163702.598 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163702.598 (140737341548096) (0)< MQTTClient_destroy:617 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163702.598 (140737349940800) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163702.598 (140737349940800) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (2)< MQTTProtocol_assignMsgId:104 (5) - -MQTT_LOG: 20240520 163702.598 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x5555555995c0 - - -MQTT_LOG: 20240520 163702.598 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7fffe8001820 - - -MQTT_LOG: 20240520 163702.598 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffe8001550 - - -MQTT_LOG: 20240520 163702.598 (140737349940800) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163702.598 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7ffff0001550 - - -MQTT_LOG: 20240520 163702.598 (140737349940800) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163702.598 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff00015c0 - - -MQTT_LOG: 20240520 163702.598 (140737349940800) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163702.598 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000ee0 - - -MQTT_LOG: 20240520 163702.598 (140737349940800) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163702.598 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000c90 - - -MQTT_LOG: 20240520 163702.598 (140737349940800) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163702.598 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7ffff0001100 - - -MQTT_LOG: 20240520 163702.598 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7ffff0000c10 - - -MQTT_LOG: 20240520 163702.598 (140737349940800) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.598 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7ffff0000e00 - - -MQTT_LOG: 20240520 163702.598 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.598 (140737349940800) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.598 (140737349940800) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (8)< Socket_writev:773 (55) - -MQTT_LOG: 20240520 163702.598 (140737349940800) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.598 (140737349940800) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3632 bytes - - -MQTT_LOG: 20240520 163702.598 (140737349940800) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163702.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3616 bytes - - -MQTT_LOG: 20240520 163702.598 4 RTI_0 -> PUBLISH msgid: 5 qos: 2 retained: 0 rc 0 payload len(13): “û¾Ó©VÑ - -MQTT_LOG: 20240520 163702.598 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3600 bytes - - -MQTT_LOG: 20240520 163702.598 (140737349940800) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163702.598 (140737349940800) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163702.598 (140737349940800) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163702.598 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3584 bytes - - -MQTT_LOG: 20240520 163702.598 (140737349940800) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163702.598 (140737349940800) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163702.598 (140737349940800) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.598 (140737349940800) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.598 Return code 1 from poll - -MQTT_LOG: 20240520 163702.598 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.598 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.598 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.598 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.598 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.598 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.639 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.639 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.639 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3504 bytes - - -MQTT_LOG: 20240520 163702.639 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2496 bytes - - -MQTT_LOG: 20240520 163702.639 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2448 bytes - - -MQTT_LOG: 20240520 163702.639 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (3)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.639 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8000f10 - - -MQTT_LOG: 20240520 163702.639 (140737333155392) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (2)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163702.639 4 RTI_0 <- PUBREC msgid: 5 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (3)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.639 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001c90 - - -MQTT_LOG: 20240520 163702.639 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.639 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001cc0 - - -MQTT_LOG: 20240520 163702.639 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.639 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2496 bytes - - -MQTT_LOG: 20240520 163702.639 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.639 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2480 bytes - - -MQTT_LOG: 20240520 163702.639 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.639 4 RTI_0 -> PUBREL msgid: 5 (0) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (3)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163702.639 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2464 bytes - - -MQTT_LOG: 20240520 163702.639 (140737333155392) (2)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.639 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.639 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.639 Return code 1 from poll - -MQTT_LOG: 20240520 163702.639 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.639 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.639 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.639 (140737349940800) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.639 (140737349940800) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.639 (140737349940800) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.639 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.639 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.639 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.639 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.640 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.640 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.640 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.640 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff00016d0 - - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163702.640 4 RTI_0 <- PUBCOMP msgid:5 - -MQTT_LOG: 20240520 163702.640 PUBCOMP received from client RTI_0 for message id 5 - removing publication - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163702.640 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2464 bytes - - -MQTT_LOG: 20240520 163702.640 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2448 bytes - - -MQTT_LOG: 20240520 163702.640 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2400 bytes - - -MQTT_LOG: 20240520 163702.640 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2352 bytes - - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163702.640 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163702.640 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163702.640 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163702.640 (140737349940800) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.640 Return code 1 from poll - -MQTT_LOG: 20240520 163702.640 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.640 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.640 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.640 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.640 (140737333155392) (5)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163702.640 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001950 - - -MQTT_LOG: 20240520 163702.640 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffe8000f10 - - -MQTT_LOG: 20240520 163702.640 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7ffff00017d0 - - -MQTT_LOG: 20240520 163702.640 (140737333155392) (5)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (4)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163702.640 (140737333155392) (3)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163702.640 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163702.640 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.640 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.640 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.640 Return code 1 from poll - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.640 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.640 (140737349940800) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.640 (140737349940800) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.698 (140737349940800) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.698 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.698 (140737349940800) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.698 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3248 bytes - - -MQTT_LOG: 20240520 163702.698 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163702.698 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163702.698 (140737349940800) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163702.698 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0001550 - - -MQTT_LOG: 20240520 163702.698 (140737349940800) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163702.698 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffe8000f10 - - -MQTT_LOG: 20240520 163702.698 (140737349940800) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163702.698 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0000c10 - - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.698 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163702.698 (140737349940800) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.698 (140737349940800) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163702.698 4 RTI_0 <- PUBLISH msgid: 9 qos: 2 retained: 0 payload len(13): “û¾Ó©VÑ - -MQTT_LOG: 20240520 163702.698 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x5555555995c0 - - -MQTT_LOG: 20240520 163702.698 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff00015c0 - - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163702.698 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0001210 - - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163702.698 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000ee0 - - -MQTT_LOG: 20240520 163702.698 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7ffff0000e70 - - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.698 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001720 - - -MQTT_LOG: 20240520 163702.698 (140737349940800) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.698 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001780 - - -MQTT_LOG: 20240520 163702.698 (140737349940800) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.698 (140737349940800) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.698 (140737349940800) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.698 (140737349940800) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.698 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2528 bytes - - -MQTT_LOG: 20240520 163702.698 (140737349940800) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.698 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2512 bytes - - -MQTT_LOG: 20240520 163702.698 (140737349940800) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.698 4 RTI_0 -> PUBREC msgid: 9 (0) - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163702.698 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2496 bytes - - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163702.698 (140737349940800) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.698 (140737349940800) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.698 Return code 1 from poll - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.698 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.698 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.698 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001f30 - - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163702.698 4 RTI_0 <- PUBREL msgid 9 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163702.698 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffec001ba0 - - -MQTT_LOG: 20240520 163702.698 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7ffff00013c0 - - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.698 (140737349940800) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.698 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001c10 - - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163702.698 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2592 bytes - - -MQTT_LOG: 20240520 163702.698 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2544 bytes - - -MQTT_LOG: 20240520 163702.698 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2512 bytes - - -MQTT_LOG: 20240520 163702.698 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2432 bytes - - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.698 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0000c10 - - -MQTT_LOG: 20240520 163702.698 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.698 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff00011a0 - - -MQTT_LOG: 20240520 163702.698 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.698 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2432 bytes - - -MQTT_LOG: 20240520 163702.698 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.698 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2416 bytes - - -MQTT_LOG: 20240520 163702.698 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.698 4 RTI_0 -> PUBCOMP msgid 9 (0) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163702.698 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2400 bytes - - -MQTT_LOG: 20240520 163702.698 (140737333155392) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.698 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.698 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.699 Return code 0 from poll - -MQTT_LOG: 20240520 163702.699 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.699 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.699 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163702.699 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.699 (140737349940800) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163702.699 (140737349940800) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.699 (140737349940800) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.699 (140737349940800) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.699 (140737349940800) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.699 (140737349940800) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.699 (140737349940800) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163702.699 (140737349940800) (0)< MQTTClient_waitForCompletion:2903 (0) - -LOG: RTI sent to federates MSG_TYPE_STOP_GRANTED with tag (0, 1) -LOG: RTI forwarded to federates MSG_TYPE_STOP_REQUEST with tag (0, 1). -LOG: RTI received from federate 0 STOP reply tag (0, 1). -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163702.699 (140737349940800) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163702.699 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.699 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.699 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.699 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.699 Return code 0 from poll - -MQTT_LOG: 20240520 163702.699 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.700 (140737349940800) (2)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163702.700 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.700 (140737349940800) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163702.700 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2352 bytes - - -MQTT_LOG: 20240520 163702.700 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163702.700 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163702.700 (140737349940800) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163702.700 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163702.700 (140737349940800) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163702.700 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163702.700 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163702.700 (140737349940800) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI: Received message type 5 from federate 0. -LOG: RTI received message from federate 0 for federate 1 port 0 with intended tag (0, 0). Forwarding. -WARNING: RTI: Destination federate 1 is no longer connected. Dropping message. -LOG: Fed status: next_event (7507123816447935596, 4294967295), completed (7507123816447935597, 0), last_granted (7507123816447935597, 0), last_provisionally_granted (7507123816447935597, 0). -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163702.700 (140737349940800) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.700 Return code 0 from poll - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.700 (140737349940800) (2)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163702.700 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.700 (140737349940800) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163702.700 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2128 bytes - - -MQTT_LOG: 20240520 163702.700 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163702.700 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163702.700 (140737349940800) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163702.700 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163702.700 (140737349940800) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163702.700 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163702.700 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163702.700 (140737349940800) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI: Received message type 9 from federate 0. -LOG: RTI received from federate/enclave 0 the latest tag complete (LTC) (0, 0). -LOG: RTI: Minimum upstream LTC for federate/enclave 1 is (0, 0)(adjusted by after delay). -DEBUG: RTI: Strict EIMT of fed/encl 1 at fed/encl 0 has tag (0, 0). -LOG: RTI: Earliest next event upstream of node 1 has tag (0, 0). -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163702.700 (140737349940800) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.700 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.700 Return code 1 from poll - -MQTT_LOG: 20240520 163702.700 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.798 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.798 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163702.798 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x5555555995c0 - - -MQTT_LOG: 20240520 163702.798 (140737333155392) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163702.798 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffec001f30 - - -MQTT_LOG: 20240520 163702.798 (140737333155392) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163702.798 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff00011a0 - - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.798 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163702.798 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163702.798 4 RTI_0 <- PUBLISH msgid: 10 qos: 2 retained: 0 payload len(13): ÿÿÿÿÿÿÿÿÿÿÿ - -MQTT_LOG: 20240520 163702.798 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0001000 - - -MQTT_LOG: 20240520 163702.798 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555990e0 - - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163702.798 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000d00 - - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163702.798 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001a70 - - -MQTT_LOG: 20240520 163702.798 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec001af0 - - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.798 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec000e00 - - -MQTT_LOG: 20240520 163702.798 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.798 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec000eb0 - - -MQTT_LOG: 20240520 163702.798 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.798 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163702.798 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.798 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163702.798 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.798 4 RTI_0 -> PUBREC msgid: 10 (0) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163702.798 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.798 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.798 Return code 1 from poll - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.798 (140737349940800) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.798 (140737349940800) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.798 (140737349940800) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.798 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.798 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.798 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.798 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.798 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff0000c40 - - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.798 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.798 (140737349940800) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163702.798 4 RTI_0 <- PUBREL msgid 10 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163702.798 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7ffff0000c90 - - -MQTT_LOG: 20240520 163702.798 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7ffff00013c0 - - -MQTT_LOG: 20240520 163702.798 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000ee0 - - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163702.798 (140737349940800) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163702.798 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163702.798 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163702.798 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163702.799 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163702.799 (140737349940800) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.799 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff00011a0 - - -MQTT_LOG: 20240520 163702.799 (140737349940800) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.799 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0000e00 - - -MQTT_LOG: 20240520 163702.799 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.799 (140737349940800) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.799 (140737349940800) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.799 (140737349940800) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.799 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163702.799 (140737349940800) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.799 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163702.799 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.799 4 RTI_0 -> PUBCOMP msgid 10 (0) - -MQTT_LOG: 20240520 163702.799 (140737349940800) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163702.799 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163702.799 (140737349940800) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163702.799 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.799 (140737349940800) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163702.799 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2128 bytes - - -MQTT_LOG: 20240520 163702.799 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163702.799 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163702.799 (140737349940800) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163702.799 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163702.799 (140737349940800) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163702.799 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163702.799 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163702.799 (140737349940800) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI: Received message type 6 from federate 0. -LOG: RTI received from federate 0 the Next Event Tag (NET) (7507123816447935596, 4294967295) -DEBUG: RTI: Updated the recorded next event tag for federate/enclave 0 to (7507123816447935596, 4294967295) -LOG: RTI: Minimum upstream LTC for federate/enclave 1 is (0, 0)(adjusted by after delay). -DEBUG: RTI: Strict EIMT of fed/encl 1 at fed/encl 0 has tag (7507123816447935596, 4294967295). -LOG: RTI: Earliest next event upstream of node 1 has tag (7507123816447935596, 4294967295). -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163702.799 (140737349940800) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.799 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.799 Return code 1 from poll - -MQTT_LOG: 20240520 163702.799 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.799 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.799 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.799 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.799 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.799 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.799 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.799 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.799 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.799 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.799 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.899 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.899 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163702.899 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x5555555995c0 - - -MQTT_LOG: 20240520 163702.899 (140737333155392) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163702.899 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffec0010f0 - - -MQTT_LOG: 20240520 163702.899 (140737333155392) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163702.899 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffec000eb0 - - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.899 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163702.899 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163702.899 4 RTI_0 <- PUBLISH msgid: 11 qos: 2 retained: 0 payload len(13): “û¾Ó©VÑ - -MQTT_LOG: 20240520 163702.899 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffe80015a0 - - -MQTT_LOG: 20240520 163702.899 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffec001190 - - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163702.899 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000dc0 - - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163702.899 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000d80 - - -MQTT_LOG: 20240520 163702.899 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec001e80 - - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.899 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001a10 - - -MQTT_LOG: 20240520 163702.899 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.899 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001be0 - - -MQTT_LOG: 20240520 163702.899 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.899 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163702.899 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.899 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163702.899 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.899 4 RTI_0 -> PUBREC msgid: 11 (0) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163702.899 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.899 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.899 Return code 1 from poll - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.899 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.899 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163702.899 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff00015c0 - - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.899 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163702.899 4 RTI_0 <- PUBREL msgid 11 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163702.899 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163702.899 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7ffff00013c0 - - -MQTT_LOG: 20240520 163702.899 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000dc0 - - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163702.899 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163702.899 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163702.899 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163702.899 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.899 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec000eb0 - - -MQTT_LOG: 20240520 163702.899 (140737349940800) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.899 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001c90 - - -MQTT_LOG: 20240520 163702.899 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.899 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163702.899 (140737349940800) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.899 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163702.899 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.899 4 RTI_0 -> PUBCOMP msgid 11 (0) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163702.899 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163702.899 (140737349940800) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.899 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.899 (140737349940800) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163702.900 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2128 bytes - - -MQTT_LOG: 20240520 163702.900 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163702.900 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163702.900 (140737349940800) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163702.900 (140737349940800) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163702.900 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163702.900 (140737349940800) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163702.900 (140737349940800) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163702.900 (140737349940800) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163702.900 (140737349940800) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163702.900 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163702.900 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163702.900 (140737349940800) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI: Received message type 9 from federate 0. -LOG: RTI received from federate/enclave 0 the latest tag complete (LTC) (0, 1). -LOG: RTI: Minimum upstream LTC for federate/enclave 1 is (0, 1)(adjusted by after delay). -DEBUG: RTI: Strict EIMT of fed/encl 1 at fed/encl 0 has tag (7507123816447935596, 4294967295). -LOG: RTI: Earliest next event upstream of node 1 has tag (7507123816447935596, 4294967295). -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163702.900 (140737349940800) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163702.900 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.900 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.900 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.900 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163702.900 Return code 1 from poll - -MQTT_LOG: 20240520 163702.900 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.999 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163702.999 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163702.999 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x5555555995c0 - - -MQTT_LOG: 20240520 163702.999 (140737333155392) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163702.999 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffec0011e0 - - -MQTT_LOG: 20240520 163702.999 (140737333155392) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163702.999 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffec001be0 - - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163702.999 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163702.999 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163702.999 4 RTI_0 <- PUBLISH msgid: 12 qos: 2 retained: 0 payload len(13): ÿÿÿÿÿÿÿÿÿÿÿ - -MQTT_LOG: 20240520 163702.999 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffec001230 - - -MQTT_LOG: 20240520 163702.999 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffec0010f0 - - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163702.999 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec0019d0 - - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163702.999 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000d80 - - -MQTT_LOG: 20240520 163702.999 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec000e00 - - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163702.999 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec0012f0 - - -MQTT_LOG: 20240520 163702.999 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.999 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001350 - - -MQTT_LOG: 20240520 163702.999 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163702.999 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163702.999 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163702.999 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163702.999 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163702.999 4 RTI_0 -> PUBREC msgid: 12 (0) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163702.999 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163702.999 Return code 1 from poll - -MQTT_LOG: 20240520 163702.999 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.999 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163702.999 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163702.999 (140737349940800) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163702.999 (140737349940800) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163702.999 (140737349940800) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163702.999 (140737349940800) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163702.999 (140737349940800) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163702.999 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163702.999 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163702.999 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.000 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.000 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163703.000 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001140 - - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163703.000 4 RTI_0 <- PUBREL msgid 12 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163703.000 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7ffff0000e30 - - -MQTT_LOG: 20240520 163703.000 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7ffff00013c0 - - -MQTT_LOG: 20240520 163703.000 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0000d10 - - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163703.000 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163703.000 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163703.000 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163703.000 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163703.000 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001be0 - - -MQTT_LOG: 20240520 163703.000 (140737349940800) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.000 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001d70 - - -MQTT_LOG: 20240520 163703.000 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163703.000 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163703.000 (140737349940800) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163703.000 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163703.000 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163703.000 4 RTI_0 -> PUBCOMP msgid 12 (0) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163703.000 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163703.000 (140737349940800) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163703.000 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2128 bytes - - -MQTT_LOG: 20240520 163703.000 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163703.000 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163703.000 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163703.000 (140737349940800) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163703.000 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163703.000 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163703.000 (140737349940800) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI: Received message type 6 from federate 0. -LOG: RTI received from federate 0 the Next Event Tag (NET) (7507123816447935596, 4294967295) -DEBUG: RTI: Updated the recorded next event tag for federate/enclave 0 to (7507123816447935596, 4294967295) -LOG: RTI: Minimum upstream LTC for federate/enclave 1 is (0, 1)(adjusted by after delay). -DEBUG: RTI: Strict EIMT of fed/encl 1 at fed/encl 0 has tag (7507123816447935596, 4294967295). -LOG: RTI: Earliest next event upstream of node 1 has tag (7507123816447935596, 4294967295). -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163703.000 (140737349940800) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.000 Return code 1 from poll - -MQTT_LOG: 20240520 163703.000 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.000 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.000 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163703.000 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.000 (140737333155392) (5)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163703.000 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001b20 - - -MQTT_LOG: 20240520 163703.000 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffec0012a0 - - -MQTT_LOG: 20240520 163703.000 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffec001fe0 - - -MQTT_LOG: 20240520 163703.000 (140737333155392) (5)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (4)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163703.000 (140737333155392) (3)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163703.000 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163703.000 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.000 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.000 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.000 Return code 1 from poll - -MQTT_LOG: 20240520 163703.000 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163703.000 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.000 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.100 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.100 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163703.100 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163703.100 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163703.100 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1968 bytes - - -MQTT_LOG: 20240520 163703.100 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163703.100 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x5555555995c0 - - -MQTT_LOG: 20240520 163703.100 (140737333155392) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163703.100 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffec0012a0 - - -MQTT_LOG: 20240520 163703.100 (140737333155392) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163703.100 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffec001350 - - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163703.100 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163703.100 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163703.100 4 RTI_0 <- PUBLISH msgid: 13 qos: 2 retained: 0 payload len(1):  - -MQTT_LOG: 20240520 163703.100 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffec001eb0 - - -MQTT_LOG: 20240520 163703.100 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffec001140 - - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163703.100 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001b20 - - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163703.100 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000e30 - - -MQTT_LOG: 20240520 163703.100 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec001ba0 - - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163703.100 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec0019d0 - - -MQTT_LOG: 20240520 163703.100 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.100 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001010 - - -MQTT_LOG: 20240520 163703.100 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163703.100 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163703.100 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163703.100 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163703.100 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163703.100 4 RTI_0 -> PUBREC msgid: 13 (0) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163703.100 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.100 Return code 1 from poll - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.100 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.100 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.100 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163703.100 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001f30 - - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163703.100 4 RTI_0 <- PUBREL msgid 13 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163703.100 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163703.100 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7ffff00013c0 - - -MQTT_LOG: 20240520 163703.100 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0001130 - - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163703.100 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163703.100 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163703.100 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163703.100 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163703.100 (140737349940800) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163703.100 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001350 - - -MQTT_LOG: 20240520 163703.100 (140737349940800) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.100 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001af0 - - -MQTT_LOG: 20240520 163703.100 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163703.100 (140737349940800) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163703.100 (140737349940800) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163703.100 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163703.100 (140737349940800) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163703.100 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163703.101 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163703.101 4 RTI_0 -> PUBCOMP msgid 13 (0) - -MQTT_LOG: 20240520 163703.101 (140737349940800) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163703.101 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163703.101 (140737349940800) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163703.101 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.101 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.101 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.101 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.101 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.101 (140737349940800) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163703.101 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2128 bytes - - -MQTT_LOG: 20240520 163703.101 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163703.101 Return code 1 from poll - -MQTT_LOG: 20240520 163703.101 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163703.101 (140737349940800) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163703.101 (140737349940800) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163703.101 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163703.101 (140737349940800) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163703.101 (140737349940800) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163703.101 (140737349940800) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163703.101 (140737349940800) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163703.101 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163703.101 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163703.101 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163703.101 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000cc0 - - -MQTT_LOG: 20240520 163703.101 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7fffec0011e0 - - -MQTT_LOG: 20240520 163703.101 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffec001fe0 - - -MQTT_LOG: 20240520 163703.101 (140737349940800) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI: Received message type 4 from federate 0. -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (4)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -RTI: Federate 0 thread exited. -RTI: Waiting for thread handling federate 1. -RTI: Federate 1 thread exited. -MQTT_LOG: 20240520 163703.101 (140737352902464) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163703.101 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163703.101 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (2) - -MQTT_LOG: 20240520 163703.101 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163703.101 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555598cc0 - - -MQTT_LOG: 20240520 163703.101 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x55555559a3e0 - - -MQTT_LOG: 20240520 163703.101 (140737352902464) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163703.101 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163703.101 (140737352902464) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163703.101 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a4b0 - - -MQTT_LOG: 20240520 163703.101 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163703.101 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555998d0 - - -MQTT_LOG: 20240520 163703.101 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163703.101 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e40 - - -MQTT_LOG: 20240520 163703.101 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163703.101 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x555555598f00 - - -MQTT_LOG: 20240520 163703.101 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163703.101 (140737352902464) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.101 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x555555599180 - - -MQTT_LOG: 20240520 163703.101 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.101 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163703.101 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (8)< Socket_writev:773 (34) - -MQTT_LOG: 20240520 163703.101 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163703.101 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163703.101 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3392 bytes - - -MQTT_LOG: 20240520 163703.101 (140737352902464) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163703.101 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3376 bytes - - -MQTT_LOG: 20240520 163703.101 3 RTI_RTI -> PUBLISH msgid: 2 qos: 2 retained: 0 rc 0 payload len(1): X - -MQTT_LOG: 20240520 163703.101 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3360 bytes - - -MQTT_LOG: 20240520 163703.101 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163703.101 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163703.101 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163703.101 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3344 bytes - - -MQTT_LOG: 20240520 163703.101 (140737352902464) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163703.101 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163703.101 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.101 Return code 1 from poll - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (2)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.101 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.101 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.101 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.101 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< WebSocket_getdata:751 (-335536152) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163703.101 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001140 - - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (2)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163703.101 3 RTI_RTI <- PUBREC msgid: 2 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163703.101 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001320 - - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.101 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec0012f0 - - -MQTT_LOG: 20240520 163703.101 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163703.101 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2352 bytes - - -MQTT_LOG: 20240520 163703.101 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163703.101 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2336 bytes - - -MQTT_LOG: 20240520 163703.101 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163703.101 3 RTI_RTI -> PUBREL msgid: 2 (0) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163703.101 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163703.101 (140737333155392) (2)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163703.101 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.101 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.102 Return code 1 from poll - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.102 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.102 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< WebSocket_getdata:751 (-335540328) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163703.102 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163703.102 (140737352902464) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163703.102 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x5555555997f0 - - -MQTT_LOG: 20240520 163703.102 (140737352902464) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163703.102 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x5555555991b0 - - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163703.102 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2416 bytes - - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163703.102 3 RTI_RTI <- PUBLISH msgid: 3 qos: 2 retained: 0 payload len(1): X - -MQTT_LOG: 20240520 163703.102 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555599510 - - -MQTT_LOG: 20240520 163703.102 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599950 - - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163703.102 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555977a0 - - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163703.102 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a300 - - -MQTT_LOG: 20240520 163703.102 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x5555555978a0 - - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163703.102 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598b70 - - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.102 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163703.102 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163703.102 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2640 bytes - - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163703.102 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2624 bytes - - -MQTT_LOG: 20240520 163703.102 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163703.102 3 RTI_RTI -> PUBREC msgid: 3 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163703.102 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2608 bytes - - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.102 Return code 1 from poll - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (2)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.102 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.102 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< WebSocket_getdata:751 (-335540328) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163703.102 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001140 - - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (2)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163703.102 3 RTI_RTI <- PUBCOMP msgid:2 - -MQTT_LOG: 20240520 163703.102 PUBCOMP received from client RTI_RTI for message id 2 - removing publication - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163703.102 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2576 bytes - - -MQTT_LOG: 20240520 163703.102 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2560 bytes - - -MQTT_LOG: 20240520 163703.102 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2528 bytes - - -MQTT_LOG: 20240520 163703.102 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2480 bytes - - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163703.102 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2448 bytes - - -MQTT_LOG: 20240520 163703.102 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163703.102 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2336 bytes - - -MQTT_LOG: 20240520 163703.102 (140737333155392) (2)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.102 Return code 1 from poll - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.102 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163703.102 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599a60 - - -MQTT_LOG: 20240520 163703.102 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163703.102 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x55555559ab50 - - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (5)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.102 Return code 1 from poll - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.102 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.102 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.102 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.144 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163703.144 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3376 bytes - - -MQTT_LOG: 20240520 163703.144 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163703.144 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163703.144 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< WebSocket_getdata:751 (-335540328) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163703.144 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163703.144 3 RTI_RTI <- PUBREL msgid 3 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163703.144 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555598390 - - -MQTT_LOG: 20240520 163703.144 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555775c0 - - -MQTT_LOG: 20240520 163703.144 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555992e0 - - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163703.144 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2464 bytes - - -MQTT_LOG: 20240520 163703.144 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2416 bytes - - -MQTT_LOG: 20240520 163703.144 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2384 bytes - - -MQTT_LOG: 20240520 163703.144 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163703.144 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991b0 - - -MQTT_LOG: 20240520 163703.144 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.144 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163703.144 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163703.144 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163703.144 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163703.144 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163703.144 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163703.144 3 RTI_RTI -> PUBCOMP msgid 3 (0) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163703.144 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163703.144 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.144 Return code 1 from poll - -MQTT_LOG: 20240520 163703.144 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (2)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (5)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163703.144 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598580 - - -MQTT_LOG: 20240520 163703.144 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x55555559a460 - - -MQTT_LOG: 20240520 163703.144 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffec0023f0 - - -MQTT_LOG: 20240520 163703.144 (140737333155392) (5)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (4)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (3)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163703.144 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3312 bytes - - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.144 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163703.144 (140737333155392) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163703.144 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 3248 bytes - - -MQTT_LOG: 20240520 163703.144 (140737333155392) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163703.144 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 3216 bytes - - -MQTT_LOG: 20240520 163703.144 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 3200 bytes - - -MQTT_LOG: 20240520 163703.144 (140737333155392) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID -1 -LOG: Received MQTT_RTI_RESIGNED message from federateID -1 -MQTT_LOG: 20240520 163703.144 (140737333155392) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (2)< MQTTProtocol_assignMsgId:104 (3) - -MQTT_LOG: 20240520 163703.144 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163703.144 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555599000 - - -MQTT_LOG: 20240520 163703.144 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffec001b20 - - -MQTT_LOG: 20240520 163703.144 (140737333155392) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163703.144 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x5555555995c0 - - -MQTT_LOG: 20240520 163703.144 (140737333155392) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163703.144 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a7a0 - - -MQTT_LOG: 20240520 163703.144 (140737333155392) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163703.144 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001230 - - -MQTT_LOG: 20240520 163703.144 (140737333155392) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163703.144 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001910 - - -MQTT_LOG: 20240520 163703.144 (140737333155392) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163703.144 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7fffec001be0 - - -MQTT_LOG: 20240520 163703.144 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7fffec001010 - - -MQTT_LOG: 20240520 163703.144 (140737333155392) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.144 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7fffec000e70 - - -MQTT_LOG: 20240520 163703.144 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (8)< Socket_writev:773 (34) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163703.144 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3504 bytes - - -MQTT_LOG: 20240520 163703.144 (140737333155392) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163703.144 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3488 bytes - - -MQTT_LOG: 20240520 163703.144 3 RTI_RTI -> PUBLISH msgid: 3 qos: 2 retained: 0 rc 0 payload len(1): X - -MQTT_LOG: 20240520 163703.144 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3472 bytes - - -MQTT_LOG: 20240520 163703.144 (140737333155392) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163703.144 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3456 bytes - - -MQTT_LOG: 20240520 163703.144 (140737333155392) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163703.144 (140737333155392) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.144 (140737333155392) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.144 Return code 1 from poll - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (3)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.144 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.144 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.144 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.188 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163703.188 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3376 bytes - - -MQTT_LOG: 20240520 163703.188 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163703.188 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163703.188 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (4)< WebSocket_getdata:751 (-335540328) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163703.188 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599950 - - -MQTT_LOG: 20240520 163703.188 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163703.188 3 RTI_RTI <- PUBREC msgid: 3 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163703.188 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163703.188 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.188 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598c20 - - -MQTT_LOG: 20240520 163703.188 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163703.188 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163703.188 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163703.188 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2352 bytes - - -MQTT_LOG: 20240520 163703.188 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163703.188 3 RTI_RTI -> PUBREL msgid: 3 (0) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163703.188 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2336 bytes - - -MQTT_LOG: 20240520 163703.188 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.188 Return code 1 from poll - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (3)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.188 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.188 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< WebSocket_getdata:751 (-335540328) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163703.188 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163703.188 (140737333155392) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163703.188 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffec001180 - - -MQTT_LOG: 20240520 163703.188 (140737333155392) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163703.188 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffec001010 - - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163703.188 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2416 bytes - - -MQTT_LOG: 20240520 163703.188 (140737333155392) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163703.188 3 RTI_RTI <- PUBLISH msgid: 4 qos: 2 retained: 0 payload len(1): X - -MQTT_LOG: 20240520 163703.188 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffec000f20 - - -MQTT_LOG: 20240520 163703.188 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffec001f30 - - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163703.188 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000e30 - - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163703.188 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001380 - - -MQTT_LOG: 20240520 163703.188 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec001da0 - - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163703.188 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001480 - - -MQTT_LOG: 20240520 163703.188 (140737333155392) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.188 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec002800 - - -MQTT_LOG: 20240520 163703.188 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.188 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.188 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163703.188 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2640 bytes - - -MQTT_LOG: 20240520 163703.188 (140737333155392) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163703.188 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2624 bytes - - -MQTT_LOG: 20240520 163703.188 (140737333155392) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163703.188 3 RTI_RTI -> PUBREC msgid: 4 (0) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163703.188 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2608 bytes - - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.188 Return code 1 from poll - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (3)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163703.188 (140737333155392) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.188 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.189 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.189 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.189 (140737333155392) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.189 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.189 (140737333155392) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< WebSocket_getdata:751 (-335540328) - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163703.189 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec0028b0 - - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163703.189 (140737333155392) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163703.189 3 RTI_RTI <- PUBCOMP msgid:3 - -MQTT_LOG: 20240520 163703.189 PUBCOMP received from client RTI_RTI for message id 3 - removing publication - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163703.189 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2576 bytes - - -MQTT_LOG: 20240520 163703.189 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2560 bytes - - -MQTT_LOG: 20240520 163703.189 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2528 bytes - - -MQTT_LOG: 20240520 163703.189 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2480 bytes - - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163703.189 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2448 bytes - - -MQTT_LOG: 20240520 163703.189 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163703.189 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2336 bytes - - -MQTT_LOG: 20240520 163703.189 (140737333155392) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163703.189 (140737333155392) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.189 (140737333155392) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.189 Return code 1 from poll - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.189 (140737352902464) (3)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163703.189 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.189 (140737352902464) (6)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163703.189 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598c80 - - -MQTT_LOG: 20240520 163703.189 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x555555599950 - - -MQTT_LOG: 20240520 163703.189 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffec0023f0 - - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.189 (140737333155392) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.189 (140737352902464) (6)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (5)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163703.189 (140737352902464) (3)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163703.189 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.189 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.189 Return code 0 from poll - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.189 (140737352902464) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163703.189 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.189 (140737352902464) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) - -MQTT_LOG: 20240520 163703.189 (140737352902464) (0)> MQTTClient_disconnect1:1929 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.189 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.202 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.202 Return code 1 from poll - -MQTT_LOG: 20240520 163703.202 (140737333155392) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.202 (140737333155392) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.202 (140737333155392) (3)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163703.202 (140737333155392) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.202 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.202 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.202 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.202 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.202 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.202 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163703.202 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.202 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.202 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.202 (140737333155392) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163703.202 (140737333155392) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.202 (140737333155392) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.202 (140737333155392) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.202 (140737333155392) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.232 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163703.232 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3376 bytes - - -MQTT_LOG: 20240520 163703.232 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163703.232 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163703.232 (140737333155392) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< WebSocket_getdata:751 (-335540328) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163703.232 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599950 - - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (3)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163703.232 3 RTI_RTI <- PUBREL msgid 4 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163703.232 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffec001440 - - -MQTT_LOG: 20240520 163703.232 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555775c0 - - -MQTT_LOG: 20240520 163703.232 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001230 - - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163703.232 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2464 bytes - - -MQTT_LOG: 20240520 163703.232 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2416 bytes - - -MQTT_LOG: 20240520 163703.232 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2384 bytes - - -MQTT_LOG: 20240520 163703.232 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163703.232 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001010 - - -MQTT_LOG: 20240520 163703.232 (140737333155392) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.232 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001270 - - -MQTT_LOG: 20240520 163703.232 (140737333155392) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163703.232 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163703.232 (140737333155392) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163703.232 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163703.232 (140737333155392) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163703.232 3 RTI_RTI -> PUBCOMP msgid 4 (0) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163703.232 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163703.232 (140737333155392) (3)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.232 Return code 1 from poll - -MQTT_LOG: 20240520 163703.232 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.232 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.232 (140737352902464) (3)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163703.232 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.232 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.232 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.232 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.232 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.232 (140737352902464) (6)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163703.232 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599580 - - -MQTT_LOG: 20240520 163703.232 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x55555559a550 - - -MQTT_LOG: 20240520 163703.232 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x55555559ab50 - - -MQTT_LOG: 20240520 163703.232 (140737352902464) (6)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163703.232 (140737352902464) (5)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163703.232 (140737352902464) (4)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163703.232 (140737352902464) (3)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163703.232 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.232 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.232 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.232 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.232 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.232 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.232 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.232 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.232 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.232 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.232 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.232 Return code 0 from poll - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.232 (140737333155392) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.232 (140737333155392) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (0)< MQTTClient_waitForCompletion:2903 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (0)> MQTTClient_disconnect1:1929 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTClient_closeSession:1095 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTPacket_send_disconnect:516 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.246 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec000e70 - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (4)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (5)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (6)> Socket_writev:721 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (6)< Socket_writev:773 (2) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (5)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (4)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3328 bytes - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163703.246 3 RTI_RTI -> DISCONNECT (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTPacket_send_disconnect:543 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> WebSocket_close:524 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< WebSocket_close:572 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> Socket_close:967 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> Socket_close_only:893 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< Socket_close_only:907 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> Socket_abortWrite:1355 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< Socket_abortWrite:1376 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> SocketBuffer_cleanup:153 - -MQTT_LOG: 20240520 163703.246 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 157, heap use now 3312 bytes - - -MQTT_LOG: 20240520 163703.246 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163703.246 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3232 bytes - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< SocketBuffer_cleanup:165 - -MQTT_LOG: 20240520 163703.246 Removed socket 3 - -MQTT_LOG: 20240520 163703.246 Removed socket 3 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< Socket_close:1037 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTClient_cleanSession:1131 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTPersistence_clear:170 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTPersistence_clear:174 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTClient_emptyMessageQueue:557 - -MQTT_LOG: 20240520 163703.246 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 565, heap use now 3200 bytes - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (4)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (4)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 567, heap use now 3168 bytes - - -MQTT_LOG: 20240520 163703.246 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 568, heap use now 3152 bytes - - -MQTT_LOG: 20240520 163703.246 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 366, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163703.246 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 370, heap use now 3056 bytes - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTClient_emptyMessageQueue:572 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTClient_cleanSession:1139 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTClient_closeSession:1123 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTClient_stop:1028 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTClient_stop:1063 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (0)< MQTTClient_disconnect1:1963 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (0)> MQTTClient_destroy:580 - -MQTT_LOG: 20240520 163703.246 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffec001010 - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTPersistence_close:141 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTPersistence_close:157 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTClient_emptyMessageQueue:557 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTClient_emptyMessageQueue:572 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTProtocol_freeClient:934 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTProtocol_freeMessageList:1020 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163703.246 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTProtocol_freeMessageList:1023 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTProtocol_freeMessageList:1020 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163703.246 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTProtocol_freeMessageList:1023 - -MQTT_LOG: 20240520 163703.246 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163703.246 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 940, heap use now 2848 bytes - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTProtocol_freeClient:989 - -MQTT_LOG: 20240520 163703.246 Freeing 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163703.246 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2528 bytes - - -MQTT_LOG: 20240520 163703.246 Removed client RTI_RTI from bstate->clients, socket 0 - -MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 600, heap use now 2496 bytes - - -MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 603, heap use now 2480 bytes - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> Thread_destroy_sem:371 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< Thread_destroy_sem:380 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> Thread_destroy_sem:371 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< Thread_destroy_sem:380 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> Thread_destroy_sem:371 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< Thread_destroy_sem:380 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> Thread_destroy_sem:371 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< Thread_destroy_sem:380 (0) - -MQTT_LOG: 20240520 163703.246 Freeing 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2464 bytes - - -MQTT_LOG: 20240520 163703.246 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (0)< MQTTClient_destroy:617 - -ERROR: MQTT receive failed. -FATAL ERROR: Error 11: Resource temporarily unavailable -MQTT_LOG: 20240520 163703.246 (140737333155392) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTProtocol_assignMsgId:104 (6) - -MQTT_LOG: 20240520 163703.246 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7fffec000f20 - - -MQTT_LOG: 20240520 163703.246 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7fffec001270 - - -MQTT_LOG: 20240520 163703.246 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffec0010f0 - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163703.246 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x5555555995c0 - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163703.246 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a7a0 - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163703.246 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec0014b0 - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163703.246 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001140 - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163703.246 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7fffec0019d0 - - -MQTT_LOG: 20240520 163703.246 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7fffec001f00 - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.246 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7fffec001480 - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (8)< Socket_writev:773 (43) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 2656 bytes - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 2640 bytes - - -MQTT_LOG: 20240520 163703.246 4 RTI_0 -> PUBLISH msgid: 6 qos: 2 retained: 0 rc 0 payload len(1):  - -MQTT_LOG: 20240520 163703.246 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 2624 bytes - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163703.246 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 2608 bytes - - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163703.246 (140737333155392) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.246 (140737333155392) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.246 Return code 1 from poll - -MQTT_LOG: 20240520 163703.246 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.246 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.246 (140737352902464) (3)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163703.246 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.246 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.246 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.246 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.246 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.246 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.246 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.246 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.246 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.246 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.246 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.246 Return code 1 from poll - -MQTT_LOG: 20240520 163703.246 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.246 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.246 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163703.246 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.246 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.246 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.246 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.246 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.247 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.247 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163703.247 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 2528 bytes - - -MQTT_LOG: 20240520 163703.247 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 1520 bytes - - -MQTT_LOG: 20240520 163703.247 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1472 bytes - - -MQTT_LOG: 20240520 163703.247 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163703.247 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a550 - - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163703.247 4 RTI_0 <- PUBREC msgid: 6 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163703.247 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991e0 - - -MQTT_LOG: 20240520 163703.247 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.247 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597160 - - -MQTT_LOG: 20240520 163703.247 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163703.247 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1520 bytes - - -MQTT_LOG: 20240520 163703.247 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163703.247 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 1504 bytes - - -MQTT_LOG: 20240520 163703.247 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163703.247 4 RTI_0 -> PUBREL msgid: 6 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163703.247 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 1488 bytes - - -MQTT_LOG: 20240520 163703.247 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.247 Return code 1 from poll - -MQTT_LOG: 20240520 163703.247 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.247 (140737333155392) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163703.247 (140737333155392) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.247 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.247 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.247 (140737333155392) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163703.247 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163703.247 (140737333155392) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< WebSocket_getdata:751 (-268428312) - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163703.247 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a500 - - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163703.247 (140737333155392) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163703.247 4 RTI_0 <- PUBCOMP msgid:6 - -MQTT_LOG: 20240520 163703.247 PUBCOMP received from client RTI_0 for message id 6 - removing publication - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163703.247 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 1488 bytes - - -MQTT_LOG: 20240520 163703.247 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 1472 bytes - - -MQTT_LOG: 20240520 163703.247 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1424 bytes - - -MQTT_LOG: 20240520 163703.247 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1376 bytes - - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163703.247 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1344 bytes - - -MQTT_LOG: 20240520 163703.247 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1264 bytes - - -MQTT_LOG: 20240520 163703.247 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 1232 bytes - - -MQTT_LOG: 20240520 163703.247 (140737333155392) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163703.247 (140737333155392) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.247 (140737333155392) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.247 Return code 1 from poll - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (6)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163703.247 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599f90 - - -MQTT_LOG: 20240520 163703.247 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x55555559a550 - - -MQTT_LOG: 20240520 163703.247 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x55555559ab50 - - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.247 (140737333155392) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (6)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (5)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (3)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.247 Return code 0 from poll - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.247 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.247 (140737352902464) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163703.303 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.303 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.303 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.303 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.303 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.303 (140737352902464) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163703.303 (140737352902464) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163703.303 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163703.303 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163703.303 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163703.303 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163703.303 Return code 0 from poll - -MQTT_LOG: 20240520 163703.303 (140737333155392) (4)> isReady:353 - -MQTT_LOG: 20240520 163703.303 (140737333155392) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163703.303 (140737333155392) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163703.303 (140737333155392) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163703.303 (140737333155392) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163703.303 (140737333155392) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163703.303 (140737333155392) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163703.303 (140737333155392) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163703.348 (140737333155392) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163703.348 (140737333155392) (0)< MQTTClient_waitForCompletion:2903 (0) - -LOG: RTI has sent failed signal to federate 0 due to abnormal termination. -RTI is exiting abnormally. -RTI: Number of federates: 2 -RTI: Clock sync: init -Starting RTI for 2 federates in federation ID Unidentified Federation. ----- System clock resolution: 1 nsec -LOG: Subscribing on topic Unidentified Federation_RTI. -LOG: PHYSICAL_TIME ON SUBSCRIBING TOPIC: 1716248233693742342 -RTI: Listening for federates. -LOG: RECEIVING message from federateID -1 -MQTT_LOG: 20240520 163713.693 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163713.693 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163713.693 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163713.693 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163713.693 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163713.693 Return code 1 from poll - -MQTT_LOG: 20240520 163713.693 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163713.693 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163713.693 (140737352902464) (2)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163713.693 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163713.693 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163713.693 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.458 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.458 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.458 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.458 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.458 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.458 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.458 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.458 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.458 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (3)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163716.458 (140737352902464) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163716.458 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163716.458 (140737352902464) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163716.458 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555597e10 - - -MQTT_LOG: 20240520 163716.458 (140737352902464) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163716.458 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555597cf0 - - -MQTT_LOG: 20240520 163716.458 (140737352902464) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.458 (140737352902464) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163716.458 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163716.458 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 1280 bytes - - -MQTT_LOG: 20240520 163716.458 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.458 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163716.459 3 RTI_RTI <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163716.459 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163716.459 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598300 - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163716.459 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555597d20 - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163716.459 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598390 - - -MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x5555555960e0 - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598510 - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x5555555985f0 - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.459 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1504 bytes - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.459 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 1488 bytes - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163716.459 3 RTI_RTI -> PUBREC msgid: 1 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163716.459 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 1472 bytes - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTProtocol_keepalive:704 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTProtocol_keepalive:781 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.459 Return code 1 from poll - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (2)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.459 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.459 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163716.459 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555986a0 - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163716.459 3 RTI_RTI <- PUBREL msgid 1 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163716.459 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555984a0 - - -MQTT_LOG: 20240520 163716.459 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163716.459 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598730 - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163716.459 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1568 bytes - - -MQTT_LOG: 20240520 163716.459 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1520 bytes - - -MQTT_LOG: 20240520 163716.459 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1488 bytes - - -MQTT_LOG: 20240520 163716.459 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1408 bytes - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555597cf0 - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597e90 - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.459 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1408 bytes - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.459 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 1392 bytes - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163716.459 3 RTI_RTI -> PUBCOMP msgid 1 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163716.459 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 1376 bytes - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163716.459 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1328 bytes - - -MQTT_LOG: 20240520 163716.459 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1296 bytes - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163716.459 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 1264 bytes - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163716.459 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 1232 bytes - - -MQTT_LOG: 20240520 163716.459 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 1216 bytes - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID -1 -LOG: Received MSG_TYPE_MQTT_JOIN message from federate 1. -DEBUG: Setting up MQTTServer_id for federate 1. -DEBUG: Setup MQTTServer_id for federate 1 as RTI_1. -DEBUG: Creating MQTTClient for federate 1. -MQTT_LOG: 20240520 163716.459 (140737352902464) (0)> MQTTClient_createWithOptions:375 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (2)> UTF8_validate:134 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (2)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163716.459 Allocating 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 438 ptr 0x555555598850 - - -MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555597cf0 - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163716.459 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555597c60 - - -MQTT_LOG: 20240520 163716.459 Allocating 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 489 ptr 0x555555598910 - - -MQTT_LOG: 20240520 163716.459 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555986a0 - - -MQTT_LOG: 20240520 163716.459 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555597ca0 - - -MQTT_LOG: 20240520 163716.459 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598300 - - -MQTT_LOG: 20240520 163716.459 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555977e0 - - -MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555597f80 - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTPersistence_create:56 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTPersistence_create:104 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTPersistence_initialize:119 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTPersistence_initialize:127 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTPersistence_restoreMessageQueue:877 - -MQTT_LOG: 20240520 163716.459 0 queued messages restored for client RTI_1 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)< MQTTPersistence_restoreMessageQueue:918 (0) - -MQTT_LOG: 20240520 163716.459 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598540 - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (0)< MQTTClient_createWithOptions:522 (0) - -DEBUG: Connecting MQTTClient for federate 1. -MQTT_LOG: 20240520 163716.459 (140737352902464) (0)> MQTTClient_connectAll:1745 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (1)> MQTTClient_connectURI:1504 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (2)> MQTTClient_connectURIVersion:1209 - -MQTT_LOG: 20240520 163716.459 Connecting to serverURI 127.0.0.1:1883 with MQTT version 4 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTProtocol_connect:227 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> MQTTProtocol_addressPort:63 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< MQTTProtocol_addressPort:101 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> Socket_new:1072 - -MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1082 ptr 0x555555598ba0 - - -MQTT_LOG: 20240520 163716.459 New socket 4 for 127.0.0.1:1883, port 1883 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> Socket_addSocket:272 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> Socket_setnonblocking:95 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< Socket_setnonblocking:100 (0) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)< Socket_addSocket:314 (0) - -MQTT_LOG: 20240520 163716.459 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1200 ptr 0x555555598c50 - - -MQTT_LOG: 20240520 163716.459 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d30 - - -MQTT_LOG: 20240520 163716.459 Connect pending - -MQTT_LOG: 20240520 163716.459 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1233, heap use now 1968 bytes - - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)< Socket_new:1235 (115) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)< MQTTProtocol_connect:355 (115) - -MQTT_LOG: 20240520 163716.459 (140737352902464) (3)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.459 Return code 0 from poll - -MQTT_LOG: 20240520 163716.459 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163716.560 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163716.560 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1936 bytes - - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (3)> MQTTPacket_send_connect:55 - -MQTT_LOG: 20240520 163716.560 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 73 ptr 0x555555598cf0 - - -MQTT_LOG: 20240520 163716.560 (140737352902464) (4)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.560 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598c20 - - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (7)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (7)< Socket_writev:773 (19) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.560 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163716.560 (140737352902464) (4)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.560 4 RTI_1 -> CONNECT version 4 clean: 1 (0) - -MQTT_LOG: 20240520 163716.560 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 127, heap use now 1936 bytes - - -MQTT_LOG: 20240520 163716.560 (140737352902464) (3)< MQTTPacket_send_connect:129 (0) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (3)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.560 Return code 1 from poll - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.560 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.560 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> MQTTPacket_connack:148 - -MQTT_LOG: 20240520 163716.560 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 149 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< MQTTPacket_connack:176 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.560 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163716.561 4 RTI_1 <- CONNACK rc: 0 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTClient_cleanSession:1131 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTPersistence_clear:170 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTPersistence_clear:174 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTClient_emptyMessageQueue:557 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTClient_emptyMessageQueue:572 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTClient_cleanSession:1139 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTPacket_freeConnack:187 - -MQTT_LOG: 20240520 163716.561 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 190, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTPacket_freeConnack:191 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTClient_connectURIVersion:1477 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (1)< MQTTClient_connectURI:1702 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (0)< MQTTClient_connectAll:1910 (0) - -DEBUG: Connected, return code 0 - -DEBUG: Creating topic for federate 1. -LOG: Starting subscribe -MQTT_LOG: 20240520 163716.561 (140737352902464) (0)> MQTTClient_subscribe5:2180 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (1)> MQTTClient_subscribeMany5:2034 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (1) - -MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163716.561 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 - - -MQTT_LOG: 20240520 163716.561 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e40 - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTProtocol_subscribe:394 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTPacket_send_subscribe:235 - -MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 247 ptr 0x555555598f30 - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599030 - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< Socket_writev:773 (43) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.561 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2128 bytes - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.561 4 RTI_1 -> SUBSCRIBE msgid: 1 (0) - -MQTT_LOG: 20240520 163716.561 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 275, heap use now 2112 bytes - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTPacket_send_subscribe:277 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTProtocol_subscribe:396 (0) - -MQTT_LOG: 20240520 163716.561 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163716.561 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 2032 bytes - - -MQTT_LOG: 20240520 163716.561 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 1984 bytes - - -MQTT_LOG: 20240520 163716.561 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.561 Return code 1 from poll - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> isReady:353 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> isReady:353 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.561 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.561 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> MQTTPacket_suback:296 - -MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 297 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 326 ptr 0x555555598ba0 - - -MQTT_LOG: 20240520 163716.561 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598cf0 - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< MQTTPacket_suback:348 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTProtocol_handleSubacks:413 - -MQTT_LOG: 20240520 163716.561 4 RTI_1 <- SUBACK msgid: 1 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTPacket_freeSuback:697 - -MQTT_LOG: 20240520 163716.561 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 366, heap use now 2048 bytes - - -MQTT_LOG: 20240520 163716.561 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 370, heap use now 2032 bytes - - -MQTT_LOG: 20240520 163716.561 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163716.561 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 702, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTPacket_freeSuback:703 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTProtocol_handleSubacks:417 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (1)< MQTTClient_subscribeMany5:2154 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (0)< MQTTClient_subscribe5:2184 (0) - -DEBUG: Subscribed, return code 0 - -LOG: Subscribing on topic Unidentified Federation_fed_1_to_RTI. -LOG: Finished subscribe -LOG: Publishing MSG_TYPE_MQTT_ACCEPT message on topic Unidentified Federation_RTI_to_fed_1. -MQTT_LOG: 20240520 163716.561 (140737352902464) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (2) - -MQTT_LOG: 20240520 163716.561 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555598ba0 - - -MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163716.561 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599130 - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163716.561 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555990a0 - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163716.561 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598f80 - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (8)< Socket_writev:773 (45) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.561 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163716.561 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163716.561 4 RTI_1 -> PUBLISH msgid: 2 qos: 2 retained: 0 rc 0 payload len(3):  - -MQTT_LOG: 20240520 163716.561 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163716.561 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.561 Return code 1 from poll - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.561 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.561 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163716.561 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163716.561 4 RTI_1 <- PUBREC msgid: 2 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991e0 - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.561 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599240 - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.561 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.561 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163716.561 4 RTI_1 -> PUBREL msgid: 2 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163716.561 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.561 Return code 1 from poll - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.561 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.561 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.562 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.562 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.562 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.562 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.562 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163716.562 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.562 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163716.562 4 RTI_1 <- PUBCOMP msgid:2 - -MQTT_LOG: 20240520 163716.562 PUBCOMP received from client RTI_1 for message id 2 - removing publication - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163716.562 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163716.562 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163716.562 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2144 bytes - - -MQTT_LOG: 20240520 163716.562 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163716.562 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163716.562 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1984 bytes - - -MQTT_LOG: 20240520 163716.562 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163716.562 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163716.562 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.562 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.562 Return code 1 from poll - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.562 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.562 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.604 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.604 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163716.604 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163716.604 (140737352902464) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163716.604 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163716.604 (140737352902464) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163716.604 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599240 - - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163716.604 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2048 bytes - - -MQTT_LOG: 20240520 163716.604 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163716.604 4 RTI_1 <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(1):  - -MQTT_LOG: 20240520 163716.604 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163716.604 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555990e0 - - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163716.604 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 - - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163716.604 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d30 - - -MQTT_LOG: 20240520 163716.604 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555598b70 - - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163716.604 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598c20 - - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.604 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 - - -MQTT_LOG: 20240520 163716.604 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.604 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.604 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163716.604 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163716.604 4 RTI_1 -> PUBREC msgid: 1 (0) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163716.604 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.604 Return code 1 from poll - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.604 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.604 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.605 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163716.605 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163716.605 4 RTI_1 <- PUBREL msgid 1 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163716.605 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555986f0 - - -MQTT_LOG: 20240520 163716.605 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163716.605 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599060 - - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163716.605 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2336 bytes - - -MQTT_LOG: 20240520 163716.605 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163716.605 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163716.605 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163716.605 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599240 - - -MQTT_LOG: 20240520 163716.605 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.605 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163716.605 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.605 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163716.605 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.605 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2160 bytes - - -MQTT_LOG: 20240520 163716.605 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163716.605 4 RTI_1 -> PUBCOMP msgid 1 (0) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163716.605 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2144 bytes - - -MQTT_LOG: 20240520 163716.605 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.605 Return code 0 from poll - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163716.605 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.605 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.662 (140737352902464) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163716.662 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) - -LOG: RECEIVING message from federateID 1 -MQTT_LOG: 20240520 163716.662 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163716.662 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.662 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.662 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.662 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.662 Return code 0 from poll - -MQTT_LOG: 20240520 163716.662 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.662 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.662 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.662 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.662 (140737352902464) (2)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163716.662 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.662 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.662 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.662 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.662 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.662 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163716.662 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163716.663 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163716.663 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2032 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 1984 bytes - - -MQTT_LOG: 20240520 163716.663 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 1968 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 1 -LOG: Receiving MSG_TYPE_MQTT_ACCEPT_ACK message on topic Unidentified Federation_fed_1_to_RTI. -LOG: RECEIVING message from federateID 1 -MQTT_LOG: 20240520 163716.663 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.663 Return code 1 from poll - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.663 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.663 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163716.663 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163716.663 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x5555555981d0 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163716.663 4 RTI_1 <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(27):  - -MQTT_LOG: 20240520 163716.663 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163716.663 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163716.663 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e40 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163716.663 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e80 - - -MQTT_LOG: 20240520 163716.663 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555598fc0 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598f00 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163716.663 4 RTI_1 -> PUBREC msgid: 2 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163716.663 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.663 Return code 1 from poll - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.663 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.663 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163716.663 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555990e0 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163716.663 4 RTI_1 <- PUBREL msgid 2 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163716.663 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555990a0 - - -MQTT_LOG: 20240520 163716.663 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163716.663 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163716.663 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2384 bytes - - -MQTT_LOG: 20240520 163716.663 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2336 bytes - - -MQTT_LOG: 20240520 163716.663 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163716.663 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163716.663 4 RTI_1 -> PUBCOMP msgid 2 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163716.663 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163716.663 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2144 bytes - - -MQTT_LOG: 20240520 163716.663 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2112 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163716.663 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163716.663 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2032 bytes - - -MQTT_LOG: 20240520 163716.663 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 1 -DEBUG: RTI received federate ID: 1. -DEBUG: RTI received federation ID: Unidentified Federation. -DEBUG: RTI responding with MSG_TYPE_ACK to federate 1. -MQTT_LOG: 20240520 163716.663 (140737352902464) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (3) - -MQTT_LOG: 20240520 163716.663 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163716.663 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x5555555981d0 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163716.663 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163716.663 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163716.663 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163716.663 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555994d0 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x555555599240 - - -MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x555555599180 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.663 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (8)< Socket_writev:773 (43) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163716.663 4 RTI_1 -> PUBLISH msgid: 3 qos: 2 retained: 0 rc 0 payload len(1): ÿ - -MQTT_LOG: 20240520 163716.663 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163716.663 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163716.663 (140737352902464) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163716.663 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.663 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.663 Return code 1 from poll - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.708 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.708 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163716.708 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163716.708 4 RTI_1 <- PUBREC msgid: 3 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163716.708 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599180 - - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.708 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.708 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.708 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163716.708 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163716.708 4 RTI_1 -> PUBREL msgid: 3 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163716.708 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163716.708 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.708 Return code 1 from poll - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.708 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.708 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163716.708 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163716.708 4 RTI_1 <- PUBCOMP msgid:3 - -MQTT_LOG: 20240520 163716.708 PUBCOMP received from client RTI_1 for message id 3 - removing publication - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163716.708 (140737352902464) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163716.708 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163716.709 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163716.709 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163716.709 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2128 bytes - - -MQTT_LOG: 20240520 163716.709 (140737352902464) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163716.709 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163716.709 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163716.709 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 1984 bytes - - -MQTT_LOG: 20240520 163716.709 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163716.709 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.709 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.709 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.709 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.709 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.709 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.709 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.709 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.709 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.709 Return code 0 from poll - -MQTT_LOG: 20240520 163716.709 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.709 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.764 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163716.764 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.764 (140737352902464) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163716.764 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.764 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.764 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.764 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.764 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.764 (140737352902464) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163716.764 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) - -DEBUG: RTI sent MSG_TYPE_ACK to federate 1. -DEBUG: RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate 1. -LOG: RECEIVING message from federateID 1 -MQTT_LOG: 20240520 163716.764 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163716.764 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.764 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.764 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.764 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.764 Return code 1 from poll - -MQTT_LOG: 20240520 163716.764 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.764 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.764 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.764 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.765 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.765 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163716.765 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163716.765 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163716.765 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163716.765 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163716.765 4 RTI_1 <- PUBLISH msgid: 3 qos: 2 retained: 0 payload len(19):  - -MQTT_LOG: 20240520 163716.765 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163716.765 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163716.765 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599060 - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163716.765 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555992e0 - - -MQTT_LOG: 20240520 163716.765 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555598fc0 - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163716.765 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.765 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599000 - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.765 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.765 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163716.765 4 RTI_1 -> PUBREC msgid: 3 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163716.765 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.765 Return code 1 from poll - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.765 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.765 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163716.765 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598f30 - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.765 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163716.765 4 RTI_1 <- PUBREL msgid 3 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163716.765 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599490 - - -MQTT_LOG: 20240520 163716.765 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163716.765 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599400 - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163716.765 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2384 bytes - - -MQTT_LOG: 20240520 163716.765 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2336 bytes - - -MQTT_LOG: 20240520 163716.765 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163716.765 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163716.765 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163716.765 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163716.766 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163716.766 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.766 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598f00 - - -MQTT_LOG: 20240520 163716.766 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.766 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163716.766 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.766 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.766 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163716.766 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.766 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163716.766 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163716.766 4 RTI_1 -> PUBCOMP msgid 3 (0) - -MQTT_LOG: 20240520 163716.766 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163716.766 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163716.766 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163716.766 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.766 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163716.766 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2144 bytes - - -MQTT_LOG: 20240520 163716.766 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2112 bytes - - -MQTT_LOG: 20240520 163716.766 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163716.766 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163716.766 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163716.766 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163716.766 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2032 bytes - - -MQTT_LOG: 20240520 163716.766 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163716.766 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 1 -DEBUG: RTI got 1 upstreams and 0 downstreams from federate 1. -DEBUG: RTI received neighbor structure from federate 1. -DEBUG: RTI waiting for MSG_TYPE_UDP_PORT from federate 1. -LOG: RECEIVING message from federateID 1 -MQTT_LOG: 20240520 163716.766 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.766 Return code 1 from poll - -MQTT_LOG: 20240520 163716.766 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.766 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.766 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.766 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.766 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.766 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.766 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.865 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163716.865 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163716.865 (140737352902464) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163716.865 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x5555555981d0 - - -MQTT_LOG: 20240520 163716.865 (140737352902464) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163716.865 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555598cc0 - - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163716.865 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163716.865 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163716.865 4 RTI_1 <- PUBLISH msgid: 4 qos: 2 retained: 0 payload len(3): þÿÿ - -MQTT_LOG: 20240520 163716.865 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163716.865 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555990e0 - - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163716.865 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599580 - - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163716.865 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598580 - - -MQTT_LOG: 20240520 163716.865 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163716.865 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599030 - - -MQTT_LOG: 20240520 163716.865 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.865 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599000 - - -MQTT_LOG: 20240520 163716.865 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.865 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163716.865 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.865 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163716.865 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163716.865 4 RTI_1 -> PUBREC msgid: 4 (0) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163716.865 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.865 Return code 1 from poll - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.865 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.866 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.866 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163716.866 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163716.866 4 RTI_1 <- PUBREL msgid 4 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163716.866 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555994d0 - - -MQTT_LOG: 20240520 163716.866 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163716.866 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d70 - - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163716.866 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163716.866 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163716.866 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163716.866 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163716.866 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598cc0 - - -MQTT_LOG: 20240520 163716.866 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.866 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598f00 - - -MQTT_LOG: 20240520 163716.866 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.866 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163716.866 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.866 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163716.866 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163716.866 4 RTI_1 -> PUBCOMP msgid 4 (0) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163716.866 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163716.866 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163716.866 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2128 bytes - - -MQTT_LOG: 20240520 163716.866 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163716.866 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163716.866 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163716.866 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163716.866 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163716.866 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163716.866 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163716.866 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 1 -DEBUG: RTI got MSG_TYPE_UDP_PORT 65535 from federate 1. -LOG: RECEIVING message from federateID -1 -MQTT_LOG: 20240520 163716.866 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.866 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -LOG: RECEIVING message from federateID 1 -MQTT_LOG: 20240520 163716.866 (140737349940800) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163716.866 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.866 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.866 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.866 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.966 Return code 1 from poll - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.966 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.966 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163716.966 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000c40 - - -MQTT_LOG: 20240520 163716.966 (140737349940800) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163716.966 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7ffff0000d60 - - -MQTT_LOG: 20240520 163716.966 (140737349940800) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163716.966 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0000e60 - - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163716.966 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163716.966 (140737349940800) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163716.966 4 RTI_1 <- PUBLISH msgid: 5 qos: 2 retained: 0 payload len(9): œž·®­VÑ - -MQTT_LOG: 20240520 163716.966 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163716.966 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 - - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163716.966 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00010a0 - - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163716.966 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0001190 - - -MQTT_LOG: 20240520 163716.966 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7ffff0001290 - - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163716.966 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001370 - - -MQTT_LOG: 20240520 163716.966 (140737349940800) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.966 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001450 - - -MQTT_LOG: 20240520 163716.966 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.966 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163716.966 (140737349940800) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.966 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163716.966 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163716.966 4 RTI_1 -> PUBREC msgid: 5 (0) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163716.966 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.966 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.966 Return code 1 from poll - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.966 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163716.966 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163716.966 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163716.966 4 RTI_1 <- PUBREL msgid 5 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163716.966 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555993c0 - - -MQTT_LOG: 20240520 163716.966 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163716.966 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 - - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163716.966 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163716.966 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163716.966 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163716.966 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163716.966 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163716.966 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0000e60 - - -MQTT_LOG: 20240520 163716.966 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.966 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0000e30 - - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.966 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163716.966 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163716.966 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163716.966 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163716.966 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163716.967 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163716.967 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163716.967 4 RTI_1 -> PUBCOMP msgid 5 (0) - -MQTT_LOG: 20240520 163716.967 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163716.967 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163716.967 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163716.967 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163716.967 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163716.967 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163716.967 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163716.967 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163716.967 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163716.967 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163716.967 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163716.967 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163716.967 Return code 1 from poll - -MQTT_LOG: 20240520 163716.967 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163716.967 (140737349940800) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163716.967 (140737349940800) (2)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163716.967 (140737349940800) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.028 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.028 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163717.028 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000c40 - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163717.028 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7ffff0001300 - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163717.028 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0001450 - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163717.028 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163717.028 3 RTI_RTI <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163717.028 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0001500 - - -MQTT_LOG: 20240520 163717.028 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001570 - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163717.028 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00010a0 - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163717.028 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00012c0 - - -MQTT_LOG: 20240520 163717.028 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7ffff0001670 - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163717.028 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001750 - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.028 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001830 - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.028 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2480 bytes - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.028 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2464 bytes - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163717.028 3 RTI_RTI -> PUBREC msgid: 2 (0) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163717.028 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2448 bytes - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163717.028 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163717.028 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2336 bytes - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163717.028 (140737349940800) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163717.028 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163717.028 (140737349940800) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163717.028 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163717.028 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163717.028 (140737349940800) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 1 -DEBUG: RTI: Received message type 2 from federate 1. -DEBUG: RTI received timestamp message with time: 1716248236965469852. -DEBUG: RTI received timestamp message with time: 1716248236965469852. fro federate 1 -MQTT_LOG: 20240520 163717.028 Return code 1 from poll - -MQTT_LOG: 20240520 163717.028 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.028 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.028 (140737352902464) (2)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163717.028 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.028 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.029 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.029 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163717.029 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff0000fd0 - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163717.029 3 RTI_RTI <- PUBREL msgid 2 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163717.029 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555598d70 - - -MQTT_LOG: 20240520 163717.029 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 - - -MQTT_LOG: 20240520 163717.029 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163717.029 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2352 bytes - - -MQTT_LOG: 20240520 163717.029 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163717.029 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163717.029 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163717.029 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001450 - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.029 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001340 - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.029 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.029 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163717.029 3 RTI_RTI -> PUBCOMP msgid 2 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163717.029 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2160 bytes - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163717.029 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2112 bytes - - -MQTT_LOG: 20240520 163717.029 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163717.029 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2048 bytes - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163717.029 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163717.029 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID -1 -LOG: Received MSG_TYPE_MQTT_JOIN message from federate 0. -DEBUG: Setting up MQTTServer_id for federate 0. -DEBUG: Setup MQTTServer_id for federate 0 as RTI_0. -DEBUG: Creating MQTTClient for federate 0. -MQTT_LOG: 20240520 163717.029 (140737352902464) (0)> MQTTClient_createWithOptions:375 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (2)> UTF8_validate:134 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (2)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163717.029 Allocating 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 438 ptr 0x555555599880 - - -MQTT_LOG: 20240520 163717.029 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7ffff0001340 - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163717.029 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598fc0 - - -MQTT_LOG: 20240520 163717.029 Allocating 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 489 ptr 0x555555599940 - - -MQTT_LOG: 20240520 163717.029 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555981d0 - - -MQTT_LOG: 20240520 163717.029 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163717.029 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163717.029 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555990e0 - - -MQTT_LOG: 20240520 163717.029 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x5555555991e0 - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTPersistence_create:56 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTPersistence_create:104 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTPersistence_initialize:119 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTPersistence_initialize:127 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTPersistence_restoreMessageQueue:877 - -MQTT_LOG: 20240520 163717.029 0 queued messages restored for client RTI_0 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)< MQTTPersistence_restoreMessageQueue:918 (0) - -MQTT_LOG: 20240520 163717.029 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e80 - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (0)< MQTTClient_createWithOptions:522 (0) - -DEBUG: Connecting MQTTClient for federate 0. -MQTT_LOG: 20240520 163717.029 (140737352902464) (0)> MQTTClient_connectAll:1745 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (1)> MQTTClient_connectURI:1504 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (2)> MQTTClient_connectURIVersion:1209 - -MQTT_LOG: 20240520 163717.029 Connecting to serverURI 127.0.0.1:1883 with MQTT version 4 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> MQTTProtocol_connect:227 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (4)> MQTTProtocol_addressPort:63 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (4)< MQTTProtocol_addressPort:101 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (4)> Socket_new:1072 - -MQTT_LOG: 20240520 163717.029 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1082 ptr 0x555555599a90 - - -MQTT_LOG: 20240520 163717.029 New socket 5 for 127.0.0.1:1883, port 1883 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> Socket_addSocket:272 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> Socket_setnonblocking:95 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< Socket_setnonblocking:100 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< Socket_addSocket:314 (0) - -MQTT_LOG: 20240520 163717.029 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1200 ptr 0x5555555978a0 - - -MQTT_LOG: 20240520 163717.029 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599b70 - - -MQTT_LOG: 20240520 163717.029 Connect pending - -MQTT_LOG: 20240520 163717.029 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1233, heap use now 2784 bytes - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (4)< Socket_new:1235 (115) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)< MQTTProtocol_connect:355 (115) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (3)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.029 Return code 0 from poll - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163717.029 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2800 bytes - - -MQTT_LOG: 20240520 163717.029 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2784 bytes - - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.029 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.029 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (3)> MQTTPacket_send_connect:55 - -MQTT_LOG: 20240520 163717.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 73 ptr 0x555555597d60 - - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597980 - - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (7)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (7)< Socket_writev:773 (19) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.130 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2800 bytes - - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.130 5 RTI_0 -> CONNECT version 4 clean: 1 (0) - -MQTT_LOG: 20240520 163717.130 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 127, heap use now 2784 bytes - - -MQTT_LOG: 20240520 163717.130 (140737352902464) (3)< MQTTPacket_send_connect:129 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (3)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.130 Return code 1 from poll - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.130 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.130 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> MQTTPacket_connack:148 - -MQTT_LOG: 20240520 163717.130 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 149 ptr 0x555555599130 - - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< MQTTPacket_connack:176 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163717.130 5 RTI_0 <- CONNACK rc: 0 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (3)> MQTTClient_cleanSession:1131 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> MQTTPersistence_clear:170 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTPersistence_clear:174 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> MQTTClient_emptyMessageQueue:557 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTClient_emptyMessageQueue:572 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (3)< MQTTClient_cleanSession:1139 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (3)> MQTTPacket_freeConnack:187 - -MQTT_LOG: 20240520 163717.130 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 190, heap use now 2800 bytes - - -MQTT_LOG: 20240520 163717.130 (140737352902464) (3)< MQTTPacket_freeConnack:191 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (2)< MQTTClient_connectURIVersion:1477 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (1)< MQTTClient_connectURI:1702 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (0)< MQTTClient_connectAll:1910 (0) - -DEBUG: Connected, return code 0 - -DEBUG: Creating topic for federate 0. -LOG: Starting subscribe -MQTT_LOG: 20240520 163717.130 (140737352902464) (0)> MQTTClient_subscribe5:2180 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (1)> MQTTClient_subscribeMany5:2034 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (1) - -MQTT_LOG: 20240520 163717.130 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555599130 - - -MQTT_LOG: 20240520 163717.130 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163717.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599580 - - -MQTT_LOG: 20240520 163717.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599cb0 - - -MQTT_LOG: 20240520 163717.130 (140737352902464) (2)> MQTTProtocol_subscribe:394 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (3)> MQTTPacket_send_subscribe:235 - -MQTT_LOG: 20240520 163717.130 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 247 ptr 0x555555599d70 - - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599e40 - - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (7)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (7)< Socket_writev:773 (43) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (6)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.130 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2976 bytes - - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.130 5 RTI_0 -> SUBSCRIBE msgid: 1 (0) - -MQTT_LOG: 20240520 163717.130 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 275, heap use now 2960 bytes - - -MQTT_LOG: 20240520 163717.130 (140737352902464) (3)< MQTTPacket_send_subscribe:277 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (2)< MQTTProtocol_subscribe:396 (0) - -MQTT_LOG: 20240520 163717.130 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 2912 bytes - - -MQTT_LOG: 20240520 163717.130 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 2880 bytes - - -MQTT_LOG: 20240520 163717.130 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163717.130 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 2800 bytes - - -MQTT_LOG: 20240520 163717.130 (140737352902464) (2)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (3)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (4)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.130 Return code 1 from poll - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> isReady:353 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> isReady:353 - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.130 (140737352902464) (5)> isReady:353 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.131 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.131 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> MQTTPacket_suback:296 - -MQTT_LOG: 20240520 163717.131 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 297 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163717.131 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555599130 - - -MQTT_LOG: 20240520 163717.131 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 326 ptr 0x555555597c30 - - -MQTT_LOG: 20240520 163717.131 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598f80 - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< MQTTPacket_suback:348 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (2)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (2)> MQTTProtocol_handleSubacks:413 - -MQTT_LOG: 20240520 163717.131 5 RTI_0 <- SUBACK msgid: 1 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> MQTTPacket_freeSuback:697 - -MQTT_LOG: 20240520 163717.131 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 366, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163717.131 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 370, heap use now 2880 bytes - - -MQTT_LOG: 20240520 163717.131 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2848 bytes - - -MQTT_LOG: 20240520 163717.131 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 702, heap use now 2800 bytes - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< MQTTPacket_freeSuback:703 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (2)< MQTTProtocol_handleSubacks:417 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (1)< MQTTClient_subscribeMany5:2154 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (0)< MQTTClient_subscribe5:2184 (0) - -DEBUG: Subscribed, return code 0 - -LOG: Subscribing on topic Unidentified Federation_fed_0_to_RTI. -LOG: Finished subscribe -LOG: Publishing MSG_TYPE_MQTT_ACCEPT message on topic Unidentified Federation_RTI_to_fed_0. -MQTT_LOG: 20240520 163717.131 (140737352902464) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (2) - -MQTT_LOG: 20240520 163717.131 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7ffff0001500 - - -MQTT_LOG: 20240520 163717.131 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555597c30 - - -MQTT_LOG: 20240520 163717.131 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555599130 - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163717.131 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163717.131 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599f40 - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163717.131 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599eb0 - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163717.131 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599dc0 - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163717.131 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x55555559a020 - - -MQTT_LOG: 20240520 163717.131 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x55555559a0c0 - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.131 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x55555559a1a0 - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (8)< Socket_writev:773 (45) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.131 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163717.131 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163717.131 5 RTI_0 -> PUBLISH msgid: 2 qos: 2 retained: 0 rc 0 payload len(3):  - -MQTT_LOG: 20240520 163717.131 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163717.131 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.131 Return code 1 from poll - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.131 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.131 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163717.131 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a250 - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163717.131 5 RTI_0 <- PUBREC msgid: 2 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163717.131 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599ff0 - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.131 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a050 - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.131 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.131 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3072 bytes - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163717.131 5 RTI_0 -> PUBREL msgid: 2 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163717.131 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3056 bytes - - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.131 Return code 1 from poll - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.131 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.131 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.132 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.132 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.132 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.132 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.132 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163717.132 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a250 - - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.132 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163717.132 5 RTI_0 <- PUBCOMP msgid:2 - -MQTT_LOG: 20240520 163717.132 PUBCOMP received from client RTI_0 for message id 2 - removing publication - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163717.132 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3056 bytes - - -MQTT_LOG: 20240520 163717.132 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163717.132 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163717.132 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163717.132 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2912 bytes - - -MQTT_LOG: 20240520 163717.132 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163717.132 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2800 bytes - - -MQTT_LOG: 20240520 163717.132 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163717.132 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.132 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.132 Return code 1 from poll - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.132 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.176 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.176 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163717.176 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163717.176 (140737352902464) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163717.176 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559a250 - - -MQTT_LOG: 20240520 163717.176 (140737352902464) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163717.176 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a050 - - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163717.176 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163717.176 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163717.176 5 RTI_0 <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(1):  - -MQTT_LOG: 20240520 163717.176 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0001500 - - -MQTT_LOG: 20240520 163717.176 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599ef0 - - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163717.176 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599cf0 - - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163717.176 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a0f0 - - -MQTT_LOG: 20240520 163717.176 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555597700 - - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163717.176 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555597980 - - -MQTT_LOG: 20240520 163717.176 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.176 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599f90 - - -MQTT_LOG: 20240520 163717.176 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.176 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163717.176 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.176 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163717.176 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163717.176 5 RTI_0 -> PUBREC msgid: 1 (0) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163717.176 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.176 Return code 1 from poll - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.176 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.176 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.177 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.177 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163717.177 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163717.177 5 RTI_0 <- PUBREL msgid 1 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163717.177 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599e00 - - -MQTT_LOG: 20240520 163717.177 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 - - -MQTT_LOG: 20240520 163717.177 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599b70 - - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163717.177 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163717.177 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163717.177 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163717.177 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163717.177 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a050 - - -MQTT_LOG: 20240520 163717.177 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.177 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a020 - - -MQTT_LOG: 20240520 163717.177 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.177 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163717.177 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.177 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163717.177 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163717.177 5 RTI_0 -> PUBCOMP msgid 1 (0) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163717.177 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163717.177 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.177 Return code 0 from poll - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.177 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.232 (140737352902464) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163717.232 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.232 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.232 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.232 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.232 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.232 (140737352902464) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163717.232 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) - -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163717.232 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163717.232 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.232 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.232 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.232 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.232 Return code 0 from poll - -MQTT_LOG: 20240520 163717.232 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.232 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.232 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.232 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.232 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.232 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (2)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163717.233 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163717.233 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2912 bytes - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163717.233 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2880 bytes - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163717.233 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163717.233 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -LOG: Receiving MSG_TYPE_MQTT_ACCEPT_ACK message on topic Unidentified Federation_fed_0_to_RTI. -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163717.233 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.233 Return code 1 from poll - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.233 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.233 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163717.233 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0001500 - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163717.233 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599130 - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163717.233 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a0c0 - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163717.233 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163717.233 5 RTI_0 <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(27):  - -MQTT_LOG: 20240520 163717.233 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163717.233 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599d70 - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163717.233 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598580 - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163717.233 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599b70 - - -MQTT_LOG: 20240520 163717.233 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555597d60 - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163717.233 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599a90 - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.233 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599f90 - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.233 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.233 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163717.233 5 RTI_0 -> PUBREC msgid: 2 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163717.233 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.233 Return code 1 from poll - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.233 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.233 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.233 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.234 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163717.234 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599f40 - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163717.234 5 RTI_0 <- PUBREL msgid 2 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163717.234 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559a130 - - -MQTT_LOG: 20240520 163717.234 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 - - -MQTT_LOG: 20240520 163717.234 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599e00 - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163717.234 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3200 bytes - - -MQTT_LOG: 20240520 163717.234 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3152 bytes - - -MQTT_LOG: 20240520 163717.234 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163717.234 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163717.234 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a0c0 - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.234 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a020 - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.234 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.234 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163717.234 5 RTI_0 -> PUBCOMP msgid 2 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163717.234 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163717.234 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2960 bytes - - -MQTT_LOG: 20240520 163717.234 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2928 bytes - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163717.234 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163717.234 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2848 bytes - - -MQTT_LOG: 20240520 163717.234 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI received federate ID: 0. -DEBUG: RTI received federation ID: Unidentified Federation. -DEBUG: RTI responding with MSG_TYPE_ACK to federate 0. -MQTT_LOG: 20240520 163717.234 (140737352902464) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (3) - -MQTT_LOG: 20240520 163717.234 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163717.234 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x55555559a020 - - -MQTT_LOG: 20240520 163717.234 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555599130 - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163717.234 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7ffff0001500 - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163717.234 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599d70 - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163717.234 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599e00 - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163717.234 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555597730 - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163717.234 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x55555559a050 - - -MQTT_LOG: 20240520 163717.234 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x555555599f90 - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.234 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x55555559a1a0 - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (8)< Socket_writev:773 (43) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.234 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163717.234 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163717.234 5 RTI_0 -> PUBLISH msgid: 3 qos: 2 retained: 0 rc 0 payload len(1): ÿ - -MQTT_LOG: 20240520 163717.234 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163717.234 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163717.234 (140737352902464) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.234 Return code 1 from poll - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.234 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.234 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.276 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.276 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163717.276 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163717.276 5 RTI_0 <- PUBREC msgid: 3 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163717.276 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599f90 - - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.276 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a1a0 - - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.276 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.276 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3072 bytes - - -MQTT_LOG: 20240520 163717.276 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163717.276 5 RTI_0 -> PUBREL msgid: 3 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163717.276 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3056 bytes - - -MQTT_LOG: 20240520 163717.276 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.276 Return code 1 from poll - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.276 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.276 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163717.276 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163717.276 5 RTI_0 <- PUBCOMP msgid:3 - -MQTT_LOG: 20240520 163717.276 PUBCOMP received from client RTI_0 for message id 3 - removing publication - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163717.276 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3056 bytes - - -MQTT_LOG: 20240520 163717.276 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163717.276 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163717.276 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163717.276 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2912 bytes - - -MQTT_LOG: 20240520 163717.276 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163717.276 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2800 bytes - - -MQTT_LOG: 20240520 163717.276 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.276 Return code 1 from poll - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163717.276 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.335 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.335 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163717.335 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0001500 - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163717.335 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163717.335 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a1a0 - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163717.335 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163717.335 5 RTI_0 <- PUBLISH msgid: 3 qos: 2 retained: 0 payload len(11):  - -MQTT_LOG: 20240520 163717.335 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163717.335 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559a250 - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163717.335 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599490 - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163717.335 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599cb0 - - -MQTT_LOG: 20240520 163717.335 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a050 - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163717.335 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a020 - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.335 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597700 - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.335 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.335 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163717.335 5 RTI_0 -> PUBREC msgid: 3 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163717.335 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) - -DEBUG: RTI sent MSG_TYPE_ACK to federate 0. -DEBUG: RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate 0. -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163717.335 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.335 Return code 1 from poll - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.335 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.335 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163717.335 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599ef0 - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163717.335 5 RTI_0 <- PUBREL msgid 3 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163717.335 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555986f0 - - -MQTT_LOG: 20240520 163717.335 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 - - -MQTT_LOG: 20240520 163717.335 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598f80 - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163717.335 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163717.335 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163717.335 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163717.335 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163717.335 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a1a0 - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.335 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599a90 - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.335 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.335 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163717.335 5 RTI_0 -> PUBCOMP msgid 3 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163717.335 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163717.335 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163717.335 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2912 bytes - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163717.335 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2880 bytes - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163717.335 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163717.335 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes - - -MQTT_LOG: 20240520 163717.335 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI got 0 upstreams and 1 downstreams from federate 0. -DEBUG: RTI received neighbor structure from federate 0. -DEBUG: RTI waiting for MSG_TYPE_UDP_PORT from federate 0. -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163717.335 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.335 Return code 1 from poll - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.335 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.335 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.435 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.435 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163717.435 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163717.435 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599130 - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163717.435 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599b40 - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163717.435 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163717.435 5 RTI_0 <- PUBLISH msgid: 4 qos: 2 retained: 0 payload len(3): þÿÿ - -MQTT_LOG: 20240520 163717.435 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0001500 - - -MQTT_LOG: 20240520 163717.435 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599f40 - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163717.435 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599400 - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163717.435 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598f80 - - -MQTT_LOG: 20240520 163717.435 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555597700 - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163717.435 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a020 - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.435 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.435 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.435 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163717.435 5 RTI_0 -> PUBREC msgid: 4 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163717.435 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.435 Return code 1 from poll - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.435 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.435 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163717.435 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599d70 - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163717.435 5 RTI_0 <- PUBREL msgid 4 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163717.435 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555597d60 - - -MQTT_LOG: 20240520 163717.435 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 - - -MQTT_LOG: 20240520 163717.435 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555986f0 - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163717.435 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163717.435 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163717.435 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163717.435 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163717.435 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599b40 - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.435 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599a90 - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.435 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.435 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163717.435 5 RTI_0 -> PUBCOMP msgid 4 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163717.435 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163717.435 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163717.435 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2912 bytes - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163717.435 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163717.435 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2880 bytes - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163717.435 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163717.435 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163717.435 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes - - -MQTT_LOG: 20240520 163717.435 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI got MSG_TYPE_UDP_PORT 65535 from federate 0. -DEBUG: All federates have connected to RTI. -RTI: All expected federates have connected. Starting execution. -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163717.435 (140737341548096) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163717.436 (140737341548096) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.436 (140737341548096) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.436 (140737341548096) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.436 (140737341548096) (3)< Socket_continueWrites:1453 (0) - -LOG: RECEIVING message from federateID -1 -MQTT_LOG: 20240520 163717.436 (140737333155392) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163717.436 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.436 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.436 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.436 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -RTI: Waiting for thread handling federate 0. -MQTT_LOG: 20240520 163717.436 Return code 1 from poll - -MQTT_LOG: 20240520 163717.436 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.436 (140737341548096) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.436 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.436 (140737341548096) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.436 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.436 (140737341548096) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.436 (140737341548096) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.436 (140737341548096) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.436 (140737341548096) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.436 (140737341548096) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.536 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.536 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163717.536 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7fffe8000c40 - - -MQTT_LOG: 20240520 163717.536 (140737341548096) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163717.536 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffe8000d60 - - -MQTT_LOG: 20240520 163717.536 (140737341548096) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163717.536 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffe8000e60 - - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163717.536 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163717.536 (140737341548096) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163717.536 5 RTI_0 <- PUBLISH msgid: 5 qos: 2 retained: 0 payload len(9): ‘K¯Ð­VÑ - -MQTT_LOG: 20240520 163717.536 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffe8000f60 - - -MQTT_LOG: 20240520 163717.536 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe8001020 - - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163717.536 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80010a0 - - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163717.536 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001190 - - -MQTT_LOG: 20240520 163717.536 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffe8001290 - - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163717.536 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8001370 - - -MQTT_LOG: 20240520 163717.536 (140737341548096) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.536 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001450 - - -MQTT_LOG: 20240520 163717.536 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.536 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163717.536 (140737341548096) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.536 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163717.536 (140737341548096) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163717.536 5 RTI_0 -> PUBREC msgid: 5 (0) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163717.536 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.536 (140737341548096) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.536 Return code 1 from poll - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.536 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163717.536 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163717.536 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec000d30 - - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163717.536 5 RTI_0 <- PUBREL msgid 5 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.536 (140737341548096) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163717.536 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffec000e30 - - -MQTT_LOG: 20240520 163717.536 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec000c60 - - -MQTT_LOG: 20240520 163717.536 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000fd0 - - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163717.536 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163717.536 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163717.536 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163717.536 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163717.536 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8000e60 - - -MQTT_LOG: 20240520 163717.536 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.536 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8000e30 - - -MQTT_LOG: 20240520 163717.536 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163717.536 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163717.536 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163717.536 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163717.536 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163717.536 5 RTI_0 -> PUBCOMP msgid 5 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163717.536 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163717.536 (140737333155392) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163717.536 Return code 1 from poll - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163717.536 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163717.536 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.582 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.582 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.582 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.582 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.582 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.582 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.582 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.582 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163719.582 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163719.582 (140737333155392) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163719.582 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7fffe8000f60 - - -MQTT_LOG: 20240520 163719.582 (140737333155392) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163719.582 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7fffec000d30 - - -MQTT_LOG: 20240520 163719.582 (140737333155392) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163719.582 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffe8000e30 - - -MQTT_LOG: 20240520 163719.582 (140737333155392) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.582 (140737333155392) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163719.582 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163719.582 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163719.582 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163719.582 5 RTI_0 <- PUBLISH msgid: 6 qos: 2 retained: 0 payload len(1):  - -MQTT_LOG: 20240520 163719.582 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffec001090 - - -MQTT_LOG: 20240520 163719.582 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe8000fd0 - - -MQTT_LOG: 20240520 163719.582 (140737333155392) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163719.582 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000d80 - - -MQTT_LOG: 20240520 163719.582 (140737333155392) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163719.582 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001170 - - -MQTT_LOG: 20240520 163719.582 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec001270 - - -MQTT_LOG: 20240520 163719.582 (140737333155392) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163719.582 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001350 - - -MQTT_LOG: 20240520 163719.582 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.582 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001430 - - -MQTT_LOG: 20240520 163719.582 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.582 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.582 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163719.583 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.583 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3312 bytes - - -MQTT_LOG: 20240520 163719.583 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3296 bytes - - -MQTT_LOG: 20240520 163719.583 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163719.583 5 RTI_0 -> PUBREC msgid: 6 (0) - -MQTT_LOG: 20240520 163719.583 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163719.583 (140737333155392) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163719.583 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163719.583 (140737333155392) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163719.583 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (3)> MQTTProtocol_keepalive:704 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (3)< MQTTProtocol_keepalive:781 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (4)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (4)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (4)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (4)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (4)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (4)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.583 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.583 Return code 1 from poll - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.583 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.583 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163719.583 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001500 - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163719.583 5 RTI_0 <- PUBREL msgid 6 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.583 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163719.583 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffe8001300 - - -MQTT_LOG: 20240520 163719.583 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffe8000b70 - - -MQTT_LOG: 20240520 163719.583 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80012c0 - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163719.583 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3376 bytes - - -MQTT_LOG: 20240520 163719.583 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3328 bytes - - -MQTT_LOG: 20240520 163719.583 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3296 bytes - - -MQTT_LOG: 20240520 163719.583 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3216 bytes - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe8000e30 - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001160 - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3216 bytes - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3200 bytes - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163719.583 5 RTI_0 -> PUBCOMP msgid 6 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163719.583 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163719.583 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163719.583 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163719.583 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 3072 bytes - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163719.583 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI: Received message type 2 from federate 0. -DEBUG: RTI received timestamp message with time: 1716248237535349649. -DEBUG: RTI received timestamp message with time: 1716248237535349649. fro federate 0 -MQTT_LOG: 20240520 163719.583 (140737341548096) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< MQTTProtocol_assignMsgId:104 (4) - -MQTT_LOG: 20240520 163719.583 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7fffec001090 - - -MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7fffe8000e30 - - -MQTT_LOG: 20240520 163719.583 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffe8000d60 - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163719.583 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7fffe8000c40 - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163719.583 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7fffe8000fd0 - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163719.583 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8000db0 - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163719.583 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8000cb0 - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7fffe8001210 - - -MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7fffe8001720 - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7fffe8001800 - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (8)< Socket_writev:773 (51) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3328 bytes - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3312 bytes - - -MQTT_LOG: 20240520 163719.583 5 RTI_0 -> PUBLISH msgid: 4 qos: 2 retained: 0 rc 0 payload len(9): ‘J ®VÑ - -MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3296 bytes - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163719.583 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163719.583 (140737341548096) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163719.583 (140737341548096) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.583 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.583 (140737349940800) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163719.583 (140737349940800) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163719.583 (140737349940800) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (2)< MQTTProtocol_assignMsgId:104 (4) - -MQTT_LOG: 20240520 163719.583 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7ffff0000c40 - - -MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7ffff0000c10 - - -MQTT_LOG: 20240520 163719.583 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7ffff0000d60 - - -MQTT_LOG: 20240520 163719.583 (140737349940800) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163719.583 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7ffff00018e0 - - -MQTT_LOG: 20240520 163719.583 (140737349940800) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163719.583 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0000f10 - - -MQTT_LOG: 20240520 163719.583 (140737349940800) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163719.583 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00012c0 - - -MQTT_LOG: 20240520 163719.583 (140737349940800) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163719.583 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00013a0 - - -MQTT_LOG: 20240520 163719.583 (140737349940800) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7ffff0000e60 - - -MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7ffff0001070 - - -MQTT_LOG: 20240520 163719.583 (140737349940800) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.583 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7ffff00015f0 - - -MQTT_LOG: 20240520 163719.583 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.583 (140737349940800) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163719.583 (140737349940800) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (8)< Socket_writev:773 (51) - -MQTT_LOG: 20240520 163719.583 (140737349940800) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.583 (140737349940800) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3584 bytes - - -MQTT_LOG: 20240520 163719.583 (140737349940800) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3568 bytes - - -MQTT_LOG: 20240520 163719.583 4 RTI_1 -> PUBLISH msgid: 4 qos: 2 retained: 0 rc 0 payload len(9): ‘J ®VÑ - -MQTT_LOG: 20240520 163719.583 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3552 bytes - - -MQTT_LOG: 20240520 163719.583 (140737349940800) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163719.583 (140737349940800) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163719.583 (140737349940800) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163719.583 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3536 bytes - - -MQTT_LOG: 20240520 163719.583 (140737349940800) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163719.583 (140737349940800) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163719.583 (140737349940800) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.583 (140737349940800) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.583 Return code 1 from poll - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.584 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.584 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163719.584 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff0000fd0 - - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163719.584 4 RTI_1 <- PUBREC msgid: 4 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163719.584 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001070 - - -MQTT_LOG: 20240520 163719.584 (140737349940800) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.584 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff00015f0 - - -MQTT_LOG: 20240520 163719.584 (140737349940800) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.584 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3536 bytes - - -MQTT_LOG: 20240520 163719.584 (140737349940800) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163719.584 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3520 bytes - - -MQTT_LOG: 20240520 163719.584 (140737349940800) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163719.584 4 RTI_1 -> PUBREL msgid: 4 (0) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163719.584 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3504 bytes - - -MQTT_LOG: 20240520 163719.584 (140737349940800) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.584 (140737349940800) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.584 (140737349940800) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.584 Return code 1 from poll - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.584 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.584 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163719.584 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001020 - - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163719.584 4 RTI_1 <- PUBCOMP msgid:4 - -MQTT_LOG: 20240520 163719.584 PUBCOMP received from client RTI_1 for message id 4 - removing publication - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163719.584 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3504 bytes - - -MQTT_LOG: 20240520 163719.584 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3488 bytes - - -MQTT_LOG: 20240520 163719.584 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3440 bytes - - -MQTT_LOG: 20240520 163719.584 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3392 bytes - - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163719.584 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3360 bytes - - -MQTT_LOG: 20240520 163719.584 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163719.584 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 3248 bytes - - -MQTT_LOG: 20240520 163719.584 (140737341548096) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.584 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.584 Return code 1 from poll - -MQTT_LOG: 20240520 163719.584 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.584 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.585 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.585 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.585 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.585 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.585 (140737333155392) (2)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163719.585 (140737333155392) (2)> MQTTTime_sleep:29 - -MQTT_LOG: 20240520 163719.585 (140737349940800) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.585 (140737349940800) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.585 Return code 1 from poll - -MQTT_LOG: 20240520 163719.585 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.585 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.585 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.585 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.585 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.585 (140737349940800) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.585 (140737349940800) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163719.585 (140737349940800) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.585 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.585 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.585 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.628 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.628 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163719.628 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff0000fd0 - - -MQTT_LOG: 20240520 163719.628 (140737349940800) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163719.628 5 RTI_0 <- PUBREC msgid: 4 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163719.628 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001290 - - -MQTT_LOG: 20240520 163719.628 (140737349940800) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.628 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001160 - - -MQTT_LOG: 20240520 163719.628 (140737349940800) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.628 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163719.628 (140737349940800) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163719.628 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3264 bytes - - -MQTT_LOG: 20240520 163719.628 (140737349940800) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163719.628 5 RTI_0 -> PUBREL msgid: 4 (0) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163719.628 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3248 bytes - - -MQTT_LOG: 20240520 163719.628 (140737349940800) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.628 (140737349940800) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.628 (140737349940800) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.628 Return code 1 from poll - -MQTT_LOG: 20240520 163719.628 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.628 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.628 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.628 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.628 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.628 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.628 (140737341548096) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163719.628 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.628 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.628 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.628 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.628 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.628 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.628 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163719.628 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.628 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.629 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163719.629 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001020 - - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163719.629 5 RTI_0 <- PUBCOMP msgid:4 - -MQTT_LOG: 20240520 163719.629 PUBCOMP received from client RTI_0 for message id 4 - removing publication - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163719.629 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3248 bytes - - -MQTT_LOG: 20240520 163719.629 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3232 bytes - - -MQTT_LOG: 20240520 163719.629 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163719.629 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163719.629 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163719.629 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163719.629 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163719.629 (140737341548096) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.629 Return code 1 from poll - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.629 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.629 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163719.629 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000c40 - - -MQTT_LOG: 20240520 163719.629 (140737349940800) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163719.629 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7ffff0000fd0 - - -MQTT_LOG: 20240520 163719.629 (140737349940800) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163719.629 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0001160 - - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163719.629 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163719.629 (140737349940800) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163719.629 4 RTI_1 <- PUBLISH msgid: 6 qos: 2 retained: 0 payload len(13): ‘J ®VÑ - -MQTT_LOG: 20240520 163719.629 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff00019a0 - - -MQTT_LOG: 20240520 163719.629 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001a60 - - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163719.629 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00016e0 - - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163719.629 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00013e0 - - -MQTT_LOG: 20240520 163719.629 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7ffff0000e30 - - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163719.629 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001210 - - -MQTT_LOG: 20240520 163719.629 (140737349940800) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.629 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001750 - - -MQTT_LOG: 20240520 163719.629 (140737349940800) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.629 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3312 bytes - - -MQTT_LOG: 20240520 163719.629 (140737349940800) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163719.629 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3296 bytes - - -MQTT_LOG: 20240520 163719.629 (140737349940800) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163719.629 4 RTI_1 -> PUBREC msgid: 6 (0) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163719.629 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.629 Return code 1 from poll - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.629 (140737349940800) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.629 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.629 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.629 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.630 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163719.630 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8000d60 - - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (3)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163719.630 4 RTI_1 <- PUBREL msgid 6 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163719.630 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffe80016e0 - - -MQTT_LOG: 20240520 163719.630 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec000c60 - - -MQTT_LOG: 20240520 163719.630 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001630 - - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163719.630 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3376 bytes - - -MQTT_LOG: 20240520 163719.630 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3328 bytes - - -MQTT_LOG: 20240520 163719.630 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3296 bytes - - -MQTT_LOG: 20240520 163719.630 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3216 bytes - - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163719.630 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001160 - - -MQTT_LOG: 20240520 163719.630 (140737341548096) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.630 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001070 - - -MQTT_LOG: 20240520 163719.630 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.630 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3216 bytes - - -MQTT_LOG: 20240520 163719.630 (140737341548096) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163719.630 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3200 bytes - - -MQTT_LOG: 20240520 163719.630 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163719.630 4 RTI_1 -> PUBCOMP msgid 6 (0) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163719.630 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163719.630 (140737341548096) (3)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.630 Return code 1 from poll - -MQTT_LOG: 20240520 163719.630 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.630 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.630 (140737349940800) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163719.630 (140737349940800) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.630 (140737349940800) (6)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163719.630 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0001190 - - -MQTT_LOG: 20240520 163719.630 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7ffff0001950 - - -MQTT_LOG: 20240520 163719.630 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7ffff0001b00 - - -MQTT_LOG: 20240520 163719.630 (140737349940800) (6)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (5)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163719.630 (140737349940800) (4)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163719.630 (140737349940800) (3)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163719.630 (140737349940800) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.630 (140737349940800) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.630 (140737349940800) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.630 (140737349940800) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.630 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.630 Return code 0 from poll - -MQTT_LOG: 20240520 163719.684 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.684 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.684 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.684 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.684 (140737349940800) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.684 (140737349940800) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.684 (140737349940800) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163719.684 (140737349940800) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.684 (140737349940800) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.684 (140737349940800) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.684 (140737349940800) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.684 (140737349940800) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.684 (140737349940800) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163719.684 (140737349940800) (0)< MQTTClient_waitForCompletion:2903 (0) - -LOG: RTI sent start time 1716248238535349649 to federate 1. -LOG: RECEIVING message from federateID 1 -MQTT_LOG: 20240520 163719.684 (140737349940800) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163719.684 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.684 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.684 Return code 0 from poll - -MQTT_LOG: 20240520 163719.684 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.684 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (0)< MQTTClient_waitForCompletion:2903 (0) - -LOG: RTI sent start time 1716248238535349649 to federate 0. -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163719.685 (140737341548096) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.685 (140737333155392) (2)< MQTTTime_sleep:35 - -MQTT_LOG: 20240520 163719.685 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.685 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.685 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.685 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.685 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.685 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.685 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.685 Return code 0 from poll - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (2)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163719.685 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4224 bytes - - -MQTT_LOG: 20240520 163719.685 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4192 bytes - - -MQTT_LOG: 20240520 163719.685 (140737341548096) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163719.685 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 4160 bytes - - -MQTT_LOG: 20240520 163719.685 (140737341548096) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163719.685 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 4112 bytes - - -MQTT_LOG: 20240520 163719.685 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 4096 bytes - - -MQTT_LOG: 20240520 163719.685 (140737341548096) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI: Received message type 25 from federate 0. -ERROR: RTI: Federate 0 reports an error and has exited. -MQTT_LOG: 20240520 163719.685 (140737341548096) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (2)< MQTTProtocol_assignMsgId:104 (5) - -MQTT_LOG: 20240520 163719.685 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7ffff00019a0 - - -MQTT_LOG: 20240520 163719.685 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7ffff0001070 - - -MQTT_LOG: 20240520 163719.685 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7fffe8001240 - - -MQTT_LOG: 20240520 163719.685 (140737341548096) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163719.685 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7fffe8000c40 - - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163719.685 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001570 - - -MQTT_LOG: 20240520 163719.685 (140737341548096) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163719.685 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001300 - - -MQTT_LOG: 20240520 163719.685 (140737341548096) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163719.685 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80012c0 - - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163719.685 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7fffe8001160 - - -MQTT_LOG: 20240520 163719.685 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7fffe8000c10 - - -MQTT_LOG: 20240520 163719.685 (140737341548096) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.685 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7fffe8001450 - - -MQTT_LOG: 20240520 163719.685 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (8)< Socket_writev:773 (43) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.685 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 4416 bytes - - -MQTT_LOG: 20240520 163719.685 (140737341548096) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163719.685 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 4400 bytes - - -MQTT_LOG: 20240520 163719.685 5 RTI_0 -> PUBLISH msgid: 5 qos: 2 retained: 0 rc 0 payload len(1): X - -MQTT_LOG: 20240520 163719.685 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 4384 bytes - - -MQTT_LOG: 20240520 163719.685 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.685 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163719.685 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 4368 bytes - - -MQTT_LOG: 20240520 163719.685 (140737341548096) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163719.685 (140737341548096) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.685 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.685 Return code 1 from poll - -MQTT_LOG: 20240520 163719.685 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.685 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.685 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.685 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.685 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.685 (140737349940800) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.685 (140737349940800) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163719.685 (140737349940800) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.685 (140737349940800) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.685 (140737349940800) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.686 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.686 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (3)< WebSocket_getdata:751 (-268428536) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163719.686 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff0001a60 - - -MQTT_LOG: 20240520 163719.686 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.686 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (2)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163719.686 5 RTI_0 <- PUBREC msgid: 5 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (3)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163719.686 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001800 - - -MQTT_LOG: 20240520 163719.686 (140737349940800) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.686 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001160 - - -MQTT_LOG: 20240520 163719.686 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.686 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3376 bytes - - -MQTT_LOG: 20240520 163719.686 (140737349940800) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163719.686 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3360 bytes - - -MQTT_LOG: 20240520 163719.686 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163719.686 5 RTI_0 -> PUBREL msgid: 5 (0) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (3)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163719.686 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 3344 bytes - - -MQTT_LOG: 20240520 163719.686 (140737349940800) (2)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163719.686 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3296 bytes - - -MQTT_LOG: 20240520 163719.686 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3264 bytes - - -MQTT_LOG: 20240520 163719.686 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163719.686 (140737349940800) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163719.686 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 3232 bytes - - -MQTT_LOG: 20240520 163719.686 (140737349940800) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163719.686 (140737349940800) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163719.686 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163719.686 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 3168 bytes - - -MQTT_LOG: 20240520 163719.686 (140737349940800) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 1 -DEBUG: RTI: Received message type 6 from federate 1. -MQTT_LOG: 20240520 163719.686 Return code 1 from poll - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.686 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.686 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< WebSocket_getdata:751 (-268428536) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163719.686 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001220 - - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (2)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163719.686 5 RTI_0 <- PUBCOMP msgid:5 - -MQTT_LOG: 20240520 163719.686 PUBCOMP received from client RTI_0 for message id 5 - removing publication - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163719.686 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 3152 bytes - - -MQTT_LOG: 20240520 163719.686 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163719.686 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163719.686 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3040 bytes - - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163719.686 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163719.686 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2928 bytes - - -MQTT_LOG: 20240520 163719.686 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 2896 bytes - - -MQTT_LOG: 20240520 163719.686 (140737333155392) (2)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.686 Return code 1 from poll - -MQTT_LOG: 20240520 163719.686 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.686 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.686 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.686 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.686 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.686 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.686 (140737341548096) (3)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163719.686 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.686 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.686 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.686 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.686 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.686 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.686 (140737341548096) (6)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163719.686 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80013e0 - - -MQTT_LOG: 20240520 163719.687 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7ffff0000d60 - - -MQTT_LOG: 20240520 163719.687 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffe80018f0 - - -MQTT_LOG: 20240520 163719.687 (140737341548096) (6)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163719.687 (140737341548096) (5)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163719.687 (140737341548096) (4)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163719.687 (140737341548096) (3)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163719.687 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.687 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.687 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.687 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.687 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.687 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.687 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.687 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.687 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.687 Return code 0 from poll - -MQTT_LOG: 20240520 163719.687 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.687 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.687 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.687 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (0)< MQTTClient_waitForCompletion:2903 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (0)> MQTTClient_disconnect1:1929 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> MQTTClient_closeSession:1095 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> MQTTPacket_send_disconnect:516 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.786 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8001450 - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (4)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (5)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (6)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (6)< Socket_writev:773 (2) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (5)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (4)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3952 bytes - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163719.786 5 RTI_0 -> DISCONNECT (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTPacket_send_disconnect:543 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> WebSocket_close:524 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< WebSocket_close:572 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> Socket_close:967 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> Socket_close_only:893 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< Socket_close_only:907 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> Socket_abortWrite:1355 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< Socket_abortWrite:1376 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> SocketBuffer_cleanup:153 - -MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 157, heap use now 3936 bytes - - -MQTT_LOG: 20240520 163719.786 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3920 bytes - - -MQTT_LOG: 20240520 163719.786 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3872 bytes - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< SocketBuffer_cleanup:165 - -MQTT_LOG: 20240520 163719.786 Removed socket 5 - -MQTT_LOG: 20240520 163719.786 Removed socket 5 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< Socket_close:1037 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> MQTTClient_cleanSession:1131 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTPersistence_clear:170 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTPersistence_clear:174 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTClient_emptyMessageQueue:557 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTClient_emptyMessageQueue:572 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTClient_cleanSession:1139 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTClient_closeSession:1123 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> MQTTClient_stop:1028 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTClient_stop:1063 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (0)< MQTTClient_disconnect1:1963 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (0)> MQTTClient_destroy:580 - -MQTT_LOG: 20240520 163719.786 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x7ffff0001b00 - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> MQTTPersistence_close:141 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTPersistence_close:157 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> MQTTClient_emptyMessageQueue:557 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTClient_emptyMessageQueue:572 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> MQTTProtocol_freeClient:934 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> MQTTProtocol_freeMessageList:1020 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163719.786 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3824 bytes - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTProtocol_freeMessageList:1023 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> MQTTProtocol_freeMessageList:1020 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163719.786 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3776 bytes - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTProtocol_freeMessageList:1023 - -MQTT_LOG: 20240520 163719.786 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3728 bytes - - -MQTT_LOG: 20240520 163719.786 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 3680 bytes - - -MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 940, heap use now 3632 bytes - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTProtocol_freeClient:989 - -MQTT_LOG: 20240520 163719.786 Freeing 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3616 bytes - - -MQTT_LOG: 20240520 163719.786 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3312 bytes - - -MQTT_LOG: 20240520 163719.786 Removed client RTI_0 from bstate->clients, socket 0 - -MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 600, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 603, heap use now 3264 bytes - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> Thread_destroy_sem:371 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< Thread_destroy_sem:380 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> Thread_destroy_sem:371 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< Thread_destroy_sem:380 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> Thread_destroy_sem:371 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< Thread_destroy_sem:380 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> Thread_destroy_sem:371 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< Thread_destroy_sem:380 (0) - -MQTT_LOG: 20240520 163719.786 Freeing 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3248 bytes - - -MQTT_LOG: 20240520 163719.786 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (0)< MQTTClient_destroy:617 - -LOG: RTI: Minimum upstream LTC for federate/enclave 1 is (7507123798319426158, 4294967295)(adjusted by after delay). -MQTT_LOG: 20240520 163719.786 (140737341548096) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTProtocol_assignMsgId:104 (5) - -MQTT_LOG: 20240520 163719.786 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x7ffff00019a0 - - -MQTT_LOG: 20240520 163719.786 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x7ffff0001750 - - -MQTT_LOG: 20240520 163719.786 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x5555555990e0 - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163719.786 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x7ffff00018e0 - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163719.786 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555981d0 - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163719.786 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80014c0 - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163719.786 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001190 - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163719.786 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x7fffe8000ed0 - - -MQTT_LOG: 20240520 163719.786 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x7fffe8000d20 - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.786 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x7fffe80017c0 - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.786 (140737341548096) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.786 Return code 1 from poll - -MQTT_LOG: 20240520 163719.786 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.786 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.786 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.786 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.786 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.786 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.786 (140737333155392) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (8)< Socket_writev:773 (55) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 3440 bytes - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 3424 bytes - - -MQTT_LOG: 20240520 163719.786 4 RTI_1 -> PUBLISH msgid: 5 qos: 2 retained: 0 rc 0 payload len(13): ÿÿÿÿÿÿÿÿÿÿÿ - -MQTT_LOG: 20240520 163719.786 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 3408 bytes - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163719.786 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 3392 bytes - - -MQTT_LOG: 20240520 163719.786 (140737341548096) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163719.786 (140737341548096) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163719.786 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.786 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.786 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.787 Return code 1 from poll - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.787 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.787 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163719.787 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163719.787 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163719.787 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163719.787 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7ffff0000d60 - - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163719.787 4 RTI_1 <- PUBREC msgid: 5 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163719.787 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffe80016f0 - - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.787 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffe8000cb0 - - -MQTT_LOG: 20240520 163719.787 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.787 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163719.787 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163719.787 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163719.787 4 RTI_1 -> PUBREL msgid: 5 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163719.787 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.787 Return code 1 from poll - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.787 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.787 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163719.787 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec001220 - - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (2)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163719.787 4 RTI_1 <- PUBCOMP msgid:5 - -MQTT_LOG: 20240520 163719.787 PUBCOMP received from client RTI_1 for message id 5 - removing publication - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163719.787 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163719.787 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163719.787 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163719.787 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2128 bytes - - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163719.787 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163719.787 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163719.787 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 1984 bytes - - -MQTT_LOG: 20240520 163719.787 (140737333155392) (2)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.787 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.787 Return code 1 from poll - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163719.787 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe8001590 - - -MQTT_LOG: 20240520 163719.787 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7ffff0000d60 - - -MQTT_LOG: 20240520 163719.787 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffe80018f0 - - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.787 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (6)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (5)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.787 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.787 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.832 Return code 1 from poll - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.832 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.832 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163719.832 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163719.832 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163719.832 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1968 bytes - - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163719.832 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff00018e0 - - -MQTT_LOG: 20240520 163719.832 (140737333155392) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163719.832 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555598f30 - - -MQTT_LOG: 20240520 163719.832 (140737333155392) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163719.832 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7fffec001350 - - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163719.832 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163719.832 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163719.832 4 RTI_1 <- PUBLISH msgid: 7 qos: 2 retained: 0 payload len(13): ‘J ®VÑ - -MQTT_LOG: 20240520 163719.832 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7fffe8000c40 - - -MQTT_LOG: 20240520 163719.832 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0000f10 - - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163719.832 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec000f20 - - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163719.832 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec001380 - - -MQTT_LOG: 20240520 163719.832 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7fffec000d00 - - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163719.832 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec000eb0 - - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.832 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7fffec001140 - - -MQTT_LOG: 20240520 163719.832 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.832 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163719.832 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163719.832 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163719.832 4 RTI_1 -> PUBREC msgid: 7 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163719.832 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163719.832 Return code 1 from poll - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.832 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163719.832 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163719.832 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffe8001500 - - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (3)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163719.832 4 RTI_1 <- PUBREL msgid 7 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163719.832 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffe80014c0 - - -MQTT_LOG: 20240520 163719.832 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffe8000b70 - - -MQTT_LOG: 20240520 163719.832 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffe80017f0 - - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163719.832 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163719.832 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163719.832 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163719.832 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163719.832 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7fffec001350 - - -MQTT_LOG: 20240520 163719.832 (140737341548096) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.832 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001370 - - -MQTT_LOG: 20240520 163719.832 (140737341548096) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163719.832 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163719.832 (140737341548096) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163719.832 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163719.832 (140737341548096) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163719.832 4 RTI_1 -> PUBCOMP msgid 7 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163719.832 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163719.832 (140737341548096) (3)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.832 Return code 1 from poll - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)> SocketBuffer_interrupted:262 - -MQTT_LOG: 20240520 163719.832 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec0012a0 - - -MQTT_LOG: 20240520 163719.832 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 83 ptr 0x7ffff0001a10 - - -MQTT_LOG: 20240520 163719.832 Allocating 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 87 ptr 0x7fffe80018f0 - - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (5)< SocketBuffer_interrupted:278 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (4)< Socket_getch:641 (-22) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< WebSocket_getch:628 (-22) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (2)< MQTTPacket_Factory:179 (-22) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.832 (140737333155392) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.832 (140737333155392) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.832 Return code 0 from poll - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> isReady:353 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.832 (140737341548096) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163719.832 (140737341548096) (0)< MQTTClient_waitForCompletion:2903 (0) - -LOG: RTI sent to federate 1 the tag advance grant (TAG) (7507123798319426158, 4294967295). -LOG: RTI received from federate 1 the Next Event Tag (NET) (0, 0) -RTI: Federate 0 thread exited. -RTI: Waiting for thread handling federate 1. -DEBUG: RTI: Updated the recorded next event tag for federate/enclave 1 to (0, 0) -LOG: RTI: Minimum upstream LTC for federate/enclave 1 is (7507123798319426158, 4294967295)(adjusted by after delay). -DEBUG: ++++ Node 1 is in ZDC: 0 -DEBUG: ++++ Node 0 is in ZDC: 0 -DEBUG: RTI: Strict EIMT of fed/encl 1 at fed/encl 0 has tag (7507123798319426158, 4294967295). -LOG: RTI: Earliest next event upstream of node 1 has tag (7507123798319426158, 4294967295). -LOG: RECEIVING message from federateID 1 -MQTT_LOG: 20240520 163719.832 (140737349940800) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.888 Return code 0 from poll - -MQTT_LOG: 20240520 163719.888 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.888 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.888 (140737349940800) (2)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163719.888 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163719.888 (140737349940800) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163719.888 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3216 bytes - - -MQTT_LOG: 20240520 163719.888 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163719.888 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163719.888 (140737349940800) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163719.888 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 3152 bytes - - -MQTT_LOG: 20240520 163719.888 (140737349940800) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163719.888 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163719.888 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163719.888 (140737349940800) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 1 -DEBUG: RTI: Received message type 9 from federate 1. -LOG: RTI received from federate/enclave 1 the latest tag complete (LTC) (0, 0). -LOG: RECEIVING message from federateID 1 -MQTT_LOG: 20240520 163719.888 (140737349940800) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163719.888 Return code 1 from poll - -MQTT_LOG: 20240520 163719.888 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163719.888 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163719.888 (140737349940800) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163719.888 (140737349940800) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163720.060 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163720.060 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163720.060 Freeing 1008 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 124, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163720.060 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/SocketBuffer.c line 125, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163720.060 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1968 bytes - - -MQTT_LOG: 20240520 163720.060 (140737349940800) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163720.060 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000c40 - - -MQTT_LOG: 20240520 163720.060 (140737349940800) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163720.060 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7ffff0001a10 - - -MQTT_LOG: 20240520 163720.060 (140737349940800) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163720.060 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0001800 - - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163720.060 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163720.060 (140737349940800) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163720.060 4 RTI_1 <- PUBLISH msgid: 8 qos: 2 retained: 0 payload len(1):  - -MQTT_LOG: 20240520 163720.060 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff00019a0 - - -MQTT_LOG: 20240520 163720.060 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001ab0 - - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163720.060 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0001780 - - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163720.060 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00011d0 - - -MQTT_LOG: 20240520 163720.060 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7ffff0001070 - - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163720.060 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001450 - - -MQTT_LOG: 20240520 163720.060 (140737349940800) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163720.060 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001210 - - -MQTT_LOG: 20240520 163720.060 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163720.060 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163720.060 (140737349940800) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163720.060 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163720.060 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163720.060 4 RTI_1 -> PUBREC msgid: 8 (0) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163720.060 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163720.060 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163720.060 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163720.060 Return code 1 from poll - -MQTT_LOG: 20240520 163720.060 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163720.060 (140737333155392) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163720.060 (140737333155392) (3)> isReady:353 - -MQTT_LOG: 20240520 163720.060 (140737333155392) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163720.060 (140737333155392) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163720.060 (140737333155392) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163720.060 (140737333155392) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163720.060 (140737333155392) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163720.060 (140737333155392) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163720.060 (140737333155392) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163720.060 (140737333155392) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163720.060 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163720.060 (140737333155392) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163720.061 (140737333155392) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163720.061 (140737333155392) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163720.061 (140737333155392) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163720.061 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163720.061 (140737333155392) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163720.061 (140737333155392) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163720.061 (140737333155392) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163720.061 (140737333155392) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163720.061 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x7fffec000d30 - - -MQTT_LOG: 20240520 163720.061 (140737333155392) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163720.061 (140737333155392) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163720.061 4 RTI_1 <- PUBREL msgid 8 - -MQTT_LOG: 20240520 163720.061 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163720.061 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163720.061 (140737333155392) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163720.061 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x7fffec000d80 - - -MQTT_LOG: 20240520 163720.061 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x7fffec0014e0 - - -MQTT_LOG: 20240520 163720.061 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7fffec0012e0 - - -MQTT_LOG: 20240520 163720.061 (140737333155392) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163720.061 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163720.061 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163720.061 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163720.061 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163720.061 (140737333155392) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163720.061 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001800 - - -MQTT_LOG: 20240520 163720.061 (140737333155392) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163720.061 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0000c10 - - -MQTT_LOG: 20240520 163720.061 (140737333155392) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163720.061 (140737333155392) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163720.061 (140737333155392) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163720.061 (140737333155392) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163720.061 (140737333155392) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163720.061 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163720.061 (140737333155392) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163720.061 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163720.061 (140737333155392) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163720.061 4 RTI_1 -> PUBCOMP msgid 8 (0) - -MQTT_LOG: 20240520 163720.061 (140737333155392) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163720.061 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163720.061 (140737333155392) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163720.061 (140737333155392) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20RTI: Number of federates: 2 -RTI: Clock sync: init -Starting RTI for 2 federates in federation ID Unidentified Federation. ----- System clock resolution: 1 nsec -LOG: Subscribing on topic Unidentified Federation_RTI. -LOG: PHYSICAL_TIME ON SUBSCRIBING TOPIC: 1716248246739416840 -RTI: Listening for federates. -LOG: RECEIVING message from federateID -1 -MQTT_LOG: 20240520 163726.739 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163726.739 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163726.739 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163726.739 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163726.739 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163726.739 Return code 1 from poll - -MQTT_LOG: 20240520 163726.739 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163726.739 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163726.739 (140737352902464) (2)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163726.739 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163726.739 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163726.739 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.428 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.428 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163728.428 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163728.428 (140737352902464) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163728.428 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555597e10 - - -MQTT_LOG: 20240520 163728.428 (140737352902464) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163728.428 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555597cf0 - - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163728.428 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 1280 bytes - - -MQTT_LOG: 20240520 163728.428 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163728.428 3 RTI_RTI <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163728.428 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163728.428 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598300 - - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163728.428 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555597d20 - - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163728.428 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598390 - - -MQTT_LOG: 20240520 163728.428 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x5555555960e0 - - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.428 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598510 - - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.428 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x5555555985f0 - - -MQTT_LOG: 20240520 163728.428 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.428 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1504 bytes - - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.428 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 1488 bytes - - -MQTT_LOG: 20240520 163728.428 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.428 3 RTI_RTI -> PUBREC msgid: 1 (0) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163728.428 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 1472 bytes - - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.428 Return code 1 from poll - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (2)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.428 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.428 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.428 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.429 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163728.429 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555986a0 - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163728.429 3 RTI_RTI <- PUBREL msgid 1 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163728.429 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555984a0 - - -MQTT_LOG: 20240520 163728.429 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163728.429 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598730 - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163728.429 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1568 bytes - - -MQTT_LOG: 20240520 163728.429 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1520 bytes - - -MQTT_LOG: 20240520 163728.429 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1488 bytes - - -MQTT_LOG: 20240520 163728.429 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1408 bytes - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.429 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555597cf0 - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.429 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555597e90 - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.429 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1408 bytes - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.429 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 1392 bytes - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.429 3 RTI_RTI -> PUBCOMP msgid 1 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163728.429 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 1376 bytes - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163728.429 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1328 bytes - - -MQTT_LOG: 20240520 163728.429 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1296 bytes - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163728.429 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 1264 bytes - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163728.429 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 1232 bytes - - -MQTT_LOG: 20240520 163728.429 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 1216 bytes - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID -1 -LOG: Received MSG_TYPE_MQTT_JOIN message from federate 0. -DEBUG: Setting up MQTTServer_id for federate 0. -DEBUG: Setup MQTTServer_id for federate 0 as RTI_0. -DEBUG: Creating MQTTClient for federate 0. -MQTT_LOG: 20240520 163728.429 (140737352902464) (0)> MQTTClient_createWithOptions:375 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (2)> UTF8_validate:134 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (2)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163728.429 Allocating 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 438 ptr 0x555555598850 - - -MQTT_LOG: 20240520 163728.429 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555597cf0 - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163728.429 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555597c60 - - -MQTT_LOG: 20240520 163728.429 Allocating 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 489 ptr 0x555555598910 - - -MQTT_LOG: 20240520 163728.429 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555986a0 - - -MQTT_LOG: 20240520 163728.429 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555597ca0 - - -MQTT_LOG: 20240520 163728.429 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598300 - - -MQTT_LOG: 20240520 163728.429 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555977e0 - - -MQTT_LOG: 20240520 163728.429 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555597f80 - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTPersistence_create:56 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTPersistence_create:104 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTPersistence_initialize:119 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTPersistence_initialize:127 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTPersistence_restoreMessageQueue:877 - -MQTT_LOG: 20240520 163728.429 0 queued messages restored for client RTI_0 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)< MQTTPersistence_restoreMessageQueue:918 (0) - -MQTT_LOG: 20240520 163728.429 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598540 - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (0)< MQTTClient_createWithOptions:522 (0) - -DEBUG: Connecting MQTTClient for federate 0. -MQTT_LOG: 20240520 163728.429 (140737352902464) (0)> MQTTClient_connectAll:1745 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (1)> MQTTClient_connectURI:1504 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (2)> MQTTClient_connectURIVersion:1209 - -MQTT_LOG: 20240520 163728.429 Connecting to serverURI 127.0.0.1:1883 with MQTT version 4 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> MQTTProtocol_connect:227 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (4)> MQTTProtocol_addressPort:63 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (4)< MQTTProtocol_addressPort:101 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (4)> Socket_new:1072 - -MQTT_LOG: 20240520 163728.429 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1082 ptr 0x555555598ba0 - - -MQTT_LOG: 20240520 163728.429 New socket 4 for 127.0.0.1:1883, port 1883 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (5)> Socket_addSocket:272 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> Socket_setnonblocking:95 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< Socket_setnonblocking:100 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (5)< Socket_addSocket:314 (0) - -MQTT_LOG: 20240520 163728.429 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1200 ptr 0x555555598c50 - - -MQTT_LOG: 20240520 163728.429 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d30 - - -MQTT_LOG: 20240520 163728.429 Connect pending - -MQTT_LOG: 20240520 163728.429 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1233, heap use now 1968 bytes - - -MQTT_LOG: 20240520 163728.429 (140737352902464) (4)< Socket_new:1235 (115) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)< MQTTProtocol_connect:355 (115) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (3)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.429 Return code 0 from poll - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.429 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163728.429 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163728.429 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1936 bytes - - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (3)> MQTTPacket_send_connect:55 - -MQTT_LOG: 20240520 163728.530 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 73 ptr 0x555555598cf0 - - -MQTT_LOG: 20240520 163728.530 (140737352902464) (4)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.530 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598c20 - - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (7)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (7)< Socket_writev:773 (19) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.530 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163728.530 (140737352902464) (4)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.530 4 RTI_0 -> CONNECT version 4 clean: 1 (0) - -MQTT_LOG: 20240520 163728.530 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 127, heap use now 1936 bytes - - -MQTT_LOG: 20240520 163728.530 (140737352902464) (3)< MQTTPacket_send_connect:129 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (3)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.530 Return code 1 from poll - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.530 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.530 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> MQTTPacket_connack:148 - -MQTT_LOG: 20240520 163728.530 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 149 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< MQTTPacket_connack:176 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (3)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163728.530 4 RTI_0 <- CONNACK rc: 0 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (3)> MQTTClient_cleanSession:1131 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (4)> MQTTPersistence_clear:170 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (4)< MQTTPersistence_clear:174 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (4)> MQTTProtocol_emptyMessageList:1001 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (4)< MQTTProtocol_emptyMessageList:1010 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (4)> MQTTClient_emptyMessageQueue:557 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (4)< MQTTClient_emptyMessageQueue:572 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (3)< MQTTClient_cleanSession:1139 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (3)> MQTTPacket_freeConnack:187 - -MQTT_LOG: 20240520 163728.530 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 190, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163728.530 (140737352902464) (3)< MQTTPacket_freeConnack:191 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (2)< MQTTClient_connectURIVersion:1477 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (1)< MQTTClient_connectURI:1702 (0) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (0)< MQTTClient_connectAll:1910 (0) - -DEBUG: Connected, return code 0 - -DEBUG: Creating topic for federate 0. -LOG: Starting subscribe -MQTT_LOG: 20240520 163728.530 (140737352902464) (0)> MQTTClient_subscribe5:2180 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (1)> MQTTClient_subscribeMany5:2034 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163728.530 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163728.530 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (1) - -MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163728.531 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 - - -MQTT_LOG: 20240520 163728.531 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e40 - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTProtocol_subscribe:394 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTPacket_send_subscribe:235 - -MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 247 ptr 0x555555598f30 - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599030 - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< Socket_writev:773 (43) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.531 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2128 bytes - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.531 4 RTI_0 -> SUBSCRIBE msgid: 1 (0) - -MQTT_LOG: 20240520 163728.531 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 275, heap use now 2112 bytes - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< MQTTPacket_send_subscribe:277 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< MQTTProtocol_subscribe:396 (0) - -MQTT_LOG: 20240520 163728.531 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163728.531 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 2032 bytes - - -MQTT_LOG: 20240520 163728.531 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 398, heap use now 1984 bytes - - -MQTT_LOG: 20240520 163728.531 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 400, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.531 Return code 1 from poll - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> isReady:353 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> isReady:353 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.531 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.531 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> MQTTPacket_suback:296 - -MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 297 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacketOut.c line 326 ptr 0x555555598ba0 - - -MQTT_LOG: 20240520 163728.531 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598cf0 - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< MQTTPacket_suback:348 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< MQTTClient_waitfor:2764 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTProtocol_handleSubacks:413 - -MQTT_LOG: 20240520 163728.531 4 RTI_0 <- SUBACK msgid: 1 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTPacket_freeSuback:697 - -MQTT_LOG: 20240520 163728.531 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 366, heap use now 2048 bytes - - -MQTT_LOG: 20240520 163728.531 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 370, heap use now 2032 bytes - - -MQTT_LOG: 20240520 163728.531 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 384, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163728.531 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 702, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< MQTTPacket_freeSuback:703 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< MQTTProtocol_handleSubacks:417 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (1)< MQTTClient_subscribeMany5:2154 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (0)< MQTTClient_subscribe5:2184 (0) - -DEBUG: Subscribed, return code 0 - -LOG: Subscribing on topic Unidentified Federation_fed_0_to_RTI. -LOG: Finished subscribe -LOG: Publishing MSG_TYPE_MQTT_ACCEPT message on topic Unidentified Federation_RTI_to_fed_0. -MQTT_LOG: 20240520 163728.531 (140737352902464) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (2) - -MQTT_LOG: 20240520 163728.531 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555598ba0 - - -MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555598bd0 - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163728.531 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599130 - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163728.531 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555990a0 - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163728.531 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598f80 - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (8)< Socket_writev:773 (45) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.531 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163728.531 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163728.531 4 RTI_0 -> PUBLISH msgid: 2 qos: 2 retained: 0 rc 0 payload len(3):  - -MQTT_LOG: 20240520 163728.531 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163728.531 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.531 Return code 1 from poll - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.531 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.531 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163728.531 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163728.531 4 RTI_0 <- PUBREC msgid: 2 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991e0 - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.531 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599240 - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.531 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.531 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.531 4 RTI_0 -> PUBREL msgid: 2 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163728.531 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163728.531 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.531 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.532 Return code 1 from poll - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.532 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.532 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163728.532 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163728.532 4 RTI_0 <- PUBCOMP msgid:2 - -MQTT_LOG: 20240520 163728.532 PUBCOMP received from client RTI_0 for message id 2 - removing publication - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163728.532 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163728.532 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163728.532 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2144 bytes - - -MQTT_LOG: 20240520 163728.532 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163728.532 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163728.532 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 1984 bytes - - -MQTT_LOG: 20240520 163728.532 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 1952 bytes - - -MQTT_LOG: 20240520 163728.532 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.532 Return code 1 from poll - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.532 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.532 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.576 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.576 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163728.576 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163728.576 (140737352902464) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163728.576 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163728.576 (140737352902464) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163728.576 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599240 - - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163728.576 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2048 bytes - - -MQTT_LOG: 20240520 163728.576 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163728.576 4 RTI_0 <- PUBLISH msgid: 1 qos: 2 retained: 0 payload len(1):  - -MQTT_LOG: 20240520 163728.576 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163728.576 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555990e0 - - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163728.576 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 - - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163728.576 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d30 - - -MQTT_LOG: 20240520 163728.576 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555598b70 - - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.576 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598c20 - - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.576 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 - - -MQTT_LOG: 20240520 163728.576 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.576 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.576 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163728.576 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.576 4 RTI_0 -> PUBREC msgid: 1 (0) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163728.576 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.576 Return code 1 from poll - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.576 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.576 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.576 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.577 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< WebSocket_getdata:751 (1431929304) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163728.577 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163728.577 4 RTI_0 <- PUBREL msgid 1 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163728.577 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555986f0 - - -MQTT_LOG: 20240520 163728.577 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163728.577 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599060 - - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163728.577 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2336 bytes - - -MQTT_LOG: 20240520 163728.577 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163728.577 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163728.577 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.577 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599240 - - -MQTT_LOG: 20240520 163728.577 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.577 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163728.577 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.577 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163728.577 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.577 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2160 bytes - - -MQTT_LOG: 20240520 163728.577 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.577 4 RTI_0 -> PUBCOMP msgid 1 (0) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163728.577 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2144 bytes - - -MQTT_LOG: 20240520 163728.577 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.577 Return code 0 from poll - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (3)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.577 (140737352902464) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) - -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163728.577 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163728.577 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.632 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.632 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.632 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.632 Return code 0 from poll - -MQTT_LOG: 20240520 163728.632 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.632 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.632 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.632 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.632 (140737352902464) (2)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163728.632 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.632 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.632 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.632 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.632 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.632 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163728.632 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163728.632 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163728.632 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163728.632 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163728.632 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163728.633 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2032 bytes - - -MQTT_LOG: 20240520 163728.633 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163728.633 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163728.633 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163728.633 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163728.633 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 1984 bytes - - -MQTT_LOG: 20240520 163728.633 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 1968 bytes - - -MQTT_LOG: 20240520 163728.633 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -LOG: Receiving MSG_TYPE_MQTT_ACCEPT_ACK message on topic Unidentified Federation_fed_0_to_RTI. -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163728.633 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163728.633 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.633 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.633 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.633 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.633 Return code 1 from poll - -MQTT_LOG: 20240520 163728.633 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.633 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.633 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.633 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.633 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.633 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.634 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.634 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163728.634 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163728.634 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x5555555981d0 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163728.634 4 RTI_0 <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(27):  - -MQTT_LOG: 20240520 163728.634 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163728.634 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163728.634 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e40 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163728.634 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598e80 - - -MQTT_LOG: 20240520 163728.634 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555598fc0 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598f00 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599180 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.634 4 RTI_0 -> PUBREC msgid: 2 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163728.634 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.634 Return code 1 from poll - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.634 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.634 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163728.634 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555990e0 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163728.634 4 RTI_0 <- PUBREL msgid 2 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163728.634 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555990a0 - - -MQTT_LOG: 20240520 163728.634 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163728.634 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163728.634 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2384 bytes - - -MQTT_LOG: 20240520 163728.634 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2336 bytes - - -MQTT_LOG: 20240520 163728.634 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163728.634 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2208 bytes - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.634 4 RTI_0 -> PUBCOMP msgid 2 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163728.634 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163728.634 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2144 bytes - - -MQTT_LOG: 20240520 163728.634 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2112 bytes - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163728.634 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163728.634 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2032 bytes - - -MQTT_LOG: 20240520 163728.634 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI received federate ID: 0. -DEBUG: RTI received federation ID: Unidentified Federation. -DEBUG: RTI responding with MSG_TYPE_ACK to federate 0. -MQTT_LOG: 20240520 163728.634 (140737352902464) (0)> MQTTClient_publishMessage5:2498 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (1)> MQTTClient_publish5:2349 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> UTF8_validate:134 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTProtocol_assignMsgId:91 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTProtocol_assignMsgId:104 (3) - -MQTT_LOG: 20240520 163728.634 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2388 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2398 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163728.634 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x5555555981d0 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTProtocol_startPublish:176 - -MQTT_LOG: 20240520 163728.634 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 208 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTProtocol_createMessage:210 - -MQTT_LOG: 20240520 163728.634 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163728.634 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTProtocol_createMessage:251 - -MQTT_LOG: 20240520 163728.634 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555994d0 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> MQTTProtocol_startPublishCommon:153 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> MQTTPacket_send_publish:861 - -MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 862 ptr 0x555555599240 - - -MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 879 ptr 0x555555599180 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)> MQTTPacket_sends:259 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.634 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 263 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (8)< Socket_writev:773 (43) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 287, heap use now 2320 bytes - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (5)< MQTTPacket_sends:289 (0) - -MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 891, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163728.634 4 RTI_0 -> PUBLISH msgid: 3 qos: 2 retained: 0 rc 0 payload len(1): ÿ - -MQTT_LOG: 20240520 163728.634 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 914, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< MQTTPacket_send_publish:916 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)< MQTTProtocol_startPublishCommon:157 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)< MQTTProtocol_startPublish:192 (0) - -MQTT_LOG: 20240520 163728.634 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 2460, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163728.634 (140737352902464) (1)< MQTTClient_publish5:2473 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (0)< MQTTClient_publishMessage5:2518 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (0)> MQTTClient_waitForCompletion:2874 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (1)> MQTTClient_yield:2832 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.634 Return code 1 from poll - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.634 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.676 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.676 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163728.676 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> MQTTProtocol_handlePubrecs:492 - -MQTT_LOG: 20240520 163728.676 4 RTI_0 <- PUBREC msgid: 3 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTPacket_send_pubrel:758 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.676 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599180 - - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.676 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.676 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.676 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.676 4 RTI_0 -> PUBREL msgid: 3 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTPacket_send_pubrel:761 (0) - -MQTT_LOG: 20240520 163728.676 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 553, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< MQTTProtocol_handlePubrecs:554 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.676 Return code 1 from poll - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.676 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.676 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163728.676 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> MQTTProtocol_handlePubcomps:648 - -MQTT_LOG: 20240520 163728.676 4 RTI_0 <- PUBCOMP msgid:3 - -MQTT_LOG: 20240520 163728.676 PUBCOMP received from client RTI_0 for message id 3 - removing publication - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTProtocol_removePublication:297 - -MQTT_LOG: 20240520 163728.676 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 302, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163728.676 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 307, heap use now 2224 bytes - - -MQTT_LOG: 20240520 163728.676 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163728.676 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2128 bytes - - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTProtocol_removePublication:312 - -MQTT_LOG: 20240520 163728.676 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2096 bytes - - -MQTT_LOG: 20240520 163728.676 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163728.676 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 690, heap use now 1984 bytes - - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< MQTTProtocol_handlePubcomps:691 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.676 Return code 1 from poll - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163728.676 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.676 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.716 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.716 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163728.716 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163728.716 (140737352902464) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163728.716 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x5555555986f0 - - -MQTT_LOG: 20240520 163728.716 (140737352902464) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163728.716 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163728.716 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2064 bytes - - -MQTT_LOG: 20240520 163728.716 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163728.716 3 RTI_RTI <- PUBLISH msgid: 2 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163728.716 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163728.716 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163728.716 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598cf0 - - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163728.716 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555990a0 - - -MQTT_LOG: 20240520 163728.716 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555599240 - - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.716 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.716 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598b70 - - -MQTT_LOG: 20240520 163728.716 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.716 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2288 bytes - - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.716 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163728.716 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.716 3 RTI_RTI -> PUBREC msgid: 2 (0) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163728.716 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.716 Return code 1 from poll - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (3)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.716 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.716 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.716 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.717 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163728.717 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x5555555981d0 - - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (3)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163728.717 3 RTI_RTI <- PUBREL msgid 2 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163728.717 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555598620 - - -MQTT_LOG: 20240520 163728.717 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163728.717 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598c80 - - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163728.717 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2352 bytes - - -MQTT_LOG: 20240520 163728.717 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163728.717 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163728.717 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.717 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163728.717 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.717 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598f00 - - -MQTT_LOG: 20240520 163728.717 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.717 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163728.717 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.717 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163728.717 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.717 3 RTI_RTI -> PUBCOMP msgid 2 (0) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163728.717 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2160 bytes - - -MQTT_LOG: 20240520 163728.717 (140737352902464) (3)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (2)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (3)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.717 Return code 1 from poll - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> isReady:353 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (3)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (3)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.717 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.717 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.734 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (5)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (6)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (7)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (7)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (7)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.734 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (7)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (6)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (5)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (5)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (6)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (6)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (6)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (6)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (5)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163728.734 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163728.734 (140737352902464) (5)> readUTFlen:387 - -MQTT_LOG: 20240520 163728.734 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x5555555981d0 - - -MQTT_LOG: 20240520 163728.734 (140737352902464) (5)< readUTFlen:401 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163728.734 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555598cc0 - - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163728.734 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163728.734 (140737352902464) (3)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (3)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163728.734 4 RTI_0 <- PUBLISH msgid: 3 qos: 2 retained: 0 payload len(11):  - -MQTT_LOG: 20240520 163728.734 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163728.734 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x5555555990e0 - - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163728.734 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555984a0 - - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163728.734 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598d70 - - -MQTT_LOG: 20240520 163728.734 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (5)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.734 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599680 - - -MQTT_LOG: 20240520 163728.734 (140737352902464) (6)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.734 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599760 - - -MQTT_LOG: 20240520 163728.734 (140737352902464) (7)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (7)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (7)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (8)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (9)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (9)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (8)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (7)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.734 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2480 bytes - - -MQTT_LOG: 20240520 163728.734 (140737352902464) (6)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.734 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2464 bytes - - -MQTT_LOG: 20240520 163728.734 (140737352902464) (5)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.734 4 RTI_0 -> PUBREC msgid: 3 (0) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163728.734 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2448 bytes - - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (3)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (3)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (4)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (3)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (2)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.734 (140737352902464) (1)< MQTTClient_yield:2856 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (0)< MQTTClient_waitForCompletion:2903 (0) - -DEBUG: RTI sent MSG_TYPE_ACK to federate 0. -DEBUG: RTI waiting for MSG_TYPE_NEIGHBOR_STRUCTURE from federate 0. -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163728.734 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.734 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.735 Return code 1 from poll - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.735 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.735 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163728.735 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599130 - - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163728.735 4 RTI_0 <- PUBREL msgid 3 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163728.735 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599640 - - -MQTT_LOG: 20240520 163728.735 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 - - -MQTT_LOG: 20240520 163728.735 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599850 - - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163728.735 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2544 bytes - - -MQTT_LOG: 20240520 163728.735 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2496 bytes - - -MQTT_LOG: 20240520 163728.735 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2464 bytes - - -MQTT_LOG: 20240520 163728.735 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2384 bytes - - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.735 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555598cc0 - - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.735 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598f00 - - -MQTT_LOG: 20240520 163728.735 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.735 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2384 bytes - - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.735 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163728.735 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.735 4 RTI_0 -> PUBCOMP msgid 3 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163728.735 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2352 bytes - - -MQTT_LOG: 20240520 163728.735 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163728.735 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163728.735 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163728.735 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163728.735 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163728.735 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163728.735 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163728.735 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163728.735 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI got 0 upstreams and 1 downstreams from federate 0. -DEBUG: RTI received neighbor structure from federate 0. -DEBUG: RTI waiting for MSG_TYPE_UDP_PORT from federate 0. -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163728.735 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.735 Return code 1 from poll - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.735 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.735 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.735 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.835 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.835 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.835 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163728.835 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598290 - - -MQTT_LOG: 20240520 163728.835 (140737352902464) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163728.835 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555598f30 - - -MQTT_LOG: 20240520 163728.835 (140737352902464) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163728.835 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599360 - - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163728.835 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2256 bytes - - -MQTT_LOG: 20240520 163728.835 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.835 (140737352902464) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163728.835 4 RTI_0 <- PUBLISH msgid: 4 qos: 2 retained: 0 payload len(3): þÿÿ - -MQTT_LOG: 20240520 163728.835 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163728.835 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x555555599440 - - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163728.835 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555997d0 - - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163728.835 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599850 - - -MQTT_LOG: 20240520 163728.835 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555599030 - - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.835 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x5555555991e0 - - -MQTT_LOG: 20240520 163728.835 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.835 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599210 - - -MQTT_LOG: 20240520 163728.835 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.835 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.835 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.835 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.835 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2480 bytes - - -MQTT_LOG: 20240520 163728.835 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.835 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2464 bytes - - -MQTT_LOG: 20240520 163728.835 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.835 4 RTI_0 -> PUBREC msgid: 4 (0) - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163728.835 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 2448 bytes - - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163728.835 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTProtocol_keepalive:704 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTProtocol_keepalive:781 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (4)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (4)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (4)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (4)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.835 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.835 Return code 1 from poll - -MQTT_LOG: 20240520 163728.835 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.836 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.836 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163728.836 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (2)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163728.836 4 RTI_0 <- PUBREL msgid 4 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163728.836 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555599490 - - -MQTT_LOG: 20240520 163728.836 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 - - -MQTT_LOG: 20240520 163728.836 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599320 - - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163728.836 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2544 bytes - - -MQTT_LOG: 20240520 163728.836 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2496 bytes - - -MQTT_LOG: 20240520 163728.836 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2464 bytes - - -MQTT_LOG: 20240520 163728.836 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2384 bytes - - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.836 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599360 - - -MQTT_LOG: 20240520 163728.836 (140737352902464) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.836 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555598cc0 - - -MQTT_LOG: 20240520 163728.836 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.836 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 2384 bytes - - -MQTT_LOG: 20240520 163728.836 (140737352902464) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.836 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2368 bytes - - -MQTT_LOG: 20240520 163728.836 (140737352902464) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.836 4 RTI_0 -> PUBCOMP msgid 4 (0) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163728.836 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2352 bytes - - -MQTT_LOG: 20240520 163728.836 (140737352902464) (2)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163728.836 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2304 bytes - - -MQTT_LOG: 20240520 163728.836 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2272 bytes - - -MQTT_LOG: 20240520 163728.836 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163728.836 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163728.836 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2240 bytes - - -MQTT_LOG: 20240520 163728.836 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163728.836 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2192 bytes - - -MQTT_LOG: 20240520 163728.836 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2176 bytes - - -MQTT_LOG: 20240520 163728.836 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI got MSG_TYPE_UDP_PORT 65535 from federate 0. -LOG: RECEIVING message from federateID -1 -MQTT_LOG: 20240520 163728.836 (140737352902464) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.836 (140737352902464) (3)< Socket_continueWrites:1453 (0) - -LOG: RECEIVING message from federateID 0 -MQTT_LOG: 20240520 163728.836 (140737349940800) (0)> MQTTClient_receive:2777 - -MQTT_LOG: 20240520 163728.836 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.836 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.837 Return code 0 from poll - -MQTT_LOG: 20240520 163728.837 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (2)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163728.837 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2112 bytes - - -MQTT_LOG: 20240520 163728.837 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2080 bytes - - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163728.837 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2048 bytes - - -MQTT_LOG: 20240520 163728.837 (140737352902464) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163728.837 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2016 bytes - - -MQTT_LOG: 20240520 163728.837 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2000 bytes - - -MQTT_LOG: 20240520 163728.837 (140737352902464) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID -1 -LOG: Received MSG_TYPE_MQTT_JOIN message from federate 1. -DEBUG: Setting up MQTTServer_id for federate 1. -DEBUG: Setup MQTTServer_id for federate 1 as RTI_1. -DEBUG: Creating MQTTClient for federate 1. -MQTT_LOG: 20240520 163728.837 (140737352902464) (0)> MQTTClient_createWithOptions:375 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> UTF8_validateString:160 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (2)> UTF8_validate:134 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (2)< UTF8_validate:146 (1) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< UTF8_validateString:165 (1) - -MQTT_LOG: 20240520 163728.837 Allocating 160 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 438 ptr 0x555555599bb0 - - -MQTT_LOG: 20240520 163728.837 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x555555599360 - - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163728.837 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555998d0 - - -MQTT_LOG: 20240520 163728.837 Allocating 304 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 489 ptr 0x555555599c70 - - -MQTT_LOG: 20240520 163728.837 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555990e0 - - -MQTT_LOG: 20240520 163728.837 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598f30 - - -MQTT_LOG: 20240520 163728.837 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x555555598df0 - - -MQTT_LOG: 20240520 163728.837 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 54 ptr 0x5555555981d0 - - -MQTT_LOG: 20240520 163728.837 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 1108 ptr 0x5555555992b0 - - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTStrncpy:1085 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTStrncpy:1095 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> Thread_create_sem:227 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< Thread_create_sem:245 (0) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTPersistence_create:56 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTPersistence_create:104 (0) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTPersistence_initialize:119 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTPersistence_initialize:127 (0) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTPersistence_restoreMessageQueue:877 - -MQTT_LOG: 20240520 163728.837 0 queued messages restored for client RTI_1 - -MQTT_LOG: 20240520 163728.837 (140737349940800) (3)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.837 (140737349940800) (3)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)< MQTTPersistence_restoreMessageQueue:918 (0) - -MQTT_LOG: 20240520 163728.837 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599580 - - -MQTT_LOG: 20240520 163728.837 (140737352902464) (0)< MQTTClient_createWithOptions:522 (0) - -DEBUG: Connecting MQTTClient for federate 1. -MQTT_LOG: 20240520 163728.837 (140737352902464) (0)> MQTTClient_connectAll:1745 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (1)> MQTTClient_connectURI:1504 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (2)> MQTTClient_connectURIVersion:1209 - -MQTT_LOG: 20240520 163728.837 Connecting to serverURI 127.0.0.1:1883 with MQTT version 4 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (3)> MQTTProtocol_connect:227 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (4)> MQTTProtocol_addressPort:63 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (4)< MQTTProtocol_addressPort:101 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (4)> Socket_new:1072 - -MQTT_LOG: 20240520 163728.837 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1082 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163728.837 New socket 5 for 127.0.0.1:1883, port 1883 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (5)> Socket_addSocket:272 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (6)> Socket_setnonblocking:95 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (6)< Socket_setnonblocking:100 (0) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (5)< Socket_addSocket:314 (0) - -MQTT_LOG: 20240520 163728.837 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1200 ptr 0x5555555978a0 - - -MQTT_LOG: 20240520 163728.837 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x5555555996f0 - - -MQTT_LOG: 20240520 163728.837 Connect pending - -MQTT_LOG: 20240520 163728.837 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/Socket.c line 1233, heap use now 2784 bytes - - -MQTT_LOG: 20240520 163728.837 (140737352902464) (4)< Socket_new:1235 (115) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (3)< MQTTProtocol_connect:355 (115) - -MQTT_LOG: 20240520 163728.837 (140737352902464) (3)> MQTTClient_waitfor:2662 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.837 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.837 Return code 1 from poll - -MQTT_LOG: 20240520 163728.837 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.837 (140737349940800) (3)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.837 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.837 (140737349940800) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.837 (140737349940800) (2)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.837 (140737349940800) (2)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.837 (140737349940800) (3)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.837 (140737349940800) (4)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.837 (140737349940800) (5)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.837 (140737349940800) (5)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.837 (140737349940800) (5)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.837 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (5)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (4)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (4)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (5)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (6)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (6)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (6)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.936 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (6)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (5)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (4)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (4)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (5)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (5)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (5)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (5)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (4)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163728.936 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000c40 - - -MQTT_LOG: 20240520 163728.936 (140737349940800) (4)> readUTFlen:387 - -MQTT_LOG: 20240520 163728.936 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7ffff0000d60 - - -MQTT_LOG: 20240520 163728.936 (140737349940800) (4)< readUTFlen:401 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163728.936 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0000e60 - - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163728.936 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163728.936 (140737349940800) (2)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (2)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163728.936 4 RTI_0 <- PUBLISH msgid: 5 qos: 2 retained: 0 payload len(9): ¤Â/x°VÑ - -MQTT_LOG: 20240520 163728.936 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163728.936 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 - - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163728.936 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff00010a0 - - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163728.936 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x7ffff0001190 - - -MQTT_LOG: 20240520 163728.936 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x7ffff0001290 - - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (4)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.936 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001370 - - -MQTT_LOG: 20240520 163728.936 (140737349940800) (5)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.936 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001450 - - -MQTT_LOG: 20240520 163728.936 (140737349940800) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (6)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (7)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (8)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (8)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (7)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (6)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.936 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3168 bytes - - -MQTT_LOG: 20240520 163728.936 (140737349940800) (5)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.936 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3152 bytes - - -MQTT_LOG: 20240520 163728.936 (140737349940800) (4)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.936 4 RTI_0 -> PUBREC msgid: 5 (0) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163728.936 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (2)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (1)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.936 (140737349940800) (2)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.936 Return code 1 from poll - -MQTT_LOG: 20240520 163728.936 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.936 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.936 (140737352902464) (5)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163728.936 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.936 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.936 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.936 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.936 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163728.936 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163728.936 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163728.936 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163728.936 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163728.936 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163728.936 (140737352902464) (6)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163728.936 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599130 - - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)> isReady:353 - -MQTT_LOG: 20240520 163728.936 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163728.936 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163728.936 (140737349940800) (3)< isReady:365 (1) - -MQTT_LOG: 20240520 163728.936 (140737349940800) (2)< Socket_getReadySocket:604 (5) - -MQTT_LOG: 20240520 163728.936 (140737352902464) (6)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163728.936 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163728.937 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163728.937 4 RTI_0 <- PUBREL msgid 5 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163728.937 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x555555598e40 - - -MQTT_LOG: 20240520 163728.937 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555598060 - - -MQTT_LOG: 20240520 163728.937 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599490 - - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163728.937 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163728.937 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3136 bytes - - -MQTT_LOG: 20240520 163728.937 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163728.937 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163728.937 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0000e60 - - -MQTT_LOG: 20240520 163728.937 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.937 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0000e30 - - -MQTT_LOG: 20240520 163728.937 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163728.937 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163728.937 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163728.937 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163728.937 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3024 bytes - - -MQTT_LOG: 20240520 163728.937 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163728.937 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163728.937 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163728.937 4 RTI_0 -> PUBCOMP msgid 5 (0) - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163728.937 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163728.937 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163728.937 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.937 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163728.937 (140737349940800) (2)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.937 (140737349940800) (3)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.937 (140737349940800) (3)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.937 (140737349940800) (2)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.937 (140737349940800) (1)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.937 (140737349940800) (1)> MQTTClient_deliverMessage:671 - -MQTT_LOG: 20240520 163728.937 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 2944 bytes - - -MQTT_LOG: 20240520 163728.937 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 2912 bytes - - -MQTT_LOG: 20240520 163728.937 (140737349940800) (1)< MQTTClient_deliverMessage:682 (0) - -MQTT_LOG: 20240520 163728.937 (140737349940800) (0)< MQTTClient_receive:2820 (0) - -LOG: Successfully received message, return code 0 - -MQTT_LOG: 20240520 163728.937 (140737349940800) (0)> MQTTClient_free:634 - -MQTT_LOG: 20240520 163728.937 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 635, heap use now 2880 bytes - - -MQTT_LOG: 20240520 163728.937 (140737349940800) (0)< MQTTClient_free:636 - -MQTT_LOG: 20240520 163728.937 (140737349940800) (0)> MQTTClient_freeMessage:623 - -MQTT_LOG: 20240520 163728.937 (140737349940800) (1)> MQTTProperties_free:401 - -MQTT_LOG: 20240520 163728.937 (140737349940800) (1)< MQTTProperties_free:424 - -MQTT_LOG: 20240520 163728.937 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 625, heap use now 2832 bytes - - -MQTT_LOG: 20240520 163728.937 Freeing 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 626, heap use now 2816 bytes - - -MQTT_LOG: 20240520 163728.937 (140737349940800) (0)< MQTTClient_freeMessage:628 - -LOG: RECEIVED message from federateID 0 -DEBUG: RTI: Received message type 2 from federate 0. -DEBUG: RTI received timestamp message with time: 1716248248935498404. -DEBUG: RTI received timestamp message with time: 1716248248935498404. fro federate 0 -MQTT_LOG: 20240520 163728.937 Return code 0 from poll - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163728.937 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163728.937 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163728.937 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163728.937 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163729.037 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163729.037 Return code 0 from poll - -MQTT_LOG: 20240520 163729.037 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.037 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.037 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.037 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.037 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.037 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.037 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163729.037 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163729.037 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163729.037 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163729.037 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163729.037 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163729.037 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163729.037 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163729.037 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163729.037 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163729.037 Return code 0 from poll - -MQTT_LOG: 20240520 163729.037 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.239 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.239 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.239 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.239 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.239 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.239 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163729.239 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163729.239 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163729.239 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163729.239 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163729.239 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163729.239 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163729.239 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163729.239 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163729.239 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163729.239 Return code 1 from poll - -MQTT_LOG: 20240520 163729.239 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.239 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163729.239 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163729.239 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163729.318 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163729.318 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163729.318 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163729.318 (140737352902464) (7)> readUTFlen:387 - -MQTT_LOG: 20240520 163729.318 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x7ffff00010a0 - - -MQTT_LOG: 20240520 163729.318 (140737352902464) (7)< readUTFlen:401 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163729.318 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0000e30 - - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163729.318 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 2880 bytes - - -MQTT_LOG: 20240520 163729.318 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163729.318 3 RTI_RTI <- PUBLISH msgid: 3 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163729.318 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163729.318 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 - - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163729.318 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598f80 - - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163729.318 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555598ec0 - - -MQTT_LOG: 20240520 163729.318 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x555555597700 - - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163729.318 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599e30 - - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163729.318 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599ed0 - - -MQTT_LOG: 20240520 163729.318 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163729.318 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3104 bytes - - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163729.318 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163729.318 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163729.318 3 RTI_RTI -> PUBREC msgid: 3 (0) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163729.318 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3072 bytes - - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163729.318 Return code 1 from poll - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163729.318 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163729.318 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163729.319 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163729.319 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x555555599f80 - - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163729.319 3 RTI_RTI <- PUBREL msgid 3 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163729.319 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x5555555995c0 - - -MQTT_LOG: 20240520 163729.319 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x5555555987f0 - - -MQTT_LOG: 20240520 163729.319 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a010 - - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163729.319 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3168 bytes - - -MQTT_LOG: 20240520 163729.319 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3120 bytes - - -MQTT_LOG: 20240520 163729.319 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3088 bytes - - -MQTT_LOG: 20240520 163729.319 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163729.319 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0000e30 - - -MQTT_LOG: 20240520 163729.319 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163729.319 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x7ffff0001160 - - -MQTT_LOG: 20240520 163729.319 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163729.319 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3008 bytes - - -MQTT_LOG: 20240520 163729.319 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163729.319 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 2992 bytes - - -MQTT_LOG: 20240520 163729.319 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163729.319 3 RTI_RTI -> PUBCOMP msgid 3 (0) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163729.319 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 2976 bytes - - -MQTT_LOG: 20240520 163729.319 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163729.319 Return code 0 from poll - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.319 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.420 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.420 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163729.420 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163729.420 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163729.420 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163729.420 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163729.420 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163729.420 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163729.420 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163729.420 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163729.420 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163729.420 Return code 0 from poll - -MQTT_LOG: 20240520 163729.420 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.420 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.420 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.420 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.420 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.420 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.420 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163729.420 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163729.520 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163729.520 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163729.520 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163729.520 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163729.520 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163729.520 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163729.520 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163729.520 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163729.520 Return code 0 from poll - -MQTT_LOG: 20240520 163729.520 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.520 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.520 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.520 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.520 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.520 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.520 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163729.520 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163729.520 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163729.520 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163729.520 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163729.621 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163729.621 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163729.621 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163729.621 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163729.621 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163729.621 Return code 0 from poll - -MQTT_LOG: 20240520 163729.621 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.621 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.621 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.621 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.621 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.621 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.621 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163729.621 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163729.621 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163729.621 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163729.621 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163729.621 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163729.621 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163729.621 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163729.722 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163729.722 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163729.722 Return code 0 from poll - -MQTT_LOG: 20240520 163729.722 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.722 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.722 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.722 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.722 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.722 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.722 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163729.722 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163729.722 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163729.722 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163729.722 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163729.722 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163729.722 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163729.722 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163729.722 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163729.722 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163729.722 Return code 1 from poll - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163729.919 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163729.919 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163729.919 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163729.919 (140737352902464) (7)> readUTFlen:387 - -MQTT_LOG: 20240520 163729.919 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555598f80 - - -MQTT_LOG: 20240520 163729.919 (140737352902464) (7)< readUTFlen:401 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163729.919 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x7ffff0001160 - - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163729.919 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3056 bytes - - -MQTT_LOG: 20240520 163729.919 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163729.919 3 RTI_RTI <- PUBLISH msgid: 4 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163729.919 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163729.919 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 - - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163729.919 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599600 - - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163729.919 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a0d0 - - -MQTT_LOG: 20240520 163729.919 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a180 - - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163729.919 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a260 - - -MQTT_LOG: 20240520 163729.919 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163729.919 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a340 - - -MQTT_LOG: 20240520 163729.919 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163729.919 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3280 bytes - - -MQTT_LOG: 20240520 163729.919 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163729.919 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3264 bytes - - -MQTT_LOG: 20240520 163729.919 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163729.919 3 RTI_RTI -> PUBREC msgid: 4 (0) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163729.919 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3248 bytes - - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163729.919 Return code 1 from poll - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163729.919 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163729.919 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163729.920 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163729.920 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163729.920 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a3f0 - - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163729.920 3 RTI_RTI <- PUBREL msgid 4 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163729.920 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559a1f0 - - -MQTT_LOG: 20240520 163729.920 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x555555599910 - - -MQTT_LOG: 20240520 163729.920 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a480 - - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163729.920 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3344 bytes - - -MQTT_LOG: 20240520 163729.920 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3296 bytes - - -MQTT_LOG: 20240520 163729.920 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3264 bytes - - -MQTT_LOG: 20240520 163729.920 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163729.920 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x7ffff0001160 - - -MQTT_LOG: 20240520 163729.920 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163729.920 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163729.920 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163729.920 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3184 bytes - - -MQTT_LOG: 20240520 163729.920 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163729.920 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3168 bytes - - -MQTT_LOG: 20240520 163729.920 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163729.920 3 RTI_RTI -> PUBCOMP msgid 4 (0) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163729.920 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3152 bytes - - -MQTT_LOG: 20240520 163729.920 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163729.920 Return code 0 from poll - -MQTT_LOG: 20240520 163729.920 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.021 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.021 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.021 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.021 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.021 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.021 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163730.021 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163730.021 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163730.021 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163730.021 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163730.021 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163730.021 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163730.021 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163730.021 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163730.021 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163730.021 Return code 0 from poll - -MQTT_LOG: 20240520 163730.021 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.021 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.021 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.021 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.122 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.122 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.122 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163730.122 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163730.122 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163730.122 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163730.122 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163730.122 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163730.122 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163730.122 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163730.122 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163730.122 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163730.122 Return code 0 from poll - -MQTT_LOG: 20240520 163730.122 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.122 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.122 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.122 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.122 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.122 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.122 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163730.223 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163730.223 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163730.223 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163730.223 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163730.223 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163730.223 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163730.223 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163730.223 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163730.223 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163730.223 Return code 0 from poll - -MQTT_LOG: 20240520 163730.223 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.223 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.223 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.223 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.223 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.223 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.223 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163730.223 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163730.223 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163730.223 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163730.324 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163730.324 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163730.324 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163730.324 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163730.324 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163730.324 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163730.324 Return code 0 from poll - -MQTT_LOG: 20240520 163730.324 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.324 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.324 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.324 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.324 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.324 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.324 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163730.324 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163730.324 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163730.324 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163730.324 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163730.324 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163730.324 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163730.425 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163730.425 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163730.425 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163730.425 Return code 1 from poll - -MQTT_LOG: 20240520 163730.425 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.425 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163730.425 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163730.425 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163730.425 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163730.425 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163730.425 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163730.425 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163730.425 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163730.425 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163730.425 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163730.425 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163730.425 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163730.425 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163730.425 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163730.425 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163730.521 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163730.521 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)> readUTFlen:387 - -MQTT_LOG: 20240520 163730.521 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x555555599600 - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< readUTFlen:401 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163730.521 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163730.521 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3232 bytes - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163730.521 3 RTI_RTI <- PUBLISH msgid: 5 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163730.521 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163730.521 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163730.521 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a110 - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163730.521 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a540 - - -MQTT_LOG: 20240520 163730.521 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559a5f0 - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163730.521 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a6d0 - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163730.521 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a7b0 - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163730.521 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3456 bytes - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163730.521 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3440 bytes - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163730.521 3 RTI_RTI -> PUBREC msgid: 5 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163730.521 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3424 bytes - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163730.521 Return code 1 from poll - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163730.521 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163730.521 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163730.521 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559a860 - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163730.521 3 RTI_RTI <- PUBREL msgid 5 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163730.521 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559a660 - - -MQTT_LOG: 20240520 163730.521 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559a8b0 - - -MQTT_LOG: 20240520 163730.521 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a950 - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163730.521 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3520 bytes - - -MQTT_LOG: 20240520 163730.521 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3472 bytes - - -MQTT_LOG: 20240520 163730.521 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3440 bytes - - -MQTT_LOG: 20240520 163730.521 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3360 bytes - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163730.521 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599390 - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163730.521 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x555555599ea0 - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163730.521 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3360 bytes - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163730.521 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3344 bytes - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163730.521 3 RTI_RTI -> PUBCOMP msgid 5 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163730.521 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3328 bytes - - -MQTT_LOG: 20240520 163730.521 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.521 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.522 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163730.522 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163730.522 Return code 0 from poll - -MQTT_LOG: 20240520 163730.522 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.522 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.522 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.522 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.522 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.522 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.522 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163730.522 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163730.522 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163730.522 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163730.522 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163730.522 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163730.522 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163730.522 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163730.522 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163730.522 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163730.522 Return code 0 from poll - -MQTT_LOG: 20240520 163730.724 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.724 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.724 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.724 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.724 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.724 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.724 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163730.724 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163730.724 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163730.724 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163730.724 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163730.724 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163730.724 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163730.724 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163730.724 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163730.724 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163730.724 Return code 0 from poll - -MQTT_LOG: 20240520 163730.724 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.724 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.724 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.825 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.825 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.825 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.825 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163730.825 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163730.825 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163730.825 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163730.825 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163730.825 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163730.825 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163730.825 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163730.825 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163730.825 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163730.825 Return code 0 from poll - -MQTT_LOG: 20240520 163730.825 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.825 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.825 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.825 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.825 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.825 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.926 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163730.926 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163730.926 (140737352902464) (6)> MQTTProtocol_keepalive:704 - -MQTT_LOG: 20240520 163730.926 (140737352902464) (6)< MQTTProtocol_keepalive:781 - -MQTT_LOG: 20240520 163730.926 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163730.926 (140737352902464) (7)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163730.926 (140737352902464) (7)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163730.926 (140737352902464) (7)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163730.926 (140737352902464) (7)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163730.926 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163730.926 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163730.926 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163730.926 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163730.926 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163730.926 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163730.926 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163730.926 Return code 0 from poll - -MQTT_LOG: 20240520 163730.926 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163730.926 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163730.926 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.026 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.026 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.026 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.026 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163731.026 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163731.026 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163731.026 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163731.026 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163731.026 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163731.026 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163731.026 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163731.026 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163731.026 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163731.026 Return code 1 from poll - -MQTT_LOG: 20240520 163731.026 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.026 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163731.026 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163731.026 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163731.026 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163731.026 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163731.122 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163731.122 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163731.122 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> readUTFlen:387 - -MQTT_LOG: 20240520 163731.122 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559a110 - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< readUTFlen:401 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163731.122 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x555555599ea0 - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163731.122 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3408 bytes - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163731.122 3 RTI_RTI <- PUBLISH msgid: 6 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163731.122 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163731.122 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163731.122 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559a580 - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163731.122 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559aa10 - - -MQTT_LOG: 20240520 163731.122 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559aac0 - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163731.122 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559aba0 - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163731.122 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559ac80 - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163731.122 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3632 bytes - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163731.122 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3616 bytes - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163731.122 3 RTI_RTI -> PUBREC msgid: 6 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163731.122 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3600 bytes - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163731.122 Return code 1 from poll - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163731.122 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163731.122 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163731.122 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559ad30 - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163731.122 3 RTI_RTI <- PUBREL msgid 6 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163731.122 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559ab30 - - -MQTT_LOG: 20240520 163731.122 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559ad80 - - -MQTT_LOG: 20240520 163731.122 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559ae20 - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163731.122 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3696 bytes - - -MQTT_LOG: 20240520 163731.122 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3648 bytes - - -MQTT_LOG: 20240520 163731.122 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3616 bytes - - -MQTT_LOG: 20240520 163731.122 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3536 bytes - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163731.122 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x555555599ea0 - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163731.122 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a310 - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163731.122 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3536 bytes - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163731.122 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3520 bytes - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163731.122 3 RTI_RTI -> PUBCOMP msgid 6 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163731.122 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3504 bytes - - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163731.122 Return code 0 from poll - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.122 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.122 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163731.223 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163731.223 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163731.223 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163731.223 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163731.223 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163731.223 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163731.223 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163731.223 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163731.223 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163731.223 Return code 0 from poll - -MQTT_LOG: 20240520 163731.223 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.223 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.223 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.223 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.223 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.223 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.223 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163731.223 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163731.223 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163731.223 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163731.324 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163731.324 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163731.324 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163731.324 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163731.324 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163731.324 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163731.324 Return code 0 from poll - -MQTT_LOG: 20240520 163731.324 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.324 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.324 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.324 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.324 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.324 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.324 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163731.324 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163731.324 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163731.324 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163731.324 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163731.324 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163731.324 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163731.425 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163731.425 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163731.425 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163731.425 Return code 0 from poll - -MQTT_LOG: 20240520 163731.425 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.425 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.425 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.425 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.425 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.425 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.425 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163731.425 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163731.425 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163731.425 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163731.425 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163731.425 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163731.425 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163731.425 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163731.425 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163731.425 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163731.627 Return code 0 from poll - -MQTT_LOG: 20240520 163731.627 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.627 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.627 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.627 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.627 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.627 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.627 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163731.627 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163731.627 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163731.627 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163731.627 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163731.627 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163731.627 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163731.627 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163731.627 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163731.627 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163731.627 Return code 1 from poll - -MQTT_LOG: 20240520 163731.627 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.627 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163731.724 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163731.724 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163731.724 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> readUTFlen:387 - -MQTT_LOG: 20240520 163731.724 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559a580 - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< readUTFlen:401 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163731.724 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a310 - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163731.724 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3584 bytes - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163731.724 3 RTI_RTI <- PUBLISH msgid: 7 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163731.724 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163731.724 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163731.724 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559aaf0 - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163731.724 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559aee0 - - -MQTT_LOG: 20240520 163731.724 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559af90 - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163731.724 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559b070 - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163731.724 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559b150 - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163731.724 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3808 bytes - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163731.724 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3792 bytes - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163731.724 3 RTI_RTI -> PUBREC msgid: 7 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163731.724 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3776 bytes - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163731.724 Return code 1 from poll - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163731.724 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163731.724 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163731.724 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559b200 - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163731.724 3 RTI_RTI <- PUBREL msgid 7 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163731.724 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559b000 - - -MQTT_LOG: 20240520 163731.724 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559b250 - - -MQTT_LOG: 20240520 163731.724 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559b2f0 - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163731.724 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3872 bytes - - -MQTT_LOG: 20240520 163731.724 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3824 bytes - - -MQTT_LOG: 20240520 163731.724 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3792 bytes - - -MQTT_LOG: 20240520 163731.724 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3712 bytes - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163731.724 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a310 - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163731.724 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559a780 - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163731.724 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3712 bytes - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163731.724 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3696 bytes - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163731.724 3 RTI_RTI -> PUBCOMP msgid 7 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163731.724 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3680 bytes - - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163731.724 Return code 0 from poll - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.724 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.825 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.825 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.825 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.825 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163731.825 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163731.825 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163731.825 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163731.825 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163731.825 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163731.825 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163731.825 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163731.825 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163731.825 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163731.825 Return code 0 from poll - -MQTT_LOG: 20240520 163731.825 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.825 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.825 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.825 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.825 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.825 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.926 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163731.926 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163731.926 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163731.926 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163731.926 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163731.926 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163731.926 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163731.926 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163731.926 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163731.926 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163731.926 Return code 0 from poll - -MQTT_LOG: 20240520 163731.926 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.926 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.926 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.926 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.926 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163731.926 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163731.926 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163731.926 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163731.926 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163732.026 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163732.026 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163732.026 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163732.026 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163732.026 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163732.026 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163732.026 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163732.026 Return code 0 from poll - -MQTT_LOG: 20240520 163732.026 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.026 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.026 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.026 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.026 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.026 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.026 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163732.026 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163732.026 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163732.026 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163732.026 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163732.026 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163732.127 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163732.127 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163732.127 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163732.127 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163732.127 Return code 0 from poll - -MQTT_LOG: 20240520 163732.127 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.127 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.127 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.127 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.127 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.127 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.127 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163732.127 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163732.127 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163732.127 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163732.127 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163732.127 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163732.127 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163732.127 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163732.127 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163732.228 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163732.228 Return code 1 from poll - -MQTT_LOG: 20240520 163732.228 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.228 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163732.228 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163732.228 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163732.228 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163732.228 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163732.228 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163732.228 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163732.228 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163732.228 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163732.228 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163732.228 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163732.228 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163732.228 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163732.228 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163732.228 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163732.228 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163732.228 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163732.325 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163732.325 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (7)> readUTFlen:387 - -MQTT_LOG: 20240520 163732.325 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559aaf0 - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (7)< readUTFlen:401 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163732.325 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559a780 - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163732.325 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3760 bytes - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163732.325 3 RTI_RTI <- PUBLISH msgid: 8 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163732.325 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163732.325 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163732.325 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559afc0 - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163732.325 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559b3b0 - - -MQTT_LOG: 20240520 163732.325 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559b460 - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163732.325 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559b540 - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163732.325 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559b620 - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163732.325 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3984 bytes - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163732.325 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3968 bytes - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163732.325 3 RTI_RTI -> PUBREC msgid: 8 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163732.325 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 3952 bytes - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163732.325 Return code 1 from poll - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163732.325 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163732.325 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163732.325 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559b6d0 - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163732.325 3 RTI_RTI <- PUBREL msgid 8 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163732.325 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559b4d0 - - -MQTT_LOG: 20240520 163732.325 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559b720 - - -MQTT_LOG: 20240520 163732.325 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559b7c0 - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163732.325 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4048 bytes - - -MQTT_LOG: 20240520 163732.325 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4000 bytes - - -MQTT_LOG: 20240520 163732.325 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 3968 bytes - - -MQTT_LOG: 20240520 163732.325 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 3888 bytes - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163732.325 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559a780 - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163732.325 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559ac50 - - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163732.325 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163732.325 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163732.325 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 3888 bytes - - -MQTT_LOG: 20240520 163732.326 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163732.326 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 3872 bytes - - -MQTT_LOG: 20240520 163732.326 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163732.326 3 RTI_RTI -> PUBCOMP msgid 8 (0) - -MQTT_LOG: 20240520 163732.326 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163732.326 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 3856 bytes - - -MQTT_LOG: 20240520 163732.326 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163732.326 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163732.326 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163732.326 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163732.326 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163732.326 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163732.326 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163732.326 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163732.326 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.326 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.326 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.326 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.326 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163732.326 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163732.426 Return code 0 from poll - -MQTT_LOG: 20240520 163732.426 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.426 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.426 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.426 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.426 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.426 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.426 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163732.426 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163732.426 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163732.426 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163732.426 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163732.426 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163732.426 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163732.426 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163732.426 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163732.426 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163732.426 Return code 0 from poll - -MQTT_LOG: 20240520 163732.426 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.426 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.527 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.527 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.527 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.527 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.527 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163732.527 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163732.527 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163732.527 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163732.527 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163732.527 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163732.527 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163732.527 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163732.527 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163732.527 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163732.527 Return code 0 from poll - -MQTT_LOG: 20240520 163732.527 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.527 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.527 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.527 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.527 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.628 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.628 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163732.628 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163732.628 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163732.628 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163732.628 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163732.628 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163732.628 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163732.628 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163732.628 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163732.628 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163732.628 Return code 0 from poll - -MQTT_LOG: 20240520 163732.628 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.628 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.628 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.628 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.628 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.628 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.628 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163732.628 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163732.729 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163732.729 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163732.729 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163732.729 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163732.729 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163732.729 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163732.729 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163732.729 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163732.729 Return code 0 from poll - -MQTT_LOG: 20240520 163732.729 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.729 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.729 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.729 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.729 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.729 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.729 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163732.729 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163732.729 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163732.729 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163732.729 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163732.830 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163732.830 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163732.830 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163732.830 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163732.830 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163732.830 Return code 1 from poll - -MQTT_LOG: 20240520 163732.830 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.830 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163732.830 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163732.830 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163732.830 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163732.830 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163732.830 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163732.830 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163732.830 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163732.830 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163732.830 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163732.830 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163732.830 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163732.830 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163732.926 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163732.926 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> readUTFlen:387 - -MQTT_LOG: 20240520 163732.926 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559afc0 - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< readUTFlen:401 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163732.926 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559ac50 - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163732.926 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 3936 bytes - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163732.926 3 RTI_RTI <- PUBLISH msgid: 9 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163732.926 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163732.926 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163732.926 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559b490 - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163732.926 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559b880 - - -MQTT_LOG: 20240520 163732.926 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559b930 - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163732.926 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559ba10 - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163732.926 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559baf0 - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163732.926 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4160 bytes - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163732.926 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4144 bytes - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163732.926 3 RTI_RTI -> PUBREC msgid: 9 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163732.926 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 4128 bytes - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTProtocol_keepalive:704 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTProtocol_keepalive:781 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163732.926 Return code 1 from poll - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163732.926 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163732.926 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163732.926 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559bba0 - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163732.926 3 RTI_RTI <- PUBREL msgid 9 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163732.926 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559b9a0 - - -MQTT_LOG: 20240520 163732.926 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559bbf0 - - -MQTT_LOG: 20240520 163732.926 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559bc90 - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163732.926 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4224 bytes - - -MQTT_LOG: 20240520 163732.926 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4176 bytes - - -MQTT_LOG: 20240520 163732.926 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4144 bytes - - -MQTT_LOG: 20240520 163732.926 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4064 bytes - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163732.926 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559ac50 - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163732.926 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559b120 - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163732.926 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4064 bytes - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163732.926 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4048 bytes - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163732.926 3 RTI_RTI -> PUBCOMP msgid 9 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163732.926 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 4032 bytes - - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163732.926 Return code 0 from poll - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163732.926 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163732.926 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163733.027 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163733.027 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163733.027 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163733.027 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163733.027 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163733.027 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163733.027 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163733.027 Return code 0 from poll - -MQTT_LOG: 20240520 163733.027 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.027 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.027 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.027 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.027 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.027 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.027 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163733.027 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163733.027 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163733.027 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163733.027 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163733.027 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163733.128 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163733.128 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163733.128 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163733.128 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163733.128 Return code 0 from poll - -MQTT_LOG: 20240520 163733.128 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.128 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.128 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.128 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.128 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.128 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.128 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163733.128 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163733.128 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163733.128 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163733.128 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163733.128 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163733.128 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163733.128 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163733.128 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163733.229 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163733.229 Return code 0 from poll - -MQTT_LOG: 20240520 163733.229 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.229 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.229 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.229 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.229 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.229 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.229 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163733.229 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163733.229 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163733.229 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163733.229 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163733.229 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163733.229 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163733.229 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163733.229 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163733.229 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163733.229 Return code 0 from poll - -MQTT_LOG: 20240520 163733.229 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.431 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.431 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.431 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.431 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.431 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.431 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163733.431 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163733.431 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163733.431 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163733.431 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163733.431 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163733.431 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163733.431 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163733.431 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163733.431 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163733.431 Return code 1 from poll - -MQTT_LOG: 20240520 163733.431 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.431 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163733.431 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163733.431 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163733.528 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163733.528 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163733.528 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163733.528 (140737352902464) (7)> readUTFlen:387 - -MQTT_LOG: 20240520 163733.528 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559b490 - - -MQTT_LOG: 20240520 163733.528 (140737352902464) (7)< readUTFlen:401 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163733.528 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559b120 - - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163733.528 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 4112 bytes - - -MQTT_LOG: 20240520 163733.528 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163733.528 3 RTI_RTI <- PUBLISH msgid: 10 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163733.528 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163733.528 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 - - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163733.528 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559b960 - - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163733.528 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559bd50 - - -MQTT_LOG: 20240520 163733.528 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559be00 - - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163733.528 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559bee0 - - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163733.528 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559bfc0 - - -MQTT_LOG: 20240520 163733.528 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163733.528 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4336 bytes - - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163733.528 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4320 bytes - - -MQTT_LOG: 20240520 163733.528 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163733.528 3 RTI_RTI -> PUBREC msgid: 10 (0) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163733.528 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 4304 bytes - - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163733.528 Return code 1 from poll - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163733.528 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163733.528 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163733.529 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163733.529 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559c070 - - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163733.529 3 RTI_RTI <- PUBREL msgid 10 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163733.529 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559be70 - - -MQTT_LOG: 20240520 163733.529 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559c0c0 - - -MQTT_LOG: 20240520 163733.529 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559c160 - - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163733.529 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4400 bytes - - -MQTT_LOG: 20240520 163733.529 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4352 bytes - - -MQTT_LOG: 20240520 163733.529 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4320 bytes - - -MQTT_LOG: 20240520 163733.529 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4240 bytes - - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163733.529 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559b120 - - -MQTT_LOG: 20240520 163733.529 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163733.529 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559b5f0 - - -MQTT_LOG: 20240520 163733.529 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163733.529 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4240 bytes - - -MQTT_LOG: 20240520 163733.529 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163733.529 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4224 bytes - - -MQTT_LOG: 20240520 163733.529 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163733.529 3 RTI_RTI -> PUBCOMP msgid 10 (0) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163733.529 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 4208 bytes - - -MQTT_LOG: 20240520 163733.529 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163733.529 Return code 0 from poll - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.529 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.630 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.630 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163733.630 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163733.630 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163733.630 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163733.630 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163733.630 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163733.630 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163733.630 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163733.630 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163733.630 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163733.630 Return code 0 from poll - -MQTT_LOG: 20240520 163733.630 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.630 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.630 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.630 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.630 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.630 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.630 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163733.630 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163733.730 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163733.730 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163733.730 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163733.730 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163733.730 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163733.730 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163733.730 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163733.730 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163733.730 Return code 0 from poll - -MQTT_LOG: 20240520 163733.730 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.730 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.730 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.730 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.730 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.730 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.730 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163733.730 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163733.730 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163733.730 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163733.730 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163733.831 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163733.831 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163733.831 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163733.831 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163733.831 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163733.831 Return code 0 from poll - -MQTT_LOG: 20240520 163733.831 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.831 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.831 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.831 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.831 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.831 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.831 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163733.831 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163733.831 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163733.831 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163733.831 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163733.831 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163733.831 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163733.831 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163733.932 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163733.932 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163733.932 Return code 0 from poll - -MQTT_LOG: 20240520 163733.932 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.932 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.932 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.932 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.932 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163733.932 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163733.932 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163733.932 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163733.932 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163733.932 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163733.932 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163733.932 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163733.932 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163733.932 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163733.932 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163733.932 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163733.932 Return code 1 from poll - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163734.130 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163734.130 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163734.130 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> readUTFlen:387 - -MQTT_LOG: 20240520 163734.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559b960 - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< readUTFlen:401 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163734.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559b5f0 - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163734.130 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 4288 bytes - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163734.130 3 RTI_RTI <- PUBLISH msgid: 11 qos: 2 retained: 0 payload len(3):  - -MQTT_LOG: 20240520 163734.130 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163734.130 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163734.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559be30 - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163734.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559c220 - - -MQTT_LOG: 20240520 163734.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559c2d0 - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163734.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559c3b0 - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163734.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559c490 - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163734.130 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4512 bytes - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163734.130 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4496 bytes - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163734.130 3 RTI_RTI -> PUBREC msgid: 11 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163734.130 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 4480 bytes - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163734.130 Return code 1 from poll - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163734.130 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163734.130 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163734.130 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559c540 - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163734.130 3 RTI_RTI <- PUBREL msgid 11 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163734.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559c340 - - -MQTT_LOG: 20240520 163734.130 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559c590 - - -MQTT_LOG: 20240520 163734.130 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559c630 - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163734.130 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4576 bytes - - -MQTT_LOG: 20240520 163734.130 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4528 bytes - - -MQTT_LOG: 20240520 163734.130 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4496 bytes - - -MQTT_LOG: 20240520 163734.130 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4416 bytes - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163734.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559b5f0 - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163734.130 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559bac0 - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163734.130 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4416 bytes - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163734.130 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4400 bytes - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163734.130 3 RTI_RTI -> PUBCOMP msgid 11 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163734.130 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 4384 bytes - - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163734.130 Return code 0 from poll - -MQTT_LOG: 20240520 163734.130 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.231 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.231 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.231 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.231 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.231 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.231 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163734.231 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163734.231 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163734.231 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163734.231 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163734.231 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163734.231 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163734.231 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163734.231 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163734.231 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163734.231 Return code 0 from poll - -MQTT_LOG: 20240520 163734.231 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.231 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.231 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.231 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.332 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.332 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.332 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163734.332 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163734.332 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163734.332 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163734.332 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163734.332 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163734.332 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163734.332 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163734.332 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163734.332 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163734.332 Return code 0 from poll - -MQTT_LOG: 20240520 163734.332 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.332 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.332 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.332 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.332 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.332 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.332 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163734.433 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163734.433 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163734.433 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163734.433 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163734.433 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163734.433 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163734.433 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163734.433 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163734.433 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163734.433 Return code 0 from poll - -MQTT_LOG: 20240520 163734.433 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.433 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.433 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.433 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.433 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.433 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.433 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163734.433 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163734.433 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163734.433 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163734.534 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163734.534 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163734.534 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163734.534 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163734.534 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163734.534 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163734.534 Return code 0 from poll - -MQTT_LOG: 20240520 163734.534 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.534 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.534 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.534 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.534 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.534 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.534 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163734.534 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163734.534 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163734.534 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163734.534 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163734.534 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163734.534 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163734.635 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163734.635 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163734.635 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163734.635 Return code 1 from poll - -MQTT_LOG: 20240520 163734.635 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.635 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163734.635 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163734.635 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163734.635 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163734.635 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163734.635 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163734.635 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163734.635 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163734.635 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163734.635 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163734.635 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163734.635 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163734.635 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163734.635 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163734.635 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163734.702 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163734.702 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)> readUTFlen:387 - -MQTT_LOG: 20240520 163734.702 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559be30 - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< readUTFlen:401 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163734.702 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559bac0 - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163734.702 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 4464 bytes - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163734.702 3 RTI_RTI <- PUBLISH msgid: 12 qos: 2 retained: 0 payload len(1):  - -MQTT_LOG: 20240520 163734.702 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163734.702 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x7ffff0001020 - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163734.702 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559c300 - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163734.702 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559c6f0 - - -MQTT_LOG: 20240520 163734.702 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559c7a0 - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163734.702 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559c880 - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163734.702 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559c960 - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163734.702 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4688 bytes - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163734.702 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4672 bytes - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163734.702 3 RTI_RTI -> PUBREC msgid: 12 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163734.702 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 4656 bytes - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163734.702 Return code 1 from poll - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< Socket_getReadySocket:604 (3) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163734.702 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163734.702 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163734.702 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559ca10 - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163734.702 3 RTI_RTI <- PUBREL msgid 12 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163734.702 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559c810 - - -MQTT_LOG: 20240520 163734.702 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559ca60 - - -MQTT_LOG: 20240520 163734.702 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559cb00 - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163734.702 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4752 bytes - - -MQTT_LOG: 20240520 163734.702 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4704 bytes - - -MQTT_LOG: 20240520 163734.702 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4672 bytes - - -MQTT_LOG: 20240520 163734.702 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4592 bytes - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163734.702 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559bac0 - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163734.702 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559bf90 - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163734.702 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4592 bytes - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163734.702 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4576 bytes - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163734.702 3 RTI_RTI -> PUBCOMP msgid 12 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163734.702 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 4560 bytes - - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163734.702 Return code 0 from poll - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163734.702 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163734.702 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163734.702 Return code 0 from poll - -MQTT_LOG: 20240520 163734.904 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.904 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.904 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.904 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.904 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.904 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.904 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163734.904 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163734.904 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163734.904 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163734.904 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163734.904 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163734.904 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163734.904 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163734.904 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163734.904 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163734.904 Return code 0 from poll - -MQTT_LOG: 20240520 163734.904 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163734.904 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163734.904 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.004 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.004 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163735.004 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (6)> MQTTProtocol_keepalive:704 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (6)< MQTTProtocol_keepalive:781 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (7)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (7)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (7)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (7)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163735.004 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163735.004 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163735.004 Return code 0 from poll - -MQTT_LOG: 20240520 163735.105 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.105 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.105 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.105 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.105 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.105 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.105 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163735.105 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163735.105 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163735.105 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163735.105 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163735.105 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163735.105 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163735.105 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163735.105 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163735.105 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163735.105 Return code 1 from poll - -MQTT_LOG: 20240520 163735.105 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.105 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.105 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.151 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163735.151 (140737352902464) (5)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163735.151 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163735.151 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163735.151 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163735.151 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163735.151 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163735.151 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163735.151 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163735.151 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163735.151 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163735.151 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163735.151 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163735.151 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163735.151 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163735.151 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163735.151 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163735.151 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163735.151 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163735.151 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPacket_publish:562 - -MQTT_LOG: 20240520 163735.152 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 563 ptr 0x7ffff0000f60 - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)> readUTFlen:387 - -MQTT_LOG: 20240520 163735.152 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 393 ptr 0x55555559ca10 - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< readUTFlen:401 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_publish:603 - -MQTT_LOG: 20240520 163735.152 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 157 ptr 0x55555559bf90 - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPersistence_putPacket:458 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPersistence_putPacket:532 (0) - -MQTT_LOG: 20240520 163735.152 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 168, heap use now 4656 bytes - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (5)> MQTTProtocol_handlePublishes:331 - -MQTT_LOG: 20240520 163735.152 4 RTI_0 <- PUBLISH msgid: 6 qos: 2 retained: 0 payload len(1):  - -MQTT_LOG: 20240520 163735.152 Allocating 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 360 ptr 0x555555598220 - - -MQTT_LOG: 20240520 163735.152 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 264 ptr 0x55555559c070 - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTProtocol_storePublication:266 - -MQTT_LOG: 20240520 163735.152 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559c1e0 - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTProtocol_storePublication:287 - -MQTT_LOG: 20240520 163735.152 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x555555599490 - - -MQTT_LOG: 20240520 163735.152 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 411 ptr 0x55555559cc80 - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPacket_send_pubrec:737 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163735.152 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559cd60 - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163735.152 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559ce40 - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163735.152 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4880 bytes - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163735.152 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4864 bytes - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163735.152 4 RTI_0 -> PUBREC msgid: 6 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_send_pubrec:740 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPacket_freePublish:614 - -MQTT_LOG: 20240520 163735.152 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 619, heap use now 4848 bytes - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_freePublish:620 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (5)< MQTTProtocol_handlePublishes:426 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163735.152 Return code 1 from poll - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< isReady:365 (1) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (5)< Socket_getReadySocket:604 (4) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (5)> MQTTPacket_Factory:112 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)> Socket_getch:620 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163735.152 queueChar: index is now 1, headerlen 1 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPacket_decode:336 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)> WebSocket_getch:591 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> Socket_getch:620 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> SocketBuffer_getQueuedChar:229 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< SocketBuffer_getQueuedChar:248 (-22) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> SocketBuffer_queueChar:314 - -MQTT_LOG: 20240520 163735.152 queueChar: index is now 2, headerlen 2 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< SocketBuffer_queueChar:339 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< Socket_getch:641 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< WebSocket_getch:628 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_decode:352 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> WebSocket_getdata:672 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)> Socket_getdata:658 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> SocketBuffer_getQueuedData:180 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< SocketBuffer_getQueuedData:214 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> SocketBuffer_complete:289 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< SocketBuffer_complete:299 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< Socket_getdata:692 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< WebSocket_getdata:751 (1431934232) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPacket_ack:800 - -MQTT_LOG: 20240520 163735.152 Allocating 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 801 ptr 0x55555559cef0 - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_ack:840 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (5)< MQTTPacket_Factory:179 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (5)> MQTTProtocol_handlePubrels:571 - -MQTT_LOG: 20240520 163735.152 4 RTI_0 <- PUBREL msgid 6 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> Protocol_processPublication:1150 - -MQTT_LOG: 20240520 163735.152 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1151 ptr 0x55555559ccf0 - - -MQTT_LOG: 20240520 163735.152 Allocating 64 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTClient.c line 1154 ptr 0x55555559cf40 - - -MQTT_LOG: 20240520 163735.152 Allocating 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 92 ptr 0x55555559cfe0 - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< Protocol_processPublication:1197 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPersistence_remove:550 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPersistence_remove:608 (0) - -MQTT_LOG: 20240520 163735.152 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4944 bytes - - -MQTT_LOG: 20240520 163735.152 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4896 bytes - - -MQTT_LOG: 20240520 163735.152 Freeing 80 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 224, heap use now 4864 bytes - - -MQTT_LOG: 20240520 163735.152 Freeing 32 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/LinkedList.c line 229, heap use now 4784 bytes - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTPacket_send_pubcomp:778 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)> MQTTPacket_send_ack:654 - -MQTT_LOG: 20240520 163735.152 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 655 ptr 0x55555559bf90 - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)> MQTTPacket_send:201 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163735.152 Allocating 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 203 ptr 0x55555559c460 - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> MQTTPacket_encode:304 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< MQTTPacket_encode:317 (1) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)> WebSocket_putdatas:944 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (10)> Socket_putdatas:797 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (11)> Socket_writev:721 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (11)< Socket_writev:773 (4) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (10)< Socket_putdatas:852 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (9)< WebSocket_putdatas:975 (0) - -MQTT_LOG: 20240520 163735.152 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 233, heap use now 4784 bytes - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (8)< MQTTPacket_send:236 (0) - -MQTT_LOG: 20240520 163735.152 Freeing 16 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTPacket.c line 664, heap use now 4768 bytes - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (7)< MQTTPacket_send_ack:666 (0) - -MQTT_LOG: 20240520 163735.152 4 RTI_0 -> PUBCOMP msgid 6 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTPacket_send_pubcomp:781 (0) - -MQTT_LOG: 20240520 163735.152 Freeing 48 bytes in heap at file /home/dongha/project/paho.mqtt.c/src/MQTTProtocolClient.c line 630, heap use now 4752 bytes - - -MQTT_LOG: 20240520 163735.152 (140737352902464) (5)< MQTTProtocol_handlePubrels:631 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163735.152 Return code 0 from poll - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.152 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.253 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.253 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.253 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163735.253 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163735.253 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163735.253 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163735.253 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163735.253 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163735.253 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163735.253 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163735.253 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163735.253 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163735.253 Return code 0 from poll - -MQTT_LOG: 20240520 163735.253 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.253 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.253 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.253 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.253 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.253 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.253 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163735.353 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163735.353 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163735.353 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163735.353 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163735.353 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163735.353 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163735.353 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163735.353 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163735.353 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163735.353 Return code 0 from poll - -MQTT_LOG: 20240520 163735.353 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.353 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.353 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.353 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.353 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.353 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.353 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163735.353 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163735.353 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163735.353 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163735.454 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163735.454 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163735.454 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163735.454 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163735.454 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163735.454 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163735.454 Return code 0 from poll - -MQTT_LOG: 20240520 163735.454 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.454 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.454 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.454 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.454 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.454 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.454 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163735.454 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163735.454 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163735.454 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163735.454 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163735.454 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163735.454 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163735.555 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163735.555 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163735.555 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163735.555 Return code 0 from poll - -MQTT_LOG: 20240520 163735.555 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.555 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.555 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.555 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.555 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.555 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.555 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163735.555 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163735.555 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163735.555 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163735.555 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163735.555 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163735.555 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163735.555 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163735.555 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163735.555 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163735.757 Return code 0 from poll - -MQTT_LOG: 20240520 163735.757 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.757 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.757 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.757 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.757 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.757 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.757 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163735.757 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163735.757 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163735.757 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163735.757 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163735.757 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163735.757 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163735.757 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163735.757 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163735.757 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163735.757 Return code 0 from poll - -MQTT_LOG: 20240520 163735.757 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.757 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.857 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.857 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.857 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.857 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.857 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163735.857 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163735.857 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163735.857 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163735.857 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163735.857 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163735.857 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163735.857 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163735.857 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163735.857 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163735.857 Return code 0 from poll - -MQTT_LOG: 20240520 163735.857 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.857 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.857 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.857 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.857 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.958 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.958 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163735.958 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163735.958 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163735.958 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163735.958 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163735.958 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163735.958 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163735.958 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163735.958 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163735.958 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163735.958 Return code 0 from poll - -MQTT_LOG: 20240520 163735.958 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.958 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.958 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.958 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.958 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163735.958 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163735.958 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163735.958 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163736.059 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163736.059 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163736.059 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163736.059 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163736.059 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163736.059 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163736.059 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163736.059 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163736.059 Return code 0 from poll - -MQTT_LOG: 20240520 163736.059 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.059 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.059 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.059 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.059 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.059 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.059 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163736.059 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163736.059 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163736.059 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163736.059 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163736.160 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163736.160 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163736.160 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163736.160 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163736.160 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163736.160 Return code 0 from poll - -MQTT_LOG: 20240520 163736.160 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.160 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.160 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.160 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.160 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.160 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.160 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163736.160 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163736.160 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163736.160 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163736.160 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163736.160 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163736.160 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163736.160 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163736.260 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163736.260 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163736.260 Return code 0 from poll - -MQTT_LOG: 20240520 163736.260 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.260 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.260 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.260 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.260 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.260 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.260 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163736.260 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163736.260 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163736.260 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163736.260 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163736.260 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163736.260 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163736.260 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163736.260 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163736.260 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163736.260 Return code 0 from poll - -MQTT_LOG: 20240520 163736.462 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.462 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.462 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.462 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.462 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.462 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.462 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163736.462 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163736.462 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163736.462 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163736.462 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163736.462 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163736.462 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163736.462 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163736.462 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163736.462 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163736.462 Return code 0 from poll - -MQTT_LOG: 20240520 163736.462 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.462 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.462 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.563 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.563 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.563 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.563 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163736.563 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163736.563 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163736.563 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163736.563 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163736.563 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163736.563 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163736.563 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163736.563 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163736.563 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163736.563 Return code 0 from poll - -MQTT_LOG: 20240520 163736.563 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.563 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.563 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.563 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.563 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.563 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.664 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163736.664 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163736.664 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163736.664 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163736.664 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163736.664 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163736.664 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163736.664 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163736.664 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163736.664 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163736.664 Return code 0 from poll - -MQTT_LOG: 20240520 163736.664 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.664 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.664 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.664 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.664 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.664 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.664 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163736.664 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163736.664 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163736.765 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163736.765 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163736.765 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163736.765 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163736.765 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163736.765 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163736.765 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163736.765 Return code 0 from poll - -MQTT_LOG: 20240520 163736.765 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.765 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.765 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.765 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.765 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.765 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.765 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163736.765 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163736.765 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163736.765 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163736.765 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163736.765 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163736.866 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163736.866 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163736.866 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163736.866 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163736.866 Return code 0 from poll - -MQTT_LOG: 20240520 163736.866 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.866 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.866 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.866 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.866 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.866 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.866 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163736.866 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163736.866 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163736.866 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163736.866 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163736.866 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163736.866 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163736.866 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163736.866 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163736.966 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163736.966 Return code 0 from poll - -MQTT_LOG: 20240520 163736.966 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.966 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.966 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.966 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.966 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163736.966 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163736.966 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163736.966 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163736.966 (140737352902464) (6)> MQTTProtocol_keepalive:704 - -MQTT_LOG: 20240520 163736.966 (140737352902464) (6)< MQTTProtocol_keepalive:781 - -MQTT_LOG: 20240520 163736.966 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163736.966 (140737352902464) (7)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163736.966 (140737352902464) (7)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163736.966 (140737352902464) (7)> MQTTProtocol_retries:795 - -MQTT_LOG: 20240520 163736.966 (140737352902464) (7)< MQTTProtocol_retries:862 - -MQTT_LOG: 20240520 163736.966 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163736.966 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163736.966 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163737.067 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163737.067 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163737.067 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163737.067 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163737.067 Return code 0 from poll - -MQTT_LOG: 20240520 163737.067 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.067 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.067 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.067 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.067 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.067 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.067 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163737.067 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163737.067 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163737.067 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163737.067 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163737.067 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163737.067 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163737.067 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163737.067 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163737.168 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163737.168 Return code 0 from poll - -MQTT_LOG: 20240520 163737.168 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.168 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.168 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.168 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.168 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.168 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.168 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163737.168 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163737.168 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163737.168 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163737.168 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163737.168 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163737.168 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163737.168 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163737.168 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163737.168 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163737.168 Return code 0 from poll - -MQTT_LOG: 20240520 163737.168 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.370 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.370 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.370 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.370 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.370 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.370 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163737.370 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163737.370 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163737.370 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163737.370 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163737.370 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163737.370 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163737.370 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163737.370 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163737.370 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163737.370 Return code 0 from poll - -MQTT_LOG: 20240520 163737.370 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.370 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.370 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.370 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.470 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.470 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.470 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163737.470 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163737.470 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163737.470 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163737.470 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163737.470 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163737.470 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163737.470 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163737.470 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163737.470 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163737.470 Return code 0 from poll - -MQTT_LOG: 20240520 163737.470 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.470 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.470 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.470 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.470 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.470 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.470 (140737352902464) (5)< Socket_getReadySocket:604 (0) - -MQTT_LOG: 20240520 163737.571 (140737352902464) (5)> MQTTClient_retry:2545 - -MQTT_LOG: 20240520 163737.571 (140737352902464) (6)> MQTTProtocol_retry:905 - -MQTT_LOG: 20240520 163737.571 (140737352902464) (6)< MQTTProtocol_retry:924 - -MQTT_LOG: 20240520 163737.571 (140737352902464) (5)< MQTTClient_retry:2555 - -MQTT_LOG: 20240520 163737.571 (140737352902464) (4)< MQTTClient_cycle:2650 (0) - -MQTT_LOG: 20240520 163737.571 (140737352902464) (4)> MQTTClient_cycle:2566 - -MQTT_LOG: 20240520 163737.571 (140737352902464) (5)> Socket_getReadySocket:495 - -MQTT_LOG: 20240520 163737.571 (140737352902464) (6)> Socket_continueWrites:1402 - -MQTT_LOG: 20240520 163737.571 (140737352902464) (6)< Socket_continueWrites:1453 (0) - -MQTT_LOG: 20240520 163737.571 Return code 0 from poll - -MQTT_LOG: 20240520 163737.571 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.571 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.571 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.571 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.571 (140737352902464) (6)> isReady:353 - -MQTT_LOG: 20240520 163737.571 (140737352902464) (6)< isReady:365 (0) - -MQTT_LOG: 20240520 163737.571 (140737352902464) (5) \ No newline at end of file diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 674cc48d9..bd6076f48 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -383,9 +383,10 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len int topicLen; MQTTClient_message* message = NULL; int rc; + int bytes_read; LF_PRINT_LOG("RECEIVING message from federateID %d", drv->my_federate_id); - rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 1000000); + rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 10000); if (rc != MQTTCLIENT_SUCCESS) { lf_print_error("Failed to receive message, return code %d.", rc); if (topicName) { @@ -420,6 +421,41 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len } return bytes_read; } + instant_t start_receive = lf_time_physical(); + while (1) { + if (CHECK_TIMEOUT(start_receive, CONNECT_TIMEOUT)) { + lf_print_error("Failed to receive with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); + bytes_read = -1; + break; + } + rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 1000); + if (rc != MQTTCLIENT_SUCCESS) { + lf_print_error("Failed to receive message, return code %d.", rc); + continue; + } else if (message == NULL) { + // This means the call succeeded but no message was received within the timeout + lf_print_log("No message received within the MQTTClient_receive() timeout period."); + continue; + } else { + // Successfully received a message + lf_print_log("Successfully received message, return code %d.", rc); + memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); + bytes_read = message->payloadlen; + LF_PRINT_LOG("RECEIVED message from federateID %d", drv->my_federate_id); + if (buffer[0] == MQTT_RESIGNED) { + LF_PRINT_LOG("Received MQTT_RESIGNED message from federateID %d", drv->my_federate_id); + bytes_read = 0; + } + break; + } + } + if (topicName) { + MQTTClient_free(topicName); + } + if (message) { + MQTTClient_freeMessage(&message); + } + return bytes_read; } char* get_host_name(netdrv_t* drv) { From 02022750b16a918dbdba1a95d997368b88108bc3 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 21 May 2024 17:41:44 -0700 Subject: [PATCH 243/262] Minor fixes. Enable handling resign. --- core/federated/RTI/rti_remote.c | 38 ++++++++++------------ core/federated/federate.c | 13 ++++---- core/federated/network/lf_mqtt_support.c | 36 -------------------- core/federated/network/lf_socket_support.c | 6 ++-- 4 files changed, 29 insertions(+), 64 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 1b77d2da0..781e84f12 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -73,7 +73,7 @@ void notify_tag_advance_grant(scheduling_node_t* e, tag_t tag) { tracepoint_rti_to_federate(send_TAG, e->id, &tag); } // This function is called in notify_advance_grant_if_safe(), which is a long - // function. During this call, the socket might close, causing the following write_to_socket + // function. During this call, the netdriver might close, causing the following write_to_netdrv // to fail. Consider a failure here a soft failure and update the federate's status. if (write_to_netdrv(((federate_info_t*)e)->fed_netdrv, message_length, buffer) <= 0) { lf_print_error("RTI failed to send tag advance grant to federate %d.", e->id); @@ -106,7 +106,7 @@ void notify_provisional_tag_advance_grant(scheduling_node_t* e, tag_t tag) { tracepoint_rti_to_federate(send_PTAG, e->id, &tag); } // This function is called in notify_advance_grant_if_safe(), which is a long - // function. During this call, the socket might close, causing the following write_to_socket + // function. During this call, the netdriver might close, causing the following write_to_netdrv // to fail. Consider a failure here a soft failure and update the federate's status. if (write_to_netdrv(((federate_info_t*)e)->fed_netdrv, message_length, buffer) <= 0) { lf_print_error("RTI failed to send tag advance grant to federate %d.", e->id); @@ -165,7 +165,7 @@ void handle_port_absent_message(federate_info_t* sending_federate, unsigned char } // Need to acquire the mutex lock to ensure that the thread handling - // messages coming from the socket connected to the destination does not + // messages coming from the netdriver connected to the destination does not // issue a TAG before this message has been forwarded. LF_MUTEX_LOCK(&rti_mutex); @@ -247,7 +247,7 @@ void handle_timed_message(federate_info_t* sending_federate, unsigned char* buff } // Need to acquire the mutex lock to ensure that the thread handling - // messages coming from the socket connected to the destination does not + // messages coming from the netdriver connected to the destination does not // issue a TAG before this message has been forwarded. LF_MUTEX_LOCK(&rti_mutex); @@ -862,13 +862,13 @@ static void handle_federate_failed(federate_info_t* my_fed) { * * This function assumes the caller does not hold the mutex. * + * //TODO: Change comments. * @note At this point, the RTI might have outgoing messages to the federate. This * function thus first performs a shutdown on the socket, which sends an EOF. It then * waits for the remote socket to be closed before closing the socket itself. * * @param my_fed The federate sending a MSG_TYPE_RESIGN message. */ -// TODO: NEEDS TO BE CHANGED. static void handle_federate_resign(federate_info_t* my_fed) { // Nothing more to do. Close the socket and exit. LF_MUTEX_LOCK(&rti_mutex); @@ -910,8 +910,8 @@ void* federate_info_thread_TCP(void* fed) { // Read no more than one byte to get the message type. ssize_t bytes_read = read_from_netdrv(my_fed->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); if (bytes_read <= 0) { - // Socket is closed - lf_print_warning("RTI: Socket to federate %d is closed. Exiting the thread.", my_fed->enclave.id); + // Netdriver is closed + lf_print_warning("RTI: Netdriver to federate %d is closed. Exiting the thread.", my_fed->enclave.id); my_fed->enclave.state = NOT_CONNECTED; // FIXME: We need better error handling here, but do not stop execution here. break; @@ -931,7 +931,7 @@ void* federate_info_thread_TCP(void* fed) { handle_timed_message(my_fed, buffer, FED_COM_BUFFER_SIZE, bytes_read); break; case MSG_TYPE_RESIGN: - // handle_federate_resign(my_fed); + handle_federate_resign(my_fed); return NULL; case MSG_TYPE_NEXT_EVENT_TAG: handle_next_event_tag(my_fed, buffer + 1); @@ -951,7 +951,7 @@ void* federate_info_thread_TCP(void* fed) { handle_federate_failed(my_fed); return NULL; default: - lf_print_error("RTI received from federate %d an unrecognized TCP message type: %u.", my_fed->enclave.id, + lf_print_error("RTI received from federate %d an unrecognized message type: %u.", my_fed->enclave.id, buffer[0]); if (rti_remote->base.tracing_enabled) { tracepoint_rti_from_federate(receive_UNIDENTIFIED, my_fed->enclave.id, NULL); @@ -959,8 +959,8 @@ void* federate_info_thread_TCP(void* fed) { } } - // Nothing more to do. Close the socket and exit. - // Prevent multiple threads from closing the same socket at the same time. + // Nothing more to do. Close the netdriver and exit. + // Prevent multiple threads from closing the same netdriver at the same time. LF_MUTEX_LOCK(&rti_mutex); close_netdrv(my_fed->fed_netdrv); LF_MUTEX_UNLOCK(&rti_mutex); @@ -975,7 +975,7 @@ void send_reject(netdrv_t* netdrv, unsigned char error_code) { LF_MUTEX_LOCK(&rti_mutex); // NOTE: Ignore errors on this response. if (write_to_netdrv(netdrv, 2, response) <= 0) { - lf_print_warning("RTI failed to write MSG_TYPE_REJECT message on the socket."); + lf_print_warning("RTI failed to write MSG_TYPE_REJECT message on the netdriver."); } // Shutdown and close the netdrv. close_netdrv(netdrv); @@ -987,8 +987,7 @@ void send_reject(netdrv_t* netdrv, unsigned char error_code) { * a federate ID and a federation ID. If the federation ID * matches this federation, send an MSG_TYPE_ACK and otherwise send * a MSG_TYPE_REJECT message. - * @param socket_id Pointer to the socket on which to listen. - * @param client_fd The socket address. + * @param netdrv_t Pointer to the netdriver on which to listen. * @return The federate ID for success or -1 for failure. */ // TODO: UPDATE comments. @@ -998,7 +997,7 @@ static int32_t receive_and_check_fed_id_message(netdrv_t* netdrv) { // Read bytes from the socket. We need 4 bytes. if (read_from_netdrv_close_on_error(netdrv, buffer, 256) <= 0) { // TODO: check length. - lf_print_error("RTI failed to read from accepted socket."); + lf_print_error("RTI failed to read from accepted netdriver."); return -1; } @@ -1184,7 +1183,6 @@ static int receive_connection_information(netdrv_t* netdrv, uint16_t fed_id) { return 1; } -// TODO: NEEDS TO BE FIXED!! /** * Listen for a MSG_TYPE_UDP_PORT message, and upon receiving it, set up * clock synchronization and perform the initial clock synchronization. @@ -1193,7 +1191,7 @@ static int receive_connection_information(netdrv_t* netdrv, uint16_t fed_id) { * up to perform runtime clock synchronization using the UDP port number * specified in the payload to communicate with the federate's clock * synchronization logic. - * @param socket_id The socket on which to listen. + * @param socket_id The netdriver on which to listen. * @param fed_id The federate ID. * @return 1 for success, 0 for failure. */ @@ -1231,7 +1229,7 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t* netdrv, uint16_t size_t message_size = 1 + sizeof(int32_t); unsigned char buffer[message_size]; read_from_netdrv_fail_on_error(netdrv, buffer, message_size, NULL, - "Socket to federate %d unexpectedly closed.", fed_id); + "Netdriver to federate %d unexpectedly closed.", fed_id); if (buffer[0] == MSG_TYPE_CLOCK_SYNC_T3) { int32_t fed_id = extract_int32(&(buffer[1])); assert(fed_id > -1); @@ -1275,7 +1273,7 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t* netdrv, uint16_t /** * Authenticate incoming federate by performing HMAC-based authentication. * - * @param socket Socket for the incoming federate tryting to authenticate. + * @param fed_netdrv Netdriver for the incoming federate tryting to authenticate. * @return True if authentication is successful and false otherwise. */ static bool authenticate_federate(netdrv_t* fed_netdrv) { @@ -1453,7 +1451,7 @@ void wait_for_federates(netdrv_t* netdrv) { // All federates have connected. lf_print("RTI: All expected federates have connected. Starting execution."); - // The socket server will not continue to accept connections after all the federates + // The netdriver server will not continue to accept connections after all the federates // have joined. // In case some other federation's federates are trying to join the wrong // federation, need to respond. Start a separate thread to do that. diff --git a/core/federated/federate.c b/core/federated/federate.c index 8a89b9a74..2217a3860 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -382,6 +382,7 @@ static trigger_handle_t schedule_message_received_from_network_locked(environmen * federate. * @param flag 0 if an EOF was received, -1 if a netdriver error occurred, 1 otherwise. */ +//TODO: need discussion here. static void close_inbound_netdrv(int fed_id, int flag) { LF_MUTEX_LOCK(&netdrv_mutex); if (_fed.netdrv_for_inbound_p2p_connections[fed_id] != NULL) { @@ -798,12 +799,12 @@ static void* listen_to_federates(void* _args) { * if _lf_normal_termination is true and otherwise proceeds without the lock. * @param fed_id The ID of the peer federate receiving messages from this * federate, or -1 if the RTI (centralized coordination). - * @param flag 0 if the netdriver has received EOF, 1 if not, -1 if abnormal termination. + * @param flag 1 if normal termination, -1 if abnormal termination. */ -// TODO: DONGHA: NEED TO FIX +// TODO: DONGHA: Need discussion here. static void close_outbound_netdrv(int fed_id, int flag) { assert(fed_id >= 0 && fed_id < NUMBER_OF_FEDERATES); - if (_lf_normal_termination) { + if (flag) { LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); } if (_fed.netdrv_for_outbound_p2p_connections[fed_id] != NULL) { @@ -825,7 +826,7 @@ static void close_outbound_netdrv(int fed_id, int flag) { close_netdrv(_fed.netdrv_for_outbound_p2p_connections[fed_id]); _fed.netdrv_for_outbound_p2p_connections[fed_id] = NULL; } - if (_lf_normal_termination) { + if (flag) { LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); } } @@ -1418,7 +1419,7 @@ static void handle_rti_failed_message(void) { exit(1); } * When messages arrive, this calls the appropriate handler. * @param args Ignored */ -static void* listen_to_rti_TCP(void* args) { +static void* listen_to_rti(void* args) { (void)args; initialize_lf_thread_id(); // Buffer for incoming messages. @@ -2496,7 +2497,7 @@ void lf_synchronize_with_other_federates(void) { // @note Up until this point, the federate has been listening for messages // from the RTI in a sequential manner in the main thread. From now on, a // separate thread is created to allow for asynchronous communication. - lf_thread_create(&_fed.RTI_netdrv_listener, listen_to_rti_TCP, NULL); + lf_thread_create(&_fed.RTI_netdrv_listener, listen_to_rti, NULL); lf_thread_t thread_id; if (create_clock_sync_thread(&thread_id)) { lf_print_warning("Failed to create thread to handle clock synchronization."); diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index bd6076f48..42ed0d022 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -385,42 +385,6 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len int rc; int bytes_read; LF_PRINT_LOG("RECEIVING message from federateID %d", drv->my_federate_id); - - rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 10000); - if (rc != MQTTCLIENT_SUCCESS) { - lf_print_error("Failed to receive message, return code %d.", rc); - if (topicName) { - MQTTClient_free(topicName); - } - if (message) { - MQTTClient_freeMessage(&message); - } - return -1; - } else if (message == NULL) { - // This means the call succeeded but no message was received within the timeout - lf_print_log("No message received within the timeout period."); - if (topicName) { - MQTTClient_free(topicName); - } - return -1; - } else { - // Successfully received a message - lf_print_log("Successfully received message, return code %d.", rc); - memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); - int bytes_read = message->payloadlen; - if (topicName) { - MQTTClient_free(topicName); - } - if (message) { - MQTTClient_freeMessage(&message); - } - LF_PRINT_LOG("RECEIVED message from federateID %d", drv->my_federate_id); - if (buffer[0] == MQTT_RESIGNED) { - LF_PRINT_LOG("Received MQTT_RESIGNED message from federateID %d", drv->my_federate_id); - return 0; - } - return bytes_read; - } instant_t start_receive = lf_time_physical(); while (1) { if (CHECK_TIMEOUT(start_receive, CONNECT_TIMEOUT)) { diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 83d866b3a..6f144b783 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -177,11 +177,13 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len lf_print_warning("Reading from socket failed. Will try again."); lf_sleep(DELAY_BETWEEN_SOCKET_RETRIES); continue; - } else if (bytes_read <= 0) { + } else if (bytes_read < 0) { + return -1; + } else if (bytes_read == 0) { // An error occurred without those three error codes. // https://stackoverflow.com/questions/42188128/does-reading-from-a-socket-wait-or-get-eof // bytes_read == 0 means disconnected. - return -1; + return 0; } bytes_to_read -= bytes_read; total_bytes_read += bytes_read; From a48e850d748fb69d515e30c4139f45d32ed8c546 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 22 May 2024 14:34:36 -0700 Subject: [PATCH 244/262] Fix Clock-sync to work on MQTT. --- core/federated/RTI/rti_remote.c | 20 +++++++++++++------ core/federated/clock-sync.c | 21 ++++++++++---------- core/federated/federate.c | 25 +++++++++++++++++------- core/federated/network/lf_mqtt_support.c | 2 +- core/federated/network/socket_common.c | 2 -- include/core/federated/clock-sync.h | 2 +- 6 files changed, 44 insertions(+), 28 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 781e84f12..2c0c62c76 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -553,7 +553,6 @@ void handle_stop_request_reply(federate_info_t* fed, unsigned char* buffer) { ////////////////////////////////////////////////// -// TODO: The whole message needs to be changed. It should not be port and IP specific. void handle_address_query(uint16_t fed_id, unsigned char* buffer) { federate_info_t* fed = GET_FED_INFO(fed_id); @@ -951,8 +950,7 @@ void* federate_info_thread_TCP(void* fed) { handle_federate_failed(my_fed); return NULL; default: - lf_print_error("RTI received from federate %d an unrecognized message type: %u.", my_fed->enclave.id, - buffer[0]); + lf_print_error("RTI received from federate %d an unrecognized message type: %u.", my_fed->enclave.id, buffer[0]); if (rti_remote->base.tracing_enabled) { tracepoint_rti_from_federate(receive_UNIDENTIFIED, my_fed->enclave.id, NULL); } @@ -1200,8 +1198,14 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t* netdrv, uint16_t // clock synchronization. This message will tell the RTI whether the federate // is doing clock synchronization, and if it is, what port to use for UDP. LF_PRINT_DEBUG("RTI waiting for MSG_TYPE_UDP_PORT from federate %d.", fed_id); - unsigned char response[1 + sizeof(uint16_t)]; - read_from_netdrv_fail_on_error(netdrv, response, 1 + sizeof(uint16_t), NULL, + size_t buffer_size; +#if defined(COMM_TYPE_TCP) || defined(COMM_TYPE_SST) + buffer_size = 1 + sizeof(uint16_t); +#elif defined(COMM_TYPE_MQTT) + buffer_size = 1 + sizeof(uint16_t) + INET_ADDRSTRLEN; +#endif + unsigned char response[buffer_size]; + read_from_netdrv_fail_on_error(netdrv, response, buffer_size, NULL, "RTI failed to read MSG_TYPE_UDP_PORT message from federate %d.", fed_id); if (response[0] != MSG_TYPE_UDP_PORT) { lf_print_error("RTI was expecting a MSG_TYPE_UDP_PORT message from federate %d. Got %u instead. " @@ -1248,10 +1252,14 @@ static int receive_udp_message_and_set_up_clock_sync(netdrv_t* netdrv, uint16_t // If no runtime clock sync, no need to set up the UDP port. // Initialize the UDP_addr field of the federate struct // TODO: DONGHA - Need to know the ip_address of the federate. - // fed->UDP_addr.sin_family = AF_INET; fed->UDP_addr.sin_port = htons(federate_UDP_port_number); + +#if defined(COMM_TYPE_TCP) || defined(COMM_TYPE_SST) fed->UDP_addr.sin_addr = *get_ip_addr(netdrv); +#elif defined(COMM_TYPE_MQTT) + inet_pton(AF_INET, &(response[1 + sizeof(uint16_t)]), &(fed->UDP_addr.sin_addr)); +#endif } else { // Disable clock sync after initial round. fed->clock_synchronization_enabled = false; diff --git a/core/federated/clock-sync.c b/core/federated/clock-sync.c index 436ab7b44..af885960e 100644 --- a/core/federated/clock-sync.c +++ b/core/federated/clock-sync.c @@ -161,33 +161,31 @@ void reset_socket_stat(struct socket_stat_t* socket_stat) { * If clock synchronization is set to on, a reserved UDP port number * will be sent. */ -uint16_t setup_clock_synchronization_with_rti() { +uint16_t setup_clock_synchronization_with_rti(struct sockaddr_in* federate_UDP_addr) { uint16_t port_to_return = UINT16_MAX; #ifdef _LF_CLOCK_SYNC_ON // Initialize the UDP socket _lf_rti_socket_UDP = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - // Initialize the necessary information for the UDP address - struct sockaddr_in federate_UDP_addr; - federate_UDP_addr.sin_family = AF_INET; - federate_UDP_addr.sin_port = htons(0u); // Port 0 indicates to bind that + federate_UDP_addr->sin_family = AF_INET; + federate_UDP_addr->sin_port = htons(0u); // Port 0 indicates to bind that // it can assign any port to this // socket. This is okay because // the port number is then sent // to the RTI. - federate_UDP_addr.sin_addr.s_addr = INADDR_ANY; - if (bind(_lf_rti_socket_UDP, (struct sockaddr*)&federate_UDP_addr, sizeof(federate_UDP_addr)) < 0) { + federate_UDP_addr->sin_addr.s_addr = INADDR_ANY; + if (bind(_lf_rti_socket_UDP, (struct sockaddr*)federate_UDP_addr, sizeof(*federate_UDP_addr)) < 0) { lf_print_error_system_failure("Failed to bind its UDP socket."); } // Retrieve the port number that was assigned by the operating system - socklen_t addr_length = sizeof(federate_UDP_addr); - if (getsockname(_lf_rti_socket_UDP, (struct sockaddr*)&federate_UDP_addr, &addr_length) == -1) { + socklen_t addr_length = sizeof(*federate_UDP_addr); + if (getsockname(_lf_rti_socket_UDP, (struct sockaddr*)federate_UDP_addr, &addr_length) == -1) { // FIXME: Send 0 UDP_PORT message instead of exiting. // That will disable clock synchronization. lf_print_error_system_failure("Failed to retrieve UDP port."); } - LF_PRINT_DEBUG("Assigned UDP port number %u to its socket.", ntohs(federate_UDP_addr.sin_port)); + LF_PRINT_DEBUG("Assigned UDP port number %u to its socket.", ntohs(federate_UDP_addr->sin_port)); - port_to_return = ntohs(federate_UDP_addr.sin_port); + port_to_return = ntohs(federate_UDP_addr->sin_port); // Set the option for this socket to reuse the same address int option_value = 1; @@ -207,6 +205,7 @@ uint16_t setup_clock_synchronization_with_rti() { port_to_return = 0u; #endif // _LF_CLOCK_SYNC_INITIAL #endif // _LF_CLOCK_SYNC_ON + (void) federate_UDP_addr; // To pass unused-value warning. return port_to_return; } diff --git a/core/federated/federate.c b/core/federated/federate.c index 2217a3860..777a08962 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -382,7 +382,7 @@ static trigger_handle_t schedule_message_received_from_network_locked(environmen * federate. * @param flag 0 if an EOF was received, -1 if a netdriver error occurred, 1 otherwise. */ -//TODO: need discussion here. +// TODO: need discussion here. static void close_inbound_netdrv(int fed_id, int flag) { LF_MUTEX_LOCK(&netdrv_mutex); if (_fed.netdrv_for_inbound_p2p_connections[fed_id] != NULL) { @@ -1557,7 +1557,6 @@ static bool bounded_NET(tag_t* tag) { * generates an empty implementation. * @param env The environment of the federate */ -//TODO: Fix here. void lf_terminate_execution(environment_t* env) { assert(env != GLOBAL_ENVIRONMENT); @@ -1886,20 +1885,32 @@ void lf_connect_to_rti(const char* hostname, int port) { // @see MSG_TYPE_NEIGHBOR_STRUCTURE in net_common.h lf_send_neighbor_structure_to_RTI(_fed.netdrv_to_rti); - // TODO: DONGHA: Handle UDP Clock sync. - uint16_t udp_port = setup_clock_synchronization_with_rti(); + // The IP address of the federate is known to the RTI when using TCP connections, while + // establish_communication_session(). However, when using MQTT, the federate has to send it's IP address to the RTI to + // do UDP clock synchronization. Thus, it sends the IPv4 address after the UDP port number. + struct sockaddr_in federate_UDP_addr; + uint16_t udp_port = setup_clock_synchronization_with_rti(&federate_UDP_addr); - // Write the returned port number to the RTI - unsigned char UDP_port_number[1 + sizeof(uint16_t)]; + size_t buffer_size = 1 + sizeof(uint16_t) + INET_ADDRSTRLEN; + unsigned char UDP_port_number[buffer_size]; UDP_port_number[0] = MSG_TYPE_UDP_PORT; encode_uint16(udp_port, &(UDP_port_number[1])); +#if defined(COMM_TYPE_TCP) || defined(COMM_TYPE_SST) + // Write the returned port number to the RTI write_to_netdrv_fail_on_error(_fed.netdrv_to_rti, 1 + sizeof(uint16_t), UDP_port_number, NULL, "Failed to send the UDP port number to the RTI."); +#elif defined(COMM_TYPE_MQTT) + // Write the returned port number and IPv4 address to the RTI. + // If the clock-sync is init or off, it will fill it to 0.0.0.0. + inet_ntop(AF_INET, &federate_UDP_addr, (char*)&(UDP_port_number[1 + sizeof(uint16_t)]), INET_ADDRSTRLEN); + // Write the buffer to the network driver + write_to_netdrv_fail_on_error(_fed.netdrv_to_rti, buffer_size, UDP_port_number, NULL, + "Failed to send the UDP port number and IPv4 address to the RTI."); +#endif lf_print("Connected to RTI at %s:%d.", hostname, uport); } -// TODO: DONGHA: NEED to make specified port work. // specified_port is 0 on default. void lf_create_server(int specified_port) { netdrv_t* my_netdrv = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 42ed0d022..5a9416665 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -392,7 +392,7 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len bytes_read = -1; break; } - rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 1000); + rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 10000); if (rc != MQTTCLIENT_SUCCESS) { lf_print_error("Failed to receive message, return code %d.", rc); continue; diff --git a/core/federated/network/socket_common.c b/core/federated/network/socket_common.c index 95c50eb66..fcd8a64a9 100644 --- a/core/federated/network/socket_common.c +++ b/core/federated/network/socket_common.c @@ -10,7 +10,6 @@ #include #include #include -#include #include "util.h" #include "net_common.h" @@ -92,7 +91,6 @@ int create_real_time_tcp_socket_errexit() { // If the RTI port is 0 (not specified), it will use RTI_DEFAULT_PORT as default. // If the federate server's port is 0 (not specified), the OS will assign the port. int create_TCP_server(socket_priv_t* priv, int server_type, uint16_t port) { - assert(port <= UINT16_MAX && port >= 0); uint16_t specified_port = port; // When server type is RTI, and port is not specified, set port as RTI_DEFAULT_PORT. diff --git a/include/core/federated/clock-sync.h b/include/core/federated/clock-sync.h index 300b34fad..9f1cb1e1b 100644 --- a/include/core/federated/clock-sync.h +++ b/include/core/federated/clock-sync.h @@ -141,7 +141,7 @@ void reset_socket_stat(struct socket_stat_t* socket_stat); * * @return port number to be sent to the RTI */ -uint16_t setup_clock_synchronization_with_rti(void); +uint16_t setup_clock_synchronization_with_rti(struct sockaddr_in* federate_UDP_addr); /** * Synchronize the initial physical clock with the RTI. From 9150fe42e77178e0e8d19ffeed9abdf2a53f612b Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 22 May 2024 17:47:58 -0700 Subject: [PATCH 245/262] Fix many comments and bugs. --- core/federated/federate.c | 14 +- core/federated/network/lf_mqtt_support.c | 228 +++++++++--------- .../federated/network/type/lf_mqtt_support.h | 4 +- 3 files changed, 124 insertions(+), 122 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index 777a08962..f5c0fdb77 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1649,6 +1649,7 @@ void send_address_advertisement_to_RTI(netdrv_t* fed_netdrv, netdrv_t* rti_netdr * @return int */ static void get_remote_federate_info_from_RTI(uint16_t remote_federate_id, netdrv_t* rti_netdrv, netdrv_t* fed_netdrv) { +// Do not send port for MQTT. It only needs to know the target federate's ID. #if defined(COMM_TYPE_TCP) || defined(COMM_TYPE_SST) // The buffer is used for both sending and receiving replies. // The size is what is needed for receiving replies. @@ -1705,10 +1706,10 @@ static void get_remote_federate_info_from_RTI(uint16_t remote_federate_id, netdr // Must set as specified port. Or else, the port will be increased when connecting to the other federate. set_specified_port(fed_netdrv, port); #elif defined(COMM_TYPE_MQTT) - // Do not send port for MQTT. It only needs to know the target federate's ID. - set_target_id(fed_netdrv, remote_federate_id); - if (rti_netdrv == NULL) { - } // JUST TO PASS COMPILER. + // // Do not send port for MQTT. It only needs to know the target federate's ID. + // set_target_id(fed_netdrv, remote_federate_id); + // if (rti_netdrv == NULL) { + // } // JUST TO PASS COMPILER. #endif } @@ -1722,6 +1723,9 @@ void lf_connect_to_federate(uint16_t remote_federate_id) { // Initialize the netdriver to connect the remote federate. netdrv_t* netdrv = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); +#if defined(COMM_TYPE_MQTT) + set_target_id(netdrv, remote_federate_id); +#endif create_connector(netdrv); get_remote_federate_info_from_RTI(remote_federate_id, _fed.netdrv_to_rti, netdrv); result = connect_to_netdrv(netdrv); @@ -1793,11 +1797,11 @@ void lf_connect_to_rti(const char* hostname, int port) { // Initialize netdriver to rti. _fed.netdrv_to_rti = initialize_netdrv(_lf_my_fed_id, federation_metadata.federation_id); // set memory. - create_connector(_fed.netdrv_to_rti); set_host_name(_fed.netdrv_to_rti, hostname); set_port(_fed.netdrv_to_rti, uport); set_specified_port(_fed.netdrv_to_rti, port); set_target_id(_fed.netdrv_to_rti, -1); + create_connector(_fed.netdrv_to_rti); if (connect_to_netdrv(_fed.netdrv_to_rti) < 0) { lf_print_error_and_exit("Failed to connect() to RTI after %d tries.", CONNECT_MAX_RETRIES); diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 5a9416665..933b6b609 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -21,10 +21,9 @@ static MQTT_priv_t* MQTT_priv_init(); static char* create_topic_federation_id_listener_id(const char* federation_id, int listener_id); static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, int B); -static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id); -static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id); -// int MQTT_connect_with_retry(MQTTClient client, MQTTClient_connectOptions* conn_opts); -// int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos); +static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int my_id, int target_id); +int MQTT_connect_with_retry(MQTTClient client, MQTTClient_connectOptions* conn_opts); +int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos); void log_callback(enum MQTTCLIENT_TRACE_LEVELS level, char* message) { (void)level; // Explicitly mark the parameter as unused @@ -64,6 +63,9 @@ void close_netdrv(netdrv_t* drv) { lf_print("Failed to disconnect, return code %d.", rc); } MQTTClient_destroy(&MQTT_priv->client); + if (MQTT_priv->topic_name) { + free(MQTT_priv->topic_name); + } } /** @@ -77,39 +79,43 @@ void close_netdrv(netdrv_t* drv) { * @return int */ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { + MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; if (server_type == RTI) { - } // JUST TO PASS COMPILER. + + } + else { + + } if (port == 0) { } // JUST TO PASS COMPILER. - MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; // Target is not available for listeners. We set it to -2 if it is uninitialized or unavailable. This is used when // close_netdrv() is called. MQTT_priv->target_id = -2; // If RTI calls this, it will be -1. If federate server calls, it will be it's federate ID. - set_MQTTServer_id(MQTT_priv, drv->my_federate_id, drv->my_federate_id); + set_MQTTClient_id(MQTT_priv, drv->my_federate_id, drv->my_federate_id); + int rc; + if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to create client, return code %d.", rc); + lf_print_error_and_exit("Failed to create client during create_listener(), return code %d.", rc); } - - MQTT_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; - MQTT_priv->conn_opts.cleansession = MQTTcleansession; - if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + LF_PRINT_DEBUG("Connecting MQTTClient %s to broker.", MQTT_priv->client_id); + if ((rc = MQTT_connect_with_retry(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { MQTTClient_destroy(&MQTT_priv->client); - lf_print_error_and_exit("Failed to connect, return code %d. Check if MQTT broker is available.", rc); + lf_print_error_and_exit( + "Failed to connect during create_listener(), return code %d. Check if MQTT broker is available.", rc); } - MQTT_priv->topic_name = (const char*)create_topic_federation_id_listener_id(drv->federation_id, drv->my_federate_id); - if ((rc = MQTTClient_subscribe(MQTT_priv->client, MQTT_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { + LF_PRINT_DEBUG("Connected MQTTClient %s to broker, return code %d.",MQTT_priv->client_id, rc); + MQTT_priv->topic_name = create_topic_federation_id_listener_id(drv->federation_id, drv->my_federate_id); + LF_PRINT_DEBUG("Subscribing on topic %s.", MQTT_priv->topic_name); + if ((rc = MQTT_subscribe_with_retry(MQTT_priv->client, MQTT_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { MQTTClient_disconnect(MQTT_priv->client, TIMEOUT); MQTTClient_destroy(&MQTT_priv->client); - lf_print_error_and_exit("Failed to subscribe, return code %d.", rc); + lf_print_error_and_exit("Failed to subscribe during create_listener(), return code %d.", rc); } - int64_t current_physical_time = lf_time_physical(); - LF_PRINT_LOG("Subscribing on topic %s.", MQTT_priv->topic_name); - LF_PRINT_LOG("PHYSICAL_TIME ON SUBSCRIBING TOPIC: " PRINTF_TIME, current_physical_time); - + LF_PRINT_DEBUG("Subscribed on topic %s, return code %d.", MQTT_priv->topic_name, rc); return 1; } @@ -146,56 +152,43 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { uint16_t fed_id = extract_uint16(buffer + 1); LF_PRINT_LOG("Received MSG_TYPE_MQTT_JOIN message from federate %d.", fed_id); - // The conncetor netdriver connects to the broker. + // The connector netdriver connects to the broker. connector_nedrv->my_federate_id = (int)fed_id; - LF_PRINT_DEBUG("Setting up MQTTServer_id for federate %d.", fed_id); - set_MQTTServer_id(connector_priv, listener_netdrv->my_federate_id, connector_nedrv->my_federate_id); - LF_PRINT_DEBUG("Setup MQTTServer_id for federate %d as %s.", fed_id, connector_priv->client_id); + LF_PRINT_DEBUG("Setting up MQTTClient_id to target federate %d.", fed_id); + // If RTI calls this, it will be RTI_targetfedID. If federate calls this, it will be myfedID_targetfedID + set_MQTTClient_id(connector_priv, listener_netdrv->my_federate_id, connector_nedrv->my_federate_id); + LF_PRINT_DEBUG("Setup MQTTClient_id to target federate %d as %s.", fed_id, connector_priv->client_id); - LF_PRINT_DEBUG("Creating topic for federate %d.", fed_id); + LF_PRINT_DEBUG("Creating topic to target federate %d.", fed_id); // Subscribe to topic: federationID_fedID_to_listenerID // This is the channel where the federate sends messages to the listener. topic_to_subscribe = create_topic_federation_id_A_to_B(connector_nedrv->federation_id, fed_id, listener_netdrv->my_federate_id); - LF_PRINT_DEBUG("Creating MQTTClient for federate %d.", fed_id); + LF_PRINT_DEBUG("Creating MQTTClient to target federate %d.", fed_id); if ((rc = MQTTClient_create(&connector_priv->client, ADDRESS, connector_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { - lf_print_error("Failed to create client, return code %d.", rc); + lf_print_error_and_exit("Failed to create client during establish_communication_session(), return code %d.", rc); } - connector_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; - connector_priv->conn_opts.cleansession = MQTTcleansession; - instant_t start_connect = lf_time_physical(); - while (1) { - if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { - lf_print_error("Failed to connect with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); - break; - } - LF_PRINT_DEBUG("Connecting MQTTClient for federate %d.", fed_id); - if ((rc = MQTTClient_connect(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { - MQTTClient_destroy(&connector_priv->client); - free(topic_to_subscribe); - lf_print_error("Failed to connect, return code %d.", rc); - continue; - } - LF_PRINT_DEBUG("Connected, return code %d.", rc); - LF_PRINT_LOG("Starting subscribe"); - if ((rc = MQTTClient_subscribe(connector_priv->client, (const char*)topic_to_subscribe, QOS)) != - MQTTCLIENT_SUCCESS) { - MQTTClient_disconnect(connector_priv->client, TIMEOUT); - MQTTClient_destroy(&connector_priv->client); - free(topic_to_subscribe); - lf_print_error("Failed to subscribe, return code %d.", rc); - continue; - } - LF_PRINT_DEBUG("Subscribed on topic %s, return code %d.", topic_to_subscribe, rc); - break; + + LF_PRINT_DEBUG("Connecting MQTTClient %s to broker.", connector_priv->client_id); + if ((rc = MQTT_connect_with_retry(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + MQTTClient_destroy(&connector_priv->client); + lf_print_error_and_exit("Failed to connect during establish_communication_session(), return code %d.", rc); + } + LF_PRINT_DEBUG("Connected MQTTClient %s to broker, return code %d.", connector_priv->client_id, rc); + LF_PRINT_DEBUG("Subscribing on topic %s.", topic_to_subscribe); + if ((rc = MQTT_subscribe_with_retry(connector_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { + MQTTClient_disconnect(connector_priv->client, TIMEOUT); + MQTTClient_destroy(&connector_priv->client); + lf_print_error_and_exit("Failed to subscribe during establish_communication_session(), return code %d.", rc); } + LF_PRINT_DEBUG("Subscribed on topic %s, return code %d.", topic_to_subscribe, rc); // Step2: The listener sends a MSG_TYPE_MQTT_ACCEPT message to the federate. // Publish to topic: federationID_listenerID_to_fedID - connector_priv->topic_name = (const char*)create_topic_federation_id_A_to_B(connector_nedrv->federation_id, - listener_netdrv->my_federate_id, fed_id); + connector_priv->topic_name = + create_topic_federation_id_A_to_B(connector_nedrv->federation_id, listener_netdrv->my_federate_id, fed_id); buffer[0] = MSG_TYPE_MQTT_ACCEPT; encode_uint16((uint16_t)connector_nedrv->my_federate_id, buffer + 1); LF_PRINT_LOG("Publishing MSG_TYPE_MQTT_ACCEPT message on topic %s.", connector_priv->topic_name); @@ -219,19 +212,19 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { */ void create_connector(netdrv_t* drv) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; - set_MQTTClient_id(MQTT_priv, drv->my_federate_id); + // Only federates call this. It will be myfedID_RTI or myfedID_targetfedID. + set_MQTTClient_id(MQTT_priv, drv->my_federate_id, MQTT_priv->target_id); int rc; if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to create client, return code %d.", rc); } - - MQTT_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; - MQTT_priv->conn_opts.cleansession = MQTTcleansession; - if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + LF_PRINT_DEBUG("Connecting MQTTClient %s to broker.", MQTT_priv->client_id); + if ((rc = MQTT_connect_with_retry(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { MQTTClient_destroy(&MQTT_priv->client); - lf_print_error_and_exit("Failed to connect, return code %d. Check if MQTT broker is available.", rc); + lf_print_error_and_exit("Failed to connect during create_connector(), return code %d. Check if MQTT broker is available.", rc); } + LF_PRINT_DEBUG("Connected MQTTClient %s to broker, return code %d.", MQTT_priv->client_id, rc); } /** * @brief Federate publishes it's federate ID to "{Federation_ID}_RTI", then subscribes to @@ -252,20 +245,22 @@ int connect_to_netdrv(netdrv_t* drv) { char* topic_to_subscribe = create_topic_federation_id_A_to_B(drv->federation_id, MQTT_priv->target_id, drv->my_federate_id); - if ((rc = MQTTClient_subscribe(MQTT_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { + LF_PRINT_DEBUG("Subscribing on topic %s.", topic_to_subscribe); + if ((rc = MQTT_subscribe_with_retry(MQTT_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { MQTTClient_disconnect(MQTT_priv->client, TIMEOUT); MQTTClient_destroy(&MQTT_priv->client); free(topic_to_subscribe); - lf_print_error_and_exit("Failed to subscribe, return code %d.", rc); + lf_print_error_and_exit("Failed to subscribe during connect_to_netdrv(), return code %d.", rc); } - LF_PRINT_LOG("Subscribed on topic %s.", topic_to_subscribe); + LF_PRINT_DEBUG("Subscribed on topic %s, return code %d.", topic_to_subscribe, rc); // Step1: The federate sends a MSG_TYPE_MQTT_JOIN message including it's federateID to the listener. // Publish to topic: federationID_listenerID - MQTT_priv->topic_name = (const char*)create_topic_federation_id_listener_id(drv->federation_id, MQTT_priv->target_id); + MQTT_priv->topic_name = create_topic_federation_id_listener_id(drv->federation_id, MQTT_priv->target_id); unsigned char buffer[1 + sizeof(uint16_t)]; buffer[0] = MSG_TYPE_MQTT_JOIN; encode_uint16((uint16_t)drv->my_federate_id, buffer + 1); + // The connect_to_netdrv() can be called in the federates before the establish_communication_session() is called in // the RTI. The MQTT QOS2 ensures the message to arrive to the subscribed client, but this can be called even before // the netdriver was initialized in the RTI side. Thus, the federate must retry sending messages to the RTI until it @@ -274,7 +269,7 @@ int connect_to_netdrv(netdrv_t* drv) { instant_t start_connect = lf_time_physical(); while (1) { if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { - lf_print_error("Failed to connect with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); + lf_print_error("Failed to handshake with target with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); return -1; } LF_PRINT_LOG("Publishing MSG_TYPE_MQTT_JOIN message with federateID %d on topic %s.", drv->my_federate_id, @@ -336,7 +331,7 @@ int connect_to_netdrv(netdrv_t* drv) { // Step3: Send MSG_TYPE_MQTT_ACCEPT_ACK message to the listener. // Publish to topic: federationID_fedID_to_listenorID MQTT_priv->topic_name = - (const char*)create_topic_federation_id_A_to_B(drv->federation_id, drv->my_federate_id, MQTT_priv->target_id); + create_topic_federation_id_A_to_B(drv->federation_id, drv->my_federate_id, MQTT_priv->target_id); buffer[0] = MSG_TYPE_MQTT_ACCEPT_ACK; write_to_netdrv_fail_on_error(drv, 1, buffer, NULL, "Failed to write MSG_TYPE_MQTT_ACCEPT_ACK_to RTI for connection through MQTT."); @@ -384,7 +379,7 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len MQTTClient_message* message = NULL; int rc; int bytes_read; - LF_PRINT_LOG("RECEIVING message from federateID %d", drv->my_federate_id); + // LF_PRINT_LOG("RECEIVING message from federateID %d", drv->my_federate_id); instant_t start_receive = lf_time_physical(); while (1) { if (CHECK_TIMEOUT(start_receive, CONNECT_TIMEOUT)) { @@ -395,17 +390,19 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 10000); if (rc != MQTTCLIENT_SUCCESS) { lf_print_error("Failed to receive message, return code %d.", rc); + lf_sleep(CONNECT_RETRY_INTERVAL); continue; } else if (message == NULL) { // This means the call succeeded but no message was received within the timeout lf_print_log("No message received within the MQTTClient_receive() timeout period."); + lf_sleep(CONNECT_RETRY_INTERVAL); continue; } else { // Successfully received a message lf_print_log("Successfully received message, return code %d.", rc); memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); bytes_read = message->payloadlen; - LF_PRINT_LOG("RECEIVED message from federateID %d", drv->my_federate_id); + // LF_PRINT_LOG("RECEIVED message from federateID %d", drv->my_federate_id); if (buffer[0] == MQTT_RESIGNED) { LF_PRINT_LOG("Received MQTT_RESIGNED message from federateID %d", drv->my_federate_id); bytes_read = 0; @@ -489,6 +486,9 @@ static MQTT_priv_t* MQTT_priv_init() { memset(MQTT_priv, 0, sizeof(MQTT_priv_t)); MQTTClient_connectOptions conn_opts = MQTTClient_connectOptions_initializer; memcpy(&MQTT_priv->conn_opts, &conn_opts, sizeof(MQTTClient_connectOptions)); + MQTT_priv->conn_opts.keepAliveInterval = MQTTkeepAliveInterval; + MQTT_priv->conn_opts.cleansession = MQTTcleansession; + MQTT_priv->conn_opts.connectTimeout = MQTTconnectTimeout; return MQTT_priv; } @@ -515,7 +515,7 @@ static char* create_topic_federation_id_listener_id(const char* federation_id, i if (listener_id == -1) { snprintf(result, max_length, "%s_RTI", federation_id); } else { - snprintf(result, max_length, "%s_fed__%d", federation_id, listener_id); + snprintf(result, max_length, "%s_fed_%d", federation_id, listener_id); } return result; } @@ -556,54 +556,50 @@ static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, return result; } -static void set_MQTTServer_id(MQTT_priv_t* MQTT_priv, int my_id, int client_id) { - if (my_id == -1 && client_id == -1) { +static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int my_id, int target_id) { + if (my_id == -1 && target_id == -1) { strcat(MQTT_priv->client_id, "RTI_RTI"); } else if (my_id == -1) { - sprintf(MQTT_priv->client_id, "RTI_%d", client_id); + sprintf(MQTT_priv->client_id, "RTI_fed_%d", target_id); + } else if (target_id == -1) { + sprintf(MQTT_priv->client_id, "fed_%d_RTI", my_id); } else { - sprintf(MQTT_priv->client_id, "fed%d_fed%d", my_id, client_id); + sprintf(MQTT_priv->client_id, "fed_%d_fed_%d", my_id, target_id); + } +} + +int MQTT_connect_with_retry(MQTTClient client, MQTTClient_connectOptions* conn_opts) { + int rc = -1; + instant_t start_connect = lf_time_physical(); + while (1) { + if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { + lf_print_error("Failed to connect with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); + break; + } + if ((rc = MQTTClient_connect(client, conn_opts)) != MQTTCLIENT_SUCCESS) { + lf_print_error("Failed to connect, return code %d. Retrying to connect.", rc); + lf_sleep(CONNECT_RETRY_INTERVAL); + continue; + } + break; } + return rc; } -static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int client_id) { sprintf(MQTT_priv->client_id, "%d", client_id); } - -// int MQTT_connect_with_retry(MQTTClient client, MQTTClient_connectOptions* conn_opts) { -// int rc; -// int retries = 0; -// instant_t start_connect = lf_time_physical(); -// while (1) { -// if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { -// lf_print_error("Failed to connect with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); -// break; -// } -// if ((rc = MQTTClient_connect(client, conn_opts)) != MQTTCLIENT_SUCCESS) { -// LF_PRINT_LOG("Failed to connect to MQTT broker, return code %d.", rc); -// retries++; -// if (retries >= MAX_RETRIES) { -// LF_PRINT_LOG("Max retries reached. Giving up."); -// return rc; -// } -// lf_print_warning("Could not connect. Will try again every " PRINTF_TIME " nanoseconds.", -// CONNECT_RETRY_INTERVAL); lf_sleep(CONNECT_RETRY_INTERVAL); -// } -// return MQTTCLIENT_SUCCESS; -// } - -// int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos) { -// int rc; -// int retries = 0; - -// while ((rc = MQTTClient_subscribe(client, topic, qos)) != MQTTCLIENT_SUCCESS) { -// LF_PRINT_LOG("Failed to subscribe to MQTT broker, return code %d.", rc); -// retries++; -// if (retries >= MAX_RETRIES) { -// LF_PRINT_LOG("Max retries reached. Giving up."); -// return rc; -// } -// lf_print_warning("Could not subscribe to topic. Will try again every " PRINTF_TIME " nanoseconds.", -// CONNECT_RETRY_INTERVAL); -// lf_sleep(CONNECT_RETRY_INTERVAL); -// } -// return MQTTCLIENT_SUCCESS; -// } \ No newline at end of file +int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos) { + int rc = -1; + instant_t start_connect = lf_time_physical(); + while (1) { + if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { + lf_print_error("Failed to subscribe with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); + break; + } + if ((rc = MQTTClient_subscribe(client, topic, qos)) != MQTTCLIENT_SUCCESS) { + lf_print_error("Failed to subscribe, return code %d. Retrying to subscribe.", rc); + lf_sleep(CONNECT_RETRY_INTERVAL); + continue; + } + break; + } + return rc; +} diff --git a/include/core/federated/network/type/lf_mqtt_support.h b/include/core/federated/network/type/lf_mqtt_support.h index 3f5cedc5f..96a184078 100644 --- a/include/core/federated/network/type/lf_mqtt_support.h +++ b/include/core/federated/network/type/lf_mqtt_support.h @@ -6,14 +6,16 @@ #define MQTTkeepAliveInterval 20 #define MQTTcleansession 1 +#define MQTTconnectTimeout 2 #define MQTT_RESIGNED 88 typedef struct MQTT_priv_t { MQTTClient client; MQTTClient_connectOptions conn_opts; // = MQTTClient_connectOptions_initializer; - const char* topic_name; + char* topic_name; char client_id[20]; + int target_id; // Must be int. Not uint_16_t. -1 stands for RTI, -2 means uninitialized. } MQTT_priv_t; From 10431707df1932c3cb48fe0126de37798148ff8a Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 23 May 2024 17:52:34 -0700 Subject: [PATCH 246/262] Add better logs && Fix names for conflicts on topic and ClientID names. --- core/federated/federate.c | 6 +- core/federated/network/lf_mqtt_support.c | 103 +++++++++++------- .../federated/network/type/lf_mqtt_support.h | 3 +- 3 files changed, 70 insertions(+), 42 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index f5c0fdb77..c4f5df73d 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1706,7 +1706,11 @@ static void get_remote_federate_info_from_RTI(uint16_t remote_federate_id, netdr // Must set as specified port. Or else, the port will be increased when connecting to the other federate. set_specified_port(fed_netdrv, port); #elif defined(COMM_TYPE_MQTT) - // // Do not send port for MQTT. It only needs to know the target federate's ID. + + // Do not send port for MQTT. It only needs to know the target federate's ID. + (void) remote_federate_id; + (void) rti_netdrv; + (void) fed_netdrv; // set_target_id(fed_netdrv, remote_federate_id); // if (rti_netdrv == NULL) { // } // JUST TO PASS COMPILER. diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 933b6b609..0c6ddc171 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -18,12 +18,16 @@ #define MAX_RETRIES 5 // Number of retry attempts #define RETRY_DELAY 2 // Delay between attempts in seconds +lf_mutex_t lf_outbound_netdrv_mutex; + + static MQTT_priv_t* MQTT_priv_init(); static char* create_topic_federation_id_listener_id(const char* federation_id, int listener_id); -static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, int B); -static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int my_id, int target_id); +static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, int B, int flag); +static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int my_id, int target_id, int flag); int MQTT_connect_with_retry(MQTTClient client, MQTTClient_connectOptions* conn_opts); -int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos); +// int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos); +int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos, int flag); void log_callback(enum MQTTCLIENT_TRACE_LEVELS level, char* message) { (void)level; // Explicitly mark the parameter as unused @@ -81,11 +85,7 @@ void close_netdrv(netdrv_t* drv) { int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; if (server_type == RTI) { - - } - else { - - } + } // JUST TO PASS COMPILER. if (port == 0) { } // JUST TO PASS COMPILER. @@ -93,7 +93,7 @@ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { // close_netdrv() is called. MQTT_priv->target_id = -2; // If RTI calls this, it will be -1. If federate server calls, it will be it's federate ID. - set_MQTTClient_id(MQTT_priv, drv->my_federate_id, drv->my_federate_id); + set_MQTTClient_id(MQTT_priv, drv->my_federate_id, drv->my_federate_id, -1); int rc; @@ -107,10 +107,10 @@ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { lf_print_error_and_exit( "Failed to connect during create_listener(), return code %d. Check if MQTT broker is available.", rc); } - LF_PRINT_DEBUG("Connected MQTTClient %s to broker, return code %d.",MQTT_priv->client_id, rc); + LF_PRINT_DEBUG("Connected MQTTClient %s to broker, return code %d.", MQTT_priv->client_id, rc); MQTT_priv->topic_name = create_topic_federation_id_listener_id(drv->federation_id, drv->my_federate_id); - LF_PRINT_DEBUG("Subscribing on topic %s.", MQTT_priv->topic_name); - if ((rc = MQTT_subscribe_with_retry(MQTT_priv->client, MQTT_priv->topic_name, QOS)) != MQTTCLIENT_SUCCESS) { + LF_PRINT_DEBUG("create_listener(): MQTTClient %s Subscribing on topic %s.", MQTT_priv->client_id, MQTT_priv->topic_name); + if ((rc = MQTT_subscribe_with_retry(MQTT_priv->client, MQTT_priv->topic_name, QOS, 1)) != MQTTCLIENT_SUCCESS) { MQTTClient_disconnect(MQTT_priv->client, TIMEOUT); MQTTClient_destroy(&MQTT_priv->client); lf_print_error_and_exit("Failed to subscribe during create_listener(), return code %d.", rc); @@ -156,14 +156,16 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { connector_nedrv->my_federate_id = (int)fed_id; LF_PRINT_DEBUG("Setting up MQTTClient_id to target federate %d.", fed_id); // If RTI calls this, it will be RTI_targetfedID. If federate calls this, it will be myfedID_targetfedID - set_MQTTClient_id(connector_priv, listener_netdrv->my_federate_id, connector_nedrv->my_federate_id); + set_MQTTClient_id(connector_priv, listener_netdrv->my_federate_id, connector_nedrv->my_federate_id, -1); LF_PRINT_DEBUG("Setup MQTTClient_id to target federate %d as %s.", fed_id, connector_priv->client_id); LF_PRINT_DEBUG("Creating topic to target federate %d.", fed_id); // Subscribe to topic: federationID_fedID_to_listenerID + // When centralized, this will be federationID_fedID_to_RTI + // When decentralized, this will be federationID_CONN_{targetfedID}_to_LIST_{myfedID} // This is the channel where the federate sends messages to the listener. topic_to_subscribe = - create_topic_federation_id_A_to_B(connector_nedrv->federation_id, fed_id, listener_netdrv->my_federate_id); + create_topic_federation_id_A_to_B(connector_nedrv->federation_id, fed_id, listener_netdrv->my_federate_id, 1); LF_PRINT_DEBUG("Creating MQTTClient to target federate %d.", fed_id); if ((rc = MQTTClient_create(&connector_priv->client, ADDRESS, connector_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, @@ -177,8 +179,9 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { lf_print_error_and_exit("Failed to connect during establish_communication_session(), return code %d.", rc); } LF_PRINT_DEBUG("Connected MQTTClient %s to broker, return code %d.", connector_priv->client_id, rc); - LF_PRINT_DEBUG("Subscribing on topic %s.", topic_to_subscribe); - if ((rc = MQTT_subscribe_with_retry(connector_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { + LF_PRINT_DEBUG("establish_communication_session(): MQTTClient %s Subscribing on topic %s.", connector_priv->client_id, topic_to_subscribe); + if ((rc = MQTT_subscribe_with_retry(connector_priv->client, (const char*)topic_to_subscribe, QOS, 2)) != + MQTTCLIENT_SUCCESS) { MQTTClient_disconnect(connector_priv->client, TIMEOUT); MQTTClient_destroy(&connector_priv->client); lf_print_error_and_exit("Failed to subscribe during establish_communication_session(), return code %d.", rc); @@ -187,8 +190,10 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { // Step2: The listener sends a MSG_TYPE_MQTT_ACCEPT message to the federate. // Publish to topic: federationID_listenerID_to_fedID + // When centralized, this will be federationID_RTI_to_fedID + // When decentralized, this will be federateionID_LIST_{myfedID}_to_CONN_{targetfedID} connector_priv->topic_name = - create_topic_federation_id_A_to_B(connector_nedrv->federation_id, listener_netdrv->my_federate_id, fed_id); + create_topic_federation_id_A_to_B(connector_nedrv->federation_id, listener_netdrv->my_federate_id, fed_id, -1); buffer[0] = MSG_TYPE_MQTT_ACCEPT; encode_uint16((uint16_t)connector_nedrv->my_federate_id, buffer + 1); LF_PRINT_LOG("Publishing MSG_TYPE_MQTT_ACCEPT message on topic %s.", connector_priv->topic_name); @@ -213,7 +218,7 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { void create_connector(netdrv_t* drv) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; // Only federates call this. It will be myfedID_RTI or myfedID_targetfedID. - set_MQTTClient_id(MQTT_priv, drv->my_federate_id, MQTT_priv->target_id); + set_MQTTClient_id(MQTT_priv, drv->my_federate_id, MQTT_priv->target_id, 1); int rc; if ((rc = MQTTClient_create(&MQTT_priv->client, ADDRESS, MQTT_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { @@ -222,7 +227,8 @@ void create_connector(netdrv_t* drv) { LF_PRINT_DEBUG("Connecting MQTTClient %s to broker.", MQTT_priv->client_id); if ((rc = MQTT_connect_with_retry(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { MQTTClient_destroy(&MQTT_priv->client); - lf_print_error_and_exit("Failed to connect during create_connector(), return code %d. Check if MQTT broker is available.", rc); + lf_print_error_and_exit( + "Failed to connect during create_connector(), return code %d. Check if MQTT broker is available.", rc); } LF_PRINT_DEBUG("Connected MQTTClient %s to broker, return code %d.", MQTT_priv->client_id, rc); } @@ -242,11 +248,13 @@ int connect_to_netdrv(netdrv_t* drv) { // This should be done before sending the MSG_TYPE_MQTT_JOIN message, because the listener publishing the // MSG_TYPE_MQTT_ACCEPT message at topic federationID_listenerID_to_fedID can be faster than the connector subscribing // to the topic. + // When centralized, this will be federationID_RTI_to_fedID + // When decentralized, this will be federateionID_LIST_{targetfedID}_to_CONN_{myfedID} char* topic_to_subscribe = - create_topic_federation_id_A_to_B(drv->federation_id, MQTT_priv->target_id, drv->my_federate_id); + create_topic_federation_id_A_to_B(drv->federation_id, MQTT_priv->target_id, drv->my_federate_id, -1); - LF_PRINT_DEBUG("Subscribing on topic %s.", topic_to_subscribe); - if ((rc = MQTT_subscribe_with_retry(MQTT_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { + LF_PRINT_DEBUG("connect_to_netdrv(): MQTTClient %s Subscribing on topic %s.", MQTT_priv->client_id, topic_to_subscribe); + if ((rc = MQTT_subscribe_with_retry(MQTT_priv->client, (const char*)topic_to_subscribe, QOS, 3)) != MQTTCLIENT_SUCCESS) { MQTTClient_disconnect(MQTT_priv->client, TIMEOUT); MQTTClient_destroy(&MQTT_priv->client); free(topic_to_subscribe); @@ -330,8 +338,10 @@ int connect_to_netdrv(netdrv_t* drv) { // Step3: Send MSG_TYPE_MQTT_ACCEPT_ACK message to the listener. // Publish to topic: federationID_fedID_to_listenorID + // When centralized, this will be federationID_fedID_to_RTI + // When decentralized, this will be federationID_CONN_{myfedID}_to_LIST_{targetfedID} MQTT_priv->topic_name = - create_topic_federation_id_A_to_B(drv->federation_id, drv->my_federate_id, MQTT_priv->target_id); + create_topic_federation_id_A_to_B(drv->federation_id, drv->my_federate_id, MQTT_priv->target_id, 1); buffer[0] = MSG_TYPE_MQTT_ACCEPT_ACK; write_to_netdrv_fail_on_error(drv, 1, buffer, NULL, "Failed to write MSG_TYPE_MQTT_ACCEPT_ACK_to RTI for connection through MQTT."); @@ -520,21 +530,25 @@ static char* create_topic_federation_id_listener_id(const char* federation_id, i return result; } -static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, int B) { - int max_length; +static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, int B, int flag) { + int max_length = 0; char* result; if (A == -2 || B == -2) { lf_print_error_and_exit("The ID used for the MQTT topic is not initalized."); return NULL; } - // Determine the maximum length of the resulting string + // If either the ID includes -1, then the flag does not matter. if (A == -1) { max_length = snprintf(NULL, 0, "%s_RTI_to_fed_%d", federation_id, B) + 1; // +1 for null terminator } else if (B == -1) { max_length = snprintf(NULL, 0, "%s_fed_%d_to_RTI", federation_id, A) + 1; // +1 for null terminator - } else { - max_length = snprintf(NULL, 0, "%s_fed_%d_to_fed_%d", federation_id, A, B) + 1; // +1 for null terminator + } + + else if (flag == 1) { + max_length = snprintf(NULL, 0, "%s_CONN_fed_%d_to_LIST_fed_%d", federation_id, A, B) + 1; // +1 for null terminator + } else if (flag == -1) { + max_length = snprintf(NULL, 0, "%s_LIST_fed_%d_to_CONN_fed_%d", federation_id, A, B) + 1; // +1 for null terminator } // Allocate memory for the resulting string @@ -549,22 +563,31 @@ static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, snprintf(result, max_length, "%s_RTI_to_fed_%d", federation_id, B); } else if (B == -1) { snprintf(result, max_length, "%s_fed_%d_to_RTI", federation_id, A); - } else { - snprintf(result, max_length, "%s_fed_%d_to_fed_%d", federation_id, A, B); } - + else if (flag == 1) { + snprintf(result, max_length, "%s_CONN_fed_%d_to_LIST_fed_%d", federation_id, A, B); + } else if (flag == -1) { + snprintf(result, max_length, "%s_LIST_fed_%d_to_CONN_fed_%d", federation_id, A, B); + } return result; } -static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int my_id, int target_id) { +static void set_MQTTClient_id(MQTT_priv_t* MQTT_priv, int my_id, int target_id, int flag) { + // When the flag is 0, it is for centralized communication. + if (my_id == -1 && target_id == -1) { strcat(MQTT_priv->client_id, "RTI_RTI"); } else if (my_id == -1) { sprintf(MQTT_priv->client_id, "RTI_fed_%d", target_id); } else if (target_id == -1) { sprintf(MQTT_priv->client_id, "fed_%d_RTI", my_id); - } else { - sprintf(MQTT_priv->client_id, "fed_%d_fed_%d", my_id, target_id); + } + + // When the flag is 1, it means + else if (flag == 1) { + sprintf(MQTT_priv->client_id, "CONN_fed_%d_LIST_fed_%d", my_id, target_id); + } else if (flag == -1) { + sprintf(MQTT_priv->client_id, "LIST_fed_%d_CONN_fed_%d", my_id, target_id); } } @@ -573,11 +596,11 @@ int MQTT_connect_with_retry(MQTTClient client, MQTTClient_connectOptions* conn_o instant_t start_connect = lf_time_physical(); while (1) { if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { - lf_print_error("Failed to connect with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); + lf_print_warning("Failed to connect with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); break; } if ((rc = MQTTClient_connect(client, conn_opts)) != MQTTCLIENT_SUCCESS) { - lf_print_error("Failed to connect, return code %d. Retrying to connect.", rc); + lf_print_warning("Failed to connect, return code %d. Retrying to connect.", rc); lf_sleep(CONNECT_RETRY_INTERVAL); continue; } @@ -586,16 +609,18 @@ int MQTT_connect_with_retry(MQTTClient client, MQTTClient_connectOptions* conn_o return rc; } -int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos) { +// int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos) { +int MQTT_subscribe_with_retry(MQTTClient client, const char* topic, int qos, int flag) { int rc = -1; instant_t start_connect = lf_time_physical(); while (1) { if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { - lf_print_error("Failed to subscribe with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); + lf_print_warning("Failed to subscribe with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); break; } if ((rc = MQTTClient_subscribe(client, topic, qos)) != MQTTCLIENT_SUCCESS) { - lf_print_error("Failed to subscribe, return code %d. Retrying to subscribe.", rc); + // lf_print_warning("Failed to subscribe, return code %d. Retrying to subscribe.", rc); + lf_print_warning("Failed to subscribe, return code %d. Retrying to subscribe. Flag: %d", rc, flag); lf_sleep(CONNECT_RETRY_INTERVAL); continue; } diff --git a/include/core/federated/network/type/lf_mqtt_support.h b/include/core/federated/network/type/lf_mqtt_support.h index 96a184078..5b2ca3e97 100644 --- a/include/core/federated/network/type/lf_mqtt_support.h +++ b/include/core/federated/network/type/lf_mqtt_support.h @@ -14,8 +14,7 @@ typedef struct MQTT_priv_t { MQTTClient client; MQTTClient_connectOptions conn_opts; // = MQTTClient_connectOptions_initializer; char* topic_name; - char client_id[20]; - + char client_id[32]; int target_id; // Must be int. Not uint_16_t. -1 stands for RTI, -2 means uninitialized. } MQTT_priv_t; From f9c0d03780e74f9400acbe80cd9c6f0240c9dd71 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 23 May 2024 20:59:01 -0700 Subject: [PATCH 247/262] Add checking for drv is open. --- core/federated/network/lf_socket_support.c | 6 ++++++ core/federated/network/lf_sst_support.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 6f144b783..758e189d5 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -26,6 +26,8 @@ netdrv_t* initialize_netdrv(int my_federate_id, const char* federation_id) { void close_netdrv(netdrv_t* drv) { socket_priv_t* priv = (socket_priv_t*)drv->priv; TCP_socket_close(priv); + free(priv); + free(drv); } // This only creates TCP servers not UDP. @@ -140,6 +142,10 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { * @return 0 for success, 1 for EOF, and -1 for an error. */ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + if (drv == NULL) { + lf_print_warning("Netdriver is closed, returning -1."); + return -1; + } socket_priv_t* priv = (socket_priv_t*)drv->priv; size_t bytes_to_read; // The bytes to read in future. diff --git a/core/federated/network/lf_sst_support.c b/core/federated/network/lf_sst_support.c index aa90c202a..a998593be 100644 --- a/core/federated/network/lf_sst_support.c +++ b/core/federated/network/lf_sst_support.c @@ -118,6 +118,10 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { } ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + if (drv == NULL) { + lf_print_warning("Netdriver is closed, returning -1."); + return -1; + } if (buffer_length == 0) { } // JUST TO PASS COMPILER. sst_priv_t* sst_priv = (sst_priv_t*)drv->priv; @@ -218,7 +222,7 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { return 0; } -void set_target_id(netdrv_t* drv, int federate_id){ +void set_target_id(netdrv_t* drv, int federate_id) { if (drv == NULL) { } // JUST TO PASS COMPILER. if (federate_id == 0) { From 74b2ef371e0288f6440e5fe47097d6f77fd62615 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 23 May 2024 20:59:32 -0700 Subject: [PATCH 248/262] Fix checking if netdrv to rti is not NULL --- core/federated/federate.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index c4f5df73d..f01ef66f3 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1562,7 +1562,7 @@ void lf_terminate_execution(environment_t* env) { // For an abnormal termination (e.g. a SIGINT), we need to send a // MSG_TYPE_FAILED message to the RTI, but we should not acquire a mutex. - if (_fed.netdrv_to_rti != 0) { + if (_fed.netdrv_to_rti != NULL) { if (_lf_normal_termination) { tracepoint_federate_to_rti(send_RESIGN, _lf_my_fed_id, &env->current_tag); send_resign_signal(); @@ -1711,9 +1711,6 @@ static void get_remote_federate_info_from_RTI(uint16_t remote_federate_id, netdr (void) remote_federate_id; (void) rti_netdrv; (void) fed_netdrv; - // set_target_id(fed_netdrv, remote_federate_id); - // if (rti_netdrv == NULL) { - // } // JUST TO PASS COMPILER. #endif } @@ -2063,7 +2060,6 @@ void* lf_handle_p2p_connections_from_federates(void* env_arg) { lf_print_error_and_exit("Failed to create a thread to listen for incoming physical connection. Error code: %d.", result); } - received_federates++; } From 5fe49a7f90417d9a3dca77a023ed49c756e99e5a Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 23 May 2024 21:02:16 -0700 Subject: [PATCH 249/262] Move netdrv_mutex to netdriver.c --- core/federated/network/net_util.c | 2 -- core/federated/network/netdriver.c | 2 ++ include/core/federated/network/netdriver.h | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/federated/network/net_util.c b/core/federated/network/net_util.c index 58a7a617a..0e6129237 100644 --- a/core/federated/network/net_util.c +++ b/core/federated/network/net_util.c @@ -43,7 +43,6 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include // TCP_NODELAY #include "net_util.h" -// #include "util.h" // Define socket functions only for federated execution. #ifdef FEDERATED @@ -52,7 +51,6 @@ THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define NUMBER_OF_FEDERATES 1 #endif -lf_mutex_t netdrv_mutex; #endif // FEDERATED diff --git a/core/federated/network/netdriver.c b/core/federated/network/netdriver.c index 68d2f9074..5d815716a 100644 --- a/core/federated/network/netdriver.c +++ b/core/federated/network/netdriver.c @@ -5,6 +5,8 @@ #include "netdriver.h" #include "util.h" +lf_mutex_t netdrv_mutex; + netdrv_t* initialize_common_netdrv(int my_federate_id, const char* federation_id) { netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { diff --git a/include/core/federated/network/netdriver.h b/include/core/federated/network/netdriver.h index 43f5e5456..8e8e197af 100644 --- a/include/core/federated/network/netdriver.h +++ b/include/core/federated/network/netdriver.h @@ -13,6 +13,9 @@ #include "lf_sst_support.h" #endif +extern lf_mutex_t netdrv_mutex; + + typedef enum netdrv_type_t { NETDRV, UDP } netdrv_type_t; // Just doing 0 for RTI, 1 for FED From d71f9d02547431e1f3a312b9a96ecfabbf16887e Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 23 May 2024 21:03:08 -0700 Subject: [PATCH 250/262] Add LF_MUTEX_INIT(&netdrv_mutex); for also the rti use the same mutex for netdrivers. --- core/federated/RTI/rti_remote.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 2c0c62c76..c05de8173 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1489,6 +1489,8 @@ void initialize_RTI(rti_remote_t* rti) { LF_COND_INIT(&received_start_times, &rti_mutex); LF_COND_INIT(&sent_start_time, &rti_mutex); + LF_MUTEX_INIT(&netdrv_mutex); + initialize_rti_common(&rti_remote->base); rti_remote->base.mutex = &rti_mutex; From 32b459b6ce4624bd1be2306aa9b343c19f596478 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 23 May 2024 21:03:23 -0700 Subject: [PATCH 251/262] Minor fix --- include/core/federated/network/net_util.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/core/federated/network/net_util.h b/include/core/federated/network/net_util.h index 2fa05e1da..3bf2935a7 100644 --- a/include/core/federated/network/net_util.h +++ b/include/core/federated/network/net_util.h @@ -167,7 +167,6 @@ uint32_t extract_uint32(unsigned char* bytes); /** * Mutex protecting socket close operations. */ -extern lf_mutex_t netdrv_mutex; /** * Extract the core header information that all messages between From 5ca9fe2381a1996e1d71e92e70f1783c9494effd Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 23 May 2024 21:15:09 -0700 Subject: [PATCH 252/262] Remove log --- core/federated/RTI/rti_remote.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index c05de8173..2c4f215af 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -627,8 +627,6 @@ void handle_timestamp(federate_info_t* my_fed, unsigned char* buffer) { tracepoint_rti_from_federate(receive_TIMESTAMP, my_fed->enclave.id, &tag); } LF_PRINT_DEBUG("RTI received timestamp message with time: " PRINTF_TIME ".", timestamp); - LF_PRINT_DEBUG("RTI received timestamp message with time: " PRINTF_TIME ". fro federate %d", timestamp, - my_fed->fed_netdrv->my_federate_id); LF_MUTEX_LOCK(&rti_mutex); rti_remote->num_feds_proposed_start++; From d677b75ffecb228296e42cc1fcd6e76dd924919a Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 23 May 2024 22:27:10 -0700 Subject: [PATCH 253/262] Add mutex and error handling. Still getting segfaults on termination. --- core/federated/network/lf_mqtt_support.c | 224 ++++++++++++------ .../federated/network/type/lf_mqtt_support.h | 2 +- 2 files changed, 153 insertions(+), 73 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 0c6ddc171..69a16f233 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -1,6 +1,5 @@ #include #include -// #include #include "util.h" #include "net_common.h" @@ -18,9 +17,6 @@ #define MAX_RETRIES 5 // Number of retry attempts #define RETRY_DELAY 2 // Delay between attempts in seconds -lf_mutex_t lf_outbound_netdrv_mutex; - - static MQTT_priv_t* MQTT_priv_init(); static char* create_topic_federation_id_listener_id(const char* federation_id, int listener_id); static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, int B, int flag); @@ -67,9 +63,13 @@ void close_netdrv(netdrv_t* drv) { lf_print("Failed to disconnect, return code %d.", rc); } MQTTClient_destroy(&MQTT_priv->client); - if (MQTT_priv->topic_name) { - free(MQTT_priv->topic_name); + if (MQTT_priv->topic_name_to_send) { + free(MQTT_priv->topic_name_to_send); } + free(MQTT_priv); + drv->priv = NULL; + free(drv); + drv = NULL; } /** @@ -102,20 +102,25 @@ int create_listener(netdrv_t* drv, server_type_t server_type, uint16_t port) { lf_print_error_and_exit("Failed to create client during create_listener(), return code %d.", rc); } LF_PRINT_DEBUG("Connecting MQTTClient %s to broker.", MQTT_priv->client_id); + LF_MUTEX_LOCK(&netdrv_mutex); if ((rc = MQTT_connect_with_retry(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { MQTTClient_destroy(&MQTT_priv->client); lf_print_error_and_exit( "Failed to connect during create_listener(), return code %d. Check if MQTT broker is available.", rc); } LF_PRINT_DEBUG("Connected MQTTClient %s to broker, return code %d.", MQTT_priv->client_id, rc); - MQTT_priv->topic_name = create_topic_federation_id_listener_id(drv->federation_id, drv->my_federate_id); - LF_PRINT_DEBUG("create_listener(): MQTTClient %s Subscribing on topic %s.", MQTT_priv->client_id, MQTT_priv->topic_name); - if ((rc = MQTT_subscribe_with_retry(MQTT_priv->client, MQTT_priv->topic_name, QOS, 1)) != MQTTCLIENT_SUCCESS) { + MQTT_priv->topic_name_to_send = create_topic_federation_id_listener_id(drv->federation_id, drv->my_federate_id); + LF_PRINT_DEBUG("create_listener(): MQTTClient %s Subscribing on topic %s.", MQTT_priv->client_id, + MQTT_priv->topic_name_to_send); + if ((rc = MQTT_subscribe_with_retry(MQTT_priv->client, MQTT_priv->topic_name_to_send, QOS, 1)) != + MQTTCLIENT_SUCCESS) { + LF_PRINT_DEBUG("create_listener(): Disconnecting MQTTClient %s.", MQTT_priv->client_id); MQTTClient_disconnect(MQTT_priv->client, TIMEOUT); MQTTClient_destroy(&MQTT_priv->client); lf_print_error_and_exit("Failed to subscribe during create_listener(), return code %d.", rc); } - LF_PRINT_DEBUG("Subscribed on topic %s, return code %d.", MQTT_priv->topic_name, rc); + LF_PRINT_DEBUG("Subscribed on topic %s, return code %d.", MQTT_priv->topic_name_to_send, rc); + LF_MUTEX_UNLOCK(&netdrv_mutex); return 1; } @@ -134,6 +139,7 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { // Create connector netdriver which will communicate with the connector. netdrv_t* connector_nedrv = initialize_netdrv(-2, listener_netdrv->federation_id); MQTT_priv_t* connector_priv = (MQTT_priv_t*)connector_nedrv->priv; + connector_nedrv->my_federate_id = listener_netdrv->my_federate_id; // // Set the trace level to maximum verbosity // MQTTClient_setTraceLevel(MQTTCLIENT_TRACE_MAXIMUM); @@ -149,56 +155,78 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { if (buffer[0] != MSG_TYPE_MQTT_JOIN) { lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_JOIN."); } - uint16_t fed_id = extract_uint16(buffer + 1); - LF_PRINT_LOG("Received MSG_TYPE_MQTT_JOIN message from federate %d.", fed_id); + uint16_t target_fed_id = extract_uint16(buffer + 1); + LF_PRINT_LOG("Received MSG_TYPE_MQTT_JOIN message from federate %d.", target_fed_id); // The connector netdriver connects to the broker. - connector_nedrv->my_federate_id = (int)fed_id; - LF_PRINT_DEBUG("Setting up MQTTClient_id to target federate %d.", fed_id); + connector_priv->target_id = (int)target_fed_id; + LF_PRINT_DEBUG("Setting up MQTTClient_id to target federate %d.", connector_priv->target_id); // If RTI calls this, it will be RTI_targetfedID. If federate calls this, it will be myfedID_targetfedID - set_MQTTClient_id(connector_priv, listener_netdrv->my_federate_id, connector_nedrv->my_federate_id, -1); - LF_PRINT_DEBUG("Setup MQTTClient_id to target federate %d as %s.", fed_id, connector_priv->client_id); + set_MQTTClient_id(connector_priv, connector_nedrv->my_federate_id, connector_priv->target_id, -1); + LF_PRINT_DEBUG("Setup MQTTClient_id to target federate %d as %s.", connector_priv->target_id, + connector_priv->client_id); - LF_PRINT_DEBUG("Creating topic to target federate %d.", fed_id); + LF_PRINT_DEBUG("Creating topic to target federate %d.", connector_priv->target_id); // Subscribe to topic: federationID_fedID_to_listenerID // When centralized, this will be federationID_fedID_to_RTI // When decentralized, this will be federationID_CONN_{targetfedID}_to_LIST_{myfedID} // This is the channel where the federate sends messages to the listener. - topic_to_subscribe = - create_topic_federation_id_A_to_B(connector_nedrv->federation_id, fed_id, listener_netdrv->my_federate_id, 1); + topic_to_subscribe = create_topic_federation_id_A_to_B(connector_nedrv->federation_id, connector_priv->target_id, + connector_nedrv->my_federate_id, 1); - LF_PRINT_DEBUG("Creating MQTTClient to target federate %d.", fed_id); + LF_PRINT_DEBUG("Creating MQTTClient to target federate %d.", connector_priv->target_id); if ((rc = MQTTClient_create(&connector_priv->client, ADDRESS, connector_priv->client_id, MQTTCLIENT_PERSISTENCE_NONE, NULL)) != MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to create client during establish_communication_session(), return code %d.", rc); } - LF_PRINT_DEBUG("Connecting MQTTClient %s to broker.", connector_priv->client_id); - if ((rc = MQTT_connect_with_retry(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { - MQTTClient_destroy(&connector_priv->client); - lf_print_error_and_exit("Failed to connect during establish_communication_session(), return code %d.", rc); - } - LF_PRINT_DEBUG("Connected MQTTClient %s to broker, return code %d.", connector_priv->client_id, rc); - LF_PRINT_DEBUG("establish_communication_session(): MQTTClient %s Subscribing on topic %s.", connector_priv->client_id, topic_to_subscribe); - if ((rc = MQTT_subscribe_with_retry(connector_priv->client, (const char*)topic_to_subscribe, QOS, 2)) != - MQTTCLIENT_SUCCESS) { - MQTTClient_disconnect(connector_priv->client, TIMEOUT); - MQTTClient_destroy(&connector_priv->client); - lf_print_error_and_exit("Failed to subscribe during establish_communication_session(), return code %d.", rc); + LF_MUTEX_LOCK(&netdrv_mutex); + + instant_t start_connect = lf_time_physical(); + while (1) { + if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { + lf_print_error_and_exit("Failed to connect and subscribe to topic %s with timeout: " PRINTF_TIME ". Giving up.", + topic_to_subscribe, CONNECT_TIMEOUT); + break; + } + LF_PRINT_DEBUG("Connecting MQTTClient %s to broker.", connector_priv->client_id); + if ((rc = MQTTClient_connect(connector_priv->client, &connector_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + // MQTTClient_destroy(&connector_priv->client); + lf_print_warning("Failed to connect during establish_communication_session(), return code %d.", rc); + lf_sleep(CONNECT_RETRY_INTERVAL); + continue; + } + LF_PRINT_DEBUG("Connected MQTTClient %s to broker, return code %d.", connector_priv->client_id, rc); + LF_PRINT_DEBUG("establish_communication_session(): MQTTClient %s Subscribing on topic %s.", + connector_priv->client_id, topic_to_subscribe); + + // The MQTTClient_subscribe() internally disconnects the MQTTClient to the broker. So, it should retry after + // re-connecting the MQTTClient first. + if ((rc = MQTTClient_subscribe(connector_priv->client, (const char*)topic_to_subscribe, QOS)) != + MQTTCLIENT_SUCCESS) { + // LF_PRINT_DEBUG("establish_communication_session(): Disconnecting MQTTClient %s.", connector_priv->client_id); + // MQTTClient_disconnect(connector_priv->client, TIMEOUT); + // MQTTClient_destroy(&connector_priv->client); + lf_print_warning("Failed to subscribe during establish_communication_session(), return code %d.", rc); + lf_sleep(CONNECT_RETRY_INTERVAL); + continue; + } + LF_PRINT_DEBUG("Subscribed on topic %s, return code %d.", topic_to_subscribe, rc); + break; } - LF_PRINT_DEBUG("Subscribed on topic %s, return code %d.", topic_to_subscribe, rc); + LF_MUTEX_UNLOCK(&netdrv_mutex); // Step2: The listener sends a MSG_TYPE_MQTT_ACCEPT message to the federate. // Publish to topic: federationID_listenerID_to_fedID // When centralized, this will be federationID_RTI_to_fedID // When decentralized, this will be federateionID_LIST_{myfedID}_to_CONN_{targetfedID} - connector_priv->topic_name = - create_topic_federation_id_A_to_B(connector_nedrv->federation_id, listener_netdrv->my_federate_id, fed_id, -1); + connector_priv->topic_name_to_send = create_topic_federation_id_A_to_B( + connector_nedrv->federation_id, connector_nedrv->my_federate_id, connector_priv->target_id, -1); buffer[0] = MSG_TYPE_MQTT_ACCEPT; - encode_uint16((uint16_t)connector_nedrv->my_federate_id, buffer + 1); - LF_PRINT_LOG("Publishing MSG_TYPE_MQTT_ACCEPT message on topic %s.", connector_priv->topic_name); + encode_uint16((uint16_t)connector_priv->target_id, buffer + 1); + LF_PRINT_LOG("Publishing MSG_TYPE_MQTT_ACCEPT message on topic %s.", connector_priv->topic_name_to_send); write_to_netdrv_fail_on_error(connector_nedrv, 1 + sizeof(uint16_t), buffer, NULL, - "Failed to send MSG_TYPE_MQTT_ACCEPT to federate %d", connector_nedrv->my_federate_id); + "Failed to send MSG_TYPE_MQTT_ACCEPT to federate %d", connector_priv->target_id); // Step3: The listner receives the MSG_TYPE_MQTT_ACCEPT_ACK message from the federate. read_from_netdrv_fail_on_error(connector_nedrv, buffer, 1, NULL, "MQTT receive failed."); @@ -224,13 +252,15 @@ void create_connector(netdrv_t* drv) { MQTTCLIENT_SUCCESS) { lf_print_error_and_exit("Failed to create client, return code %d.", rc); } - LF_PRINT_DEBUG("Connecting MQTTClient %s to broker.", MQTT_priv->client_id); - if ((rc = MQTT_connect_with_retry(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { - MQTTClient_destroy(&MQTT_priv->client); - lf_print_error_and_exit( - "Failed to connect during create_connector(), return code %d. Check if MQTT broker is available.", rc); - } - LF_PRINT_DEBUG("Connected MQTTClient %s to broker, return code %d.", MQTT_priv->client_id, rc); + // LF_MUTEX_LOCK(&netdrv_mutex); + // LF_PRINT_DEBUG("Connecting MQTTClient %s to broker.", MQTT_priv->client_id); + // if ((rc = MQTT_connect_with_retry(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + // MQTTClient_destroy(&MQTT_priv->client); + // lf_print_error_and_exit( + // "Failed to connect during create_connector(), return code %d. Check if MQTT broker is available.", rc); + // } + // LF_PRINT_DEBUG("Connected MQTTClient %s to broker, return code %d.", MQTT_priv->client_id, rc); + // LF_MUTEX_UNLOCK(&netdrv_mutex); } /** * @brief Federate publishes it's federate ID to "{Federation_ID}_RTI", then subscribes to @@ -239,7 +269,6 @@ void create_connector(netdrv_t* drv) { * @param drv * @return int */ -// TODO: Suppport Decentralized int connect_to_netdrv(netdrv_t* drv) { MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; int rc; @@ -253,18 +282,41 @@ int connect_to_netdrv(netdrv_t* drv) { char* topic_to_subscribe = create_topic_federation_id_A_to_B(drv->federation_id, MQTT_priv->target_id, drv->my_federate_id, -1); - LF_PRINT_DEBUG("connect_to_netdrv(): MQTTClient %s Subscribing on topic %s.", MQTT_priv->client_id, topic_to_subscribe); - if ((rc = MQTT_subscribe_with_retry(MQTT_priv->client, (const char*)topic_to_subscribe, QOS, 3)) != MQTTCLIENT_SUCCESS) { - MQTTClient_disconnect(MQTT_priv->client, TIMEOUT); - MQTTClient_destroy(&MQTT_priv->client); - free(topic_to_subscribe); - lf_print_error_and_exit("Failed to subscribe during connect_to_netdrv(), return code %d.", rc); + LF_MUTEX_LOCK(&netdrv_mutex); + instant_t start_connect = lf_time_physical(); + while (1) { + if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { + lf_print_error_and_exit("Failed to connect and subscribe to topic %s with timeout: " PRINTF_TIME ". Giving up.", + topic_to_subscribe, CONNECT_TIMEOUT); + break; + } + LF_PRINT_DEBUG("Connecting MQTTClient %s to broker.", MQTT_priv->client_id); + if ((rc = MQTTClient_connect(MQTT_priv->client, &MQTT_priv->conn_opts)) != MQTTCLIENT_SUCCESS) { + // MQTTClient_destroy(&MQTT_priv->client); + lf_print_warning( + "Failed to connect during create_connector(), return code %d. Check if MQTT broker is available.", rc); + lf_sleep(CONNECT_RETRY_INTERVAL); + continue; + } + LF_PRINT_DEBUG("Connected MQTTClient %s to broker, return code %d.", MQTT_priv->client_id, rc); + LF_PRINT_DEBUG("connect_to_netdrv(): MQTTClient %s Subscribing on topic %s.", MQTT_priv->client_id, + topic_to_subscribe); + if ((rc = MQTTClient_subscribe(MQTT_priv->client, (const char*)topic_to_subscribe, QOS)) != MQTTCLIENT_SUCCESS) { + // LF_PRINT_DEBUG("connect_to_netdrv(): Disconnecting MQTTClient %s.", MQTT_priv->client_id); + // MQTTClient_disconnect(MQTT_priv->client, TIMEOUT); + // MQTTClient_destroy(&MQTT_priv->client); + // free(topic_to_subscribe); + lf_print_warning("Failed to subscribe during connect_to_netdrv(), return code %d.", rc); + lf_sleep(CONNECT_RETRY_INTERVAL); + continue; + } + LF_PRINT_DEBUG("Subscribed on topic %s, return code %d.", topic_to_subscribe, rc); + break; } - LF_PRINT_DEBUG("Subscribed on topic %s, return code %d.", topic_to_subscribe, rc); - + LF_MUTEX_UNLOCK(&netdrv_mutex); // Step1: The federate sends a MSG_TYPE_MQTT_JOIN message including it's federateID to the listener. // Publish to topic: federationID_listenerID - MQTT_priv->topic_name = create_topic_federation_id_listener_id(drv->federation_id, MQTT_priv->target_id); + MQTT_priv->topic_name_to_send = create_topic_federation_id_listener_id(drv->federation_id, MQTT_priv->target_id); unsigned char buffer[1 + sizeof(uint16_t)]; buffer[0] = MSG_TYPE_MQTT_JOIN; encode_uint16((uint16_t)drv->my_federate_id, buffer + 1); @@ -274,14 +326,14 @@ int connect_to_netdrv(netdrv_t* drv) { // the netdriver was initialized in the RTI side. Thus, the federate must retry sending messages to the RTI until it // replies the MSG_TYPE_MQTT_ACCEPT message. The connect retry interval (500 msecs) should be shorter than the read // timeout time (which is 10 secs), thus it does not use read_from_netdrv(). - instant_t start_connect = lf_time_physical(); + start_connect = lf_time_physical(); while (1) { if (CHECK_TIMEOUT(start_connect, CONNECT_TIMEOUT)) { lf_print_error("Failed to handshake with target with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); return -1; } LF_PRINT_LOG("Publishing MSG_TYPE_MQTT_JOIN message with federateID %d on topic %s.", drv->my_federate_id, - MQTT_priv->topic_name); + MQTT_priv->topic_name_to_send); write_to_netdrv_fail_on_error(drv, 1 + sizeof(uint16_t), buffer, NULL, "Failed to write my_federate_id to listener for connection through MQTT."); @@ -327,7 +379,7 @@ int connect_to_netdrv(netdrv_t* drv) { lf_print_error_and_exit("Wrong message type... Expected MSG_TYPE_MQTT_ACCEPT."); } LF_PRINT_LOG("Receiving MSG_TYPE_MQTT_ACCEPT message on topic %s.", topic_to_subscribe); - free((char*)MQTT_priv->topic_name); + free((char*)MQTT_priv->topic_name_to_send); free(topic_to_subscribe); // Compare the received federateID with my federateID. @@ -340,12 +392,12 @@ int connect_to_netdrv(netdrv_t* drv) { // Publish to topic: federationID_fedID_to_listenorID // When centralized, this will be federationID_fedID_to_RTI // When decentralized, this will be federationID_CONN_{myfedID}_to_LIST_{targetfedID} - MQTT_priv->topic_name = + MQTT_priv->topic_name_to_send = create_topic_federation_id_A_to_B(drv->federation_id, drv->my_federate_id, MQTT_priv->target_id, 1); buffer[0] = MSG_TYPE_MQTT_ACCEPT_ACK; write_to_netdrv_fail_on_error(drv, 1, buffer, NULL, "Failed to write MSG_TYPE_MQTT_ACCEPT_ACK_to RTI for connection through MQTT."); - LF_PRINT_LOG("Publishing MSG_TYPE_MQTT_ACCEPT_ACK_to message on topic %s.", MQTT_priv->topic_name); + LF_PRINT_LOG("Publishing MSG_TYPE_MQTT_ACCEPT_ACK_to message on topic %s.", MQTT_priv->topic_name_to_send); return 0; } @@ -367,29 +419,35 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { pubmsg.qos = QOS; pubmsg.retained = 0; - if ((rc = MQTTClient_publishMessage(MQTT_priv->client, MQTT_priv->topic_name, &pubmsg, &token)) != + if ((rc = MQTTClient_publishMessage(MQTT_priv->client, MQTT_priv->topic_name_to_send, &pubmsg, &token)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to publish message, return code %d.", rc); + lf_print_error("Failed to publish message, return code %d.", rc); + return rc; } - // LF_PRINT_DEBUG("Message publishing on topic %s is %.*s", MQTT_priv->topic_name, pubmsg.payloadlen, + // LF_PRINT_DEBUG("Message publishing on topic %s is %.*s", MQTT_priv->topic_name_to_send, pubmsg.payloadlen, // (char*)(pubmsg.payload)); if ((rc = MQTTClient_waitForCompletion(MQTT_priv->client, token, TIMEOUT)) != MQTTCLIENT_SUCCESS) { - lf_print_error_and_exit("Failed to complete publish message, return code %d.", rc); + lf_print_error("Failed to complete publish message, return code %d.", rc); + return rc; } int bytes_written = pubmsg.payloadlen; return bytes_written; } ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { + if (drv == NULL) { + lf_print_warning("Netdriver is closed, returning -1."); + return -1; + } if (buffer_length == 0) { } // JUST TO PASS COMPILER. - MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; + char* topicName = NULL; - int topicLen; + int topicLen = 0; MQTTClient_message* message = NULL; int rc; int bytes_read; - // LF_PRINT_LOG("RECEIVING message from federateID %d", drv->my_federate_id); + // LF_PRINT_LOG("RECEIVING message from federateID %d", MQTT_priv->target_id); instant_t start_receive = lf_time_physical(); while (1) { if (CHECK_TIMEOUT(start_receive, CONNECT_TIMEOUT)) { @@ -397,9 +455,32 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len bytes_read = -1; break; } + MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; + // If the netdrv was closed from the outside during termination, segmentation faults happen. When federate executes + // and calls lf_terminate_execution(), closing inbound and outbound netdrivers are first before waiting for the + // threads to join. In this case, the federates may not receive the MQTT_resign message and just get closed. So this + // must needs a mutex to avoid segmentation faults, happening during MQTT_receive + LF_MUTEX_LOCK(&netdrv_mutex); + if (drv == NULL) { + lf_print_warning("drv is closed, returning -1."); + return -1; + } + if (drv->priv == NULL) { + lf_print_warning("drv->priv is closed, returning -1."); + return -1; + } + if (MQTT_priv == NULL) { + lf_print_warning("MQTT_priv is closed, returning -1."); + return -1; + } + if (MQTT_priv->client == NULL) { + lf_print_warning("MQTT_priv->client is closed, returning -1."); + return -1; + } rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 10000); + LF_MUTEX_UNLOCK(&netdrv_mutex); if (rc != MQTTCLIENT_SUCCESS) { - lf_print_error("Failed to receive message, return code %d.", rc); + lf_print_warning("Failed to receive message, return code %d.", rc); lf_sleep(CONNECT_RETRY_INTERVAL); continue; } else if (message == NULL) { @@ -412,9 +493,9 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len lf_print_log("Successfully received message, return code %d.", rc); memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); bytes_read = message->payloadlen; - // LF_PRINT_LOG("RECEIVED message from federateID %d", drv->my_federate_id); + // LF_PRINT_LOG("RECEIVED message from federateID %d", MQTT_priv->target_id); if (buffer[0] == MQTT_RESIGNED) { - LF_PRINT_LOG("Received MQTT_RESIGNED message from federateID %d", drv->my_federate_id); + LF_PRINT_LOG("Received MQTT_RESIGNED message from federateID %d", MQTT_priv->target_id); bytes_read = 0; } break; @@ -563,8 +644,7 @@ static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, snprintf(result, max_length, "%s_RTI_to_fed_%d", federation_id, B); } else if (B == -1) { snprintf(result, max_length, "%s_fed_%d_to_RTI", federation_id, A); - } - else if (flag == 1) { + } else if (flag == 1) { snprintf(result, max_length, "%s_CONN_fed_%d_to_LIST_fed_%d", federation_id, A, B); } else if (flag == -1) { snprintf(result, max_length, "%s_LIST_fed_%d_to_CONN_fed_%d", federation_id, A, B); diff --git a/include/core/federated/network/type/lf_mqtt_support.h b/include/core/federated/network/type/lf_mqtt_support.h index 5b2ca3e97..8c182edc0 100644 --- a/include/core/federated/network/type/lf_mqtt_support.h +++ b/include/core/federated/network/type/lf_mqtt_support.h @@ -13,7 +13,7 @@ typedef struct MQTT_priv_t { MQTTClient client; MQTTClient_connectOptions conn_opts; // = MQTTClient_connectOptions_initializer; - char* topic_name; + char* topic_name_to_send; char client_id[32]; int target_id; // Must be int. Not uint_16_t. -1 stands for RTI, -2 means uninitialized. } MQTT_priv_t; From 1ad0a34801c49a44fa1b8a64f6a29af8c6b24aff Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 23 May 2024 22:27:19 -0700 Subject: [PATCH 254/262] Reveal mutex locks.. --- core/federated/federate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index f01ef66f3..142a2ce32 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1387,10 +1387,10 @@ static void send_resign_signal() { size_t bytes_to_write = 1; unsigned char buffer[bytes_to_write]; buffer[0] = MSG_TYPE_RESIGN; - // LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); + LF_MUTEX_LOCK(&lf_outbound_netdrv_mutex); write_to_netdrv_fail_on_error(_fed.netdrv_to_rti, bytes_to_write, &(buffer[0]), &lf_outbound_netdrv_mutex, "Failed to send MSG_TYPE_RESIGN."); - // LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); + LF_MUTEX_UNLOCK(&lf_outbound_netdrv_mutex); LF_PRINT_LOG("Resigned."); } From 30fef48fcf88af166ed2b4a74832b1005a98279c Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 23 May 2024 22:27:37 -0700 Subject: [PATCH 255/262] Removing close netdrivers on netdrv_close_on_error --- core/federated/network/netdriver.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/federated/network/netdriver.c b/core/federated/network/netdriver.c index 5d815716a..5f2a702b9 100644 --- a/core/federated/network/netdriver.c +++ b/core/federated/network/netdriver.c @@ -83,10 +83,13 @@ void write_to_netdrv_fail_on_error(netdrv_t* drv, size_t num_bytes, unsigned cha */ ssize_t read_from_netdrv_close_on_error(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { ssize_t bytes_read = read_from_netdrv(drv, buffer, buffer_length); - if (bytes_read <= 0) { - close_netdrv(drv); + if (bytes_read < 0) { return -1; } + if (bytes_read == 0) { + // close_netdrv(drv); + return 0; + } return bytes_read; } From c27ff6ba82570e606f705bc210ff68df1311cd04 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 30 May 2024 12:53:28 -0700 Subject: [PATCH 256/262] Move _lf_termination_executed to netdriver.c for checking the status during every read. --- core/federated/network/lf_mqtt_support.c | 29 ++++++------------------ core/federated/network/netdriver.c | 6 +++++ core/reactor_common.c | 3 ++- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 69a16f233..714cfb383 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -7,6 +7,7 @@ #include "netdriver.h" #include "lf_mqtt_support.h" #include "MQTTClientPersistence.h" // For logging +// #include "reactor_common.h" // #include @@ -17,6 +18,8 @@ #define MAX_RETRIES 5 // Number of retry attempts #define RETRY_DELAY 2 // Delay between attempts in seconds +extern bool _lf_termination_executed; + static MQTT_priv_t* MQTT_priv_init(); static char* create_topic_federation_id_listener_id(const char* federation_id, int listener_id); static char* create_topic_federation_id_A_to_B(const char* federation_id, int A, int B, int flag); @@ -446,13 +449,13 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len int topicLen = 0; MQTTClient_message* message = NULL; int rc; - int bytes_read; + int bytes_read = -1; // LF_PRINT_LOG("RECEIVING message from federateID %d", MQTT_priv->target_id); instant_t start_receive = lf_time_physical(); - while (1) { + while (!_lf_termination_executed) { if (CHECK_TIMEOUT(start_receive, CONNECT_TIMEOUT)) { lf_print_error("Failed to receive with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); - bytes_read = -1; + // bytes_read = -1; break; } MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; @@ -460,25 +463,7 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len // and calls lf_terminate_execution(), closing inbound and outbound netdrivers are first before waiting for the // threads to join. In this case, the federates may not receive the MQTT_resign message and just get closed. So this // must needs a mutex to avoid segmentation faults, happening during MQTT_receive - LF_MUTEX_LOCK(&netdrv_mutex); - if (drv == NULL) { - lf_print_warning("drv is closed, returning -1."); - return -1; - } - if (drv->priv == NULL) { - lf_print_warning("drv->priv is closed, returning -1."); - return -1; - } - if (MQTT_priv == NULL) { - lf_print_warning("MQTT_priv is closed, returning -1."); - return -1; - } - if (MQTT_priv->client == NULL) { - lf_print_warning("MQTT_priv->client is closed, returning -1."); - return -1; - } - rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 10000); - LF_MUTEX_UNLOCK(&netdrv_mutex); + rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 5000); if (rc != MQTTCLIENT_SUCCESS) { lf_print_warning("Failed to receive message, return code %d.", rc); lf_sleep(CONNECT_RETRY_INTERVAL); diff --git a/core/federated/network/netdriver.c b/core/federated/network/netdriver.c index 5f2a702b9..662177874 100644 --- a/core/federated/network/netdriver.c +++ b/core/federated/network/netdriver.c @@ -7,6 +7,12 @@ lf_mutex_t netdrv_mutex; +/** + * Flag to prevent termination function from executing twice and to signal to background + * threads to terminate. + */ +bool _lf_termination_executed = false; + netdrv_t* initialize_common_netdrv(int my_federate_id, const char* federation_id) { netdrv_t* drv = malloc(sizeof(netdrv_t)); if (!drv) { diff --git a/core/reactor_common.c b/core/reactor_common.c index 5d8a50b9f..ca0501435 100644 --- a/core/reactor_common.c +++ b/core/reactor_common.c @@ -1117,7 +1117,8 @@ void initialize_global(void) { * Flag to prevent termination function from executing twice and to signal to background * threads to terminate. */ -bool _lf_termination_executed = false; +// bool _lf_termination_executed = false; +extern bool _lf_termination_executed; /** Flag used to disable cleanup operations on abnormal termination. */ bool _lf_normal_termination = false; From 9f3cd860e9d4f5e85de6da021e2f64c1bbbdfaaf Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 18 Jun 2024 09:08:49 -0700 Subject: [PATCH 257/262] Remove old configs. --- core/federated/network/SSTskeleton.config | 10 ---------- core/federated/network/temp__d.config | 10 ---------- core/federated/network/temp__s.config | 10 ---------- core/federated/sst-c-api | 1 - 4 files changed, 31 deletions(-) delete mode 100644 core/federated/network/SSTskeleton.config delete mode 100644 core/federated/network/temp__d.config delete mode 100644 core/federated/network/temp__s.config delete mode 160000 core/federated/sst-c-api diff --git a/core/federated/network/SSTskeleton.config b/core/federated/network/SSTskeleton.config deleted file mode 100644 index e1ad2266e..000000000 --- a/core/federated/network/SSTskeleton.config +++ /dev/null @@ -1,10 +0,0 @@ -entityInfo.name=net1. -entityInfo.purpose={"group":"Servers"} -entityInfo.number_key=1 -authInfo.pubkey.path= -entityInfo.privkey.path= -auth.ip.address=127.0.0.1 -auth.port.number=21900 -entity.server.ip.address=127.0.0.1 -entity.server.port.number=15045 -network.protocol=TCP \ No newline at end of file diff --git a/core/federated/network/temp__d.config b/core/federated/network/temp__d.config deleted file mode 100644 index b1851561d..000000000 --- a/core/federated/network/temp__d.config +++ /dev/null @@ -1,10 +0,0 @@ -entityInfo.name=net1.federate__d -entityInfo.purpose={"group":"Servers"} -entityInfo.number_key=1 -authInfo.pubkey.path=/home/jake/project/iotauth/entity/auth_certs/Auth101EntityCert.pem -entityInfo.privkey.path=/home/jake/project/iotauth/entity/credentials/keys/net1/Net1.federate__dKey.pem -auth.ip.address=10.218.100.147 -auth.port.number=21900 -entity.server.ip.address=10.218.100.147 -entity.server.port.number=15045 -network.protocol=TCP \ No newline at end of file diff --git a/core/federated/network/temp__s.config b/core/federated/network/temp__s.config deleted file mode 100644 index e28044b22..000000000 --- a/core/federated/network/temp__s.config +++ /dev/null @@ -1,10 +0,0 @@ -entityInfo.name=net1.federate__s -entityInfo.purpose={"group":"Servers"} -entityInfo.number_key=1 -authInfo.pubkey.path=/home/jake/project/iotauth/entity/auth_certs/Auth101EntityCert.pem -entityInfo.privkey.path=/home/jake/project/iotauth/entity/credentials/keys/net1/Net1.federate__sKey.pem -auth.ip.address=10.218.100.147 -auth.port.number=21900 -entity.server.ip.address=10.218.100.147 -entity.server.port.number=15045 -network.protocol=TCP \ No newline at end of file diff --git a/core/federated/sst-c-api b/core/federated/sst-c-api deleted file mode 160000 index 9518b6677..000000000 --- a/core/federated/sst-c-api +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9518b6677b6f5b72ccb1f6f5c0a47de2f9efcfa7 From eddbe734c4913c1b0fd0dfa066c38e5f339b2ad8 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Wed, 19 Jun 2024 12:14:02 -0700 Subject: [PATCH 258/262] Add comments. --- core/federated/federate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/federated/federate.c b/core/federated/federate.c index 142a2ce32..cc71fe9f7 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -1702,6 +1702,7 @@ static void get_remote_federate_info_from_RTI(uint16_t remote_federate_id, netdr char hostname[INET_ADDRSTRLEN]; inet_ntop(AF_INET, buffer + 1 + sizeof(int32_t), hostname, INET_ADDRSTRLEN); LF_PRINT_LOG("Received address %s port %d for federate %d from RTI.", hostname, port, remote_federate_id); + // Set the target federate's hostname and port to the netdriver. set_host_name(fed_netdrv, hostname); // Must set as specified port. Or else, the port will be increased when connecting to the other federate. set_specified_port(fed_netdrv, port); From ff613cf415e98050c3ccb2a69736c6f44e127f5e Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 20 Jun 2024 12:53:40 -0700 Subject: [PATCH 259/262] Checked buffer length for read --- core/federated/network/lf_socket_support.c | 12 +++++------- core/federated/network/netdriver.c | 2 ++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 758e189d5..901818d45 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -56,8 +56,8 @@ netdrv_t* establish_communication_session(netdrv_t* listener_netdrv) { // Got a socket break; } else if (connector_priv->socket_descriptor < 0 && (errno != EAGAIN || errno != EWOULDBLOCK)) { - lf_print_error_and_exit("Failed to accept the socket. %s. connector_priv->socket_descriptor = %d", strerror(errno), - connector_priv->socket_descriptor); + lf_print_error_and_exit("Failed to accept the socket. %s. connector_priv->socket_descriptor = %d", + strerror(errno), connector_priv->socket_descriptor); } else { // Try again lf_print_warning("Failed to accept the socket. %s. Trying again.", strerror(errno)); @@ -139,7 +139,7 @@ int write_to_netdrv(netdrv_t* drv, size_t num_bytes, unsigned char* buffer) { * @param socket The socket ID. * @param num_bytes The number of bytes to read. * @param buffer The buffer into which to put the bytes. - * @return 0 for success, 1 for EOF, and -1 for an error. + * @return 0 for success, 1 for EOF, and -1 for an rerror. */ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_length) { if (drv == NULL) { @@ -173,8 +173,7 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len for (;;) { retry_count = 0; - while (bytes_to_read > 0) { - // TODO: Check buffer_length. + while (bytes_to_read > 0 && bytes_to_read <= buffer_length) { bytes_read = read(priv->socket_descriptor, buffer + total_bytes_read, bytes_to_read); if (bytes_read < 0 && // If) Error has occurred, retry_count++ < NUM_SOCKET_RETRIES && // there are left retry counts, @@ -283,14 +282,13 @@ ssize_t peek_from_netdrv(netdrv_t* drv, unsigned char* result) { return bytes_read; } -void set_target_id(netdrv_t* drv, int federate_id){ +void set_target_id(netdrv_t* drv, int federate_id) { if (drv == NULL) { } // JUST TO PASS COMPILER. if (federate_id == 0) { } // JUST TO PASS COMPILER. } - // ------------------Helper Functions------------------ // static void handle_header_read(unsigned char* buffer, size_t* bytes_to_read, int* state) { diff --git a/core/federated/network/netdriver.c b/core/federated/network/netdriver.c index 662177874..5f82a6ecb 100644 --- a/core/federated/network/netdriver.c +++ b/core/federated/network/netdriver.c @@ -5,6 +5,8 @@ #include "netdriver.h" #include "util.h" +// Mutex lock held while performing socket close operations. +// A deadlock can occur if two threads simulataneously attempt to close the same netdriver. lf_mutex_t netdrv_mutex; /** From abac6815c069f3bc840c58d75b2d09be490a19e4 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Thu, 20 Jun 2024 20:13:34 -0700 Subject: [PATCH 260/262] Change bytes_read to 0 for close() situations. --- core/federated/network/lf_mqtt_support.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index 714cfb383..eae5c85d9 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -449,9 +449,14 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len int topicLen = 0; MQTTClient_message* message = NULL; int rc; - int bytes_read = -1; + int bytes_read = 0; // LF_PRINT_LOG("RECEIVING message from federateID %d", MQTT_priv->target_id); instant_t start_receive = lf_time_physical(); + // If the netdrv was closed from the outside during termination, segmentation faults happen. When federate executes + // and calls lf_terminate_execution(), closing inbound and outbound netdrivers are first before waiting for the + // threads to join. In this case, the federates may not receive the MQTT_resign message and just get closed. The + // close_outbound_netdrv() and close_inbound_netdrv() functions hold a mutex lock, so this just needs to check the + // _lf_termination_executed status befor restarting the loop. while (!_lf_termination_executed) { if (CHECK_TIMEOUT(start_receive, CONNECT_TIMEOUT)) { lf_print_error("Failed to receive with timeout: " PRINTF_TIME ". Giving up.", CONNECT_TIMEOUT); @@ -459,10 +464,6 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len break; } MQTT_priv_t* MQTT_priv = (MQTT_priv_t*)drv->priv; - // If the netdrv was closed from the outside during termination, segmentation faults happen. When federate executes - // and calls lf_terminate_execution(), closing inbound and outbound netdrivers are first before waiting for the - // threads to join. In this case, the federates may not receive the MQTT_resign message and just get closed. So this - // must needs a mutex to avoid segmentation faults, happening during MQTT_receive rc = MQTTClient_receive(MQTT_priv->client, &topicName, &topicLen, &message, 5000); if (rc != MQTTCLIENT_SUCCESS) { lf_print_warning("Failed to receive message, return code %d.", rc); From 9f4b822272ae3018ee23c6162c0e18917c33e4a2 Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 25 Jun 2024 14:57:22 -0700 Subject: [PATCH 261/262] Minor fix --- core/federated/RTI/rti_remote.c | 6 ++++-- core/federated/RTI/rti_remote.h | 5 ++--- core/federated/network/lf_mqtt_support.c | 1 + core/federated/network/lf_socket_support.c | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 672fffddd..57f856009 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -291,8 +291,10 @@ void handle_timed_message(federate_info_t* sending_federate, unsigned char* buff "RTI failed to forward message to federate %d.", federate_id); while (sending_federate->fed_netdrv->read_remaining_bytes > 0) { - ssize_t bytes_read_again = read_from_netdrv_fail_on_error(sending_federate->fed_netdrv, buffer, FED_COM_BUFFER_SIZE, - NULL, "RTI failed to read message chunks."); + ssize_t bytes_read_again = read_from_netdrv(sending_federate->fed_netdrv, buffer, FED_COM_BUFFER_SIZE); + if (bytes_read_again <= 0) { + lf_print_error_and_exit("RTI failed to read message chunks."); + } write_to_netdrv_fail_on_error(fed->fed_netdrv, bytes_read_again, buffer, &rti_mutex, "RTI failed to forward message to federate %d.", federate_id); } diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index a9796e016..cdca63092 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -65,7 +65,7 @@ typedef struct federate_info_t { pqueue_tag_t* in_transit_message_tags; // Record of in-transit messages to this federate that are not // yet processed. This record is ordered based on the time // value of each message for a more efficient access. - netdrv_t* fed_netdrv; // The netdriver that the RTI handling each federate. + netdrv_t* fed_netdrv; // The netdriver that the RTI handling each federate. } federate_info_t; /** @@ -207,8 +207,7 @@ void handle_port_absent_message(federate_info_t* sending_federate, unsigned char * @param sending_federate The sending federate. * @param buffer The buffer to read into (the first byte is already there). */ -void handle_timed_message(federate_info_t* sending_federate, unsigned char* buffer, size_t buffer_length, - ssize_t bytes_read); +void handle_timed_message(federate_info_t* sending_federate, unsigned char* buffer, ssize_t bytes_read); /** * Handle a latest tag complete (LTC) message. @see diff --git a/core/federated/network/lf_mqtt_support.c b/core/federated/network/lf_mqtt_support.c index eae5c85d9..217961f64 100644 --- a/core/federated/network/lf_mqtt_support.c +++ b/core/federated/network/lf_mqtt_support.c @@ -477,6 +477,7 @@ ssize_t read_from_netdrv(netdrv_t* drv, unsigned char* buffer, size_t buffer_len } else { // Successfully received a message lf_print_log("Successfully received message, return code %d.", rc); + // TODO: NEED to add compare with buffer_length. Also actions. memcpy(buffer, (unsigned char*)message->payload, message->payloadlen); bytes_read = message->payloadlen; // LF_PRINT_LOG("RECEIVED message from federateID %d", MQTT_priv->target_id); diff --git a/core/federated/network/lf_socket_support.c b/core/federated/network/lf_socket_support.c index 901818d45..424d08c37 100644 --- a/core/federated/network/lf_socket_support.c +++ b/core/federated/network/lf_socket_support.c @@ -1,4 +1,5 @@ #include +#include #include #include #include From 7e5997aa5b6b2b4419c2a93e075d2898399d229a Mon Sep 17 00:00:00 2001 From: Dongha Kim Date: Tue, 25 Jun 2024 18:30:29 -0700 Subject: [PATCH 262/262] Fix RTI build --- core/federated/RTI/main.c | 2 -- core/federated/RTI/rti_remote.c | 6 ++++++ core/federated/RTI/rti_remote.h | 4 ---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/federated/RTI/main.c b/core/federated/RTI/main.c index 89e2d71b1..b7e6b4c29 100644 --- a/core/federated/RTI/main.c +++ b/core/federated/RTI/main.c @@ -245,7 +245,6 @@ int process_args(int argc, const char* argv[]) { usage(argc, argv); return 0; } - // TODO: Need to fix rti.user_specified_port = (uint16_t)RTI_port; } else if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--clock_sync") == 0) { if (argc < i + 2) { @@ -334,7 +333,6 @@ int main(int argc, const char* argv[]) { rti.base.scheduling_nodes[i] = (scheduling_node_t*)fed_info; } - // TODO: Need to add user_specified_port if (start_rti_server(rti.user_specified_port)) { wait_for_federates(rti.rti_netdrv); normal_termination = true; diff --git a/core/federated/RTI/rti_remote.c b/core/federated/RTI/rti_remote.c index 57f856009..be1d2326a 100644 --- a/core/federated/RTI/rti_remote.c +++ b/core/federated/RTI/rti_remote.c @@ -1518,6 +1518,12 @@ void initialize_RTI(rti_remote_t* rti) { // #endif } +// The RTI includes clock.c, which requires the following functions that are defined +// in clock-sync.c. But clock-sync.c is not included in the standalone RTI. +// Provide empty implementations of these functions. +void clock_sync_add_offset(instant_t* t) { (void)t; } +void clock_sync_subtract_offset(instant_t* t) { (void)t; } + void free_scheduling_nodes(scheduling_node_t** scheduling_nodes, uint16_t number_of_scheduling_nodes) { for (uint16_t i = 0; i < number_of_scheduling_nodes; i++) { scheduling_node_t* node = scheduling_nodes[i]; diff --git a/core/federated/RTI/rti_remote.h b/core/federated/RTI/rti_remote.h index cdca63092..45559f4ee 100644 --- a/core/federated/RTI/rti_remote.h +++ b/core/federated/RTI/rti_remote.h @@ -32,10 +32,6 @@ #include // For HMAC authentication. #endif -// #ifdef OPENSSL_REQUIRED -// #include -// #endif - #include "lf_types.h" #include "pqueue_tag.h"