ekiga r6131 - trunk/src/endpoints
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6131 - trunk/src/endpoints
- Date: Sun, 6 Apr 2008 18:50:18 +0100 (BST)
Author: dsandras
Date: Sun Apr 6 18:50:17 2008
New Revision: 6131
URL: http://svn.gnome.org/viewvc/ekiga?rev=6131&view=rev
Log:
Moved some settings from the endpoint to the bridge.
Broke redirection on timeout.
Modified:
trunk/src/endpoints/h323.cpp
trunk/src/endpoints/h323.h
trunk/src/endpoints/opal-gmconf-bridge.cpp
Modified: trunk/src/endpoints/h323.cpp
==============================================================================
--- trunk/src/endpoints/h323.cpp (original)
+++ trunk/src/endpoints/h323.cpp Sun Apr 6 18:50:17 2008
@@ -53,86 +53,11 @@
#define new PNEW
-/* DESCRIPTION : This notifier is called when the config database data
- * associated with the H.245 Tunneling changes.
- * BEHAVIOR : It updates the endpoint.
- * PRE : data is a pointer to the H323EndPoint.
- */
-static void h245_tunneling_changed_nt (G_GNUC_UNUSED gpointer id,
- GmConfEntry *entry,
- gpointer data);
-
-
-
-/* DESCRIPTION : This notifier is called when the config database data
- * associated with the early H.245 key changes.
- * BEHAVIOR : It updates the endpoint.
- * PRE : data is a pointer to the H323EndPoint.
- */
-static void early_h245_changed_nt (G_GNUC_UNUSED gpointer id,
- GmConfEntry *entry,
- gpointer data);
-
-
-
-/* DESCRIPTION : This notifier is called when the config database data
- * associated with the Fast Start changes.
- * BEHAVIOR : It updates the endpoint.
- * PRE : data is a pointer to the H323EndPoint.
- */
-static void fast_start_changed_nt (G_GNUC_UNUSED gpointer id,
- GmConfEntry *entry,
- gpointer data);
-
-
-
-static void
-h245_tunneling_changed_nt (G_GNUC_UNUSED gpointer id,
- GmConfEntry *entry,
- G_GNUC_UNUSED gpointer data)
-{
- GMH323Endpoint *h323EP = (GMH323Endpoint *) data;
-
- if (gm_conf_entry_get_type (entry) == GM_CONF_BOOL) {
-
- h323EP->DisableH245Tunneling (!gm_conf_entry_get_bool (entry));
- }
-}
-
-
-static void
-early_h245_changed_nt (G_GNUC_UNUSED gpointer id,
- GmConfEntry *entry,
- G_GNUC_UNUSED gpointer data)
-{
- GMH323Endpoint *h323EP = (GMH323Endpoint *) data;
-
- if (gm_conf_entry_get_type (entry) == GM_CONF_BOOL) {
-
- h323EP->DisableH245inSetup (!gm_conf_entry_get_bool (entry));
- }
-}
-
-
-static void
-fast_start_changed_nt (G_GNUC_UNUSED gpointer id,
- GmConfEntry *entry,
- G_GNUC_UNUSED gpointer data)
-{
- GMH323Endpoint *h323EP = (GMH323Endpoint *) data;
-
- if (gm_conf_entry_get_type (entry) == GM_CONF_BOOL) {
-
- h323EP->DisableFastStart (!gm_conf_entry_get_bool (entry));
- }
-}
-
-
/* The class */
GMH323Endpoint::GMH323Endpoint (GMManager & ep)
: H323EndPoint (ep), endpoint (ep)
{
- NoAnswerTimer.SetNotifier (PCREATE_NOTIFIER (OnNoAnswerTimeout));
+ SetInitialBandwidth (40000);
}
@@ -141,38 +66,6 @@
}
-void
-GMH323Endpoint::Init ()
-{
- bool early_h245 = FALSE;
- bool h245_tunneling = FALSE;
- bool fast_start = FALSE;
-
- gnomemeeting_threads_enter ();
- fast_start = gm_conf_get_bool (H323_KEY "enable_fast_start");
- h245_tunneling = gm_conf_get_bool (H323_KEY "enable_h245_tunneling");
- early_h245 = gm_conf_get_bool (H323_KEY "enable_early_h245");
- gnomemeeting_threads_leave ();
-
- /* Initialise internal parameters */
- DisableH245Tunneling (!h245_tunneling);
- DisableFastStart (!fast_start);
- DisableH245inSetup (!early_h245);
-
- SetInitialBandwidth (40000);
-
- /* Be notified for configuration changes */
- gm_conf_notifier_add (H323_KEY "enable_h245_tunneling",
- h245_tunneling_changed_nt, this);
-
- gm_conf_notifier_add (H323_KEY "enable_early_h245",
- early_h245_changed_nt, this);
-
- gm_conf_notifier_add (H323_KEY "enable_fast_start",
- fast_start_changed_nt, this);
-}
-
-
bool
GMH323Endpoint::StartListener (PString iface,
WORD port)
@@ -401,7 +294,6 @@
bool res = FALSE;
- int no_answer_timeout = 0;
unsigned reason = 0;
gchar *forward_host = NULL;
@@ -413,8 +305,6 @@
busy_forward = gm_conf_get_bool (CALL_FORWARDING_KEY "forward_on_busy");
always_forward = gm_conf_get_bool (CALL_FORWARDING_KEY "always_forward");
status = gm_conf_get_int (PERSONAL_DATA_KEY "status");
- no_answer_timeout =
- gm_conf_get_int (CALL_OPTIONS_KEY "no_answer_timeout");
gnomemeeting_threads_leave ();
@@ -438,9 +328,6 @@
else
reason = 0; // Ask the user
- if (reason == 0)
- NoAnswerTimer.SetInterval (0, PMIN (no_answer_timeout, 60));
-
res = endpoint.OnIncomingConnection (connection, reason, forward_host);
g_free (forward_host);
@@ -469,8 +356,6 @@
void
GMH323Endpoint::OnEstablished (OpalConnection &connection)
{
- NoAnswerTimer.Stop ();
-
PTRACE (3, "GMSIPEndpoint\t H.323 connection established");
H323EndPoint::OnEstablished (connection);
}
@@ -479,42 +364,6 @@
void
GMH323Endpoint::OnReleased (OpalConnection &connection)
{
- NoAnswerTimer.Stop ();
-
PTRACE (3, "GMSIPEndpoint\t H.323 connection released");
H323EndPoint::OnReleased (connection);
}
-
-
-void
-GMH323Endpoint::OnNoAnswerTimeout (PTimer &,
- INT)
-{
- gchar *forward_host = NULL;
- gboolean forward_on_no_answer = FALSE;
-
- if (endpoint.GetCallingState () == GMManager::Called) {
-
- gnomemeeting_threads_enter ();
- forward_host = gm_conf_get_string (H323_KEY "forward_host");
- forward_on_no_answer =
- gm_conf_get_bool (CALL_FORWARDING_KEY "forward_on_no_answer");
- gnomemeeting_threads_leave ();
-
- if (forward_host && forward_on_no_answer) {
-
- PSafePtr<OpalCall> call =
- endpoint.FindCallWithLock (endpoint.GetCurrentCallToken ());
- PSafePtr<OpalConnection> con =
- endpoint.GetConnection (call, TRUE);
-
- con->ForwardCall (forward_host);
- }
- else
- ClearAllCalls (OpalConnection::EndedByNoAnswer, FALSE);
-
- g_free (forward_host);
- }
-}
-
-
Modified: trunk/src/endpoints/h323.h
==============================================================================
--- trunk/src/endpoints/h323.h (original)
+++ trunk/src/endpoints/h323.h Sun Apr 6 18:50:17 2008
@@ -70,14 +70,6 @@
/* DESCRIPTION : /
- * BEHAVIOR : Init the endpoint internal values and the various
- * components.
- * PRE : /
- */
- void Init ();
-
-
- /* DESCRIPTION : /
* BEHAVIOR : Starts the listener thread on the port choosen
* in the options after having removed old listeners.
* returns TRUE if success and FALSE in case of error.
@@ -179,21 +171,12 @@
private:
-
- /* DESCRIPTION : Notifier called when an incoming call
- * has not been answered in the required time.
- * BEHAVIOR : Reject the call, or forward if forward on no answer is
- * enabled in the config database.
- * PRE : /
- */
- PDECLARE_NOTIFIER(PTimer, GMH323Endpoint, OnNoAnswerTimeout);
-
- PTimer NoAnswerTimer;
-
GMManager & endpoint;
PMutex gk_name_mutex;
PString gk_name;
+
+ std::string forward_uri;
};
#endif
Modified: trunk/src/endpoints/opal-gmconf-bridge.cpp
==============================================================================
--- trunk/src/endpoints/opal-gmconf-bridge.cpp (original)
+++ trunk/src/endpoints/opal-gmconf-bridge.cpp Sun Apr 6 18:50:17 2008
@@ -42,6 +42,7 @@
#include "manager.h"
#include "sip.h"
+#include "h323.h"
using namespace Opal;
@@ -78,6 +79,10 @@
keys.push_back (CALL_FORWARDING_KEY "always_forward");
keys.push_back (CALL_OPTIONS_KEY "no_answer_timeout");
+ keys.push_back (H323_KEY "enable_h245_tunneling");
+ keys.push_back (H323_KEY "enable_early_h245");
+ keys.push_back (H323_KEY "enable_fast_start");
+
load (keys);
}
@@ -233,6 +238,22 @@
}
//
+ // H.323 keys
+ //
+ else if (key == H323_KEY "enable_h245_tunneling") {
+
+ manager.GetH323Endpoint ()->DisableH245Tunneling (!gm_conf_entry_get_bool (entry));
+ }
+ else if (key == H323_KEY "enable_early_h245") {
+
+ manager.GetH323Endpoint ()->DisableH245inSetup (!gm_conf_entry_get_bool (entry));
+ }
+ else if (key == H323_KEY "enable_fast_start") {
+
+ manager.GetH323Endpoint ()->DisableFastStart (!gm_conf_entry_get_bool (entry));
+ }
+
+ //
// NAT related keys
//
else if (key == NAT_KEY "binding_timeout") {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]