diff options
author | Timotej S <6674623+underhood@users.noreply.github.com> | 2021-11-09 08:53:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 08:53:53 +0100 |
commit | f62198716ad35ed1f4872a9bdf5ce745591a13ca (patch) | |
tree | 40da21c72bb1c684621234602990e414d3ec9a31 /aclk/aclk_rx_msgs.c | |
parent | fd819dd69f123f5d94fde157265da4ccd41e8e33 (diff) |
fix log if D_ACLK is used (#11763)
Diffstat (limited to 'aclk/aclk_rx_msgs.c')
-rw-r--r-- | aclk/aclk_rx_msgs.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/aclk/aclk_rx_msgs.c b/aclk/aclk_rx_msgs.c index 0790b435de..6e85564de5 100644 --- a/aclk/aclk_rx_msgs.c +++ b/aclk/aclk_rx_msgs.c @@ -266,7 +266,14 @@ void aclk_handle_new_cloud_msg(const char *message_type, const char *msg, size_t // TODO do the look up table with hashes to optimize when there are more // than few if (!strcmp(message_type, "cmd")) { - aclk_handle_cloud_message((char *)msg); + // msg is binary payload in all other cases + // however in this message from old legacy cloud + // we have to convert it to C string + char *str = mallocz(msg_len+1); + memcpy(str, msg, msg_len); + str[msg_len] = 0; + aclk_handle_cloud_message(str); + freez(str); return; } if (!strcmp(message_type, "CreateNodeInstanceResult")) { |