Changeset 3702
- Timestamp:
- 06/20/08 09:10:59
- Files:
-
- trunk/ChangeLog (modified) (58 diffs)
- trunk/libtinymail/tny-cached-file-stream.c (modified) (1 diff)
- trunk/libtinymail/tny-cached-file.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r3701 r3702 1 2008-06-20 Jose Dapena Paz <jdapena@igalia.com> 2 3 * libtinymail/tny-cached-file-stream.c: 4 Linked the reset implementation to the stream interface. 5 6 * libtinymail/tny-cached-file.c: 7 Create the files synchronously, to avoid accessing the file from other 8 thread if this has not been created yet. 9 10 * Changelog: removed many end-of-line whitespaces. 11 1 12 2008-06-18 Jose Dapena Paz <jdapena@igalia.com> 2 13 … … 38 49 39 50 2008-06-05 Mark Doffman <mark.doffman@codethink.co.uk> 40 41 * bindings/python/* 51 52 * bindings/python/* 42 53 Update .override and .defs files to reflect changes 43 54 in tinymail interfaces. … … 56 67 57 68 * camel/providers/pop3/camel-pop3-store.c (connect_to_server): 58 fixed a crash when there is a connection problem related to TLS 69 fixed a crash when there is a connection problem related to TLS 59 70 60 71 2008-06-03 Jose Dapena Paz <jdapena@igalia.com> … … 108 119 directory (the one on top of cur, new and tmp). 109 120 110 >>>>>>> .r3690111 121 2008-05-26 Philip Van Hoof <pvanhoof@gnome.org> 112 122 … … 391 401 makes you can manage certificates using the maemo tablet certificate 392 402 manager. 393 403 394 404 * libtinymail-camel/camel-lite/camel/camel-certdb.h, 395 405 libtinymail-camel/camel-lite/camel/camel-private.h: modified to 396 406 have a pointer to the CST object in certdb and certificate id in 397 407 certificate object in case we compile with CST support. 398 408 399 409 * libtinymail-camel/camel-lite/camel/camel-tcp-stream-ssl.c: 400 410 Modified a bit the code for proper integration with cst (mainly 401 411 removing direct access to internal fields). 402 412 403 413 * libtinymail-camel/camel-lite/configure.ac, 404 414 libtinymail-camel/camel-lite/camel/Makefile.am: … … 789 799 libtinymail-camel/camel-lite/camel/camel-store-summary.c: 790 800 Added the proper error codes when there is no enough space left on 791 devices 801 devices 792 802 793 803 2008-01-29 Philip Van Hoof <pvanhoof@gnome.org> … … 810 820 2008-01-27 Philip Van Hoof <pvanhoof@gnome.org> 811 821 812 * Various code improvements 822 * Various code improvements 813 823 * Merged camel-lite with upstream camel revision 8428 814 824 … … 871 881 872 882 2008-01-21 Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com> 873 883 874 884 * fix freeing uninitialized data in camel-imap-folder.c 875 885 … … 930 940 931 941 * fix for use of unitialized variable in decode_it function, 932 which caused crashes in some cases. 942 which caused crashes in some cases. 933 943 934 944 2008-01-15 Sergio Villar Senin <svillar@igalia.com> … … 968 978 969 979 * Merged camel-lite with Camel upstream rev. 8360 970 * Added an extra check around a strcmp that seems to have caused a 980 * Added an extra check around a strcmp that seems to have caused a 971 981 crash once 972 982 * Size determining when adding items to a local maildir folder … … 987 997 988 998 2008-01-10 Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com> 989 999 990 1000 * libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store-summary: 991 1001 fix typo in camel-imap-store-summary.c which caused valgrind errors … … 998 1008 999 1009 2008-01-09 Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com> 1000 1010 1001 1011 * small fixes / cleanups for tny-maemo-conic-device 1002 1012 … … 1069 1079 1070 1080 * libtinymail-camel/camel-lite/camel/providers/imap/camel- 1071 imap-command.c: (camel_imap_command_response): Set an initial 1081 imap-command.c: (camel_imap_command_response): Set an initial 1072 1082 value to variable len 1073 1083 * libtinymail/tny-store-acount.c: … … 1151 1161 1152 1162 * libtinymail-camel/tny-camel-mime-part.c 1153 (tny_camel_mime_part_new): Fixed a memory leak 1163 (tny_camel_mime_part_new): Fixed a memory leak 1154 1164 1155 1165 2007-12-13 Felipe Erias Morandeira <femorandeira@igalia.com> … … 1179 1189 can be added with g_object_ref or a weak reference. 1180 1190 * libtinymail-camel/tny-camel-folder.c: now the TnyCamelHeader we 1181 use to retrieve the message in find_msg is constructed from summary. 1191 use to retrieve the message in find_msg is constructed from summary. 1182 1192 This is created in a way it's persistent, and then, we can access 1183 1193 properly to the summary flags. We also eturn null and set error if … … 1205 1215 1206 1216 * libtinymail-camel/tny-camel-folder.c: 1207 Fixed an small leak when notifying folder observers 1217 Fixed an small leak when notifying folder observers 1208 1218 * libtinymail/tny-folder.[ch] 1209 1219 libtinymail/tny-shared.h … … 1215 1225 2007-12-09 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> 1216 1226 1217 * optimization :) for NULL strings in decode_it 1227 * optimization :) for NULL strings in decode_it 1218 1228 1219 1229 2007-12-08 Jürg Billeter <j@bitron.ch> … … 1268 1278 1269 1279 * Merge from devel/pvanhoof/bs branch 1270 1280 1271 1281 2007-11-30 Philip Van Hoof <pvanhoof@gnome.org> 1272 1282 … … 1299 1309 1300 1310 2007-11-26 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> 1301 1311 1302 1312 * add a dummy conic device, so libtinymail-maemo does 1303 1313 not require libconic anymore … … 1471 1481 2007-11-09 Sergio Villar Senin <svillar@igalia.com> 1472 1482 1473 * libtinymail-maemo/tny-maemo-conic-device.c: 1483 * libtinymail-maemo/tny-maemo-conic-device.c: 1474 1484 Added a new API to allow asynchronous connections 1475 1485 in the Maemo conic device. This patch is a new version of an initial … … 1477 1487 Splitted the Maemo connic device in two files, one for the actual 1478 1488 device and the other one for a dummy device (useful for sbox devel) 1479 Fixed a problem when linking the maemo conic device 1480 1489 Fixed a problem when linking the maemo conic device 1490 1481 1491 2007-11-08 Jose Dapena Paz <jdapena@igalia.com> 1482 1492 … … 1533 1543 1534 1544 2007-11-05 Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com> 1535 1545 1536 1546 * Don't leak an fp in md5_get_digest_from_file 1537 1547 … … 1546 1556 1547 1557 * Bugfix when renaming or moving a local folder. Not all of its sub- 1548 folders where recreated (if the flags where 0, CamelStore's 1558 folders where recreated (if the flags where 0, CamelStore's 1549 1559 camel_store_get_folder_info returned an iter with only one child in it. 1550 1560 Either it should return no childs or all childs. I adapted Tinymail to … … 1585 1595 * Using the SSL negotiated timeout time for IDLE's recycle (undone) 1586 1596 * Undone last timeout change, set it to 27 minutes fixed for IMAP 1587 1597 1588 1598 2007-10-29 Jose Dapena Paz <jdapena@igalia.com> 1589 1599 … … 1750 1760 id with the merged folder id's and their account 1751 1761 id's. 1752 (tny_merge_folder_get_url_string): created 1762 (tny_merge_folder_get_url_string): created 1753 1763 implementation. Now it gets the merge folder id 1754 1764 as part of the url string with this format: … … 1778 1788 1779 1789 2007-09-25 Mark Doffman <mark.doffman@codethink.co.uk> 1780 1790 1781 1791 * /bindings/python/*: Remove the platform generation 1782 from the automatically generated bindings. 1792 from the automatically generated bindings. 1783 1793 1784 1794 * /bindings/python/README: Update for changes to the way 1785 1795 the python bindings are generated. 1786 1796 1787 1797 * /tests/python-demo/*: Add implementations of a tny-list 1788 iterator, platform factory, and account store. Update the 1789 svn ignore to ignore the compiled python files. 1798 iterator, platform factory, and account store. Update the 1799 svn ignore to ignore the compiled python files. 1790 1800 1791 1801 * /tests/python-demo/tinymail-python-test.py: Modify to use 1792 1802 the python implementation of the platform factory. 1793 1803 1794 1804 2007-09-24 Philip Van Hoof <pvanhoof@gnome.org> 1795 1805 … … 1812 1822 to the tinymail library. 1813 1823 1814 * bindings/python/Makefile.am: Added a generated file to 1824 * bindings/python/Makefile.am: Added a generated file to 1815 1825 the CLEANFILES to fix release problems. 1816 1826 … … 1842 1852 1843 1853 * /bindings/python/gendefs/defsgen.py: 1844 Modify so that only non-virtual methods can be 1854 Modify so that only non-virtual methods can be 1845 1855 generated. 1846 1856 … … 1851 1861 * /bindings/python/*.defs: Include virtual method 1852 1862 definitions. All Tinymail and Tinymailui interfaces 1853 are implementable. 1863 are implementable. 1854 1864 1855 1865 * /bindings/python/*.override: I add type definitions 1856 to fix bindings compilation problems when used with 1866 to fix bindings compilation problems when used with 1857 1867 updated .defs files. 1858 1868 … … 1864 1874 * Disconnecting the old settings if new settings are set and 1865 1875 tny_camel_account_set_online is issued (experimental) 1866 * Crash fixes when alerting 1876 * Crash fixes when alerting 1867 1877 1868 1878 2007-09-13 Jose Dapena Paz <jdapena@igalia.com> 1869 1879 1870 * libtinymail/tny-folder.c: Remove assertion that expects folder 1871 names to have 1 character at least (at least in my IMAP server 1880 * libtinymail/tny-folder.c: Remove assertion that expects folder 1881 names to have 1 character at least (at least in my IMAP server 1872 1882 we've got empty strings as valid imap folders). 1873 1883 1874 1884 * libtinymail-camel/tny-camel-msg-header-priv.h: Add internal API 1875 1885 to set a decorated header (at least for updating flag values). 1876 1877 * libtinymail-camel/tny-camel-msg-header.c: Now we can set an 1878 internal decorated TnyHeader instance. For flags operations, 1886 1887 * libtinymail-camel/tny-camel-msg-header.c: Now we can set an 1888 internal decorated TnyHeader instance. For flags operations, 1879 1889 we'll set/unset/get also the decorated header. 1880 1890 1881 1891 * libtinymail-camel/tny-camel-partial-msg-receive-strategy.c: Now 1882 we set the folder header as decorated by the msg header. This way 1883 the flags are set correctly in folder when we set a flag from the 1892 we set the folder header as decorated by the msg header. This way 1893 the flags are set correctly in folder when we set a flag from the 1884 1894 header obtained from the message. 1885 1886 * libtinymail-camel/tny-camel-full-msg-receive-strategy.c: Now we 1895 1896 * libtinymail-camel/tny-camel-full-msg-receive-strategy.c: Now we 1887 1897 set the folder header as decorated by the msg header. 1888 1898 … … 1950 1960 2007-09-04 Murray Cumming <murrayc@murrayc.com> 1951 1961 1952 * libtinymail-camel/tny-camel-account.h: Change the 1962 * libtinymail-camel/tny-camel-account.h: Change the 1953 1963 TnyCamelGetSupportedSecureAuthCallback callback to provide a 1954 1964 GError* instead of a GError**, because it is not an output parameter. … … 1979 1989 (tny_camel_account_set_port_default), 1980 1990 (tny_camel_account_set_pass_func_default), 1981 (tny_camel_account_set_forget_pass_func_default): Check that the input 1982 is differnt to the existing value, to avoid unnecessarily signalling that 1991 (tny_camel_account_set_forget_pass_func_default): Check that the input 1992 is differnt to the existing value, to avoid unnecessarily signalling that 1983 1993 the account has changed. 1984 1994 1985 1995 2007-09-04 Javier Fernandez Garcia-Boente <jfernandez@igalia.com> 1986 1996 1987 * Fixed bug in update folder observers call, creating 1997 * Fixed bug in update folder observers call, creating 1988 1998 the new change object to propagate it to observers. 1989 1999 1990 2000 2007-09-04 Sergio Villar Senin <svillar@igalia.com> 1991 2001 … … 1998 2008 libtinymail-camel/camel-lite/configure.ac : fixes a maemo integration 1999 2009 build error. 2000 2010 2001 2011 2007-09-04 Philip Van Hoof <pvanhoof@gnome.org> 2002 2012 … … 2017 2027 really recognizable anymore so it shouldn't copy the copyright of the 2018 2028 original as this is not a copy anymore. 2019 * Date, Received, INTERNALDATE: fixes 2029 * Date, Received, INTERNALDATE: fixes 2020 2030 * Fixed filedescriptor leaks with local folders 2021 2031 * Fixed online command attempts when password got cancelled … … 2029 2039 2030 2040 * Add a new API function, tny_send_queue_add_async to define 2031 user and status callbacks for messages transfer to outbox 2032 folder. 2041 user and status callbacks for messages transfer to outbox 2042 folder. 2033 2043 2034 2044 2007-09-03 Sergio Villar Senin <svillar@igalia.com> … … 2048 2058 2049 2059 2007-08-31 Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com> 2050 2060 2051 2061 * Fix tny_camel_msg_header_date_(sent|received): 2052 2062 - don't try to normalize to GMT (camel already does that) … … 2062 2072 2007-08-28 Javier Fernandez Garcia-Boente <jfernandez@igalia.com> 2063 2073 2064 * Added a new API function in TnyFolder class: tny_folder_remove_msgs. 2065 This function allows to remove several messages in a single camel 2066 operation, avoiding to call excesive times to folder observer 2067 notification. 2074 * Added a new API function in TnyFolder class: tny_folder_remove_msgs. 2075 This function allows to remove several messages in a single camel 2076 operation, avoiding to call excesive times to folder observer 2077 notification. 2068 2078 2069 2079 2007-08-15 Philip Van Hoof <pvanhoof@gnome.org> … … 2075 2085 2076 2086 * libtinymail-maemo/tny-maemo-conic-device.c: 2077 (tny_maemo_conic_device_force_offline): Fix a compiler warning 2087 (tny_maemo_conic_device_force_offline): Fix a compiler warning 2078 2088 about an unused variable. 2079 2089 … … 2094 2104 2095 2105 * libtinymail-maemo/tny-maemo-conic-device.c: 2096 (tny_maemo_conic_device_instance_init): Change the is_online default 2106 (tny_maemo_conic_device_instance_init): Change the is_online default 2097 2107 to TRUE. 2098 2108 * This is a hack that fixes a problem 2099 * (Our signal is not emitted before the gtk mainloop is started, 2100 * because we use an idle handler for that and we don't know how to 2109 * (Our signal is not emitted before the gtk mainloop is started, 2110 * because we use an idle handler for that and we don't know how to 2101 2111 * detect when the mainloop has not yet started. 2102 2112 * The downside is that we now don't know that we are really offline, … … 2107 2117 2108 2118 * libtinymail-maemo/tny-maemo-conic-device.c: (conic_emit_status): 2109 Do not check for a running mainloop, because we know of no working 2119 Do not check for a running mainloop, because we know of no working 2110 2120 way to do this, and it causes hangs if we never use the idle handler. 2111 2121 See the comments in the code. … … 2119 2129 * libtinymail-maemo/tny-maemo-conic-device.c: 2120 2130 (conic_emit_status_idle), (conic_emit_status): 2121 If no mainloop is running (for instance, before gtk_main_run()), 2122 just emit without using g_idle_add(). Hopefully this will cause the signal 2123 to be emitted early enough - when tinymail needs is_online() to be correct. 2131 If no mainloop is running (for instance, before gtk_main_run()), 2132 just emit without using g_idle_add(). Hopefully this will cause the signal 2133 to be emitted early enough - when tinymail needs is_online() to be correct. 2124 2134 See the comments to see why this is OK for tinymail. 2125 2135 … … 2128 2138 * libtinymail-maemo/tny-maemo-conic-device.c: 2129 2139 (on_connection_event), (tny_maemo_conic_device_get_iap): 2130 Fixed a compiler warnings and a build fix when building for the device. 2140 Fixed a compiler warnings and a build fix when building for the device. 2131 2141 2132 2142 2007-08-14 Murray Cumming <murrayc@murrayc.com> 2133 2143 2134 2144 * libtinymail-maemo/tny-maemo-conic-device.c: 2135 (tny_maemo_conic_device_instance_init): Initialize is_online before 2145 (tny_maemo_conic_device_instance_init): Initialize is_online before 2136 2146 forcing the on_connection_event() signal handler to be called, not after, 2137 which could explain why is_online sometimes seems to be false at the start 2147 which could explain why is_online sometimes seems to be false at the start 2138 2148 when it should not be. 2139 2149 … … 2141 2151 2142 2152 * libtinymail-camel/tny-camel-folder.c: 2143 (tny_camel_folder_transfer_msgs_default): Remove unused err variable 2153 (tny_camel_folder_transfer_msgs_default): Remove unused err variable 2144 2154 to fix a compiler warning. 2145 * libtinymail-maemo/tny-maemo-conic-device.c: Formatting/syntax 2155 * libtinymail-maemo/tny-maemo-conic-device.c: Formatting/syntax 2146 2156 changes requested by Philip. 2147 2157 … … 2194 2204 * tests/c-demo/tny-demoui-summary-view.c: 2195 2205 (on_header_view_tree_row_activated): 2196 Avoid compiler warnings, such as unused variables, functions without 2197 returns, and unused functions. Tinymail now builds with -Wall -Werror 2206 Avoid compiler warnings, such as unused variables, functions without 2207 returns, and unused functions. Tinymail now builds with -Wall -Werror 2198 2208 again. 2199 2209 … … 2260 2270 sync operation's reconnect) 2261 2271 * Added the changed signal to TnyAccount 2262 * Making tny_account_set_name get propagated to the TnyGtkFolderStore- 2272 * Making tny_account_set_name get propagated to the TnyGtkFolderStore- 2263 2273 TreeModel instance. 2264 2274 * Fixed a kludge in the TnySessionCamel for POP accounts with wrong … … 2290 2300 2291 2301 * Fixed some bugs in TnyMergeFolder notification function. This 2292 method was overwriting data into old change, rather than use the 2302 method was overwriting data into old change, rather than use the 2293 2303 new_change structure to propagate changes to observed folders. 2294 2304 … … 2299 2309 2300 2310 * camel/camel-mime-parser.c: (folder_scan_content), 2301 (folder_scan_step): Initialize some variables because 2302 valgrind complains about uninitialized variables here. This does not 2311 (folder_scan_step): Initialize some variables because 2312 valgrind complains about uninitialized variables here. This does not 2303 2313 fix it but it should make things clearer for someone who can fix it. 2304 2314 … … 2345 2355 * Cond locks in the queues of the store accounts while the callbacks 2346 2356 are happening. This is a significant policy change in locking 2347 behaviour that should be well tested. 2357 behaviour that should be well tested. 2348 2358 2349 2359 * This was a major API change in TnyAccount … … 2376 2386 2007-07-23 Murray Cumming <murrayc@murrayc.com> 2377 2387 2378 * libtinymail-camel/tny-camel-account.c: Improved the 2388 * libtinymail-camel/tny-camel-account.c: Improved the 2379 2389 documentation for tny_camel_account_set_online(). 2380 2390 2381 2391 * libtinymail/tny-merge-folder.c: (tny_merge_folder_get_id), 2382 (tny_merge_folder_instance_init): Use 2383 unknown_mergefolder instead of an empty string for the default ID, 2384 because an empty string is not allowed by the get_func_id() DBC 2392 (tny_merge_folder_instance_init): Use 2393 unknown_mergefolder instead of an empty string for the default ID, 2394 because an empty string is not allowed by the get_func_id() DBC 2385 2395 contract, causing a crash at runtime when DBC is enabled in the build. 2386 2396 … … 2392 2402 2393 2403 2007-07-23 Jose Dapena Paz <jdapena@igalia.com> 2394 2404 2395 2405 * libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c: 2396 2406 (imap_refresh_info): now we lock the folder also, before locking the 2397 2407 service, in order to respect better the lock order. This should avoid 2398 2408 some locks. 2399 2409 2400 2410 * libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.[ch]: 2401 2411 now we store a reference to the struct addrinfo used for connections. When … … 2406 2416 flooding the connection. 2407 2417 We also removed the method (camel_imap_service_connect) as it's not used. 2408 2418 2409 2419 * libtinymail-camel/camel-lite/camel/camel-private.h: 2410 2420 added parenthesis to some lock macros. 2411 2421 2412 2422 2007-07-23 Jose Dapena Paz <jdapena@igalia.com> 2413 2423 … … 2415 2425 with a reason. This prevents some interlock problems, as the 2416 2426 last unreason can lead to a folder lock. 2417 2427 2418 2428 2007-07-23 Jose Dapena Paz <jdapena@igalia.com> 2419 2429 … … 2423 2433 object when the attachment is a message. 2424 2434 (tny_camel_mime_part_add_part_default): now when we are 2425 attaching a message as a part, it's created adding a 2435 attaching a message as a part, it's created adding a 2426 2436 message/rfc822 mime part that contains the message as 2427 2437 its content object. This fixes attaching messages. … … 2450 2460 2451 2461 * libtinymail-camel/tny-camel-account.c: 2452 (tny_camel_account_matches_url_string_default): For maildir accounts, 2453 compare their paths before the # marker for the folder, to avoid 2462 (tny_camel_account_matches_url_string_default): For maildir accounts, 2463 compare their paths before the # marker for the folder, to avoid 2454 2464 considering all maildir accounts to be the same account. 2455 2465 … … 2467 2477 2007-07-09 Javier Fernández García-Boente <jfernandez@igalia.com> 2468 2478 * Implements and emits msg-sending and msg-sent signals 2469 when a message is just being sent and when is fully sent. 2470 * Add a notification about EXPUNGED header change in 2479 when a message is just being sent and when is fully sent. 2480 * Add a notification about EXPUNGED header change in 2471 2481 tny_camel_folder_remove_msg_default method. 2472 2482 … … 2499 2509 (tny_olpc_account_store_alert): 2500 2510 * tests/shared/account-store.c: (tny_test_account_store_alert): 2501 Add a TnyAcccount* parameter to the alert_func vfunc, so that 2502 applications an show information about the account (and server) 2503 that failed. This is documented as sometimes being NULL for current 2511 Add a TnyAcccount* parameter to the alert_func vfunc, so that 2512 applications an show information about the account (and server) 2513 that failed. This is documented as sometimes being NULL for current 2504 2514 implementations (see the *ssl.c comment below). 2505 2515 … … 2507 2517 * camel/camel-session.c: (camel_session_alert_user), 2508 2518 (camel_session_alert_user_with_id), 2509 (camel_session_alert_user_generic): Added a CamelService* 2510 paramteter to these functions. For tinymail, this allows us to use 2511 CamelService::data to get the TnyAccount*. 2519 (camel_session_alert_user_generic): Added a CamelService* 2520 paramteter to these functions. For tinymail, this allows us to use 2521 CamelService::data to get the TnyAccount*. 2512 2522 * camel/camel-disco-diary.c: (camel_disco_diary_log), 2513 2523 (diary_decode_folder): … … 2521 2531 Pass the CamelService::data to camel_session_alert_user*(). 2522 2532 * camel/camel-tcp-stream-openssl.c: (ssl_verify): 2523 * camel/camel-tcp-stream-ssl.c: (ssl_bad_cert): Pass NULL for 2524 service_user_data because I cannot see a suitable CamelService. 2533 * camel/camel-tcp-stream-ssl.c: (ssl_bad_cert): Pass NULL for 2534 service_user_data because I cannot see a suitable CamelService. 2525 2535 See the TODOs. 2526 2536 trunk/libtinymail/tny-cached-file-stream.c
r3701 r3702 212 212 klass->write= tny_cached_file_stream_write; 213 213 klass->close= tny_cached_file_stream_close; 214 klass->reset= tny_cached_file_stream_reset; 214 215 215 216 return; trunk/libtinymail/tny-cached-file.c
r3701 r3702 191 191 flags = O_RDWR; 192 192 if (creation) { 193 flags = O_CREAT | O_RDWR ;193 flags = O_CREAT | O_RDWR | O_SYNC; 194 194 } else { 195 195 flags |= O_RDONLY; … … 292 292 typedef struct { 293 293 TnyCachedFile *self; 294 TnyStream *write_stream;294 gint write_fd; 295 295 } AsyncFetchStreamData; 296 296 … … 302 302 TnyCachedFilePriv *priv; 303 303 TnyStream *write_stream; 304 int write_fd;305 304 306 305 self = afs_data->self; … … 308 307 309 308 /* First we dump the read stream contents to file cache */ 310 write_fd = get_new_fd_of_stream (self, TRUE, TRUE); 311 lseek (write_fd, 0, SEEK_SET); 312 write_stream = tny_fs_stream_new (write_fd); 309 write_stream = tny_fs_stream_new (afs_data->write_fd); 313 310 while (!tny_stream_is_eos (priv->fetch_stream)) { 314 311 gssize readed, written; … … 428 425 afs_data = g_slice_new0 (AsyncFetchStreamData); 429 426 afs_data->self = g_object_ref (result); 427 afs_data->write_fd = get_new_fd_of_stream (result, TRUE, TRUE); 428 lseek (afs_data->write_fd, 0, SEEK_SET); 430 429 g_thread_create (async_fetch_stream, afs_data, FALSE, NULL); 431 430 } else {
