Module: kamailio Branch: master Commit: 91c388147a9328743582a92c6f1184141aa268fb URL: https://github.com/kamailio/kamailio/commit/91c388147a9328743582a92c6f118414...
Author: Armen Babikyan armen@firespotter.com Committer: Armen Babikyan armen@firespotter.com Date: 2018-01-25T17:20:35-08:00
websocket: handle unrecognized subprotocol better
---
Modified: src/modules/websocket/ws_frame.c
---
Diff: https://github.com/kamailio/kamailio/commit/91c388147a9328743582a92c6f118414... Patch: https://github.com/kamailio/kamailio/commit/91c388147a9328743582a92c6f118414...
---
diff --git a/src/modules/websocket/ws_frame.c b/src/modules/websocket/ws_frame.c index 9bc3268601..2739ecbc11 100644 --- a/src/modules/websocket/ws_frame.c +++ b/src/modules/websocket/ws_frame.c @@ -678,6 +678,9 @@ int ws_frame_receive(sr_event_param_t *evp)
return -1; } + } else { + LM_ERR("Unrecognized WebSocket subprotocol: %u\n", frame.wsc->sub_protocol); + return -1; }
case OPCODE_CLOSE: