|
|
|
@ -451,13 +451,9 @@ int property__write_all(struct mosquitto__packet *packet, struct mqtt5__property
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static int property__command_check(int command, struct mqtt5__property *properties)
|
|
|
|
|
int mosquitto_property_command_check(int command, int identifier)
|
|
|
|
|
{
|
|
|
|
|
struct mqtt5__property *p;
|
|
|
|
|
|
|
|
|
|
p = properties;
|
|
|
|
|
while(p){
|
|
|
|
|
switch(p->identifier){
|
|
|
|
|
switch(identifier){
|
|
|
|
|
case MQTT_PROP_PAYLOAD_FORMAT_INDICATOR:
|
|
|
|
|
case MQTT_PROP_MESSAGE_EXPIRY_INTERVAL:
|
|
|
|
|
case MQTT_PROP_CONTENT_TYPE:
|
|
|
|
@ -545,6 +541,18 @@ static int property__command_check(int command, struct mqtt5__property *properti
|
|
|
|
|
default:
|
|
|
|
|
return MOSQ_ERR_PROTOCOL;
|
|
|
|
|
}
|
|
|
|
|
return MOSQ_ERR_SUCCESS;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int property__command_check(int command, struct mqtt5__property *properties)
|
|
|
|
|
{
|
|
|
|
|
struct mqtt5__property *p;
|
|
|
|
|
int rc;
|
|
|
|
|
|
|
|
|
|
p = properties;
|
|
|
|
|
while(p){
|
|
|
|
|
rc = mosquitto_property_command_check(command, p->identifier);
|
|
|
|
|
if(rc) return rc;
|
|
|
|
|
|
|
|
|
|
p = p->next;
|
|
|
|
|
}
|
|
|
|
|