Skip to content
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

fix bugs and format code for some compile. #206

Open
wants to merge 30 commits into
base: develop
Choose a base branch
from

Conversation

Doawen
Copy link

@Doawen Doawen commented Apr 2, 2020

No description provided.

wangxianwen added 4 commits April 2, 2020 15:17
…_publish", because routine "MQTTPacket_decodeBuf" has changed the rc to other value.
…routine can return data over 128, so change char to unsigned char.
1.some old compile cannot support defining variable after routine process sentence.
2. some compile can not support setting value in 'if' condition.
3. some old compile will err when variable name same with structure type name.
@scaprile
Copy link
Contributor

scaprile commented Apr 2, 2020

Try to provide a description on why you are doing what you are doing.
What you describe as "some linux platforms don't support char >= 128" is "some users don't tell the compiler whether they want char to be signed by default or not", which is not strictly defined on pre C99 (iirc).
If you need specific changes for your compiler, those are not bugs, they are specific changes for your compiler and should be handled as such. You may propose those if you like, though it is likely that you'll have to handle them separately.
If you've found a real problem, please describe it thoroughly and submit a specific issue for that specific problem so it can be reviewed.

wangxianwen added 25 commits April 3, 2020 11:24
…will not compatibility with older one, because modify the routine's parameter.
…r package type in poor wifi condition,because handle other package will occupy cpu time.
1. The back task only wait for a small time when no data in reading buffer, and this can give other code cpu time for back task.
2. This 5ms do not have effect on wait_for routine.
1.add try count for connect process.
2.optimize the time set for publish process.
2、订阅消息大小也不再制定个数,根据空间自动增长。
3、默认发送重试次数6次,适应网络抖动情况。
2、增加获取剩余心跳时间的函数,某些低功耗平台可以在这个间隔时间内,做一些业务处理。
2、增加nopong接口,部分平台需要mqtt库支持服务器不回复pong帧的情况,主要用在芯片低功耗状态下;
2、增加使用小内存的publish函数,不再复制用户数据,直接发送消息头和用户数据内容,降低内存使用,减少内存拷贝。
2、增加异步模式,可以提高多线程调用发送时的传输效率;
mqtt开源库在解析suback帧时,若发送单包订阅请求,收到了空中遗留的多包订阅请求回复帧后,会出现数组操作溢出的问题;该问题是在极端断线环境下发现(先订阅多包,并紧急断线触发重试操作,再马上恢复网络,并快速订阅单包)。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants