From 5f8d86b4ee793cdaef283b2dfa21f7b34635e09e Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Thu, 10 Jan 2019 22:10:32 +0000 Subject: [PATCH] Fix sub-denied test. --- src/handle_subscribe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/handle_subscribe.c b/src/handle_subscribe.c index 1f8412f7..e50075a3 100644 --- a/src/handle_subscribe.c +++ b/src/handle_subscribe.c @@ -145,8 +145,8 @@ int handle__subscribe(struct mosquitto_db *db, struct mosquitto *context) log__printf(NULL, MOSQ_LOG_DEBUG, "\t%s (QoS %d)", sub, qos); if(context->protocol != mosq_p_mqtt31){ - rc = mosquitto_acl_check(db, context, sub, 0, NULL, qos, false, MOSQ_ACL_SUBSCRIBE); - switch(rc){ + rc2 = mosquitto_acl_check(db, context, sub, 0, NULL, qos, false, MOSQ_ACL_SUBSCRIBE); + switch(rc2){ case MOSQ_ERR_SUCCESS: break; case MOSQ_ERR_ACL_DENIED: @@ -154,7 +154,7 @@ int handle__subscribe(struct mosquitto_db *db, struct mosquitto *context) break; default: mosquitto__free(sub); - return rc; + return rc2; } }