[Libwebsockets] Switch from 1.7.8 to 2.0.1

Thomas Spitz thomas.spitz at hestia-france.com
Fri May 13 15:44:31 CEST 2016


 <hestia at hestia-france.com>
Hello,

I'm going to switch from 1.7.8 to 2.0.1 to take advantage of new functions
(lwsws, vhost,..)

Thus I first try to switch from 1.7.8 to 2.0.1 without activating any new
function but I have problem as soon as I try to connect. Here the log of
one try:

> lwsts[935]: fd=19, revents=1
> lwsts[935]: accepted new conn  port 26302 on fd=21
> lwsts[935]: Accepted 0xc7050 to tsi 0
> lwsts[935]: lws_adopt_socket_vhost: new wsi 0xc7050, sockfd 21
> lwsts[935]: lws_set_timeout: 0xc7050: 20 secs
> lwsts[935]: insert_wsi_socket_into_fds: 0xc7050: tsi=0, sock=21,
> pos-in-fds=2
> lwsts[935]: lws_header_table_attach: wsi 0xc7050: ah (nil) (tsi 0)
> lwsts[935]: lws_header_table_attach: wsi 0xc7050: ah 0xcb7e0: count 1 (on
> exit)
> lwsts[935]: Attached ah immediately
> lwsts[935]: fd=21, revents=1
> lwsts[935]: lws_server_socket_service: 0xc7050: rxpos:0 rxlen:0
> lwsts[935]: lws_server_socket_service: wsi 0xc7050, ah->rxlen = 200
> lwsts[935]: lws_read: incoming len 200  state 0
> lwsts[935]: issuing 200 bytes to parser
> lwsts[935]: WSI_TOKEN_NAME_PART '' (mode=0)
> lwsts[935]: Unknown method - dropping
> lwsts[935]:  forbidding on uri sanitation
> lwsts[935]: 0xc7050 new partial sent 20 from 94 total
> lwsts[935]: ****** c7050 Sending new, pending truncated ...
> /tmp/MyProg: libwebsockets-2.0.1-stable/lib/output.c: 113: lws_issue_raw:
> Assertion `0' failed.
> Child terminated with signal = 0x6 (SIGABRT)
> GDBserver exiting

I have tried both to compile the libwebsocket using buildroot
Here the libwebsockets.mk of buildroot modified:

>
> ################################################################################
> #
> # libwebsockets
> #
>
> ################################################################################
> LIBWEBSOCKETS_VERSION = 2.0.1 #instead of 1.7.8
> LIBWEBSOCKETS_SOURCE =
> libwebsockets-$(LIBWEBSOCKETS_VERSION).tar.gz #instead of
> LIBWEBSOCKETS_SOURCE = libwebsockets-$(LIBWEBSOCKETS_VERSION).tar.xz
> LIBWEBSOCKETS_SITE = https://libwebsockets.org/git/libwebsockets/snapshot #instead
> of LIBWEBSOCKETS_SITE =
> http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/snapshot
> LIBWEBSOCKETS_LICENSE = LGPLv2.1 with exceptions
> LIBWEBSOCKETS_LICENSE_FILES = LICENSE
> LIBWEBSOCKETS_DEPENDENCIES = zlib
> LIBWEBSOCKETS_INSTALL_STAGING = YES
> LIBWEBSOCKETS_CONF_OPTS += -DWITHOUT_TESTAPPS=ON
> ifeq ($(BR2_INET_IPV6),y)
> LIBWEBSOCKETS_CONF_OPTS += -DLWS_IPV6=ON
> else
> LIBWEBSOCKETS_CONF_OPTS += -DLWS_IPV6=OFF
> endif
> ifeq ($(BR2_PACKAGE_OPENSSL),y)
> LIBWEBSOCKETS_DEPENDENCIES += openssl host-openssl
> LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SSL=ON
> else
> LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SSL=OFF
> endif
> $(eval $(cmake-package))

and to compile by myself out of buildroot with debug support:
I haven't change anything to CMakeLists.txt
I modified a bit cross-arm-linux-gnueabihf.cmake

> cmake .. -DCMAKE_INSTALL_PREFIX:PATH=./
> -DCMAKE_TOOLCHAIN_FILE=../cross-arm-linux-apf28.cmake
> -DZLIB_LIBRARY=/buildroot/output/build/zlib-1.2.8/libz.so
> -DZLIB_INCLUDE_DIR=/buildroot/output/staging/usr/include/
> -DOPENSSL_ROOT_DIR=/buildroot/output/build/openssl-1.0.2g
> -DOPENSSL_INCLUDE_DIR=/buildroot/output/build/openssl-1.0.2g/include/
> -DOPENSSL_LIBRARIES=/buildroot/output/build/openssl-1.0.2g/
>  -DCMAKE_BUILD_TYPE=DEBUG


If you see any big mistake...

Best regards,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20160513/7b18f018/attachment.html>


More information about the Libwebsockets mailing list