Fix messages to `$` prefixed topics being rejected.

Closes #2111. Thanks to yellowgg2.
pull/2128/head
Roger A. Light 5 years ago
parent 7baca428da
commit f89a3c3fc0

@ -4,6 +4,7 @@
Broker: Broker:
- Fix `tls_version` behaviour not matching documentation. It was setting the - Fix `tls_version` behaviour not matching documentation. It was setting the
exact TLS version to use, not the minimium TLS version to use. Closes #2110. exact TLS version to use, not the minimium TLS version to use. Closes #2110.
- Fix messages to `$` prefixed topics being rejected. Closes #2111.
2.0.8 - 2021-02-25 2.0.8 - 2021-02-25

@ -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]);

Loading…
Cancel
Save