Fixes for scan in VD
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / bt_le_adapter / tizen / caleserver_vd.c
old mode 100755 (executable)
new mode 100644 (file)
index 6a52aed..f1a5f6e
@@ -859,10 +859,6 @@ CAResult_t CAAddNewCharacteristicsToGattServer(const bt_gatt_h svcPath, const ch
 
     if (read)
     {
-        g_gattReadCharPath = charPath;
-    }
-    else
-    {
         char desc_value[2] = {0, 0};  // Notification enabled.
         bt_gatt_h descriptor = NULL;
         permissions = BT_GATT_PERMISSION_READ | BT_GATT_PERMISSION_WRITE;
@@ -887,6 +883,9 @@ CAResult_t CAAddNewCharacteristicsToGattServer(const bt_gatt_h svcPath, const ch
                       CALEGetErrorMsg(ret));
             return CA_STATUS_FAILED;
         }
+        g_gattReadCharPath = charPath;
+    }
+    else{
         g_gattWriteCharPath = charPath;
     }