-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple fixes and improvements in mqtt client source #97
base: master
Are you sure you want to change the base?
Conversation
如果任务优先级比初始化的任务优先级高会导致无法连接, 因为新建的任务在进入的时候会检查这一个状态, 如果被抢占, 这一个状态就不会被修改
We cannot do that because this flag is not meant to be used in such way, MQTT_LOG_LEVEL is only for mqtt_log. It is better to do in such way to remove warning and not to not mix definitions:
|
yes that's another way to do it. independent of LOG setting. I will modify that and push again. |
Signed-off-by: Ajay Bhargav <[email protected]>
This patch fix the issue where platform_thread_destroy do not actually delete the thread created, only memory free was done. Signed-off-by: Ajay Bhargav <[email protected]>
Compiler generate unused variable 'i' warning in mqtt_list_subscribe_topic when MQTT_LOG_LEVEL < MQTT_LOG_INFO_LEVEL. Signed-off-by: Ajay Bhargav <[email protected]>
@@ -1463,6 +1463,8 @@ int mqtt_publish(mqtt_client_t* c, const char* topic_filter, mqtt_message_t* msg | |||
int mqtt_list_subscribe_topic(mqtt_client_t* c) | |||
{ | |||
int i = 0; | |||
|
|||
(void) i; /* prevent compiler warning */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jiejieTop approve?
In tencentos implementation of platform_thread_destroy, stack size is getting freed where as stack base is suppose to be freed. platform_thread_t structure varaible is also not freed. this patch fix both the issues Signed-off-by: Ajay Bhargav <[email protected]>
Signed-off-by: Ajay Bhargav <[email protected]>
Task handle must be storead in temporary variable and then memory is to be freed. Else task exits before memory free is executed. Signed-off-by: Ajay Bhargav <[email protected]>
Signed-off-by: Ajay Bhargav <[email protected]>
Signed-off-by: Ajay Bhargav <[email protected]>
Signed-off-by: Ajay Bhargav <[email protected]>
when topic filter string passed to mqtt_subscribe via a local variable, topic subscribe is success but does not receive anything afterwards. This patch remove dependency of type of variable passed to mqtt_subscribe Signed-off-by: Ajay Bhargav <[email protected]>
last will topic and message is now allocated to remove dependency on variable type passed to function. Signed-off-by: Ajay Bhargav <[email protected]>
remove full path name from error and debug messages. Signed-off-by: Ajay Bhargav <[email protected]>
Signed-off-by: Ajay Bhargav <[email protected]>
Signed-off-by: Ajay Bhargav <[email protected]>
Signed-off-by: Ajay Bhargav <[email protected]>
Update mqttclient.c
Compiler generate unused variable 'i' warning in mqtt_list_subscribe_topic when MQTT_LOG_LEVEL < MQTT_LOG_INFO_LEVEL.