Module: sems
Branch: master
Commit: 6907a1db89aaefff7354dc5bf55ad8fb014fe4b1
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=6907a1db89aaefff7354dc5bf55ad8fb014fe4b1

Author: Raphael Coeffic <[email protected]>
Committer: Raphael Coeffic <[email protected]>
Date:   Wed Aug 18 14:26:09 2010 +0200

fixes ipv6 in parse_uri

---

 core/sip/parse_uri.cpp |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/core/sip/parse_uri.cpp b/core/sip/parse_uri.cpp
index cc2e216..549e22d 100644
--- a/core/sip/parse_uri.cpp
+++ b/core/sip/parse_uri.cpp
@@ -54,6 +54,7 @@ static int parse_sip_uri(sip_uri* uri, const char* beg, int 
len)
        URI_USER=0, 
        URI_PW,
        URI_HOST,
+       URI_HOST_V6,
        URI_PORT,
        URI_PNAME,
        URI_PVALUE,
@@ -247,6 +248,21 @@ static int parse_sip_uri(sip_uri* uri, const char* beg, 
int len)
                break;
            }
            break;
+
+       case '[':
+           switch(st){
+           case URI_HOST:
+               st = URI_HOST_V6;
+               break;
+           }
+           break;
+       case ']':
+           switch(st){
+           case URI_HOST_V6:
+               st = URI_HOST;
+               break;
+           }
+           break;
        }
     }
 

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to