You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to port my code from v1.2.0 to v2.1.0, which is integrated into the coreMQTT-Agent. However, I have come across an unexpected assertion firing which was not present in previous v1.2.0. Upon analyzing the code, I discovered that the problem also exists in v2.1.1 too.
In my code I am trying to connect to a test broker that does not require a login and password. That's why I pass empty strings as "" and not NULL. strlen of the empty string returns 0, so this assertion fires: I have a valid string that is not NULL, but its length is 0.
Workaround of this problem can be achieved by passing a pointer to NULL instead of the empty string "". But still I think this case should not be handled as fatal error.
The text was updated successfully, but these errors were encountered:
I'm trying to port my code from
v1.2.0
tov2.1.0
, which is integrated into the coreMQTT-Agent. However, I have come across an unexpected assertion firing which was not present in previousv1.2.0
. Upon analyzing the code, I discovered that the problem also exists inv2.1.1
too.coreMQTT/source/core_mqtt.c
Line 1869 in b0acf49
In my code I am trying to connect to a test broker that does not require a login and password. That's why I pass empty strings as
""
and notNULL
.strlen
of the empty string returns0
, so this assertion fires: I have a valid string that is notNULL
, but its length is0
.Workaround of this problem can be achieved by passing a pointer to
NULL
instead of the empty string""
. But still I think this case should not be handled as fatal error.The text was updated successfully, but these errors were encountered: