Changeset 2524
- Timestamp:
- 07/27/07 19:41:54
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/pvanhoof/sessionwork/libtinymail-camel/tny-camel-folder.c
r2521 r2524 4247 4247 gint unread; 4248 4248 gint total; 4249 4250 GCond* condition;4251 gboolean had_callback;4252 GMutex *mutex;4253 4254 4249 } PokeStatusInfo; 4255 4250 … … 4290 4285 g_object_unref (info->self); 4291 4286 4292 g_mutex_lock (info->mutex); 4293 g_cond_broadcast (info->condition); 4294 info->had_callback = TRUE; 4295 g_mutex_unlock (info->mutex); 4287 g_slice_free (PokeStatusInfo, info); 4296 4288 } 4297 4289 … … 4332 4324 info->self = TNY_FOLDER (g_object_ref (folder)); 4333 4325 4334 info->mutex = g_mutex_new ();4335 info->condition = g_cond_new ();4336 info->had_callback = FALSE;4337 4326 4338 4327 g_idle_add_full (G_PRIORITY_HIGH, 4339 4328 tny_camel_folder_poke_status_callback, 4340 4329 info, tny_camel_folder_poke_status_destroyer); 4341 4342 4343 /* Wait on the queue for the mainloop callback to be finished */4344 g_mutex_lock (info->mutex);4345 if (!info->had_callback)4346 g_cond_wait (info->condition, info->mutex);4347 g_mutex_unlock (info->mutex);4348 4349 g_mutex_free (info->mutex);4350 g_cond_free (info->condition);4351 4352 g_slice_free (PokeStatusInfo, info);4353 4330 4354 4331 } else if (info) … … 4406 4383 tny_camel_folder_poke_status_callback, info, 4407 4384 tny_camel_folder_poke_status_destroyer); 4385 4408 4386 } 4409 4387
