Fix for __uam_manager_get_device_type 33/258233/3
authorrohit singh <rohit.singh@samsung.com>
Wed, 12 May 2021 11:52:29 +0000 (17:22 +0530)
committerrohit singh <rohit.singh@samsung.com>
Thu, 13 May 2021 05:29:21 +0000 (10:59 +0530)
Issue: Return type mismatch issue. Inside function __uam_manager_get_device_type()
enum UAM_SENSOR_BITMASK_* is used instead of UAM_TECH_TYPE-*, which was inconsistent
to the function calling __uam_manager_get_device_type().

Solution: Changed UAM_SENSOR_BITMASK_* to UAM_TECH_TYPE-*.

Change-Id: I1df188dd713379e8c594de86707bf39e05a7fec9

ua-daemon/src/ua-manager-request-handler.c

index 64dbf46..c1728be 100755 (executable)
@@ -1331,9 +1331,9 @@ static unsigned int __uam_manager_get_device_type(
 
                if (bitmask == UAM_SENSOR_BITMASK_BT ||
                        bitmask == UAM_SENSOR_BITMASK_BLE) {
-                       device_type = UAM_SENSOR_BITMASK_BT;
+                       device_type = UAM_TECH_TYPE_BT;
                } else if (bitmask == UAM_SENSOR_BITMASK_WIFI) {
-                       device_type = UAM_SENSOR_BITMASK_WIFI;
+                       device_type = UAM_TECH_TYPE_WIFI;
                }
 
                break;
@@ -1382,9 +1382,9 @@ static unsigned int __uam_manager_get_device_type(
 
                if (bitmask == UAM_SENSOR_BITMASK_BT ||
                        bitmask == UAM_SENSOR_BITMASK_BLE) {
-                       device_type = UAM_SENSOR_BITMASK_BT;
+                       device_type = UAM_TECH_TYPE_BT;
                } else if (bitmask == UAM_SENSOR_BITMASK_WIFI) {
-                       device_type = UAM_SENSOR_BITMASK_WIFI;
+                       device_type = UAM_TECH_TYPE_WIFI;
                }
 
                break;