From: kmook Date: Thu, 22 Dec 2016 02:31:57 +0000 (+0900) Subject: Fixed build error in aarch64 X-Git-Tag: accepted/tizen/common/20161222.131146^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e79de16d05865066672a2d70ec68c6b99ce03c5;p=platform%2Fcore%2Fconvergence%2Fd2d-conv-manager.git Fixed build error in aarch64 Change-Id: Id2c57f7c86c659e3a604a7166cf4d67feb976fd5 Signed-off-by: kmook --- diff --git a/msf_tizen_client/include/Channel.h b/msf_tizen_client/include/Channel.h index b080f44..b2c6e30 100755 --- a/msf_tizen_client/include/Channel.h +++ b/msf_tizen_client/include/Channel.h @@ -65,8 +65,8 @@ public: private: static void __send_ping_pong(void* data); - static void* startTimer(timer_function function, TimerWorker woker, unsigned int interval, void *data); - static void stopTimer(void *timer); + static int startTimer(timer_function function, TimerWorker woker, unsigned int interval, void *data); + static void stopTimer(int timer); static gboolean __timeout_worker(gpointer ud); long pingTimeout; @@ -77,7 +77,7 @@ private: double average; long longestRT; bool running; - void* pingpongTimer; + int pingpongTimer; }; enum Result_base_Type { diff --git a/msf_tizen_client/src/Channel.cpp b/msf_tizen_client/src/Channel.cpp index f4aa9e7..31979ef 100755 --- a/msf_tizen_client/src/Channel.cpp +++ b/msf_tizen_client/src/Channel.cpp @@ -69,7 +69,7 @@ ChannelConnectionHandler::ChannelConnectionHandler() { startTime = 0; pingSent = 0; average = 0; - pingpongTimer = NULL; + pingpongTimer = 0; } Channel::Channel() { @@ -1641,9 +1641,9 @@ void ChannelConnectionHandler::calculateAverageRT() { void ChannelConnectionHandler::stopPing() { if (running) { MSF_DBG("stopping ping"); - if (pingpongTimer) { + if (pingpongTimer > 0) { stopTimer(pingpongTimer); - pingpongTimer = NULL; + pingpongTimer = 0; } running = false; } @@ -1668,7 +1668,7 @@ void ChannelConnectionHandler::startPing(Channel *ptr) { pingSent = startTime; channel_ptr = ptr; - if (pingpongTimer == NULL) { + if (pingpongTimer <= 0) { pingpongTimer = startTimer(__send_ping_pong, __timeout_worker, pingTimeout/1000, ptr); } } @@ -1688,14 +1688,14 @@ void ChannelConnectionHandler::__send_ping_pong(void* data) ptr->connectionHandler->pingSent = time(0); } - if (ptr->connectionHandler->pingpongTimer != NULL) { + if (ptr->connectionHandler->pingpongTimer > 0) { stopTimer(ptr->connectionHandler->pingpongTimer); - ptr->connectionHandler->pingpongTimer = NULL; + ptr->connectionHandler->pingpongTimer = 0; } ptr->connectionHandler->pingpongTimer = startTimer(__send_ping_pong, __timeout_worker, ptr->connectionHandler->pingTimeout/1000, ptr); } -void* ChannelConnectionHandler::startTimer(timer_function function, TimerWorker woker, unsigned int interval, void *data) +int ChannelConnectionHandler::startTimer(timer_function function, TimerWorker woker, unsigned int interval, void *data) { guint id = 0; GSource *src = NULL; @@ -1712,7 +1712,7 @@ void* ChannelConnectionHandler::startTimer(timer_function function, TimerWorker id = g_source_attach(src, NULL); g_source_unref(src); - return (void*)id; + return id; } gboolean ChannelConnectionHandler::__timeout_worker(gpointer ud) @@ -1724,7 +1724,7 @@ gboolean ChannelConnectionHandler::__timeout_worker(gpointer ud) return false; } -void ChannelConnectionHandler::stopTimer(void *timer) +void ChannelConnectionHandler::stopTimer(int timer) { guint id = (guint) timer; if (id) {