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

libwebsockets: update libwebsockets to v4.2-stable #1187

Merged

Conversation

codingspirit
Copy link
Member

Signed-off-by: zhiqinli@amazon.com zhiqinli@amazon.com

Issue #, if available:
#1147
In libwebsockets v3.2.3, there is a memory access violation issue when use mbedtls with certificates, @ycyang1229 managed to fix this via:
warmcat/libwebsockets#2304
this PR has been merged into libwebsockets main and v4.2-stable branch. Without this patch, using mbedtls with iot certificates will always failed.
Description of changes:
Similar to #1152 , this changes will update libwebsockets to v4.2-stable. This update will fix #1147, and replace old ws_ping_pong_interval with new lws_retry_bo_t to manage ping behaviors, which was introduced since libwebsockets v4.+.

ref: https://libwebsockets.org/git/libwebsockets/tree/READMEs/README.lws_retry.md

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Signed-off-by: zhiqinli@amazon.com <zhiqinli@amazon.com>
@codecov-commenter
Copy link

Codecov Report

Merging #1187 (3f3aa3d) into master (0a58284) will decrease coverage by 28.29%.
The diff coverage is 50.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1187       +/-   ##
===========================================
- Coverage   85.84%   57.54%   -28.30%     
===========================================
  Files          42       42               
  Lines       10587    10591        +4     
===========================================
- Hits         9088     6095     -2993     
- Misses       1499     4496     +2997     
Impacted Files Coverage Δ
src/source/Signaling/Signaling.c 11.32% <50.00%> (-83.77%) ⬇️
src/source/Crypto/Tls.c 0.00% <0.00%> (-100.00%) ⬇️
src/source/Ice/TurnConnection.c 0.00% <0.00%> (-93.47%) ⬇️
src/source/Signaling/ChannelInfo.c 0.00% <0.00%> (-88.03%) ⬇️
src/source/Signaling/LwsApiCalls.c 1.34% <0.00%> (-82.67%) ⬇️
src/source/Crypto/Tls_openssl.c 0.00% <0.00%> (-82.65%) ⬇️
src/source/Signaling/StateMachine.c 0.00% <0.00%> (-81.71%) ⬇️
src/source/Ice/SocketConnection.c 50.90% <0.00%> (-28.83%) ⬇️
src/source/Signaling/FileCache.c 73.87% <0.00%> (-23.43%) ⬇️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a58284...3f3aa3d. Read the comment docs.

@hassanctech hassanctech self-requested a review July 19, 2021 21:14
@@ -20,7 +20,7 @@ endif()

ExternalProject_Add(project_libwebsockets
GIT_REPOSITORY https://github.com/warmcat/libwebsockets.git
GIT_TAG v3.2.3
GIT_TAG v4.2-stable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please change this to the latest release that just went out and we can quickly get this merged:

https://github.com/warmcat/libwebsockets/releases/tag/v4.2.1

@hassanctech hassanctech merged commit 374f025 into awslabs:master Jul 19, 2021
@codingspirit codingspirit deleted the update-libwebsockets-4.2-stable branch July 25, 2021 02:47
@agrexgh
Copy link

agrexgh commented Aug 17, 2021

@codingspirit
I've got the errors like below on 0be0979.
Do you have any headers not committed?
It seems they are the reference to new members of struct.

../src/source/Signaling/Signaling.c:17:10: error: ‘lws_retry_bo_t’ {aka ‘const struct lws_retry_bo’} has no member named ‘secs_since_valid_ping’
../src/source/Signaling/Signaling.c:101:17: error: ‘struct lws_context_creation_info’ has no member named ‘retry_and_idle_policy’

@disa6302
Copy link
Contributor

@agrexgh ,

Please run git clean -ffxd from the repo root to delete the open-source And build directory and rebuild

@agrexgh
Copy link

agrexgh commented Aug 17, 2021

@disa6302
Thank you I'll try it soon!

@agrexgh
Copy link

agrexgh commented Aug 17, 2021

@disa6302
The erros disappeared, thanks!

HungTseLee added a commit to HungTseLee/libwebsockets that referenced this pull request Sep 22, 2021
ambiot-mini added a commit to ambiot-mini/libwebsockets that referenced this pull request Oct 19, 2021
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.

[BUG] when using mbedtls, iot core credential crashed
5 participants