Changed variable types and casting to enable aarch64 27/86227/1 accepted/tizen/common/20160831.162239 accepted/tizen/mobile/20160831.125156 accepted/tizen/tv/20160831.125205 accepted/tizen/wearable/20160831.125209 submit/tizen/20160831.080055
authorkmook <kmook.choi@samsung.com>
Wed, 31 Aug 2016 06:52:07 +0000 (15:52 +0900)
committerkmook <kmook.choi@samsung.com>
Wed, 31 Aug 2016 06:52:07 +0000 (15:52 +0900)
Change-Id: I2ffacd0c96f5124b72e5b6d9eedad5def0c4042d
Signed-off-by: kmook <kmook.choi@samsung.com>
daemon/DiscoveryManager.cpp
daemon/Util.cpp
daemon/Util.h
daemon/service_provider/RemoteAppControlServiceProvider.cpp
lib/CMakeLists.txt
msf_tizen_client/test/main.cpp
packaging/d2d-conv-manager.spec

index e4fb71c..6f9800c 100755 (executable)
@@ -85,7 +85,7 @@ int conv::DiscoveryManager::notifyTimeOut(std::string client)
        if (timerIter != __requestTimerMap.end()) {
                int timerId = timerIter->second;
                _D("timerId[%d]", timerId);
-               conv::util::miscStopTimer(reinterpret_cast<void*> (timerId));
+               conv::util::miscStopTimer(timerId);
                __requestTimerMap.erase(timerIter);
        }
 
@@ -168,7 +168,7 @@ int conv::DiscoveryManager::handleRequest(Request* requestObj)
                                if (timerIter != __requestTimerMap.end()) {
                                        int timerId = timerIter->second;
                                        _D("timerId[%d]", timerId);
-                                       conv::util::miscStopTimer(reinterpret_cast<void*> (timerId));
+                                       conv::util::miscStopTimer(timerId);
                                        __requestTimerMap.erase(timerIter);
                                }
                        }
@@ -178,7 +178,7 @@ int conv::DiscoveryManager::handleRequest(Request* requestObj)
                        param[0] = reinterpret_cast<void*>(new(std::nothrow) string(client));
                        param[1] = reinterpret_cast<void*>(this);
 
-                       int timerId = reinterpret_cast<int>(conv::util::miscStartTimer(__timer_worker, timeout, param));
+                       int timerId = conv::util::miscStartTimer(__timer_worker, timeout, param);
                        __requestTimerMap[string(client)] = timerId;
 
                        requestObj->reply(CONV_ERROR_NONE);
index 5907178..52759b9 100755 (executable)
@@ -119,7 +119,7 @@ static gboolean __misc_timer_worker(gpointer ud)
     return TRUE;
 }
 
-void* conv::util::miscStartTimer(timer_function function, unsigned int interval, void *data)
+int conv::util::miscStartTimer(timer_function function, unsigned int interval, void *data)
 {
     guint id = 0;
     GSource *src = NULL;
@@ -138,10 +138,10 @@ void* conv::util::miscStartTimer(timer_function function, unsigned int interval,
     g_source_unref(src);
 
        _D("Done with id[%d] in misc_start_timer", id);
-    return (void*)id;
+    return id;
 }
 
-void conv::util::miscStopTimer(void *timer)
+void conv::util::miscStopTimer(int timer)
 {
     guint id = (guint) timer;
        _D("Requested Stop Timer[%d]", id);
index 50e32e3..a04997f 100644 (file)
@@ -29,8 +29,8 @@ namespace conv {
                bool isServiceActivated(int serviceValue);
 
                typedef void (*timer_function)(void *data);
-               void* miscStartTimer(timer_function function, unsigned int interval, void *data);
-               void miscStopTimer(void *timer);
+               int miscStartTimer(timer_function function, unsigned int interval, void *data);
+               void miscStopTimer(int timer);
                bool getPeerMac(const std::string &remoteIP, const int remotePort, char *buf);
                std::string getIpAddress(std::string hostAddress);
        }
index 9fa3f26..598fad8 100755 (executable)
@@ -44,7 +44,7 @@ static int get_req_id()
        return req_id;
 }
 
-static std::map<int, app_control_cb_info_s> app_control_cb_map;
+static std::map<long long, app_control_cb_info_s> app_control_cb_map;
 static std::map<int, response_cb_info_s> response_cb_map;
 
 static void vconf_update_cb(keynode_t *node, void* user_data)
@@ -151,9 +151,9 @@ static void _app_control_cb(app_control_h request, app_control_h reply, app_cont
 {
        _D("app control reply received");
 
-       int reply_id = (int)user_data;
+       long long reply_id = (long long)user_data;
 
-       std::map<int, app_control_cb_info_s>::iterator find_iter = app_control_cb_map.find(reply_id);
+       std::map<long long, app_control_cb_info_s>::iterator find_iter = app_control_cb_map.find(reply_id);
 
        IF_FAIL_VOID_TAG(find_iter != app_control_cb_map.end(), _E, "No reply data");
 
@@ -259,7 +259,7 @@ static int __app_control_launch(iotcon_request_h request, iotcon_attributes_h at
                bool waiting_reply = false;
 
                // check if it's already launched and waiting for app_control response
-               for(std::map<int, app_control_cb_info_s>::iterator it = app_control_cb_map.begin(); it != app_control_cb_map.end(); it++) {
+               for(std::map<long long, app_control_cb_info_s>::iterator it = app_control_cb_map.begin(); it != app_control_cb_map.end(); it++) {
                        app_control_cb_info_s found_cb_info = it->second;
                        if(found_cb_info.request_handle == request) {
                                waiting_reply = true;
@@ -270,7 +270,7 @@ static int __app_control_launch(iotcon_request_h request, iotcon_attributes_h at
 
                if (!waiting_reply) {
                        int req_id;
-                       int reply_id = get_req_id();
+                       long long reply_id = get_req_id();
 
                        iotcon_attributes_get_int(attributes, CONV_JSON_REQ_ID, &req_id);
 
index 8917534..4edc698 100644 (file)
@@ -28,7 +28,7 @@ INSTALL(TARGETS ${CLIENT} DESTINATION ${LIB_INSTALL_DIR})
 
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 CONFIGURE_FILE("${CLIENT}.pc.in" "${CLIENT}.pc" @ONLY)
-INSTALL(FILES "${CLIENT}.pc" DESTINATION lib/pkgconfig)
+INSTALL(FILES "${CLIENT}.pc" DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
 
 FILE(GLOB CLIENT_HEADER include/*.h)
 FOREACH(hfile ${CLIENT_HEADER})
index b58de28..636d08a 100755 (executable)
@@ -316,7 +316,7 @@ public:
 class published_listener : public OnPublishListener {
 public:
        void onPublished(bool result, void* user_data) {
-               printf("\n published result = %s, user_data = %d", result ? "true" : "false", (int)user_data);
+//             printf("\n published result = %s, user_data = %d", result ? "true" : "false", (int)user_data);
        }
 };
 
index ea64a95..f40abe8 100755 (executable)
@@ -12,8 +12,6 @@ Source1002:   lib%{name}.manifest
 
 %define BUILD_PROFILE %{?profile}%{!?profile:%{?tizen_profile_name}}
 
-ExcludeArch: aarch64 x86_64
-
 BuildRequires: cmake
 BuildRequires: pkgconfig(gio-2.0)
 BuildRequires: pkgconfig(glib-2.0)