summaryrefslogtreecommitdiff
path: root/ipacm
diff options
context:
space:
mode:
authorSkylar Chang <chiaweic@codeaurora.org>2017-10-25 10:50:38 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-10-27 12:36:03 -0700
commit0fe2143973276c0f20cc09888c0218849358c79e (patch)
tree496b95bcbeb28000a027bb3906dedee875cc20f8 /ipacm
parent1c8d3f9edf0c5f7aafc652335d8e01f7358b7fc2 (diff)
downloadipacfg-mgr-0fe2143973276c0f20cc09888c0218849358c79e.tar.gz
IPACM: fix the ipacm crash issue on SSR
On SSR scenario without tethering enable once, ipacm crash due to uninitialized pointer, elrInstance. Make the change to initialize it as NULL. Bug: 67019241 Change-Id: I126f44c02a8b186dd2e61392cb2d9732263165e1
Diffstat (limited to 'ipacm')
-rw-r--r--ipacm/src/IPACM_Main.cpp3
-rw-r--r--ipacm/src/IPACM_OffloadManager.cpp2
2 files changed, 5 insertions, 0 deletions
diff --git a/ipacm/src/IPACM_Main.cpp b/ipacm/src/IPACM_Main.cpp
index 5d0f83b..1f92bfa 100644
--- a/ipacm/src/IPACM_Main.cpp
+++ b/ipacm/src/IPACM_Main.cpp
@@ -700,6 +700,7 @@ void* ipa_driver_msg_notifier(void *param)
if (OffloadMng->elrInstance == NULL) {
IPACMERR("OffloadMng->elrInstance is NULL, can't forward to framework!\n");
} else {
+ IPACMERR("calling OffloadMng->elrInstance->onLimitReached \n");
OffloadMng->elrInstance->onLimitReached();
}
continue;
@@ -709,6 +710,7 @@ void* ipa_driver_msg_notifier(void *param)
if (OffloadMng->elrInstance == NULL) {
IPACMERR("OffloadMng->elrInstance is NULL, can't forward to framework!\n");
} else {
+ IPACMERR("calling OffloadMng->elrInstance->onOffloadStopped \n");
OffloadMng->elrInstance->onOffloadStopped(IpaEventRelay::ERROR);
}
continue;
@@ -718,6 +720,7 @@ void* ipa_driver_msg_notifier(void *param)
if (OffloadMng->elrInstance == NULL) {
IPACMERR("OffloadMng->elrInstance is NULL, can't forward to framework!\n");
} else {
+ IPACMERR("calling OffloadMng->elrInstance->onOffloadSupportAvailable \n");
OffloadMng->elrInstance->onOffloadSupportAvailable();
}
continue;
diff --git a/ipacm/src/IPACM_OffloadManager.cpp b/ipacm/src/IPACM_OffloadManager.cpp
index 616cf70..4b85c6e 100644
--- a/ipacm/src/IPACM_OffloadManager.cpp
+++ b/ipacm/src/IPACM_OffloadManager.cpp
@@ -59,6 +59,8 @@ IPACM_OffloadManager::IPACM_OffloadManager()
upstream_v6_up = false;
memset(event_cache, 0, MAX_EVENT_CACHE*sizeof(framework_event_cache));
latest_cache_index = 0;
+ elrInstance = NULL;
+ touInstance = NULL;
return ;
}