Module: kamailio
Branch: master
Commit: c576c7120d2ec2226b30990868c462d285f9eacc
URL:
https://github.com/kamailio/kamailio/commit/c576c7120d2ec2226b30990868c462d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-01-14T10:40:22+01:00
Merge pull request #26 from wdoekes/wjd-ws_frame_transmit-check-wsc
websocket: Check frame->wsc in ws_frame_transmit for NULL.
---
Modified: modules/websocket/ws_frame.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c576c7120d2ec2226b30990868c462d…
Patch:
https://github.com/kamailio/kamailio/commit/c576c7120d2ec2226b30990868c462d…
---
diff --git a/modules/websocket/ws_frame.c b/modules/websocket/ws_frame.c
index d3814bd..a6b4f90 100644
--- a/modules/websocket/ws_frame.c
+++ b/modules/websocket/ws_frame.c
@@ -743,6 +743,11 @@ int ws_frame_transmit(void *data)
frame.payload_len = wsev->len;
frame.payload_data = wsev->buf;
frame.wsc = wsconn_get(wsev->id);
+ if (frame.wsc == NULL)
+ {
+ LM_ERR("WebSocket outbound connection not found\n");
+ return -1;
+ }
LM_DBG("Tx message:\n%.*s\n", frame.payload_len,
frame.payload_data);