multimediacommsengine/mmcesrv/mmceserver/src/mcestateoffering.cpp
branchRCL_3
changeset 3 513a8b745b2f
parent 0 1bce908db942
child 8 2a28ef775f15
--- a/multimediacommsengine/mmcesrv/mmceserver/src/mcestateoffering.cpp	Tue Feb 02 01:04:58 2010 +0200
+++ b/multimediacommsengine/mmcesrv/mmceserver/src/mcestateoffering.cpp	Fri Feb 19 23:12:20 2010 +0200
@@ -34,6 +34,9 @@
 #include "mcenatmacros.h"
 #include "mcesdpsession.h"
 #include "mcesrvlogs.h"
+#include "mcemediastate.h"
+#include "mcemediadefs.h"
+#include "mcemediamanager.h"
 
 // -----------------------------------------------------------------------------
 // CMceStateOffering::CMceStateOffering
@@ -271,7 +274,15 @@
     if ( MceSip::ResponseCode( session.Response() ) == KMceSipSessionProgress && 
     	   session.ForkedDialogsCount() ) 
         {
+        if( session.ActiveBody().NegotiationState().Id() == KMceMediaNegotiated ||
+        	 session.ActiveBody().NegotiationState().Id() == KMceOfferingMedia )
+        	{
         IsFork = ETrue;
+        	}
+        else
+        	{
+        	session.ResetCurrentDialog();
+        	}
   	    }
     if ( session.Actions().NeedToProcessL( aEvent ) || IsFork )
         {
@@ -484,6 +495,13 @@
     	    {
     	    if  ( !MCE_NEED_TO_RECEIVE( session ) )
     	        {
+    	        if ( session.ActiveBody().SecureSession())
+    	            {
+    	            if( session.ForkedDialogsCount() )
+    	            	{
+    	            	session.ForceUpdateStreamL();
+    	            	}
+    	            }
                 status = session.Actions().UpdateL();
     	        // SDP answer was received before
     	        // go to established state