Fix incorrect json_get_int call.

This commit is contained in:
Roger A. Light
2024-03-04 17:39:35 +00:00
parent 9f7b23ca72
commit 9691ab42f6
+1 -1
View File
@@ -156,7 +156,7 @@ int dynsec_clients__config_load(struct dynsec__data *data, cJSON *tree)
/* sha512-pbkdf2 only */
int iterations;
const char *salt;
json_get_int(j_client, "iterations", &iterations, 0, true);
json_get_int(j_client, "iterations", &iterations, true, 0);
if(json_get_string(j_client, "salt", &salt, false) == MOSQ_ERR_SUCCESS
&& json_get_string(j_client, "password", &password, false) == MOSQ_ERR_SUCCESS
&& iterations > 0){