|
@@ -1946,6 +1946,7 @@ static int MQTTSubscribe(iotx_mc_client_t *c, const char *topicFilter, iotx_mqtt
|
|
|
iotx_mqtt_event_handle_func_fpt messageHandler, void *pcontext)
|
|
iotx_mqtt_event_handle_func_fpt messageHandler, void *pcontext)
|
|
|
{
|
|
{
|
|
|
int len = 0;
|
|
int len = 0;
|
|
|
|
|
+ int qos_sub = (int)qos;
|
|
|
iotx_time_t timer;
|
|
iotx_time_t timer;
|
|
|
MQTTString topic = MQTTString_initializer;
|
|
MQTTString topic = MQTTString_initializer;
|
|
|
/*iotx_mc_topic_handle_t handler = {topicFilter, {messageHandler, pcontext}};*/
|
|
/*iotx_mc_topic_handle_t handler = {topicFilter, {messageHandler, pcontext}};*/
|
|
@@ -2125,7 +2126,7 @@ static int MQTTSubscribe(iotx_mc_client_t *c, const char *topicFilter, iotx_mqtt
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
len = MQTTSerialize_subscribe((unsigned char *)c->buf_send, c->buf_size_send, 0, (unsigned short)msgId, 1, &topic,
|
|
len = MQTTSerialize_subscribe((unsigned char *)c->buf_send, c->buf_size_send, 0, (unsigned short)msgId, 1, &topic,
|
|
|
- (int *)&qos);
|
|
|
|
|
|
|
+ (int *)&qos_sub);
|
|
|
if (len <= 0) {
|
|
if (len <= 0) {
|
|
|
#ifdef PLATFORM_HAS_DYNMEM
|
|
#ifdef PLATFORM_HAS_DYNMEM
|
|
|
mqtt_free(handler->topic_filter);
|
|
mqtt_free(handler->topic_filter);
|