Module: sip-router
Branch: master
Commit: f96e6005eb5a071ec25c9ab3174c4150223448cd
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f96e600…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Aug 8 09:59:59 2012 +0100
modules/lcr: Added WebSocket transport to lcr
- LCR won't use a WebSocket gateway (this doesn't make sense), but
PROTO_(WS|WSS) has been added to some switch statements to catch
misconfiguration and get rid of compiler warnings.
---
modules/lcr/lcr_mod.c | 4 ++++
modules/lcr/lcr_rpc.c | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/lcr/lcr_mod.c b/modules/lcr/lcr_mod.c
index 3bdcc98..6627b43 100644
--- a/modules/lcr/lcr_mod.c
+++ b/modules/lcr/lcr_mod.c
@@ -1738,6 +1738,10 @@ inline int decode_avp_value(char *value, unsigned int *gw_index,
str *scheme,
transport->s = ";transport=sctp";
transport->len = 15;
break;
+ case PROTO_WS:
+ case PROTO_WSS:
+ LM_ERR("unsupported transport '%d'\n", u);
+ return 0;
default:
LM_ERR("unknown transport '%d'\n", u);
return 0;
diff --git a/modules/lcr/lcr_rpc.c b/modules/lcr/lcr_rpc.c
index 1ce860d..6483c5b 100644
--- a/modules/lcr/lcr_rpc.c
+++ b/modules/lcr/lcr_rpc.c
@@ -134,6 +134,8 @@ static void dump_gws(rpc_t* rpc, void* c)
case PROTO_OTHER:
rpc->struct_add(st, "s", "transport", "OTHER");
break;
+ case PROTO_WS:
+ case PROTO_WSS:
case PROTO_NONE:
break;
}