datacommsserver/esockserver/ssock/ss_sap.cpp
branchRCL_3
changeset 9 77effd21b2c9
parent 0 dfb7c4ff071f
child 48 07656293a99c
equal deleted inserted replaced
5:68ef71f0cd72 9:77effd21b2c9
    61 
    61 
    62 @param anAddr The address
    62 @param anAddr The address
    63 @return Returns KErrNone if the local name is correctly set or, if this is
    63 @return Returns KErrNone if the local name is correctly set or, if this is
    64 not the case, an informative error number. */
    64 not the case, an informative error number. */
    65 	{
    65 	{
    66 	iLocalAddressSet = ETrue;
    66 	SetLocalAddressSet();
    67 	iLocalAddress = anAddr;
    67 	iLocalAddress = anAddr;
    68 	
    68 	
    69 	}
    69 	}
    70 
    70 
    71 TInt CNetworkFlow::SetRemName(TSockAddr& anAddr)
    71 TInt CNetworkFlow::SetRemName(TSockAddr& anAddr)
    74 
    74 
    75 @param anAddr The address
    75 @param anAddr The address
    76 @return Returns KErrNone if the remote name is correctly set or, if this is
    76 @return Returns KErrNone if the remote name is correctly set or, if this is
    77 not the case, an informative error number. */
    77 not the case, an informative error number. */
    78 	{
    78 	{
    79 	iRemoteAddressSet = ETrue;
    79 	SetRemoteAddressSet();
    80 	iRemoteAddress = anAddr;
    80 	iRemoteAddress = anAddr;
    81 	return KErrNone;
    81 	return KErrNone;
    82 	}
    82 	}
    83 
    83 
    84 void CNetworkFlow::UpdateDestinationAddress(const TSockAddr& aDest)
    84 void CNetworkFlow::UpdateDestinationAddress(const TSockAddr& aDest)
    85 	{
    85 	{
    86 	iRemoteAddress = aDest;
    86 	iRemoteAddress = aDest;
    87 	iRemoteAddressSet = ETrue;
    87 	SetRemoteAddressSet();
    88 	}
    88 	}
    89 
    89 
    90 TUint CNetworkFlow::Write(const TDesC8& /*aDesc*/, TUint /*aOptions*/, TSockAddr* anAddr)
    90 TUint CNetworkFlow::Write(const TDesC8& /*aDesc*/, TUint /*aOptions*/, TSockAddr* anAddr)
    91 /** Sends data onto the network via the protocol.
    91 /** Sends data onto the network via the protocol.
    92 
    92 
   221     	{
   221     	{
   222     	iSessionControlNotify = NULL;
   222     	iSessionControlNotify = NULL;
   223 		iSessionDataNotify = NULL;
   223 		iSessionDataNotify = NULL;
   224 		if(iSubConnectionProvider.IsOpen())
   224 		if(iSubConnectionProvider.IsOpen())
   225 			{
   225 			{
   226 			if(iDCIdle < EIdle)
   226 			if (!Idle())
   227 				{
   227 				{
   228 				iDCIdle = EIdle;
   228 				SetIdle();
   229 		    	ProcessDCIdleState();
   229 		    	ProcessDCIdleState();
   230 				}
   230 				}
   231 			}
   231 			}
   232 		else
   232 		else
   233 			{
   233 			{
   248 	}
   248 	}
   249 
   249 
   250 void CNetworkFlow::ProcessDCIdleState()
   250 void CNetworkFlow::ProcessDCIdleState()
   251 	{
   251 	{
   252 #ifdef SYMBIAN_NETWORKING_UPS
   252 #ifdef SYMBIAN_NETWORKING_UPS
   253 	if(iDCIdle == EIdle && !ActivityRunning())
   253 	if (Idle() && !IdleSent() && !ActivityRunning())
   254 #else
   254 #else
   255 	if(iDCIdle == EIdle && !iNoBearerRunning)
   255 	if (Idle() && !IdleSent() && !NoBearerGuard())
   256 #endif
   256 #endif
   257 		{
   257 		{
   258 		iDCIdle = EIdleSent;
   258 		SetIdleSent();
   259 		iSubConnectionProvider.PostMessage(Id(), TCFControlProvider::TIdle().CRef());
   259 		iSubConnectionProvider.PostMessage(Id(), TCFControlProvider::TIdle().CRef());
   260 		}
   260 		}
   261 	}
   261 	}
   262 
   262 
   263 
   263