Skip to content

Commit 018963e

Browse files
Lorl0rdkartben
authored andcommitted
samples: net: secure_mqtt: error code to enum
The error code `0x80` is replaced with its corresponding `mqtt_suback_return_code` enum value. This will make the code more readable, as users of this example do not have to look up, what `0x80` encodes. Signed-off-by: Pályi Lőrinc <[email protected]>
1 parent 7b1d748 commit 018963e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/net/secure_mqtt_sensor_actuator/src/mqtt_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ static void mqtt_event_handler(struct mqtt_client *const client, const struct mq
214214
break;
215215

216216
case MQTT_EVT_SUBACK:
217-
if (evt->result == 0x80) {
217+
if (evt->result == MQTT_SUBACK_FAILURE) {
218218
LOG_ERR("MQTT SUBACK error [%d]", evt->result);
219219
break;
220220
}

0 commit comments

Comments
 (0)