multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesdpsession.cpp
branchRCL_3
changeset 8 2a28ef775f15
parent 3 513a8b745b2f
child 11 a5ac35ca6d81
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesdpsession.cpp	Wed Mar 31 22:14:10 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesdpsession.cpp	Wed Apr 14 16:21:36 2010 +0300
@@ -921,7 +921,28 @@
     CSdpConnectionField* connfield = aSdpDocument.ConnectionField();
     const TInetAddr* inetAddr = NULL;
     
-    if( connfield )
+    // find "c-" line from media level
+    TInt index = 0;
+    TBool found = ETrue;
+    while( found && index < mediaLines.Count() )
+        {
+        RPointerArray<CSdpConnectionField>& connfields = 
+                                            mediaLines[index]->ConnectionFields();
+        
+        if ( mediaLines[index++]->Port() > 0 )
+            {
+            TInt cfindex = 0;
+	        TBool cffound = EFalse;
+	        while( !cffound && cfindex < connfields.Count() )
+	            {
+	            inetAddr = connfields[cfindex++]->InetAddress();
+	            cffound = MCE_NOT_NULL_PTR( inetAddr );
+	            }
+	        found = cffound;
+            }
+        }
+    
+    if( connfield && !found )
         {
 		inetAddr = connfield->InetAddress();
 		if( inetAddr )
@@ -931,29 +952,6 @@
 		    MCE_SET_REMOTE_IP_ADDR( &aSession, inetAddress );
 		    }
         }
-    
-    if ( !inetAddr )
-        {
-        TInt index = 0;
-        TBool found = ETrue;
-        while( found && index < mediaLines.Count() )
-            {
-            RPointerArray<CSdpConnectionField>& connfields = 
-                                                mediaLines[index]->ConnectionFields();
-            
-            if ( mediaLines[index++]->Port() > 0 )
-                {
-	            TInt cfindex = 0;
-	            TBool cffound = EFalse;
-	            while( !cffound && cfindex < connfields.Count() )
-	                {
-	                inetAddr = connfields[cfindex++]->InetAddress();
-	                cffound = MCE_NOT_NULL_PTR( inetAddr );
-	                }
-	            found = cffound;
-                }
-            }
-        }
         
     if ( inetAddr )
         {