[ekiga/gnome-2-26] Fixed stupid bug where I convert an enum to a pointer starting from zero, while pushing to a functio



commit c45a1a23a57df6c44edfdfa70b22ad70e8e9f450
Author: Julien Puydt <jpuydt src gnome org>
Date:   Wed Apr 15 13:51:10 2009 +0000

    Fixed stupid bug where I convert an enum to a pointer starting from zero, while pushing to a function which doesn't like null pointers
    
    svn path=/trunk/; revision=7858
---
 lib/engine/components/opal/opal-call-manager.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/engine/components/opal/opal-call-manager.cpp b/lib/engine/components/opal/opal-call-manager.cpp
index e9cd11a..af8d878 100644
--- a/lib/engine/components/opal/opal-call-manager.cpp
+++ b/lib/engine/components/opal/opal-call-manager.cpp
@@ -83,7 +83,7 @@ public:
   {
     PSTUNClient::NatTypes result = manager.SetSTUNServer (server);
 
-    g_async_queue_push (queue, GUINT_TO_POINTER (result));
+    g_async_queue_push (queue, GUINT_TO_POINTER ((guint)result + 1));
   };
 
 private:
@@ -706,7 +706,7 @@ CallManager::HandleSTUNResult ()
   if (g_async_queue_length (queue) > 0) {
 
     PSTUNClient::NatTypes result
-      = (PSTUNClient::NatTypes)GPOINTER_TO_UINT (g_async_queue_pop (queue));
+      = (PSTUNClient::NatTypes)(GPOINTER_TO_UINT (g_async_queue_pop (queue))-1);
     got_answer = true;
 
     if (result == PSTUNClient::SymmetricNat



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]