Changes to implementation of netapi_getSaStats()
authorTinku Mannan <tmannan@ti.com>
Fri, 28 Sep 2012 15:12:25 +0000 (11:12 -0400)
committerTinku Mannan <tmannan@ti.com>
Fri, 28 Sep 2012 15:12:25 +0000 (11:12 -0400)
ti/runtime/netapi/src/netapi_sec.c

index 2ab6c26514ccf74e2e61e9c243c60638ae8a85a0..94578a4d96ebad9e172e901dd15886bfd871505e 100755 (executable)
@@ -481,15 +481,16 @@ netapi_secDelRxPolicy_internal(h,  policy_app_id, 0, perr);
 
 
 
-void  netapi_getSaStats (NETAPI_T h, NETCP_CFG_SA_T handle,
-                                       NETAPI_SA_STATS_T*      pSaStats)
+void  netapi_getSaStats (NETAPI_T               h, 
+                         NETCP_CFG_SA_T         handle,
+                         NETAPI_SA_STATS_T*     pSaStats)
 {
 
     NETAPI_HANDLE_T * n = (NETAPI_HANDLE_T *) h;
-void * handle_inflow;
-void * handle_sideband;
-int tunnelId = (handle >>8) &0xffff;
-int have_to_wait = 1;
+    void * handle_inflow;
+    void * handle_sideband;
+    int tunnelId = (handle >>8) &0xffff;
+    int have_to_wait = 1;
     handle_inflow = netcp_cfgp_get_sa_handles(&netapi_get_global()->nwal_context,
                                           tunnelId, &handle_sideband);
     if(handle_inflow)
@@ -497,14 +498,14 @@ int have_to_wait = 1;
         //printf("netapi_getSaStats(): handle inflow valid\n");
         nwal_getSecAssocStats(((NETAPI_GLOBAL_T*) (n->global))->nwal_context.nwalInstHandle, 
                                                 handle_inflow, &(pSaStats->saIpsecStats));
-        pSaStats->mode_active |= NETAPI_INFLOW_MODE_ACTIVE;
+        pSaStats->validParams |= NETAPI_IPSEC_STAT_VALID;
     }
     if(handle_sideband)
     {
         //printf("netapi_getSaStats(): handle sideband valid\n");
         nwal_getDataModeStats(((NETAPI_GLOBAL_T*) (n->global))->nwal_context.nwalInstHandle, 
                                                 handle_sideband, &(pSaStats->dataModeStats));
-         pSaStats->mode_active |= NETAPI_SIDEBAND_MODE_ACTIVE;
+         pSaStats->validParams |= NETAPI_SIDEBAND_DATA_MODE_STAT_VALID;
     }
     
 }