[ITC][Non-ACR][SVACE fixes for modules]
authorShilpa Jindal <shilpa.j@samsung.com>
Mon, 31 Jul 2017 11:12:29 +0000 (16:42 +0530)
committershobhit verma <shobhit.v@samsung.com>
Mon, 31 Jul 2017 11:48:13 +0000 (11:48 +0000)
Change-Id: I1c8a9925b65f510d93718742a71f388a674b1ac1
Signed-off-by: Shilpa Jindal <shilpa.j@samsung.com>
src/itc/accounts-svc/ITs-accounts-svc.c
src/itc/bluetooth/ITs-bluetooth-le-adapter.c
src/itc/capi-mediamuxer/ITs-capi-mediamuxer-common.c

index 576540b..8b6f222 100755 (executable)
@@ -783,19 +783,23 @@ int ITc_account_set_get_user_text_p(void)
        char* pszGetUserText = NULL;
 
 
-       int nIndex =  0 + (rand()% 5);//The index of the user integer (must be in range from 0 to 4)
-       int nRet = account_set_user_text(g_account, nIndex, pszSetUserText);
-       PRINT_RESULT(ACCOUNT_ERROR_NONE, nRet, "account_set_user_text", AccManagerGetErrorMSG(nRet));
-
-       nRet = account_get_user_text(g_account, nIndex, &pszGetUserText);
-       PRINT_RESULT(ACCOUNT_ERROR_NONE, nRet, "account_get_user_text", AccManagerGetErrorMSG(nRet));
-       if ( pszGetUserText == NULL || strcmp(pszSetUserText, pszGetUserText) != 0 )
+       //int nIndex =  0 + (rand()% 5);//The index of the user integer (must be in range from 0 to 4)
+       int nIndex=0;
+       for( nIndex= 0;nIndex<5;nIndex++)
        {
-               FPRINTF("[Line : %d][%s] account_get_user_text API Call Failed Set and Get values mismatchSet value is: %s, Get value is: %s\\n", __LINE__, API_NAMESPACE, pszSetUserText, pszGetUserText);
+               int nRet = account_set_user_text(g_account, nIndex, pszSetUserText);
+               PRINT_RESULT(ACCOUNT_ERROR_NONE, nRet, "account_set_user_text", AccManagerGetErrorMSG(nRet));
+
+               nRet = account_get_user_text(g_account, nIndex, &pszGetUserText);
+               PRINT_RESULT(ACCOUNT_ERROR_NONE, nRet, "account_get_user_text", AccManagerGetErrorMSG(nRet));
+               if ( pszGetUserText == NULL || strcmp(pszSetUserText, pszGetUserText) != 0 )
+               {
+                       FPRINTF("[Line : %d][%s] account_get_user_text API Call Failed Set and Get values mismatchSet value is: %s, Get value is: %s\\n", __LINE__, API_NAMESPACE, pszSetUserText, pszGetUserText);
+                       FREE_MEMORY(pszGetUserText);
+                       return 1;
+               }
                FREE_MEMORY(pszGetUserText);
-               return 1;
        }
-       FREE_MEMORY(pszGetUserText);
        return 0;
 }
 
@@ -836,20 +840,24 @@ int ITc_account_set_get_user_int_p(void)
                return 1;
        }
 
-       int nIndex =  0 + (rand()% 5);//The index of the user integer (must be in range from 0 to 4)
-       nRet = account_set_user_int(g_account, nIndex, pszSetUserInt);
-       PRINT_RESULT_CLEANUP(ACCOUNT_ERROR_NONE, nRet, "account_set_user_int", AccManagerGetErrorMSG(nRet), account_delete_from_db_by_id(g_AccId););
+       //int nIndex =  0 + (rand()% 5);//The index of the user integer (must be in range from 0 to 4)
+       int nIndex=0;
+       for( nIndex= 0;nIndex<5;nIndex++)
+       {
+               nRet = account_set_user_int(g_account, nIndex, pszSetUserInt);
+               PRINT_RESULT_CLEANUP(ACCOUNT_ERROR_NONE, nRet, "account_set_user_int", AccManagerGetErrorMSG(nRet), account_delete_from_db_by_id(g_AccId););
 
-       nRet = account_update_to_db_by_id(g_account, g_AccId);
-       PRINT_RESULT_CLEANUP(ACCOUNT_ERROR_NONE, nRet, "account_update_to_db_by_id", AccManagerGetErrorMSG(nRet),account_delete_from_db_by_id(g_AccId););
+               nRet = account_update_to_db_by_id(g_account, g_AccId);
+               PRINT_RESULT_CLEANUP(ACCOUNT_ERROR_NONE, nRet, "account_update_to_db_by_id", AccManagerGetErrorMSG(nRet),account_delete_from_db_by_id(g_AccId););
 
-       nRet = account_get_user_int(g_account, nIndex, &pszGetUserInt);
-       PRINT_RESULT_CLEANUP(ACCOUNT_ERROR_NONE, nRet, "account_get_user_int", AccManagerGetErrorMSG(nRet), account_delete_from_db_by_id(g_AccId););
-       if ( pszGetUserInt == -1 || pszGetUserInt != pszSetUserInt )
-       {
-               FPRINTF("[Line : %d][%s] account_get_user_int API Call Failed Set and Get values mismatchSet value is: %d, Get value is: %d\\n", __LINE__, API_NAMESPACE, pszSetUserInt, pszGetUserInt);
-               account_delete_from_db_by_id(g_AccId);
-               return 1;
+               nRet = account_get_user_int(g_account, nIndex, &pszGetUserInt);
+               PRINT_RESULT_CLEANUP(ACCOUNT_ERROR_NONE, nRet, "account_get_user_int", AccManagerGetErrorMSG(nRet), account_delete_from_db_by_id(g_AccId););
+               if ( pszGetUserInt == -1 || pszGetUserInt != pszSetUserInt )
+               {
+                       FPRINTF("[Line : %d][%s] account_get_user_int API Call Failed Set and Get values mismatchSet value is: %d, Get value is: %d\\n", __LINE__, API_NAMESPACE, pszSetUserInt, pszGetUserInt);
+                       account_delete_from_db_by_id(g_AccId);
+                       return 1;
+               }
        }
        account_delete_from_db_by_id(g_AccId);
        return 0;
index a6be9bc..d00ea05 100755 (executable)
@@ -1431,7 +1431,7 @@ int ITc_bt_adapter_le_scan_filter_set_manufacturer_data_with_mask_p(void)
                return 1;
        }
 
-       nRet = bt_adapter_le_scan_filter_set_manufacturer_data_with_mask(scan_filter, manufacturer_id, pszManufactureData, sizeof(manufacture_0), pszManufactureDatamask, sizeof(pszManufactureDatamask));
+       nRet = bt_adapter_le_scan_filter_set_manufacturer_data_with_mask(scan_filter, manufacturer_id, pszManufactureData, sizeof(manufacture_0), pszManufactureDatamask, strlen(pszManufactureDatamask));
        PRINT_RESULT_CLEANUP(BT_ERROR_NONE, nRet, "bt_adapter_le_scan_filter_set_manufacturer_data_with_mask", BluetoothGetError(nRet), bt_adapter_le_scan_filter_destroy(scan_filter));
 
        nRet = bt_adapter_le_scan_filter_destroy(scan_filter);
index 6543582..fd0de71 100755 (executable)
@@ -101,7 +101,7 @@ int MediamuxerExtractNal(FILE *fd, unsigned char* nal)
        int nal_length = 0;
        size_t result;
        int read_size = 1;
-       unsigned char buffer[1000000];
+       unsigned char buffer[1000];
        unsigned char val, zero_count, i;
        int nal_unit_type = 0;
        int init;