[ekiga] Further advance ekiga IPv6 compatibility



commit 359d13dba48d969be2e8f6b1b54d8a6b09017afa
Author: Jacek Konieczny <jajcus jajcus net>
Date:   Wed May 4 21:13:30 2011 +0200

    Further advance ekiga IPv6 compatibility
    
    Taken from bug #331041.

 lib/engine/components/opal/opal-call-manager.cpp |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-call-manager.cpp b/lib/engine/components/opal/opal-call-manager.cpp
index 8df4a4e..762fd6c 100644
--- a/lib/engine/components/opal/opal-call-manager.cpp
+++ b/lib/engine/components/opal/opal-call-manager.cpp
@@ -49,6 +49,8 @@
 #include "call-manager.h"
 #include "form-request-simple.h"
 
+#include <stdlib.h>
+
 static  bool same_codec_desc (Ekiga::CodecDescription a, Ekiga::CodecDescription b)
 {
   return (a.name == b.name && a.rate == b.rate);
@@ -99,8 +101,17 @@ using namespace Opal;
 CallManager::CallManager (Ekiga::ServiceCore & _core)
   : core (_core)
 {
-  /* Initialise the endpoint paramaters */
+  /* Initialise the endpoint parameters */
+#if P_HAS_IPV6
+  char * ekiga_ipv6 = getenv("EKIGA_IPV6");
+  // use IPv6 instead of IPv4 if EKIGA_IPV6 env var is set
+  if (ekiga_ipv6 && PIPSocket::IsIpAddressFamilyV6Supported())
+    PIPSocket::SetDefaultIpAddressFamilyV6();
+  else
+    PIPSocket::SetDefaultIpAddressFamilyV4();
+#else
   PIPSocket::SetDefaultIpAddressFamilyV4();
+#endif
   SetAutoStartTransmitVideo (true);
   SetAutoStartReceiveVideo (true);
   SetUDPPorts (5000, 5100);



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