tcpiputils/dhcp/src/DHCPStateMachine.cpp
branchRCL_3
changeset 27 4214adf9e0d3
parent 0 af10295192d8
child 40 d566d76acea1
equal deleted inserted replaced
23:23b59305592d 27:4214adf9e0d3
   418 	TPckgBuf<TSoInet6InterfaceInfo> configInfo(aSoInet6InterfaceInfo);
   418 	TPckgBuf<TSoInet6InterfaceInfo> configInfo(aSoInet6InterfaceInfo);
   419 	// not interested in error
   419 	// not interested in error
   420 	// how could we attempt to handle it anyway?...keep trying??? i think not...
   420 	// how could we attempt to handle it anyway?...keep trying??? i think not...
   421 	// ensure that we have a socket to write down	
   421 	// ensure that we have a socket to write down	
   422 	iSocket.Close();	
   422 	iSocket.Close();	
   423 	(void)iSocket.Open(iEsock, KAfInet, KSockDatagram, KProtocolInetUdp, iConnection);
   423 	TInt error = iSocket.Open(iEsock, KAfInet, KSockDatagram, KProtocolInetUdp, iConnection);
   424 	(void)iSocket.SetOpt(KSoInetConfigInterface, KSolInetIfCtrl, configInfo);	
   424 	
   425 	// make socket invisible for interface counting
   425     if(error == KErrNone)
   426 	(void)iSocket.SetOpt(KSoKeepInterfaceUp, KSolInetIp, 0);
   426 		{
       
   427 		error = iSocket.SetOpt(KSoInetConfigInterface, KSolInetIfCtrl, configInfo);
       
   428 		if(error == KErrNone)
       
   429 		    {	        
       
   430 		    // make socket invisible for interface counting
       
   431 		    error = iSocket.SetOpt(KSoKeepInterfaceUp, KSolInetIp, 0);
       
   432 		    if(error != KErrNone)
       
   433 		        {
       
   434 		        __CFLOG_VAR((KLogSubSysDHCP, KLogCode, _L("CDHCPStateMachine::RemoveConfiguredAddress, SetOpt Failed to set KSolInetIp")));   
       
   435 		        }
       
   436 		    }
       
   437 		else
       
   438 		    {
       
   439 		    __CFLOG_VAR((KLogSubSysDHCP, KLogCode, _L("CDHCPStateMachine::RemoveConfiguredAddress,SetOpt Failed to set KsolInetIfCtrl")));   
       
   440 		    }
       
   441 		}
       
   442 	else
       
   443 		{
       
   444 		__CFLOG_VAR((KLogSubSysDHCP, KLogCode, _L("CDHCPStateMachine::RemoveConfiguredAddress,Socket Open Failed: Due to KErrNotReady ")));	
       
   445 		}
   427 	}
   446 	}
   428 
   447 
   429 void CDHCPStateMachine::ConfigureInterfaceL( const TSoInet6InterfaceInfo& aInterfaceInfo )
   448 void CDHCPStateMachine::ConfigureInterfaceL( const TSoInet6InterfaceInfo& aInterfaceInfo )
   430 /**
   449 /**
   431   * Set the interface IP address and other params
   450   * Set the interface IP address and other params