$OpenBSD: patch-lib_engine_components_opal_opal-account_cpp,v 1.1 2011/10/29 08:37:40 ajacoutot Exp $

From 804e7a10dff32003d2059b56e185551d9b7e8859 Mon Sep 17 00:00:00 2001
From: Julien Puydt <jpuydt@newton.localdomain>
Date: Sat, 24 Sep 2011 12:46:57 +0000
Subject: Made the opal accounts only signal failed registrations on the first failure ; further retries won't be repeated

--- lib/engine/components/opal/opal-account.cpp.orig	Fri Jul 29 13:49:25 2011
+++ lib/engine/components/opal/opal-account.cpp	Fri Oct 28 15:44:54 2011
@@ -66,6 +66,7 @@ Opal::Account::Account (Ekiga::ServiceCore & _core,
   dead = false;
   state = Unregistered;
   message_waiting_number = 0;
+  failed_registration_already_notified = false;
 
   int i = 0;
   char *pch = strtok ((char *) account.c_str (), "|");
@@ -164,6 +165,7 @@ Opal::Account::Account (Ekiga::ServiceCore & _core,
   password = _password;
   timeout = _timeout;
   type = t;
+  failed_registration_already_notified = false;
 
   setup_presentity ();
 
@@ -552,6 +554,7 @@ Opal::Account::handle_registration_event (Registration
       if (presence_core && personal_details)
 	presence_core->publish (personal_details);
       state = state_;
+      failed_registration_already_notified = false;
       updated ();
     }
     break;
@@ -559,6 +562,8 @@ Opal::Account::handle_registration_event (Registration
   case Unregistered:
 
     status = _("Unregistered");
+    failed_registration_already_notified = false;
+
     updated ();
     /* delay destruction of this account until the
        unsubscriber thread has called back */
@@ -569,6 +574,7 @@ Opal::Account::handle_registration_event (Registration
   case UnregistrationFailed:
 
     status = _("Could not unregister");
+    failed_registration_already_notified = false;
     if (!info.empty ())
       status = status + " (" + info + ")";
     updated ();
