Module: kamailio
Branch: master
Commit: 6752351b69cd991cd11f389f80cf73bd68ff5bb9
URL:
https://github.com/kamailio/kamailio/commit/6752351b69cd991cd11f389f80cf73b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-04T14:36:42+02:00
websocket: use route_lookup() instead of route_get()
- avoid creating an empty route block structure if not defined in cfg
---
Modified: src/modules/websocket/ws_conn.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6752351b69cd991cd11f389f80cf73b…
Patch:
https://github.com/kamailio/kamailio/commit/6752351b69cd991cd11f389f80cf73b…
---
diff --git a/src/modules/websocket/ws_conn.c b/src/modules/websocket/ws_conn.c
index ad3d216a83..3fd9207dcf 100644
--- a/src/modules/websocket/ws_conn.c
+++ b/src/modules/websocket/ws_conn.c
@@ -279,7 +279,7 @@ static void wsconn_run_route(ws_connection_t *wsc)
LM_DBG("wsconn_run_route event_route[websocket:closed]\n");
- rt = route_get(&event_rt, "websocket:closed");
+ rt = route_lookup(&event_rt, "websocket:closed");
if (rt < 0 || event_rt.rlist[rt] == NULL)
{
LM_DBG("route does not exist");
@@ -291,7 +291,7 @@ static void wsconn_run_route(ws_connection_t *wsc)
LM_ERR("faked_msg_init() failed\n");
return;
}
-
+
fmsg = faked_msg_next();
wsc->rcv.proto_reserved1 = wsc->id;
fmsg->rcv = wsc->rcv;