Changeset 3664
- Timestamp:
- 05/14/08 17:17:53
- Files:
-
- trunk/ChangeLog (modified) (11 diffs)
- trunk/libtinymail-camel/tny-camel-queue-priv.h (modified) (1 diff)
- trunk/libtinymail-camel/tny-camel-queue.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r3663 r3664 1 2008-05-14 Philip Van Hoof <pvanhoof@gnome.org> 2 3 * libtinymail-camel/tny-camel-queue.c: Letting the thread wait for 4 more items instead of exiting 5 1 6 2008-05-13 Rob Taylor <rob.taylor@codethink.co.uk> 2 7 … … 484 489 485 490 * Attempt at making mime parsing use the seekable capability of 486 streams in stead of copying them in memory. This is experimental!491 streams instead of copying them in memory. This is experimental! 487 492 488 493 2008-03-04 Philip Van Hoof <pvanhoof@gnome.org> … … 906 911 907 912 * Code robustness 908 * Changed the account item of a folder to be hard referenced in stead913 * Changed the account item of a folder to be hard referenced instead 909 914 of weakly 910 915 … … 1033 1038 2007-12-12 Philip Van Hoof <pvanhoof@gnome.org> 1034 1039 1035 * Experimental appending in stead of rewriting the summary.mmap1040 * Experimental appending instead of rewriting the summary.mmap 1036 1041 1037 1042 2007-12-11 Philip Van Hoof <pvanhoof@gnome.org> … … 1334 1339 observers 1335 1340 * Cyclic references fix. tny_folder_store_add_observer and 1336 tny_folder_add_observer no longer add strong references, in stead they1341 tny_folder_add_observer no longer add strong references, instead they 1337 1342 add weak references 1338 1343 … … 1340 1345 root folder C, and then move A into B, that A would only become a 1341 1346 subfolder of B after you restart the application. The problem was that 1342 A and B got created with _tny_camel_folder_new in stead of the1347 A and B got created with _tny_camel_folder_new instead of the 1343 1348 tny_camel_store_account_factor_folder. This made the observers 1344 1349 infrastructure of the model confuse when a new list of folder was … … 1348 1353 1349 1354 For future, let's be extremely careful not to use 1350 _tny_camel_folder_new but in stead to make sure that the factory is1355 _tny_camel_folder_new but instead to make sure that the factory is 1351 1356 always used. 1352 1357 … … 1526 1531 1527 1532 * Fixed regression on the regression fix of a few days ago :) 1528 * Renamed Maildir filenames to have '!' in stead of '_' or ':' in1533 * Renamed Maildir filenames to have '!' instead of '_' or ':' in 1529 1534 their filenames 1530 1535 … … 3149 3154 * Support for tny_header_get_uid on TnyMsg's header instance 3150 3155 * Removed the warning in libtinymail/tny-folder.c: please use the 3151 support for DBC in stead. It's specifically designed for this. Read3156 support for DBC instead. It's specifically designed for this. Read 3152 3157 the documentation in building.txt to find out how to enable it. 3153 3158 … … 4775 4780 consumption on initial download of both IMAP and NNTP folders. 4776 4781 * libtinymail-gnome-desktop: Default status of the device is now 4777 offline in stead of online (for example in case network manager4782 offline instead of online (for example in case network manager 4778 4783 installation was invalid or not found) 4779 4784 * Bugfix reported by Nitin.Mahajan@nokia.com … … 4788 4793 4789 4794 * libtinymail-camel/camel-lite: Allocation of the CamelFolderInfo is 4790 now with GSlice in stead of many different malloc ways. This one needs4795 now with GSlice instead of many different malloc ways. This one needs 4791 4796 testing! 4792 4797 trunk/libtinymail-camel/tny-camel-queue-priv.h
r3102 r3664 46 46 GList *list; 47 47 GThread *thread; 48 GCond *condition; 49 GMutex *mutex; 50 gboolean is_waiting; 48 51 GStaticRecMutex *lock; 49 52 gboolean stopped, next_uncancel; trunk/libtinymail-camel/tny-camel-queue.c
r3499 r3664 52 52 self->list = NULL; 53 53 g_static_rec_mutex_unlock (self->lock); 54 55 g_cond_free (self->condition); 56 g_mutex_free (self->mutex); 54 57 55 58 /* g_static_rec_mutex_free (self->lock); */ … … 167 170 GList *first = NULL; 168 171 QueueItem *item = NULL; 169 gboolean deleted = FALSE ;172 gboolean deleted = FALSE, wait = FALSE; 170 173 171 174 g_static_rec_mutex_lock (queue->lock); … … 184 187 queue->current = item; 185 188 } else 186 queue->stopped= TRUE;189 wait = TRUE; 187 190 g_static_rec_mutex_unlock (queue->lock); 188 191 … … 234 237 queue->current = NULL; 235 238 236 if (g_list_length (queue->list) == 0) { 237 queue->thread = NULL; 238 queue->stopped = TRUE; 239 } 239 if (g_list_length (queue->list) == 0) 240 wait = TRUE; 240 241 g_static_rec_mutex_unlock (queue->lock); 241 242 242 243 if (item) 243 244 g_slice_free (QueueItem, item); 245 246 if (wait) { 247 g_mutex_lock (queue->mutex); 248 queue->is_waiting = TRUE; 249 g_cond_wait (queue->condition, queue->mutex); 250 queue->is_waiting = FALSE; 251 g_mutex_unlock (queue->mutex); 252 } 244 253 } 245 254 … … 410 419 queue->stopped = TRUE; 411 420 } 421 } else { 422 g_mutex_lock (queue->mutex); 423 //if (queue->is_waiting) 424 g_cond_broadcast (queue->condition); 425 g_mutex_unlock (queue->mutex); 412 426 } 413 427 … … 465 479 TnyCamelQueue *self = (TnyCamelQueue*)instance; 466 480 481 self->is_waiting = FALSE; 482 self->mutex = g_mutex_new (); 483 self->condition = g_cond_new (); 467 484 self->account = NULL; 468 485 self->stopped = TRUE; 469 486 self->list = NULL; 487 488 /* We don't use a GThreadPool because we need control over the queued 489 * items: we must remove them sometimes for example. */ 490 470 491 self->thread = NULL; 471 492 self->lock = g_new0 (GStaticRecMutex, 1);
