[prev in list] [next in list] [prev in thread] [next in thread] 

List:       helix-server-cvs
Subject:    [Server-cvs] common/util urlutil.cpp,1.6,1.6.128.1
From:       vijendrakumara () helixcommunity ! org
Date:       2008-05-12 5:59:54
Message-ID: 200805120600.m4C60ItN019210 () mailer ! progressive-comp ! com
[Download RAW message or body]

Update of /cvsroot/server/common/util
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv1903

Modified Files:
      Tag: SERVER_12_1
	urlutil.cpp 
Log Message:
Reviewed By : JJ Zeng

Hello,

Synopsis
=========

CR : Fix for PR : 146276 : MMS playback fails via IPv6 proxy

Branches: SERVER_CURRENT_RN, SERVER_12_1_RN 

Suggested Reviewer: anyone

Description

===========

If we send an ms request from wm player 9.0 using ipv6 address then the
clip doesn’t play on player.

I debug the code and found couple of problem.

1. The parsing of host string in case of ipv6 Address was not correct. It
is using strrchr to parse rightmost ‘:’ char. But if I am using a default
port means if I don’t provide the port number then it is failing.
Fix: write the code to parse the hostname and port properly from an
hostbuf string.

2. Passing the ipv6 host string with ‘[‘and ‘]’ character to
resolver->GetAddrInfo().
Fix: Pass the correct string to i.e. ipV6 host string without ‘[‘ and ‘]’
character to resolver->GetAddrInfo().

3. The condition checking inside OnSetup3() is failing for ipv6 host
string. The condition is purely given for ipv4 host string only (not
considering ipv6 host string).
Fix: Change the condition to support the ipv6 host string too.
        * IsNumericAddr is not applicable for ipv6 host string. If we use
hostname in host string(.e.g. localhost ). Then it can get
converted to ipv6 address e.g. ::1. then again here it fails.
         Remove this condition checking.




Files Affected
==============

server_rn/proxy/core/mmsproxy.cpp
server_rn/cache/siiplin/mmsfob.cpp
server_rn/protocol/wmt/mms/mmsprot.cpp
server/common/util/urlutil.cpp
server/common/util/pub/urlutil.h

Testing Performed
=================

Functional Tests:
-----------------

-        tested with wm player9.0 and play wmvideo with mms protocol and ipv6
proxy and server address and TCP and UDP as transport protocol. The clip
is working fine in all cases.

Testing on proxy :

ipv4(server) - ipv4(proxy) - udp & tcp
ipv6(server) - ipv4(proxy) - udp & tcp
ipv4(server) - ipv6(proxy) - udp & tcp
ipv6(server) - ipv6(proxy) - udp & tcp

Testing on server

ipv4(server)  - udp & tcp
ipv6(server)  - udp & tcp


Integration Tests:

n/a

Leak Tests:

- None

Performance Tests:

n/a

Platforms Tested:
win32-i386-vc7
linux-rhel4-i686

Build verified:

win32-i386-vc7
linux-rhel4-i686

QA Hints
========
None.

Thanks and Regards
Vijendra


Index: urlutil.cpp
===================================================================
RCS file: /cvsroot/server/common/util/urlutil.cpp,v
retrieving revision 1.6
retrieving revision 1.6.128.1
diff -u -d -r1.6 -r1.6.128.1
--- urlutil.cpp	9 Jul 2004 19:14:47 -0000	1.6
+++ urlutil.cpp	12 May 2008 05:59:48 -0000	1.6.128.1
@@ -178,3 +178,33 @@
     }
     return rc;
 }
+
+const char*
+GetPort(const char *host)
+{
+    const char *pTemp = host;
+    const char *pPort=NULL;
+    HXBOOL bOpen=FALSE, bClose=FALSE;
+    pPort = NULL;
+    while(*pTemp)
+    {
+        if( *pTemp == '[' ) //indicates ipv6 address 
+            bOpen = TRUE;
+
+        if( *pTemp == ']' ) //indicates ipv6 address 
+            bClose = TRUE;
+        if( *pTemp == ':' && bOpen && bClose )
+        {
+            pPort = pTemp;
+            break;
+        }
+        else if( *pTemp == ':' && !bOpen )
+        {
+            //ipv4 address port
+            pPort = pTemp;
+            break;
+        }
+        pTemp++;
+    }
+    return pPort;
+}


_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic