--- a/alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmonitorimpl.cpp Mon Jan 18 20:33:49 2010 +0200
+++ b/alwayson_net_plugin/pdpcontextmanager2/src/caoconnectionmonitorimpl.cpp Tue Jan 26 12:12:48 2010 +0200
@@ -23,6 +23,7 @@
#include "maoconnectionmonitorobserver.h"
#include "caoasyncwrapper.h"
+
// UNNAMED NAMESPACE FOR LOCAL DEFINITIONS
namespace
{
@@ -50,6 +51,9 @@
#endif
}
+const TInt KRetryCounter = 10;
+
+
// METHODS
// ---------------------------------------------------------------------------
@@ -224,10 +228,23 @@
if ( aStatus == KErrNone )
{
- LOG_2( _L("> NW reg. status: %d"), iWNReg.iRegStatus );
- iObserver.HandleNWRegistrationStatusChangedL(
- iWNRegPckg().iRegStatus );
- }
+ LOG_2( _L("> Current iWNReg.iRegStatus: %d"), iWNReg.iRegStatus );
+
+ if ( ( iWNReg.iRegStatus < iWNChangeReg.iRegStatus ) &&
+ ( iCounter < KRetryCounter ) )
+ {
+ iCounter++;
+ LOG_2( _L("> Different from events iWNChangeReg.iRegStatusv: %d"),
+ iWNChangeReg.iRegStatus );
+ iNWRegistrationStatus->IssueRequest();
+ }
+ else
+ {
+ iCounter = 0;
+ iObserver.HandleNWRegistrationStatusChangedL(
+ iWNRegPckg().iRegStatus );
+ }
+ }
else
{
HandleError( aStatus );