--- a/multimediacommscontroller/mmcccontroller/src/mccresourceitem.cpp Wed Mar 31 22:14:10 2010 +0300
+++ b/multimediacommscontroller/mmcccontroller/src/mccresourceitem.cpp Wed Apr 14 16:21:36 2010 +0300
@@ -253,6 +253,10 @@
{
needsCamera = aCameraHandler.IsViewFinderEnabled();
}
+ else if ( iState == MMccResources::EResourcePaused )
+ {
+ needsCamera = aCameraHandler.IsViewFinderEnabled();
+ }
else
{
// NOP
--- a/multimediacommscontroller/mmcccontroller/tsrc/ut_controller/src/UT_CMccResourceItem.cpp Wed Mar 31 22:14:10 2010 +0300
+++ b/multimediacommscontroller/mmcccontroller/tsrc/ut_controller/src/UT_CMccResourceItem.cpp Wed Apr 14 16:21:36 2010 +0300
@@ -350,6 +350,14 @@
camera->iViewFinderEnabled = ETrue;
camera->iViewFinderSettings.iSize = TSize( 100, 100 );
EUNIT_ASSERT( iItem->NeedsCamera( *camera ) )
+
+ // In paused state camera is needed only when viewfinder is enabled
+ camera->iViewFinderEnabled = EFalse;
+ iItem->iState = MMccResources::EResourcePaused;
+ EUNIT_ASSERT( !iItem->NeedsCamera( *camera ) )
+ camera->iViewFinderEnabled = ETrue;
+ camera->iViewFinderSettings.iSize = TSize( 100, 100 );
+ EUNIT_ASSERT( iItem->NeedsCamera( *camera ) )
CleanupStack::PopAndDestroy( camera );
CleanupStack::PopAndDestroy( pool );
--- 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 )
{
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesrvstream.cpp Wed Mar 31 22:14:10 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesrvstream.cpp Wed Apr 14 16:21:36 2010 +0300
@@ -898,20 +898,24 @@
MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): codec requires signalling");
action = KMceRequiresSignalling;
}
- else if ( LocalMediaPort() != aCurrent.LocalMediaPort() ||
- Data().RemoteMediaPortChanged( aCurrent.Data().RemoteMediaPort() ) )
+ else if ( LocalMediaPort() != aCurrent.LocalMediaPort() )
//local port has changed => needs new media session & signaling
{
MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): local port changed. requires signalling");
action = KMceRequiresSignalling;
}
+ else if ( Data().RemoteMediaPortChanged( aCurrent.Data().RemoteMediaPort() ) )
+ {
+ MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): Remote port changed. requires signalling");
+ action = KMceRequiresSipSignallingOnly;
+ }
else if ( Data().RemoteRTCPAddressChanged(aCurrent.Data().iRemoteRtcpPort,
aCurrent.Data().iRemoteRtcpAddress))
{
MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): Remote Rtcp Port changed, requires signalling");
- action = KMceRequiresSignalling;
+ action = KMceRequiresSipSignallingOnly;
}
else if ( Data().iIsEnabled != aCurrent.Data().iIsEnabled )
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/inc/UT_CMCEMediaManager.h Wed Mar 31 22:14:10 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/inc/UT_CMCEMediaManager.h Wed Apr 14 16:21:36 2010 +0300
@@ -506,6 +506,7 @@
void UT_CMceMediaManager_SetCNameLL();
void UT_CMceMediaManager_SetRemoteAddressLL();
void UT_CMceMediaManager_UpdateConfigKeyLL();
+ void UT_CMceMediaManager_ForceEnableSinkStateL();
/**
* Tests
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/src/UT_CMCESdpSession.cpp Wed Mar 31 22:14:10 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/src/UT_CMCESdpSession.cpp Wed Apr 14 16:21:36 2010 +0300
@@ -210,10 +210,10 @@
_LIT8( KConnectionField2, "v=0\r\n\
o=- 123 123 IN IP4 0.0.0.0\r\n\
s=-\r\n\
-c=IN IP4 10.36.7.239\r\n\
+c=IN IP4 10.36.7.229\r\n\
t=0 0\r\n\
m=audio 5000/1 RTP/AVP 96\r\n\
-c=IN IP4 10.36.7.229\r\n\
+c=IN IP4 10.36.7.239\r\n\
a=rtpmap:96 AMR/8000\r\n\
m=video 0 RTP/AVP 97\r\n\
c=IN IP4 193.65.182.50\r\n");
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/src/UT_cmcesrvstream.cpp Wed Mar 31 22:14:10 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/tsrc/ut_mediamanager/src/UT_cmcesrvstream.cpp Wed Apr 14 16:21:36 2010 +0300
@@ -641,7 +641,7 @@
iMcc->iRequireSignalling = EFalse;
iStream->Data().SetLocalMediaPort( stream->LocalMediaPort() );
iStream->Data().SetRemoteMediaPort( 10 );
- EUNIT_ASSERT( iStream->RequireSignalling( *stream, *current, *update ) );
+ EUNIT_ASSERT( iStream->RequireSignalling( *stream, *current, *update ) == KMceRequiresSipSignallingOnly );
iMcc->iRequireSignalling = EFalse;
iStream->Data().SetLocalMediaPort( stream->LocalMediaPort() );
--- a/multimediacommsengine/mmcesrv/mmceserver/inc/mcenatsipsession.h Wed Mar 31 22:14:10 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmceserver/inc/mcenatsipsession.h Wed Apr 14 16:21:36 2010 +0300
@@ -252,6 +252,8 @@
void SetReservationStatus(TMceReturnStatus aStatus);
void ResumeNatUpdated();
+
+ void StateRollBack();
private: // Constructors
--- a/multimediacommsengine/mmcesrv/mmceserver/inc/mcenatsipstatemachine.h Wed Mar 31 22:14:10 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmceserver/inc/mcenatsipstatemachine.h Wed Apr 14 16:21:36 2010 +0300
@@ -87,6 +87,11 @@
*/
void ErrorOccurred();
+ /**
+ * Sets current Nat state.
+ */
+ void SetCurrentNatState(TMceNatStateIndex aStatus);
+
private:
CMceNatSipStateMachine();
--- a/multimediacommsengine/mmcesrv/mmceserver/src/mcenatsipsession.cpp Wed Mar 31 22:14:10 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmceserver/src/mcenatsipsession.cpp Wed Apr 14 16:21:36 2010 +0300
@@ -873,4 +873,9 @@
MCESRV_DEBUG( "*** CMceNatSipSession::ResumeNatUpdated, Exit" )
}
+void CMceNatSipSession::StateRollBack()
+ {
+ iNatStateMachine->SetCurrentNatState( KMceNatStateConnected );
+ }
+
// End of File
--- a/multimediacommsengine/mmcesrv/mmceserver/src/mcenatsipstatemachine.cpp Wed Mar 31 22:14:10 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmceserver/src/mcenatsipstatemachine.cpp Wed Apr 14 16:21:36 2010 +0300
@@ -188,3 +188,12 @@
{
iCurrentState = KMceNatStateIdle;
}
+
+// -----------------------------------------------------------------------------
+// CMceNatSipStateMachine::SetCurrentNatState
+// -----------------------------------------------------------------------------
+//
+void CMceNatSipStateMachine::SetCurrentNatState(TMceNatStateIndex aStatus)
+ {
+ iCurrentState = aStatus;
+ }
--- a/multimediacommsengine/mmcesrv/mmceserver/src/mcestateoffering.cpp Wed Mar 31 22:14:10 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmceserver/src/mcestateoffering.cpp Wed Apr 14 16:21:36 2010 +0300
@@ -31,6 +31,7 @@
#include "mceclientserver.h"
#include "mcesip.h"
#include "mcesipsession.h"
+#include "mcenatsipsession.h"
#include "mcenatmacros.h"
#include "mcesdpsession.h"
#include "mcesrvlogs.h"
@@ -632,6 +633,11 @@
else
{
session.Actions().UpdateFailed();
+ if(session.IsNatSession())
+ {
+ CMceNatSipSession* natsession = static_cast <CMceNatSipSession*>( &session );
+ natsession->StateRollBack();
+ }
session.Actions().StateChanged( KMceStateEstablished );
session.Actions().ClientStateChangedL( CMceSession::EEstablished,
*session.Body(),
--- a/multimediacommsengine/mmcesrv/mmceserver/tsrc/ut_server/src/UT_CMCEStateOffering.cpp Wed Mar 31 22:14:10 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmceserver/tsrc/ut_server/src/UT_CMCEStateOffering.cpp Wed Apr 14 16:21:36 2010 +0300
@@ -612,6 +612,26 @@
EUNIT_ASSERT ( iSipSession->PendingTransactions().Count() == 4 );
MCE_RESET_STUBS();
+ // KMceSipRequestPending updating
+ iSipSession->iSubState = CMceSipSession::EUpdating;
+ iStorage->iMediaManagerUpdateStatus = KMceAsync;
+
+ MCETestHelper::ChangeResponseTypeL(
+ *iSipSession->iResponse->ResponseElements(),
+ KMceSipRequestPending,
+ SipStrConsts:: EPhraseBusyHere);
+
+ TMceStateTransitionEvent event3_4( *iSipSession, EMceErrorResponse );
+ iState->EntryL( event3_4 );
+ MCE_ENTRYL_POSTCONDITION_2
+ MCE_ASSERT_STUBS( CMCETls::ECloseSession /*mmaction*/,
+ CMCETls::ENone /*mmsdpaction*/,
+ SipStrConsts::EBye /*sentMethod*/,
+ KErrNotFound /*sentResponse*/);
+
+ EUNIT_ASSERT ( event3_4.Code() == EMceErrorResponse );
+ MCE_RESET_STUBS();
+
// KMceSipSessionIntervalTooSmall && dialog state ETerminated
iSipSession->Dialog()->Dialog().iState = CSIPDialog::ETerminated;
iSipSession->iSubState = CMceSipSession::EOffering;
--- a/natplugins/natpcliprovisioningnatfwadapter/group/wpnatfwtraversaladapter.mmp Wed Mar 31 22:14:10 2010 +0300
+++ b/natplugins/natpcliprovisioningnatfwadapter/group/wpnatfwtraversaladapter.mmp Wed Apr 14 16:21:36 2010 +0300
@@ -58,8 +58,6 @@
LIBRARY ProvisioningEngine.lib
LIBRARY centralrepository.lib
LIBRARY charconv.lib
-LIBRARY apengine.lib
-LIBRARY commdb.lib
LIBRARY cmmanager.lib
PAGED