[ekiga] Fix pre-fill account name and password in assistant



commit 6dde98b24f1eefa9d9aae11a3b8e187e8146211c
Author: Eugen Dedu <Eugen Dedu pu-pm univ-fcomte fr>
Date:   Mon Jun 7 12:01:00 2010 +0200

    Fix pre-fill account name and password in assistant
    
    Fixes bug #620796.

 lib/engine/components/opal/opal-bank.cpp |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-bank.cpp b/lib/engine/components/opal/opal-bank.cpp
index 6d1d673..21af35a 100644
--- a/lib/engine/components/opal/opal-bank.cpp
+++ b/lib/engine/components/opal/opal-bank.cpp
@@ -225,19 +225,15 @@ Opal::AccountPtr
 Opal::Bank::find_account (const std::string& aor)
 {
   AccountPtr result;
-  bool found = false;
 
   for (iterator iter = begin ();
-       !found && iter != end ();
+       iter != end ();
        ++iter) {
-
-    if ((*iter)->get_aor () == aor) {
-
-      found = true;
-      result = *iter;
-    }
+    if (aor.find ("@") != std::string::npos && (*iter)->get_aor () == aor)  // find by account name+host (aor)
+        return *iter;
+    else if ((*iter)->get_host () == aor)  // find by host
+      return *iter;
   }
-
   return result;
 }
 



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