|
|
@ -83,7 +83,10 @@ int retain__store(const char *topic, struct mosquitto_msg_store *stored, char **
|
|
|
|
assert(split_topics);
|
|
|
|
assert(split_topics);
|
|
|
|
|
|
|
|
|
|
|
|
HASH_FIND(hh, db.retains, split_topics[0], strlen(split_topics[0]), retainhier);
|
|
|
|
HASH_FIND(hh, db.retains, split_topics[0], strlen(split_topics[0]), retainhier);
|
|
|
|
if(retainhier == NULL) return MOSQ_ERR_NOT_FOUND;
|
|
|
|
if(retainhier == NULL){
|
|
|
|
|
|
|
|
retainhier = retain__add_hier_entry(NULL, &db.retains, split_topics[0], (uint16_t)strlen(split_topics[0]));
|
|
|
|
|
|
|
|
if(!retainhier) return MOSQ_ERR_NOMEM;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for(i=0; split_topics[i] != NULL; i++){
|
|
|
|
for(i=0; split_topics[i] != NULL; i++){
|
|
|
|
slen = strlen(split_topics[i]);
|
|
|
|
slen = strlen(split_topics[i]);
|
|
|
|