[evolution-patches] patch for bug #62866 calendar



Hi,
  Have attached the patch which solves this bug. The status ("Opening
groupwise://... " is not updated because the async_auth_idle_cb signals
the condition ccad->cond (e-cal.c :1622) even before the execution of
g_cond_wait in async_auth_func_cb. So the thread remains locked in the
g_cond_wait in async_auth_func_cb and the current operation of e_cal is
shown always busy. Even if the account is diabled and enabled again, the
ecal->priv->current_op will not be NULL and so e-cal.c will send back an
error message E_CALENDAR_STATUS_BUSY. The whole thing is timing issue,
does not happen every time.

thanks, chenthill.

? patch_60265.diff
? patch_62866.diff
? backends/groupwise/.e-cal-backend-groupwise.c.swp
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.308
diff -u -r1.308 ChangeLog
--- ChangeLog	10 Aug 2004 15:19:44 -0000	1.308
+++ ChangeLog	12 Aug 2004 13:26:27 -0000
@@ -1,3 +1,12 @@
+2004-08-12  Chenthill Palanisamy <pchenthill novell com>
+
+	Fixes #62866
+
+	* libecal/e-cal.c (async_auth_func_cb): removed the function
+	async_auth_idle_cb since it resulted in dead lock of the 
+	thread and made the call for authentication from this function
+	itself.
+
 2004-08-09  Jeffrey Stedfast  <fejj novell com>
 
 	Fixes bug #58150
Index: libecal/e-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.c,v
retrieving revision 1.70
diff -u -r1.70 e-cal.c
--- libecal/e-cal.c	10 Aug 2004 15:19:44 -0000	1.70
+++ libecal/e-cal.c	12 Aug 2004 13:26:31 -0000
@@ -1613,19 +1613,6 @@
 } ECalAsyncData;
 
 static gboolean
-async_auth_idle_cb (gpointer data)
-{
-	ECalAsyncData *ccad = data;
-
-	g_mutex_lock (ccad->mutex);
-	ccad->password = ccad->real_auth_func (ccad->ecal, ccad->auth_prompt, ccad->auth_key, ccad->real_auth_user_data);
-	g_cond_signal (ccad->cond);
-	g_mutex_unlock (ccad->mutex);
-	
-	return FALSE;
-}
-
-static gboolean
 async_signal_idle_cb (gpointer data)
 {
 	ECalAsyncData *ccad = data;
@@ -1652,14 +1639,8 @@
 
 	ccad->auth_prompt = prompt;
 	ccad->auth_key = key;
-
-	g_idle_add ((GSourceFunc) async_auth_idle_cb, ccad);
 		
-	g_mutex_lock (ccad->mutex);
-	g_cond_wait (ccad->cond, ccad->mutex);
-	password = ccad->password;
-	ccad->password = NULL;
-	g_mutex_unlock (ccad->mutex);	
+	password = ccad->real_auth_func (ccad->ecal, ccad->auth_prompt, ccad->auth_key, ccad->real_auth_user_data);
 
 	return password;
 }


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