ekiga r6029 - in trunk: . src/endpoints



Author: dsandras
Date: Tue Mar  4 20:22:12 2008
New Revision: 6029
URL: http://svn.gnome.org/viewvc/ekiga?rev=6029&view=rev

Log:
Some cleanups. Fixed on-the-fly account registration until it is moved
to the engine.


Modified:
   trunk/ChangeLog
   trunk/src/endpoints/accountshandler.cpp
   trunk/src/endpoints/sip.cpp

Modified: trunk/src/endpoints/accountshandler.cpp
==============================================================================
--- trunk/src/endpoints/accountshandler.cpp	(original)
+++ trunk/src/endpoints/accountshandler.cpp	Tue Mar  4 20:22:12 2008
@@ -121,54 +121,39 @@
 
   g_slist_foreach (defined_accounts, (GFunc) gm_account_delete, NULL);
   g_slist_free (defined_accounts);
-}
-
-
-/*
-void GMAccountsEndpoint::PublishPresence (guint status)
-{
-  GSList *defined_accounts = NULL;
-  GSList *accounts_iter = NULL;
-
-  GmAccount *list_account = NULL;
 
-  gchar *aor = NULL;
+  while (active) {       
 
-  PWaitAndSignal m(publishers_mutex);
-  
-  defined_accounts = gnomemeeting_get_accounts_list ();
-  accounts_iter = defined_accounts;
-  while (accounts_iter) {
+    accounts_mutex.Wait ();     
+    accounts_iter = accounts;   
+    while (accounts_iter) {     
 
-    if (accounts_iter->data) {
+      if (accounts_iter->data) {        
 
-      list_account = GM_ACCOUNT (accounts_iter)->data;
+        list_account = GM_ACCOUNT (accounts_iter)->data;        
 
-      if (list_account->protocol_name
-          && list_account->enabled
-          && !strcmp (list_account->protocol_name, "SIP")) {
+        /* Register SIP account */      
+        if (list_account->protocol_name) {      
 
-        if (PString (list_account->username).Find("@") != P_MAX_INDEX)
-          aor = g_strdup (list_account->username);
-        else
-          aor = g_strdup_printf ("%s %s", 
-                                 list_account->username, 
-                                 list_account->host);
+          if (!strcmp (list_account->protocol_name, "SIP"))     
+            SIPRegister (list_account);         
+          else          
+            H323Register (list_account);        
+        }       
+      }         
 
-        publishers += aor;
-        publishers_status += status;
+      accounts_iter = g_slist_next (accounts_iter);     
+    }   
 
-        g_free (aor);
-      }
-    }
+    g_slist_foreach (accounts, (GFunc) gm_account_delete, NULL);        
+    g_slist_free (accounts);    
+    accounts = NULL;    
+    accounts_mutex.Signal ();   
 
-    accounts_iter = g_slist_next (accounts_iter);
+    PThread::Sleep (100);       
   }
-
-  g_slist_foreach (defined_accounts, (GFunc) gm_account_delete, NULL);
-  g_slist_free (defined_accounts);
 }
-*/
+
 
 void GMAccountsEndpoint::RegisterAccount (GmAccount *account)
 {

Modified: trunk/src/endpoints/sip.cpp
==============================================================================
--- trunk/src/endpoints/sip.cpp	(original)
+++ trunk/src/endpoints/sip.cpp	Tue Mar  4 20:22:12 2008
@@ -249,7 +249,6 @@
     data += "</tuple>\r\n";
     data += "</presence>\r\n";
     Publish (to.c_str (), data, 500); // TODO: allow to change the 500 
-    std::cout << "hey" << data << std::endl << std::flush;
   }
 }
 



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