Skip to content

Commit

Permalink
mqtt: use same coding style regarding whitespace/tabs after 2bb8b56
Browse files Browse the repository at this point in the history
  • Loading branch information
henningw committed Oct 14, 2022
1 parent 846ed0a commit 0994754
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/modules/mqtt/mqtt_dispatch.c
Expand Up @@ -224,17 +224,17 @@ int mqtt_run_dispatcher(mqtt_dispatcher_cfg_t* cfg)
LM_ERR("mosquitto_tls_set() failed: %d %s\n",errno, strerror(errno));
return -1;
}
if (cfg->tls_alpn != NULL) {
if (cfg->tls_alpn != NULL) {
#if LIBMOSQUITTO_VERSION_NUMBER >= 1006000
res = mosquitto_string_option(_mosquitto, MOSQ_OPT_TLS_ALPN, cfg->tls_alpn);
if (res != MOSQ_ERR_SUCCESS) {
LM_ERR("mosquitto_string_option() failed setting TLS ALPN: %d %s\n",errno, strerror(errno));
return -1;
}
res = mosquitto_string_option(_mosquitto, MOSQ_OPT_TLS_ALPN, cfg->tls_alpn);
if (res != MOSQ_ERR_SUCCESS) {
LM_ERR("mosquitto_string_option() failed setting TLS ALPN: %d %s\n",errno, strerror(errno));
return -1;
}
#else
LM_WARN("unable to set TLS ALPN due to outdated mosquitto library version, upgrade it to >= 1.6.0\n")
LM_WARN("unable to set TLS ALPN due to outdated mosquitto library version, upgrade it to >= 1.6.0\n")
#endif
}
}
}

res = mosquitto_connect(_mosquitto, cfg->host, cfg->port, cfg->keepalive);
Expand Down

0 comments on commit 0994754

Please sign in to comment.