removed warning in CA layer
authorJaewook Jung <jw0213.jung@samsung.com>
Fri, 4 Mar 2016 05:35:27 +0000 (14:35 +0900)
committerJon A. Cruz <jon@joncruz.org>
Tue, 15 Mar 2016 09:00:15 +0000 (09:00 +0000)
Change-Id: Id7b89929a8497a041590b60e91f2ad33d51ce0c1
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/5585
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jon@joncruz.org>
resource/csdk/connectivity/common/src/cathreadpool_pthreads.c
resource/csdk/connectivity/inc/camessagehandler.h
resource/csdk/connectivity/src/bt_le_adapter/tizen/calenwmonitor.c
resource/csdk/connectivity/src/bt_le_adapter/tizen/caleserver.c
resource/csdk/connectivity/src/bt_le_adapter/tizen/caleserver.h
resource/csdk/connectivity/src/ip_adapter/caipserver.c
resource/csdk/connectivity/util/src/camanager/tizen/caleconnectionmanager.c

index 751bafc..636036e 100644 (file)
@@ -24,7 +24,9 @@
  * This file provides APIs related to thread pool.
  */
 
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE
+#endif
 #include <errno.h>
 #include <pthread.h>
 #include "cathreadpool.h"
index 0e37c47..3f2fa6c 100644 (file)
@@ -98,6 +98,12 @@ void CATerminateMessageHandler();
 void CAHandleRequestResponseCallbacks();
 
 /**
+ * Setting the Callback funtion for network state change callback.
+ * @param[in] nwMonitorHandler    callback for network state change.
+ */
+void CASetNetworkMonitorCallback(CANetworkMonitorCallback nwMonitorHandler);
+
+/**
  * To log the PDU data.
  * @param[in] pdu    pdu data.
  * @param[in] endpoint  endpoint
index ed03e02..47b1b5f 100644 (file)
 
 #include "caleinterface.h"
 
-#include<stdio.h>
-#include<stdlib.h>
-#include<string.h>
-#include<glib.h>
-#include<arpa/inet.h>
-#include<sys/types.h>
-#include<sys/socket.h>
-#include<netinet/in.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include <arpa/inet.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
 
 #include <bluetooth.h>
 #include <bluetooth_internal.h>
 #include <bluetooth_type.h>
 
-
 #include "camutex.h"
 #include "caleadapter.h"
 #include "caadapterutils.h"
+#include "oic_string.h"
+#include "oic_malloc.h"
 
 /**
  * Logging tag for module name
@@ -347,7 +348,7 @@ void CALENWConnectionStateChangedCb(int result, bool connected,
     VERIFY_NON_NULL_VOID(remoteAddress, TAG, "remote address is NULL");
 
     ca_mutex_lock(g_bleConnectionStateChangedCbMutex);
-    const char *addr = OICStrdup(remoteAddress);
+    char *addr = OICStrdup(remoteAddress);
     if (NULL == addr)
     {
         OIC_LOG(ERROR, TAG, "addr is NULL");
index a46a558..125de56 100644 (file)
 *
 ******************************************************************/
 
-#include <bluetooth.h>
-#include <bluetooth_type.h>
-#include <bluetooth_internal.h>
-
 #include "caleserver.h"
 #include "cacommon.h"
 #include "cacommonutil.h"
index 0d934b0..100ea9b 100644 (file)
 #ifndef TZ_BLE_SERVER_H_
 #define TZ_BLE_SERVER_H_
 
+#include <bluetooth.h>
+#include <bluetooth_type.h>
+#include <bluetooth_internal.h>
+
 #include "caadapterinterface.h"
 #include "logger.h"
 #include "cathreadpool.h"
index 1f53541..c0a571e 100644 (file)
  *
  ******************************************************************/
 
+#ifndef __APPLE_USE_RFC_3542
 #define __APPLE_USE_RFC_3542 // for PKTINFO
+#endif
+#ifndef _GNU_SOURCE
 #define _GNU_SOURCE // for in6_pktinfo
+#endif
 
 #include <sys/types.h>
 #include <sys/socket.h>
index 3e0310f..cc196f2 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "camanagerleinterface.h"
 #include "cacommon.h"
+#include "camessagehandler.h"
 #include "caleserver.h"
 #include "cagattservice.h"
 #include "logger.h"