Update snapshot(2017-12-06)
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / bt_le_adapter / tizen / caleserver_vd.c
index ef3654b..e5a71d3 100755 (executable)
  * Logging tag for module name
  */
 #define TAG "OIC_CA_LE_SERVER_VD"
-/**
- * Initial buffer size for Gatt Server.
- */
-#define CA_LE_INITIAL_BUF_SIZE 512
 
 /**
  * The handle of the OIC server.
@@ -190,6 +186,11 @@ void CALEServerNotificationSentCB(int result, char *remote_address, bt_gatt_serv
                                   bt_gatt_h characteristic, bool completed, void *user_data)
 #endif
 {
+    (void)server;
+    (void)characteristic;
+    (void)completed;
+    (void)user_data;
+
     OIC_LOG_V(DEBUG, TAG, "Notification to the device[%s] result[%d]", remote_address, result);
 }
 
@@ -228,7 +229,7 @@ CAResult_t CAStartLEGattServer()
 
     // For Read Characteristics.
     ret = CAAddNewCharacteristicsToGattServer(g_gattSvcPath, charReadUUID, charReadValue,
-                                              CA_LE_INITIAL_BUF_SIZE, true);
+                                              sizeof(charReadValue), true);
     if (CA_STATUS_OK != ret)
     {
         OIC_LOG_V(ERROR, TAG, "CAAddNewCharacteristicsToGattServer failed[%d]", ret);
@@ -242,7 +243,7 @@ CAResult_t CAStartLEGattServer()
 
 
     ret = CAAddNewCharacteristicsToGattServer(g_gattSvcPath, charWriteUUID, charWriteValue,
-            CA_LE_INITIAL_BUF_SIZE, false); // For Write Characteristics.
+            sizeof(charWriteValue), false); // For Write Characteristics.
     if (CA_STATUS_OK != ret )
     {
         OIC_LOG_V(ERROR, TAG, "CAAddNewCharacteristicsToGattServer failed[%d]", ret);
@@ -284,6 +285,10 @@ CAResult_t CAStartLEGattServer()
 void CALENotificationCb(bool notify, bt_gatt_server_h server, bt_gatt_h gatt_handle,
                         void *user_data)
 {
+    (void)server;
+    (void)gatt_handle;
+    (void)user_data;
+
     OIC_LOG(DEBUG, TAG, "IN");
     if (notify)
     {
@@ -687,6 +692,10 @@ void CALEGattRemoteCharacteristicWriteCb(char *remoteAddress, bt_gatt_server_h s
                                          int charLen, void *userData)
 #endif
 {
+    (void)server;
+    (void)gatt_handle;
+    (void)userData;
+
     OIC_LOG(INFO, TAG, "IN - WriteCharCB");
 
     if (NULL == charValue || NULL == remoteAddress)
@@ -1023,6 +1032,7 @@ void CASetBLEServerErrorHandleCallback(CABLEErrorHandleCallback callback)
 
 bool CALEServerIsConnected(const char* address)
 {
+    (void)address;
     //@Todo
     return true;
 }