[ekiga/gnome-2-26] Fixed crash when accepting a call



commit 3e9fd667d25d671aa79b226f21d957abe7b9b688
Author: Robert Jongbloed <robertj voxlucida com au>
Date:   Thu Jun 4 10:27:23 2009 +0200

    Fixed crash when accepting a call
    
    Closes bug 578534.
---
 lib/engine/components/opal/opal-call.cpp |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/lib/engine/components/opal/opal-call.cpp b/lib/engine/components/opal/opal-call.cpp
index 0588939..ec1eb5e 100644
--- a/lib/engine/components/opal/opal-call.cpp
+++ b/lib/engine/components/opal/opal-call.cpp
@@ -112,20 +112,10 @@ Opal::Call::hangup ()
 void
 Opal::Call::answer ()
 {
-  PSafePtr<OpalConnection> connection = NULL;
-  int i = 0;
-
   if (!is_outgoing () && !IsEstablished ()) {
-
-    do {
-
-      connection = GetConnection (i);
-      i++;
-    }  while (!PIsDescendant(&(*connection), OpalPCSSConnection));
-
-    if (PIsDescendant(&(*connection), OpalPCSSConnection)) {
-      PDownCast (OpalPCSSConnection, &(*connection))->AcceptIncoming ();
-    }
+    PSafePtr<OpalPCSSConnection> connection = GetConnectionAs<OpalPCSSConnection>();
+    if (connection != NULL)
+      connection->AcceptIncoming();
   }
 }
 



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