Fixed build error in aarch64 02/106502/1 accepted/tizen/common/20161222.131146 accepted/tizen/mobile/20161223.095046 accepted/tizen/tv/20161223.095108 accepted/tizen/wearable/20161223.095123 submit/tizen/20161222.023827
authorkmook <kmook.choi@samsung.com>
Thu, 22 Dec 2016 02:31:57 +0000 (11:31 +0900)
committerkmook <kmook.choi@samsung.com>
Thu, 22 Dec 2016 02:31:57 +0000 (11:31 +0900)
Change-Id: Id2c57f7c86c659e3a604a7166cf4d67feb976fd5
Signed-off-by: kmook <kmook.choi@samsung.com>
msf_tizen_client/include/Channel.h
msf_tizen_client/src/Channel.cpp

index b080f44..b2c6e30 100755 (executable)
@@ -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 {
index f4aa9e7..31979ef 100755 (executable)
@@ -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) {