ekiga r7295 - in trunk: . src/endpoints
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7295 - in trunk: . src/endpoints
- Date: Mon, 27 Oct 2008 21:25:30 +0000 (UTC)
Author: dsandras
Date: Mon Oct 27 21:25:29 2008
New Revision: 7295
URL: http://svn.gnome.org/viewvc/ekiga?rev=7295&view=rev
Log:
Do not answer or hangup calls in a separate thread, or cancelling an
outgoing call before it gets established won't work.
Modified:
trunk/ChangeLog
trunk/src/endpoints/opal-call.cpp
trunk/src/endpoints/opal-call.h
Modified: trunk/src/endpoints/opal-call.cpp
==============================================================================
--- trunk/src/endpoints/opal-call.cpp (original)
+++ trunk/src/endpoints/opal-call.cpp Mon Oct 27 21:25:29 2008
@@ -90,18 +90,31 @@
void
Opal::Call::hangup ()
{
- PThread::Create (PCREATE_NOTIFIER (OnHangup), NULL,
- PThread::AutoDeleteThread, PThread::NormalPriority,
- "Opal::Call Answer Thread");
+ if (!is_outgoing () && !IsEstablished ())
+ Clear (OpalConnection::EndedByAnswerDenied);
+ else
+ Clear ();
}
void
Opal::Call::answer ()
{
- PThread::Create (PCREATE_NOTIFIER (OnAnswer), NULL,
- PThread::AutoDeleteThread, PThread::NormalPriority,
- "Opal::Call Answer Thread");
+ 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 ();
+ }
+ }
}
@@ -631,37 +644,6 @@
void
-Opal::Call::OnAnswer (PThread &, INT /*param*/)
-{
- 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 ();
- }
- }
-}
-
-
-void
-Opal::Call::OnHangup (PThread &, INT /*param*/)
-{
- if (!is_outgoing () && !IsEstablished ())
- Clear (OpalConnection::EndedByAnswerDenied);
- else
- Clear ();
-}
-
-
-void
Opal::Call::OnNoAnswerTimeout (PTimer &,
INT)
{
Modified: trunk/src/endpoints/opal-call.h
==============================================================================
--- trunk/src/endpoints/opal-call.h (original)
+++ trunk/src/endpoints/opal-call.h Mon Oct 27 21:25:29 2008
@@ -190,11 +190,6 @@
PBoolean OnAlerting (OpalConnection & connection);
- PDECLARE_NOTIFIER (PThread, Opal::Call, OnAnswer);
-
- PDECLARE_NOTIFIER (PThread, Opal::Call, OnHangup);
-
-
/*
* Helper methods
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]