javacommons/gcfprotocols/socket/socket/src.s60/apnsettings.cpp
changeset 76 4ad59aaee882
parent 35 85266cc22c7f
child 87 1627c337e51e
equal deleted inserted replaced
69:773449708c84 76:4ad59aaee882
    64 
    64 
    65 
    65 
    66     return def;
    66     return def;
    67 }
    67 }
    68 
    68 
    69 
    69 void ApnSettings::removeDefaultApn()
       
    70 { 
       
    71     #ifdef RD_JAVA_OPENC_BETA_PATCH
       
    72         setdefaultif(0);
       
    73         ILOG(ESOCKET, "sedefaultif called");
       
    74         ILOG1(ESOCKET, "remove default apn returned %d",setdefaultif(NULL));
       
    75     #endif  
       
    76 }
       
    77 int ApnSettings::retryConnection(int aErrCode, int aType, int aApn)
       
    78 {
       
    79     if ( aErrCode > __EMAXERRNO )
       
    80     {
       
    81         // errno out of range, check for KErrNotReady
       
    82         int errCode = -(aErrCode - __EMAXERRNO);
       
    83         ELOG1(ESOCKET,"ApnSettings:: retryConnection symbian error : %d" , errCode);
       
    84         if( (errCode == KErrNotReady) && (aType == 2) )
       
    85         {
       
    86             // call reset and setDefaultif() again to make a new conn and use  
       
    87             ApnSettings::removeDefaultApn();
       
    88             int ret = ApnSettings::setDefaultApn(aType,aApn);
       
    89             return ret;
       
    90         }
       
    91      }     
       
    92      return -(aErrCode);
       
    93      
       
    94 }