Fix persistence reloading.

This commit is contained in:
Roger A. Light 2018-01-13 21:11:07 +00:00
parent 027c5d7f6e
commit ff55499725
2 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ int db__open(struct mosquitto__config *config, struct mosquitto_db *db)
db->subs = NULL; db->subs = NULL;
subhier = sub__add_hier_entry(&db->subs, " ", strlen(" ")); subhier = sub__add_hier_entry(&db->subs, "", strlen(""));
if(!subhier) return MOSQ_ERR_NOMEM; if(!subhier) return MOSQ_ERR_NOMEM;
subhier = sub__add_hier_entry(&db->subs, "$SYS", strlen("$SYS")); subhier = sub__add_hier_entry(&db->subs, "$SYS", strlen("$SYS"));

View File

@ -183,7 +183,7 @@ static int sub__topic_tokenise(const char *subtopic, struct sub__token **topics)
assert(topics); assert(topics);
if(subtopic[0] != '$'){ if(subtopic[0] != '$'){
new_topic = sub__topic_append(&tail, topics, " "); new_topic = sub__topic_append(&tail, topics, "");
if(!new_topic) goto cleanup; if(!new_topic) goto cleanup;
} }