Module: kamailio
Branch: master
Commit: efefe2d09367395685e7574dcd9dc12680646d99
URL: 
https://github.com/kamailio/kamailio/commit/efefe2d09367395685e7574dcd9dc12680646d99

Author: Alexandr Dubovikov <alexandr.dubovi...@gmail.com>
Committer: GitHub <nore...@github.com>
Date: 2016-08-15T13:20:55+02:00

Merge pull request #746 from denzs/master

modules/siptrace: fix parsing of unsecure ws uris

---

Modified: modules/siptrace/siptrace.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/efefe2d09367395685e7574dcd9dc12680646d99.diff
Patch: 
https://github.com/kamailio/kamailio/commit/efefe2d09367395685e7574dcd9dc12680646d99.patch

---

diff --git a/modules/siptrace/siptrace.c b/modules/siptrace/siptrace.c
index 078f1a9..c7ae4e9 100644
--- a/modules/siptrace/siptrace.c
+++ b/modules/siptrace/siptrace.c
@@ -1854,7 +1854,7 @@ static int pipport2su (char *pipport, union 
sockaddr_union *tmp_su, unsigned int
        if(strncmp(pipport, "udp:",4) == 0) *proto = IPPROTO_UDP;
        else if(strncmp(pipport, "tcp:",4) == 0) *proto = IPPROTO_TCP;
        else if(strncmp(pipport, "tls:",4) == 0) *proto = IPPROTO_IDP; /* fake 
proto type */
-       else if(strncmp(pipport, "ws:",3) == 0) *proto = IPPROTO_IDP; /* fake 
proto type */
+       else if(strncmp(pipport, "ws:",3) == 0) cutlen = 3, *proto = 
IPPROTO_IDP; /* fake proto type */
        else if(strncmp(pipport, "wss:",4) == 0) *proto = IPPROTO_IDP; /* fake 
proto type */
 #ifdef USE_SCTP
        else if(strncmp(pipport, "sctp:",5) == 0) cutlen = 5, *proto = 
IPPROTO_SCTP;


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to