mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-21 15:23:46 +08:00
Fix sub-denied test.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user