genericservices/httputils/UriParser/SipUriParser.cpp
changeset 34 5fae379060a7
parent 0 e4d67989cc36
--- a/genericservices/httputils/UriParser/SipUriParser.cpp	Fri Jun 04 16:20:51 2010 +0100
+++ b/genericservices/httputils/UriParser/SipUriParser.cpp	Fri Jun 11 15:26:22 2010 +0300
@@ -168,6 +168,10 @@
 			}
 		else
 			{
+		// First, move past the opening brace
+		    authority.Set(authority.Mid(startHostIPv6 + 1));
+		    // auth now = X:X:X]?????
+
 			// This is an IPv6 address, so it MUST have the closing brace too....
 			TInt endIPv6Host = authority.Locate(KIPv6UriCloseBrace);
 
@@ -181,16 +185,13 @@
 			// It's an ipv6  address, with an opening and closing brace. So now just extract it
 			// auth = [X:X:X]?????
 
-			// First, move past the opening brace
-			authority.Set(authority.Mid(startHostIPv6 + 1));
-			// auth now = X:X:X]?????
 
 			// Set the host, and need to remove the closing brace
-			aHost.Set(authority.Left(endIPv6Host - 1));
+			aHost.Set(authority.Left(endIPv6Host));
 			// host = X:X:X
 
 			// Move past the host
-			authority.Set(authority.Mid(endIPv6Host));
+			authority.Set(authority.Mid(endIPv6Host + 1 ));
 			}
 		
 		// Get the port...