Changeset 3702

Show
Ignore:
Timestamp:
06/20/08 09:10:59
Author:
jdapena
Message:

* libtinymail/tny-cached-file-stream.c:

Linked the reset implementation to the stream interface.
* libtinymail/tny-cached-file.c:
Create the files synchronously, to avoid accessing the file from other
thread if this has not been created yet.
* Changelog: removed many end-of-line whitespaces.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r3701 r3702  
     12008-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 
    1122008-06-18  Jose Dapena Paz  <jdapena@igalia.com> 
    213 
     
    3849 
    39502008-06-05  Mark Doffman  <mark.doffman@codethink.co.uk> 
    40          
    41         * bindings/python/*  
     51 
     52        * bindings/python/* 
    4253        Update .override and .defs files to reflect changes 
    4354        in tinymail interfaces. 
     
    5667 
    5768        * 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 
    5970 
    60712008-06-03  Jose Dapena Paz  <jdapena@igalia.com> 
     
    108119        directory (the one on top of cur, new and tmp). 
    109120 
    110 >>>>>>> .r3690 
    1111212008-05-26  Philip Van Hoof <pvanhoof@gnome.org> 
    112122 
     
    391401        makes you can manage certificates using the maemo tablet certificate 
    392402        manager. 
    393          
     403 
    394404        * libtinymail-camel/camel-lite/camel/camel-certdb.h, 
    395405        libtinymail-camel/camel-lite/camel/camel-private.h: modified to 
    396406        have a pointer to the CST object in certdb and certificate id in 
    397407        certificate object in case we compile with CST support. 
    398          
     408 
    399409        * libtinymail-camel/camel-lite/camel/camel-tcp-stream-ssl.c: 
    400410        Modified a bit the code for proper integration with cst (mainly 
    401411        removing direct access to internal fields). 
    402          
     412 
    403413        * libtinymail-camel/camel-lite/configure.ac, 
    404414        libtinymail-camel/camel-lite/camel/Makefile.am: 
     
    789799        libtinymail-camel/camel-lite/camel/camel-store-summary.c: 
    790800        Added the proper error codes when there is no enough space left on 
    791         devices         
     801        devices 
    792802 
    7938032008-01-29  Philip Van Hoof <pvanhoof@gnome.org> 
     
    8108202008-01-27  Philip Van Hoof <pvanhoof@gnome.org> 
    811821 
    812         * Various code improvements  
     822        * Various code improvements 
    813823        * Merged camel-lite with upstream camel revision 8428 
    814824 
     
    871881 
    8728822008-01-21 Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com> 
    873          
     883 
    874884        * fix freeing uninitialized data in camel-imap-folder.c 
    875885 
     
    930940 
    931941        * fix for use of unitialized variable in decode_it function, 
    932         which caused crashes in some cases.  
     942        which caused crashes in some cases. 
    933943 
    9349442008-01-15  Sergio Villar Senin  <svillar@igalia.com> 
     
    968978 
    969979        * 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 
    971981        crash once 
    972982        * Size determining when adding items to a local maildir folder 
     
    987997 
    9889982008-01-10 Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com> 
    989          
     999 
    9901000        * libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store-summary: 
    9911001        fix typo in camel-imap-store-summary.c which caused valgrind errors 
     
    9981008 
    99910092008-01-09  Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com> 
    1000          
     1010 
    10011011        * small fixes / cleanups for tny-maemo-conic-device 
    10021012 
     
    10691079 
    10701080        * 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 
    10721082        value to variable len 
    10731083        * libtinymail/tny-store-acount.c: 
     
    11511161 
    11521162        * 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 
    11541164 
    115511652007-12-13  Felipe Erias Morandeira  <femorandeira@igalia.com> 
     
    11791189        can be added with g_object_ref or a weak reference. 
    11801190        * 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. 
    11821192        This is created in a way it's persistent, and then, we can access 
    11831193        properly to the summary flags. We also eturn null and set error if 
     
    12051215 
    12061216        * libtinymail-camel/tny-camel-folder.c: 
    1207         Fixed an small leak when notifying folder observers     
     1217        Fixed an small leak when notifying folder observers 
    12081218        * libtinymail/tny-folder.[ch] 
    12091219        libtinymail/tny-shared.h 
     
    121512252007-12-09  Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> 
    12161226 
    1217         * optimization :) for NULL strings in decode_it  
     1227        * optimization :) for NULL strings in decode_it 
    12181228 
    121912292007-12-08  Jürg Billeter  <j@bitron.ch> 
     
    12681278 
    12691279        * Merge from devel/pvanhoof/bs branch 
    1270          
     1280 
    127112812007-11-30  Philip Van Hoof  <pvanhoof@gnome.org> 
    12721282 
     
    12991309 
    130013102007-11-26 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> 
    1301          
     1311 
    13021312        * add a dummy conic device, so libtinymail-maemo does 
    13031313          not require libconic anymore 
     
    147114812007-11-09  Sergio Villar Senin  <svillar@igalia.com> 
    14721482 
    1473         * libtinymail-maemo/tny-maemo-conic-device.c:  
     1483        * libtinymail-maemo/tny-maemo-conic-device.c: 
    14741484        Added a new API to allow asynchronous connections 
    14751485        in the Maemo conic device. This patch is a new version of an initial 
     
    14771487        Splitted the Maemo connic device in two files, one for the actual 
    14781488        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 
    148114912007-11-08  Jose Dapena Paz  <jdapena@igalia.com> 
    14821492 
     
    15331543 
    153415442007-11-05  Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com> 
    1535          
     1545 
    15361546        * Don't leak an fp in md5_get_digest_from_file 
    15371547 
     
    15461556 
    15471557        * 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 
    15491559        camel_store_get_folder_info returned an iter with only one child in it. 
    15501560        Either it should return no childs or all childs. I adapted Tinymail to 
     
    15851595        * Using the SSL negotiated timeout time for IDLE's recycle (undone) 
    15861596        * Undone last timeout change, set it to 27 minutes fixed for IMAP 
    1587          
     1597 
    158815982007-10-29  Jose Dapena Paz  <jdapena@igalia.com> 
    15891599 
     
    17501760        id with the merged folder id's and their account 
    17511761        id's. 
    1752         (tny_merge_folder_get_url_string): created  
     1762        (tny_merge_folder_get_url_string): created 
    17531763        implementation. Now it gets the merge folder id 
    17541764        as part of the url string with this format: 
     
    17781788 
    177917892007-09-25  Mark Doffman <mark.doffman@codethink.co.uk> 
    1780          
     1790 
    17811791        * /bindings/python/*: Remove the platform generation 
    1782         from the automatically generated bindings.  
     1792        from the automatically generated bindings. 
    17831793 
    17841794        * /bindings/python/README: Update for changes to the way 
    17851795        the python bindings are generated. 
    1786          
     1796 
    17871797        * /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. 
    17901800 
    17911801        * /tests/python-demo/tinymail-python-test.py: Modify to use 
    17921802        the python implementation of the platform factory. 
    1793          
     1803 
    179418042007-09-24  Philip Van Hoof  <pvanhoof@gnome.org> 
    17951805 
     
    18121822        to the tinymail library. 
    18131823 
    1814         * bindings/python/Makefile.am: Added a generated file to  
     1824        * bindings/python/Makefile.am: Added a generated file to 
    18151825        the CLEANFILES to fix release problems. 
    18161826 
     
    18421852 
    18431853        * /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 
    18451855        generated. 
    18461856 
     
    18511861        * /bindings/python/*.defs: Include virtual method 
    18521862        definitions. All Tinymail and Tinymailui interfaces 
    1853         are implementable.  
     1863        are implementable. 
    18541864 
    18551865        * /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 
    18571867        updated .defs files. 
    18581868 
     
    18641874        * Disconnecting the old settings if new settings are set and 
    18651875        tny_camel_account_set_online is issued (experimental) 
    1866         * Crash fixes when alerting  
     1876        * Crash fixes when alerting 
    18671877 
    186818782007-09-13  Jose Dapena Paz  <jdapena@igalia.com> 
    18691879 
    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 
    18721882        we've got empty strings as valid imap folders). 
    18731883 
    18741884        * libtinymail-camel/tny-camel-msg-header-priv.h: Add internal API 
    18751885        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, 
    18791889        we'll set/unset/get also the decorated header. 
    1880          
     1890 
    18811891        * 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 
    18841894        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 
    18871897        set the folder header as decorated by the msg header. 
    18881898 
     
    195019602007-09-04  Murray Cumming  <murrayc@murrayc.com> 
    19511961 
    1952         * libtinymail-camel/tny-camel-account.h: Change the  
     1962        * libtinymail-camel/tny-camel-account.h: Change the 
    19531963        TnyCamelGetSupportedSecureAuthCallback callback to provide a 
    19541964        GError* instead of a GError**, because it is not an output parameter. 
     
    19791989        (tny_camel_account_set_port_default), 
    19801990        (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 
    19831993        the account has changed. 
    19841994 
    198519952007-09-04  Javier Fernandez Garcia-Boente  <jfernandez@igalia.com> 
    19861996 
    1987         * Fixed bug in update folder observers call, creating  
     1997        * Fixed bug in update folder observers call, creating 
    19881998        the new change object to propagate it to observers. 
    1989   
     1999 
    199020002007-09-04  Sergio Villar Senin  <svillar@igalia.com> 
    19912001 
     
    19982008        libtinymail-camel/camel-lite/configure.ac : fixes a maemo integration 
    19992009        build error. 
    2000          
     2010 
    200120112007-09-04  Philip Van Hoof  <pvanhoof@gnome.org> 
    20022012 
     
    20172027        really recognizable anymore so it shouldn't copy the copyright of the 
    20182028        original as this is not a copy anymore. 
    2019         * Date, Received, INTERNALDATE: fixes  
     2029        * Date, Received, INTERNALDATE: fixes 
    20202030        * Fixed filedescriptor leaks with local folders 
    20212031        * Fixed online command attempts when password got cancelled 
     
    20292039 
    20302040        * 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. 
    20332043 
    203420442007-09-03  Sergio Villar Senin  <svillar@igalia.com> 
     
    20482058 
    204920592007-08-31 Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com> 
    2050          
     2060 
    20512061        * Fix tny_camel_msg_header_date_(sent|received): 
    20522062                - don't try to normalize to GMT (camel already does that) 
     
    206220722007-08-28  Javier Fernandez Garcia-Boente  <jfernandez@igalia.com> 
    20632073 
    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. 
    20682078 
    206920792007-08-15  Philip Van Hoof  <pvanhoof@gnome.org> 
     
    20752085 
    20762086        * 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 
    20782088        about an unused variable. 
    20792089 
     
    20942104 
    20952105        * 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 
    20972107        to TRUE. 
    20982108        * 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 
    21012111        * detect when the mainloop has not yet started. 
    21022112        * The downside is that we now don't know that we are really offline, 
     
    21072117 
    21082118        * 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 
    21102120        way to do this, and it causes hangs if we never use the idle handler. 
    21112121        See the comments in the code. 
     
    21192129        * libtinymail-maemo/tny-maemo-conic-device.c: 
    21202130        (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. 
    21242134        See the comments to see why this is OK for tinymail. 
    21252135 
     
    21282138        * libtinymail-maemo/tny-maemo-conic-device.c: 
    21292139        (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. 
    21312141 
    213221422007-08-14  Murray Cumming  <murrayc@murrayc.com> 
    21332143 
    21342144        * 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 
    21362146        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 
    21382148        when it should not be. 
    21392149 
     
    21412151 
    21422152        * 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 
    21442154        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 
    21462156        changes requested by Philip. 
    21472157 
     
    21942204        * tests/c-demo/tny-demoui-summary-view.c: 
    21952205        (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 
    21982208        again. 
    21992209 
     
    22602270        sync operation's reconnect) 
    22612271        * 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- 
    22632273        TreeModel instance. 
    22642274        * Fixed a kludge in the TnySessionCamel for POP accounts with wrong 
     
    22902300 
    22912301        * 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 
    22932303        new_change structure to propagate changes to observed folders. 
    22942304 
     
    22992309 
    23002310        * 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 
    23032313        fix it but it should make things clearer for someone who can fix it. 
    23042314 
     
    23452355        * Cond locks in the queues of the store accounts while the callbacks 
    23462356        are happening. This is a significant policy change in locking 
    2347         behaviour that should be well tested.  
     2357        behaviour that should be well tested. 
    23482358 
    23492359        * This was a major API change in TnyAccount 
     
    237623862007-07-23  Murray Cumming  <murrayc@murrayc.com> 
    23772387 
    2378         * libtinymail-camel/tny-camel-account.c: Improved the  
     2388        * libtinymail-camel/tny-camel-account.c: Improved the 
    23792389        documentation for tny_camel_account_set_online(). 
    23802390 
    23812391        * 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 
    23852395        contract, causing a crash at runtime when DBC is enabled in the build. 
    23862396 
     
    23922402 
    239324032007-07-23  Jose Dapena Paz  <jdapena@igalia.com> 
    2394          
     2404 
    23952405        * libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c: 
    23962406        (imap_refresh_info): now we lock the folder also, before locking the 
    23972407        service, in order to respect better the lock order. This should avoid 
    23982408        some locks. 
    2399          
     2409 
    24002410        * libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.[ch]: 
    24012411        now we store a reference to the struct addrinfo used for connections. When 
     
    24062416        flooding the connection. 
    24072417        We also removed the method (camel_imap_service_connect) as it's not used. 
    2408          
     2418 
    24092419        * libtinymail-camel/camel-lite/camel/camel-private.h: 
    24102420        added parenthesis to some lock macros. 
    2411   
     2421 
    241224222007-07-23  Jose Dapena Paz  <jdapena@igalia.com> 
    24132423 
     
    24152425        with a reason. This prevents some interlock problems, as the 
    24162426        last unreason can lead to a folder lock. 
    2417          
     2427 
    241824282007-07-23  Jose Dapena Paz  <jdapena@igalia.com> 
    24192429 
     
    24232433        object when the attachment is a message. 
    24242434        (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 
    24262436        message/rfc822 mime part that contains the message as 
    24272437        its content object. This fixes attaching messages. 
     
    24502460 
    24512461        * 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 
    24542464        considering all maildir accounts to be the same account. 
    24552465 
     
    246724772007-07-09  Javier Fernández García-Boente <jfernandez@igalia.com> 
    24682478        * 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 
    24712481        tny_camel_folder_remove_msg_default method. 
    24722482 
     
    24992509        (tny_olpc_account_store_alert): 
    25002510        * 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 
    25042514        implementations (see the *ssl.c comment below). 
    25052515 
     
    25072517        * camel/camel-session.c: (camel_session_alert_user), 
    25082518        (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*. 
    25122522        * camel/camel-disco-diary.c: (camel_disco_diary_log), 
    25132523        (diary_decode_folder): 
     
    25212531        Pass the CamelService::data to camel_session_alert_user*(). 
    25222532        * 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. 
    25252535        See the TODOs. 
    25262536 
  • trunk/libtinymail/tny-cached-file-stream.c

    r3701 r3702  
    212212        klass->write= tny_cached_file_stream_write; 
    213213        klass->close= tny_cached_file_stream_close; 
     214        klass->reset= tny_cached_file_stream_reset; 
    214215 
    215216        return; 
  • trunk/libtinymail/tny-cached-file.c

    r3701 r3702  
    191191        flags = O_RDWR; 
    192192        if (creation) { 
    193                 flags = O_CREAT | O_RDWR
     193                flags = O_CREAT | O_RDWR | O_SYNC
    194194        } else { 
    195195                flags |= O_RDONLY; 
     
    292292typedef struct { 
    293293        TnyCachedFile *self; 
    294         TnyStream *write_stream
     294        gint write_fd
    295295} AsyncFetchStreamData; 
    296296 
     
    302302        TnyCachedFilePriv *priv; 
    303303        TnyStream *write_stream; 
    304         int write_fd; 
    305304 
    306305        self = afs_data->self; 
     
    308307 
    309308        /* 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); 
    313310        while (!tny_stream_is_eos (priv->fetch_stream)) { 
    314311                gssize readed, written; 
     
    428425                afs_data = g_slice_new0 (AsyncFetchStreamData); 
    429426                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); 
    430429                g_thread_create (async_fetch_stream, afs_data, FALSE, NULL); 
    431430        } else {