Revert Patch CCCD change
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / bt_le_adapter / tizen / caleserver_vd.c
index f1a5f6e..6a52aed 100644 (file)
@@ -859,6 +859,10 @@ 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;
@@ -883,9 +887,6 @@ CAResult_t CAAddNewCharacteristicsToGattServer(const bt_gatt_h svcPath, const ch
                       CALEGetErrorMsg(ret));
             return CA_STATUS_FAILED;
         }
-        g_gattReadCharPath = charPath;
-    }
-    else{
         g_gattWriteCharPath = charPath;
     }