tcpiputils/dhcp/src/DHCPStateMachine.cpp
changeset 37 052078dda061
parent 0 af10295192d8
equal deleted inserted replaced
18:39bb7c3571e9 37:052078dda061
   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             iSocket.SetOpt(KSoKeepInterfaceUp, KSolInetIp, 0);
       
   432             if(error != KErrNone)
       
   433                 {
       
   434                 __CFLOG_VAR((KLogSubSysDHCP, KLogCode, _L("CDHCPStateMachine::RemoveConfiguredAddress, SetOpt Failed to set KSoKeepInterfaceUp")));
       
   435                 }
       
   436             }
       
   437         else
       
   438             {
       
   439             __CFLOG_VAR((KLogSubSysDHCP, KLogCode, _L("CDHCPStateMachine::RemoveConfiguredAddress, SetOpt Failed to set KSoInetConfigInterface")));
       
   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