Comments (2)
build libwebsocket disable ipv6 will cause another problem:
Thread 2 "ws_server" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 4304.4305]
0x00007ffff7f78d69 in _orange_socket_callback (wsi=0x7ffff7b27ac0, reason=LWS_CALLBACK_FILTER_NETWORK_CONNECTION, _user=0x7ffff7b54908, in=0xa, len=0) at orange_ws_server.c:173
173 if(user && *user && (*user)->disconnect){
(gdb) backtrace
#0 0x00007ffff7f78d69 in _orange_socket_callback (wsi=0x7ffff7b27ac0, reason=LWS_CALLBACK_FILTER_NETWORK_CONNECTION, _user=0x7ffff7b54908, in=0xa, len=0) at orange_ws_server.c:173
#1 0x00007ffff7f40d30 in rops_handle_POLLIN_listen (pt=0x7ffff7b2f2a0, wsi=0x7ffff7b27ac0, pollfd=0x7ffff7b28040)
at /home/leo/code/openwrt-all/build_dir/target-x86_64_musl/libwebsockets-openssl/libwebsockets-4.2.1/lib/roles/listen/ops-listen.c:128
#2 0x00007ffff7f27d84 in lws_service_fd_tsi (tsi=0, pollfd=0x7ffff7b28040, context=0x7ffff7b2f020)
at /home/leo/code/openwrt-all/build_dir/target-x86_64_musl/libwebsockets-openssl/libwebsockets-4.2.1/lib/core-net/service.c:735
#3 lws_service_fd_tsi (context=context@entry=0x7ffff7b2f020, pollfd=0x7ffff7b28040, tsi=tsi@entry=0)
at /home/leo/code/openwrt-all/build_dir/target-x86_64_musl/libwebsockets-openssl/libwebsockets-4.2.1/lib/core-net/service.c:624
#4 0x00007ffff7f15bb0 in _lws_plat_service_forced_tsi (context=context@entry=0x7ffff7b2f020, tsi=tsi@entry=0)
at /home/leo/code/openwrt-all/build_dir/target-x86_64_musl/libwebsockets-openssl/libwebsockets-4.2.1/lib/plat/unix/unix-service.c:51
#5 0x00007ffff7f15e3a in _lws_plat_service_tsi (tsi=0, timeout_ms=, context=0x7ffff7b2f020)
at /home/leo/code/openwrt-all/build_dir/target-x86_64_musl/libwebsockets-openssl/libwebsockets-4.2.1/lib/plat/unix/unix-service.c:216
#6 _lws_plat_service_tsi (context=0x7ffff7b2f020, timeout_ms=, tsi=0)
at /home/leo/code/openwrt-all/build_dir/target-x86_64_musl/libwebsockets-openssl/libwebsockets-4.2.1/lib/plat/unix/unix-service.c:72
#7 0x00007ffff7f27e76 in lws_service (context=0x7ffff7b2f020, timeout_ms=timeout_ms@entry=60000)
at /home/leo/code/openwrt-all/build_dir/target-x86_64_musl/libwebsockets-openssl/libwebsockets-4.2.1/lib/core-net/service.c:805
#8 0x00007ffff7f788f8 in _websocket_server_thread (ptr=0x7ffff7f65890) at orange_ws_server.c:469
#9 0x00007ffff7fdc658 in ?? ()
#10 0x0000000000000000 in ?? ()
if(user && *user && (*user)->disconnect){
DEBUG("ws_client requested a disconnect!\n");
return -1;
}
code *user point to a invalid memory. cause core dump.
from juci.
patched orange_ws_server.c will fix this.
--- a/src/orange_ws_server.c
+++ b/src/orange_ws_server.c
@@ -166,6 +166,10 @@ static void orange_srv_ws_client_delete(
static int _orange_socket_callback(struct lws *wsi, enum lws_callback_reasons reason, void *_user, void *in, size_t len){
// TODO: keeping user data in protocol is probably not the right place. Fix it.
+
- if(LWS_CALLBACK_FILTER_NETWORK_CONNECTION == reason)
-
return 0;
- const struct lws_protocols *proto = lws_get_protocol(wsi);
struct orange_srv_ws_client **user = (struct orange_srv_ws_client **)_user;
from juci.
Related Issues (20)
- I visit the home page and can not see anything. The homepage is blank.Also the console does not have any errors HOT 4
- Compile error juci on lede project HOT 4
- Spinning circle HOT 1
- autologon HOT 1
- plugins/juci-openwrt-wireless/src/widgets/overview.wifi.js HOT 1
- error libblobpack HOT 4
- UCI failed! HOT 15
- ng-tags-input.css.map 404 HOT 1
- Compiling JUCI in LEDE HOT 10
- LEDE Compile Deprecated error & missing library HOT 4
- UCI failed to initialize HOT 2
- Network connections page protocols error. HOT 3
- New plugin HOT 3
- Compiling Error with LEDE HOT 4
- Unable to build HOT 9
- JUCI Webpages fail to get information for interfaces on OpenWRT 18.06.02 HOT 1
- Development stopped? HOT 1
- Make dependency which does not exist HOT 1
- juci project no more update? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from juci.