Module: sip-router
Branch: master
Commit: ad11cdca0941cd114e17bb80337a7557818220d5
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ad11cdc…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Thu Apr 25 18:16:28 2013 +0100
modules/msrp: Use "msrps://" instead of "msrp://" in headers when the
transport is WSS
---
modules/msrp/msrp_cmap.c | 4 ++--
modules/msrp/msrp_vars.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/msrp/msrp_cmap.c b/modules/msrp/msrp_cmap.c
index f558172..3e4c351 100644
--- a/modules/msrp/msrp_cmap.c
+++ b/modules/msrp/msrp_cmap.c
@@ -211,7 +211,7 @@ int msrp_cmap_save(msrp_frame_t *mf)
idx = msrp_get_slot(hid, _msrp_cmap_head->mapsize);
srcaddr.s = sbuf;;
- if(mf->tcpinfo->rcv->proto==PROTO_TLS)
+ if(mf->tcpinfo->rcv->proto==PROTO_TLS ||
mf->tcpinfo->rcv->proto==PROTO_WSS)
{
memcpy(srcaddr.s, "msrps://", 8);
srcaddr.s+=8;
@@ -295,7 +295,7 @@ int msrp_cmap_save(msrp_frame_t *mf)
_msrp_cmap_head->cslots[idx].lsize++;
lock_release(&_msrp_cmap_head->cslots[idx].lock);
- if(mf->tcpinfo->rcv->proto==PROTO_TLS)
+ if(mf->tcpinfo->rcv->proto==PROTO_TLS ||
mf->tcpinfo->rcv->proto==PROTO_WSS)
{
srcaddr.len = snprintf(sbuf, MSRP_SBUF_SIZE,
"Use-Path: msrps://%.*s/%.*s;tcp\r\nExpires: %d\r\n",
diff --git a/modules/msrp/msrp_vars.c b/modules/msrp/msrp_vars.c
index fdc277a..939cfb2 100644
--- a/modules/msrp/msrp_vars.c
+++ b/modules/msrp/msrp_vars.c
@@ -273,7 +273,7 @@ int pv_get_msrp(sip_msg_t *msg, pv_param_t *param, pv_value_t *res)
return pv_get_null(msg, param, res);
s.s = pv_get_buffer();
p = s.s;
- if(mf->tcpinfo->rcv->proto==PROTO_TLS)
+ if(mf->tcpinfo->rcv->proto==PROTO_TLS ||
mf->tcpinfo->rcv->proto==PROTO_WSS)
{
memcpy(p, "msrps://", 8);
p+=8;