Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ports/common/td_proto_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,18 @@ static bool parse_u16(const char *s, uint16_t *out)
return true;
}

/* No default: with every state listed, -Wswitch reports a new one. */
static const char *state_name(td_mqtt_state_t s)
{
switch (s) {
case TD_MQTT_OFF: return "not connected";
case TD_MQTT_CONNECTING: return "connecting";
case TD_MQTT_TLS_HANDSHAKE: return "TLS handshake";
case TD_MQTT_WAIT_CONNACK: return "logging in";
case TD_MQTT_CONNECTED: return "connected";
case TD_MQTT_RETRY: return "reconnecting";
default: return "not connected";
}
return "not connected";
}

/* Wait (driving the connection) until it settles or timeout_ms passes. */
Expand Down
Loading