diff options
author | Ravi Gummadidala <rgummadi@codeaurora.org> | 2013-03-07 21:42:25 -0800 |
---|---|---|
committer | Ravi Gummadidala <rgummadi@codeaurora.org> | 2013-03-07 23:11:25 -0800 |
commit | 18067b91fbc19838bd4c4abdd77a21e87be638d7 (patch) | |
tree | d0770626791e0855780851adeafac7d44f1b7f43 /ipacm/src/IPACM_Conntrack_NATApp.cpp | |
parent | fe84c855cb867cfd5e7e266503c0b1f922314b4a (diff) | |
download | ipacfg-mgr-18067b91fbc19838bd4c4abdd77a21e87be638d7.tar.gz |
Additional fixes from bring-up:
1. added support for wlan events
2. disabled wlan power events
3. fixed issues found during testing
4. changed dump messages format of ipa nat table
Change-Id: I6d2b3caeb2061db0a59ccd843606e05901533f76
Diffstat (limited to 'ipacm/src/IPACM_Conntrack_NATApp.cpp')
-rw-r--r-- | ipacm/src/IPACM_Conntrack_NATApp.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ipacm/src/IPACM_Conntrack_NATApp.cpp b/ipacm/src/IPACM_Conntrack_NATApp.cpp index 63b158c..8e5ee41 100644 --- a/ipacm/src/IPACM_Conntrack_NATApp.cpp +++ b/ipacm/src/IPACM_Conntrack_NATApp.cpp @@ -53,6 +53,7 @@ NatApp::NatApp() int NatApp::Init(void) { IPACM_Config *pConfig; + int size = 0; pConfig = IPACM_Config::GetInstance(); if(pConfig == NULL) @@ -63,13 +64,15 @@ int NatApp::Init(void) max_entries = pConfig->GetNatMaxEntries(); - cache = (nat_table_entry *)malloc(sizeof(nat_table_entry) * max_entries); + size = (sizeof(nat_table_entry) * max_entries); + cache = (nat_table_entry *)malloc(size); if(cache == NULL) { IPACMERR("Unable to allocate memory for cache\n"); goto fail; } - memset(cache, 0, sizeof(nat_table_entry) * max_entries); + IPACMDBG("Allocated %d bytes for config manager nat cache\n", size); + memset(cache, 0, size); nALGPort = pConfig->GetAlgPortCnt(); pALGPorts = (ipacm_alg *)malloc(sizeof(ipacm_alg) * nALGPort); |