Skip to content

Commit 3de1bcc

Browse files
committed
Add get_pkt_id in mqtt_unsubscribe.
1 parent 317a8b3 commit 3de1bcc

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

app/wizard_demo/httpd_proxy/http_servlet.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,10 @@ bool http_servlet::doConnect(request_t& req, response_t&)
179179
logger_error("write connect response error");
180180
delete peer;
181181

182+
#ifndef USE_REFER
182183
local->unbind_sock();
183184
delete local;
185+
#endif
184186
return false;
185187
}
186188
#endif

lib_acl_cpp/include/acl_cpp/mqtt/mqtt_unsubscribe.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ class ACL_CPP_API mqtt_unsubscribe : public mqtt_message {
3030
*/
3131
mqtt_unsubscribe& set_pkt_id(unsigned short id);
3232

33+
/**
34+
* get the messsage's id.
35+
* @return {unsigned short} should return the value that > 0 && <= 65535.
36+
*/
37+
unsigned short get_pkt_id() const {
38+
return pkt_id_;
39+
}
40+
3341
/**
3442
* set the message's topic.
3543
* @param topic {const char*}

lib_acl_cpp/include/acl_cpp/stdlib/string.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,8 @@ class ACL_CPP_API string {
947947

948948
/**
949949
* 将当前对象存储的字符串进行分割
950-
* @param sep {const char*} 进行分割时的分割标记
950+
* @param sep {const char*} 进行分割时的分割符集合,该字符串中的每一个字符都
951+
* 做为分割符,注:内部不是用整个字符串进行分割的
951952
* @param quoted {bool} 当为 true 时,则对于由单/双引号引起来的
952953
* 字符串内容,不做分割,但此时要求 sep 中不得存在单/双号
953954
* @return {std::list<string>&} 返回 list 格式的分割结果,返回的结果
@@ -957,7 +958,7 @@ class ACL_CPP_API string {
957958

958959
/**
959960
* 将当前对象存储的字符串进行分割
960-
* @param sep {const char*} 进行分割时的分割标记
961+
* @param sep {const char*} 进行分割时的分割标记,含义与split相同
961962
* @param quoted {bool} 当为 true 时,则对于由单/双引号引起来的
962963
* 字符串内容,不做分割,但此时要求 sep 中不得存在单/双号
963964
* @return {std::vector<string>&} 返回 vector 格式的分割结果,返回的

0 commit comments

Comments
 (0)