Skip to content

Commit

Permalink
Reply to $CONTROL QoS>0 msgs even if WITH_CONTROL disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Dec 2, 2020
1 parent 27a160d commit ea1d496
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/handle_publish.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,15 @@ int handle__publish(struct mosquitto *context)
db__msg_store_free(msg);
return rc;
#else
if(msg->qos == 1){
if (send__puback(context, msg->source_mid, MQTT_RC_SUCCESS, NULL)) {
return MOSQ_ERR_UNKNOWN;
}
}else if(msg->qos == 2){
if(send__pubrec(context, msg->source_mid, MQTT_RC_SUCCESS, NULL)){
return MOSQ_ERR_UNKNOWN;
}
}
db__msg_store_free(msg);
return MOSQ_ERR_SUCCESS;
#endif
Expand Down

0 comments on commit ea1d496

Please sign in to comment.