Fix sub-denied test.

pull/1203/head
Roger A. Light 7 years ago
parent 4a2e569171
commit 5f8d86b4ee

@ -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); log__printf(NULL, MOSQ_LOG_DEBUG, "\t%s (QoS %d)", sub, qos);
if(context->protocol != mosq_p_mqtt31){ if(context->protocol != mosq_p_mqtt31){
rc = mosquitto_acl_check(db, context, sub, 0, NULL, qos, false, MOSQ_ACL_SUBSCRIBE); rc2 = mosquitto_acl_check(db, context, sub, 0, NULL, qos, false, MOSQ_ACL_SUBSCRIBE);
switch(rc){ switch(rc2){
case MOSQ_ERR_SUCCESS: case MOSQ_ERR_SUCCESS:
break; break;
case MOSQ_ERR_ACL_DENIED: case MOSQ_ERR_ACL_DENIED:
@ -154,7 +154,7 @@ int handle__subscribe(struct mosquitto_db *db, struct mosquitto *context)
break; break;
default: default:
mosquitto__free(sub); mosquitto__free(sub);
return rc; return rc2;
} }
} }

Loading…
Cancel
Save