----------  Forwarded Message  ----------

Subject: Re: [Licq-devel] Licq Lockup
Date: Sunday 05 October 2003 14:18
From: "Juan F. Codagnone" <[EMAIL PROTECTED]>
To: "Udo A. Steinberg" <[EMAIL PROTECTED]>, Licq Development Mailing 
List <[EMAIL PROTECTED]>

On Tuesday 30 September 2003 23:29, Udo A. Steinberg wrote:
> Afterwards my licq locks up.
>
> Does anyone else experience the same behaviour?
>
> -Udo.

The attached patch fixs that. It may not apply cleanly to cvs.

Regards,
        Juan.

--
Buenos Aires, Argentina                         20°C with winds at 11 km/h
 NNE

-------------------------------------------------------



-- 
Buenos Aires, Argentina                           15°C with winds at 3 km/h SW
Index: usereventdlg.cpp
===================================================================
--- usereventdlg.cpp	(revision 3464)
+++ usereventdlg.cpp	(working copy)
@@ -1995,10 +1995,17 @@
 
 //-----UserSendCommon::checkSecure-------------------------------------------
 bool UserSendCommon::checkSecure()
-{
+{ 
+  int secure;
+  bool send_ok = true;
   ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_R);
-  bool send_ok = true;
-  if (chkSendServer->isChecked() && ( u->Secure() || u->AutoSecure()) )
+  
+  if( u == 0 )
+    return false;
+  secure =  u->Secure() || u->AutoSecure();
+  gUserManager.DropUser(u);
+  
+  if (chkSendServer->isChecked() && secure )
   {
     if (!QueryUser(this, tr("Warning: Message can't be sent securely\n"
                              "through the server!"),
@@ -2007,9 +2014,14 @@
       send_ok = false;
     }
     else
-      u->SetAutoSecure( false );
+    { 
+      ICQUser *u = gUserManager.FetchUser(m_szId, m_nPPID, LOCK_R);
+      if( u )
+         u->SetAutoSecure( false );
+      gUserManager.DropUser(u);
+    }
   }
-  gUserManager.DropUser(u);
+  
   return send_ok;
 }
 

Attachment: pgp00000.pgp
Description: signature

Reply via email to