提交 6468bb4f 编写于 作者: R Roger A. Light

Fix documentation omission around mosquitto_reinitialise.

Closes #2489. Thanks to rroguski
上级 351911bd
...@@ -27,6 +27,7 @@ Client library: ...@@ -27,6 +27,7 @@ Client library:
- Fix incorrect use of SSL_connect. Closes #2594. - Fix incorrect use of SSL_connect. Closes #2594.
- Don't set SIGPIPE to ignore, use MSG_NOSIGNAL instead. Closes #2564. - Don't set SIGPIPE to ignore, use MSG_NOSIGNAL instead. Closes #2564.
- Add documentation of struct mosquitto_message to header. Closes #2561. - Add documentation of struct mosquitto_message to header. Closes #2561.
- Fix documentation omission around mosquitto_reinitialise. Closes #2489.
Clients: Clients:
- Fix mosquitto_pub incorrectly reusing topic aliases when reconnecting. - Fix mosquitto_pub incorrectly reusing topic aliases when reconnecting.
......
...@@ -346,9 +346,10 @@ libmosq_EXPORT void mosquitto_destroy(struct mosquitto *mosq); ...@@ -346,9 +346,10 @@ libmosq_EXPORT void mosquitto_destroy(struct mosquitto *mosq);
* callbacks that are specified. * callbacks that are specified.
* *
* Returns: * Returns:
* MOSQ_ERR_SUCCESS - on success. * MOSQ_ERR_SUCCESS - on success.
* MOSQ_ERR_INVAL - if the input parameters were invalid. * MOSQ_ERR_INVAL - if the input parameters were invalid.
* MOSQ_ERR_NOMEM - if an out of memory condition occurred. * MOSQ_ERR_NOMEM - if an out of memory condition occurred.
* MOSQ_ERR_MALFORMED_UTF8 - if the client id is not valid UTF-8.
* *
* See Also: * See Also:
* <mosquitto_new>, <mosquitto_destroy> * <mosquitto_new>, <mosquitto_destroy>
......
...@@ -163,6 +163,9 @@ int mosquitto_reinitialise(struct mosquitto *mosq, const char *id, bool clean_st ...@@ -163,6 +163,9 @@ int mosquitto_reinitialise(struct mosquitto *mosq, const char *id, bool clean_st
return MOSQ_ERR_MALFORMED_UTF8; return MOSQ_ERR_MALFORMED_UTF8;
} }
mosq->id = mosquitto__strdup(id); mosq->id = mosquitto__strdup(id);
if(!mosq->id){
return MOSQ_ERR_NOMEM;
}
} }
mosq->in_packet.payload = NULL; mosq->in_packet.payload = NULL;
packet__cleanup(&mosq->in_packet); packet__cleanup(&mosq->in_packet);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册