--- a/tcpiputils/dhcp/src/DHCPStateMachine.cpp Mon May 03 13:58:16 2010 +0300
+++ b/tcpiputils/dhcp/src/DHCPStateMachine.cpp Tue Jun 29 19:20:22 2010 +0530
@@ -420,10 +420,29 @@
// how could we attempt to handle it anyway?...keep trying??? i think not...
// ensure that we have a socket to write down
iSocket.Close();
- (void)iSocket.Open(iEsock, KAfInet, KSockDatagram, KProtocolInetUdp, iConnection);
- (void)iSocket.SetOpt(KSoInetConfigInterface, KSolInetIfCtrl, configInfo);
- // make socket invisible for interface counting
- (void)iSocket.SetOpt(KSoKeepInterfaceUp, KSolInetIp, 0);
+ TInt error = iSocket.Open(iEsock, KAfInet, KSockDatagram, KProtocolInetUdp, iConnection);
+
+ if(error == KErrNone)
+ {
+ error = iSocket.SetOpt(KSoInetConfigInterface, KSolInetIfCtrl, configInfo);
+ if(error == KErrNone)
+ {
+ // make socket invisible for interface counting
+ iSocket.SetOpt(KSoKeepInterfaceUp, KSolInetIp, 0);
+ if(error != KErrNone)
+ {
+ __CFLOG_VAR((KLogSubSysDHCP, KLogCode, _L("CDHCPStateMachine::RemoveConfiguredAddress, SetOpt Failed to set KSoKeepInterfaceUp")));
+ }
+ }
+ else
+ {
+ __CFLOG_VAR((KLogSubSysDHCP, KLogCode, _L("CDHCPStateMachine::RemoveConfiguredAddress, SetOpt Failed to set KSoInetConfigInterface")));
+ }
+ }
+ else
+ {
+ __CFLOG_VAR((KLogSubSysDHCP, KLogCode, _L("CDHCPStateMachine::RemoveConfiguredAddress, Socket Open Failed: Due to KErrNotReady")));
+ }
}
void CDHCPStateMachine::ConfigureInterfaceL( const TSoInet6InterfaceInfo& aInterfaceInfo )