[ekiga] Fixed crashes shown as assertion failed in /usr/include/ptlib/safecoll.h:813
- From: Eugen Dedu <ededu src gnome org>
- To: svn-commits-list gnome org
- Subject: [ekiga] Fixed crashes shown as assertion failed in /usr/include/ptlib/safecoll.h:813
- Date: Tue, 21 Jul 2009 10:24:33 +0000 (UTC)
commit a9853ead89a41c3a7a38a47d98cb98894ac89fb9
Author: Eugen Dedu <Eugen Dedu pu-pm univ-fcomte fr>
Date: Tue Jul 21 12:23:41 2009 +0200
Fixed crashes shown as assertion failed in /usr/include/ptlib/safecoll.h:813
The fix is the same as 43c6c4, but in other places in the source code.
The crash was 100% reproducible: Start ekiga, wait until it registers.
Add in the URI echo ekiga net, call, you receive an error. Go with
cursor in the URI, remove echo, type 500, but immediately after typing
5, there is crash.
lib/engine/components/opal/opal-call.cpp | 54 +++--------------------------
1 files changed, 6 insertions(+), 48 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-call.cpp b/lib/engine/components/opal/opal-call.cpp
index c1501dc..ca87a54 100644
--- a/lib/engine/components/opal/opal-call.cpp
+++ b/lib/engine/components/opal/opal-call.cpp
@@ -142,16 +142,7 @@ Opal::Call::answer ()
void
Opal::Call::transfer (std::string uri)
{
- PSafePtr<OpalConnection> connection = NULL;
-
- int i = 0;
-
- do {
-
- connection = GetConnection (i);
- i++;
- } while (PIsDescendant(&(*connection), OpalPCSSConnection));
-
+ PSafePtr<OpalPCSSConnection> connection = GetConnectionAs<OpalPCSSConnection>();
if (connection)
connection->TransferConnection (uri);
}
@@ -160,17 +151,8 @@ Opal::Call::transfer (std::string uri)
void
Opal::Call::toggle_hold ()
{
- PSafePtr<OpalConnection> connection = NULL;
-
bool on_hold = false;
- int i = 0;
-
- do {
-
- connection = GetConnection (i);
- i++;
- } while (PIsDescendant(&(*connection), OpalPCSSConnection));
-
+ PSafePtr<OpalPCSSConnection> connection = GetConnectionAs<OpalPCSSConnection>();
if (connection) {
on_hold = connection->IsConnectionOnHold ();
@@ -186,20 +168,12 @@ void
Opal::Call::toggle_stream_pause (StreamType type)
{
OpalMediaStreamPtr stream = NULL;
- PSafePtr<OpalConnection> connection = NULL;
PString codec_name;
std::string stream_name;
bool paused = false;
- int i = 0;
-
- do {
-
- connection = GetConnection (i);
- i++;
- } while (PIsDescendant(&(*connection), OpalPCSSConnection));
-
+ PSafePtr<OpalPCSSConnection> connection = GetConnectionAs<OpalPCSSConnection>();
if (connection != NULL) {
stream = connection->GetMediaStream ((type == Audio) ? OpalMediaType::Audio () : OpalMediaType::Video (), false);
@@ -222,16 +196,7 @@ Opal::Call::toggle_stream_pause (StreamType type)
void
Opal::Call::send_dtmf (const char dtmf)
{
- PSafePtr<OpalConnection> connection = NULL;
-
- int i = 0;
-
- do {
-
- connection = GetConnection (i);
- i++;
- } while (PIsDescendant(&(*connection), OpalPCSSConnection));
-
+ PSafePtr<OpalPCSSConnection> connection = GetConnectionAs<OpalPCSSConnection>();
if (connection != NULL)
connection->SendUserInputTone (dtmf, 180);
}
@@ -665,19 +630,12 @@ void
Opal::Call::OnNoAnswerTimeout (PTimer &,
INT)
{
- PSafePtr<OpalConnection> connection = NULL;
- int i = 0;
-
if (!is_outgoing ()) {
if (!forward_uri.empty ()) {
- do {
- connection = GetConnection (i);
- i++;
- } while (PIsDescendant(&(*connection), OpalPCSSConnection));
-
- if (!PIsDescendant(&(*connection), OpalPCSSConnection))
+ PSafePtr<OpalPCSSConnection> connection = GetConnectionAs<OpalPCSSConnection>();
+ if (connection != NULL)
connection->ForwardCall (forward_uri);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]