Module: kamailio
Branch: master
Commit: 9811e318359b3099c3b1d7dff3673b642f8ccd0a
URL:
https://github.com/kamailio/kamailio/commit/9811e318359b3099c3b1d7dff3673b6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2018-01-26T08:50:16+01:00
Merge pull request #1412 from armenb/ws_cid85650_fix
websocket: handle unrecognized subprotocol better
---
Modified: src/modules/websocket/ws_frame.c
---
Diff:
https://github.com/kamailio/kamailio/commit/9811e318359b3099c3b1d7dff3673b6…
Patch:
https://github.com/kamailio/kamailio/commit/9811e318359b3099c3b1d7dff3673b6…
---
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: