Disallow properties that are invalid for a command.
This commit is contained in:
parent
741a8a9cc3
commit
49a8642986
@ -85,6 +85,11 @@ int cfg_parse_property(struct mosq_config *cfg, int argc, char *argv[], int *idx
|
||||
return MOSQ_ERR_INVAL;
|
||||
}
|
||||
|
||||
if(mosquitto_property_command_check(cmd, identifier)){
|
||||
fprintf(stderr, "Error: %s property not allow for %s in --property argument.\n\n", propname, cmdname);
|
||||
return MOSQ_ERR_INVAL;
|
||||
}
|
||||
|
||||
if(identifier == MQTT_PROP_USER_PROPERTY){
|
||||
if((*idx)+3 > argc-1){
|
||||
/* Not enough args */
|
||||
|
Loading…
Reference in New Issue
Block a user