aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
Commit message (Collapse)AuthorAgeFilesLines
* Update to the new $(BASE_VERSION)-versioned path. Likewise. Likewise.Ettore Perazzoli2003-01-236-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | * providers/imap/Makefile.am (libcamelimapincludedir): Update to the new $(BASE_VERSION)-versioned path. * providers/smtp/Makefile.am (libcamelsmtpincludedir): Likewise. * providers/sendmail/Makefile.am (libcamelsendmailincludedir): Likewise. * providers/pop3/Makefile.am (libcamelpop3includedir): Likewise. * providers/nntp/Makefile.am (libcamelnntpincludedir): Likewise. * providers/local/Makefile.am (libcamellocalincludedir): Likewise. * camel-lock-client.c (camel_lock_helper_init): Use CAMEL_LIBEXECDIR instead of CAMEL_SBINDIR to find camel-lock-helper. * Makefile.am: Install camel-lock-helper and camel-index-control in $(libexec)/evolution/$(BASE_VERSION)/camel. Install libcamel.la in $privlibdir. (install-exec-hook): Update for the new location of camel-lock-helper. (libcamelincludedir): Version using $(BASE_VERSION). (INCLUDES): Define CAMEL_LIBEXECDIR. svn path=/trunk/; revision=19554
* Instead of checking recipients != NULL, check that camel_address_lengthJeffrey Stedfast2003-01-051-2/+2
| | | | | | | | | | | 2003-01-04 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_send_to): Instead of checking recipients != NULL, check that camel_address_length (recipients) != 0 since it is illegal for recipients to be NULL (camel_transport_send_to already checks this). svn path=/trunk/; revision=19235
* commit this tooJeffrey Stedfast2002-12-181-1/+2
| | | | svn path=/trunk/; revision=19155
* Replace calls to g_string_sprintfa() with g_string_append_printf() sinceJeffrey Stedfast2002-12-1817-115/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-12-17 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c: Replace calls to g_string_sprintfa() with g_string_append_printf() since the former seems to have been deprecated. * providers/imap/camel-imap-search.c: Same. * providers/imap/camel-imap-folder.c: Here too. * providers/local/camel-mbox-summary.c: And here. * providers/local/camel-local-summary.c: Replace g_string_sprintf() with g_string_printf(). * camel-data-cache.c (data_cache_expire): Replace g_string_sprintf() with g_string_printf(). * camel-url.c: Replace calls to g_string_sprintfa() with g_string_append_printf() since the former seems to have been deprecated. * camel-service.c: Same. * camel-mime-utils.c: Here too. svn path=/trunk/; revision=19154
* Use a bag instead of a hashtable to track the cache streams.Not Zed2002-12-095-58/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-12-07 Not Zed <NotZed@Ximian.com> * camel-data-cache.c (data_cache_init): Use a bag instead of a hashtable to track the cache streams. (data_cache_finalise): Same. (free_busy): No longer needed. (data_cache_expire): use bag instead of hashtable. (stream_finalised): No longer required. (camel_data_cache_add): objectbagise (camel_data_cache_get): " (camel_data_cache_remove): " (data_cache_path): Set the now expired date before running expiry, so it plays better with multiple threads. Still a couple of harmless races. 2002-12-06 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-store.c (scan_dir): folders -> object bag. (get_folder_info_mbox): folders -> object bag. * providers/local/camel-mh-store.c (folder_info_new): folders -> object bag. * providers/local/camel-maildir-store.c (scan_dir): folders -> object bag. * providers/local/camel-local-store.c (rename_folder): folders -> object bag. * camel-private.h (CamelStorePrivate): Remove 'cache' lock, handled by the objectbag. * providers/imap/camel-imap-store.c (copy_folder): Removed. (imap_store_refresh_folders): folders -> object bag. (get_folder_counts): folders -> object bag. * camel-vee-store.c (vee_get_folder): changes for folders objectbag. (vee_get_folder_info): Change to use folders objectbag. Also, dont refresh the base folder if we're in FAST mode. (build_info): Removed, no longer needed. (vee_rename_folder): Fixed for folders objectbag. * camel-store.c (camel_store_init): init the folders objectbag. (camel_store_finalize): Destroy the folders object bag. (folder_matches): (folder_finalize): Removed, now handled implicitly by the objectbag. (camel_store_get_folder): object bag changes. (camel_store_delete_folder): " (get_subfolders): Removed, now handled without a callback. (camel_store_rename_folder): Changed to use object bag of folders. (trash_add_folder): Removed. (init_trash): use folders object bag. (copy_folder_cache): (sync_folder): Removed, no longer needed. Weird arsed code anyway. (store_sync): Use folder object bag instead of hashtable. (camel_store_unsubscribe_folder): " (camel_store_init): remove cache_lock init, no longer used. (camel_store_finalize): Same for cleanup. 2002-12-05 Not Zed <NotZed@Ximian.com> * camel-store.h (struct _CamelStore): change folders from a hashtable into a CamelObjectBag. * camel-object.c (camel_object_ref): Use type_lock instead of class lock for ref counting. (camel_object_unref): Use type_lock instead of class lock for unref. (camel_object_unref): If the object is 'bagged', then also look hooks, and remove it from any bags. (camel_object_bag_new): (camel_object_bag_destroy): (camel_object_bag_add): (camel_object_bag_get): (camel_object_bag_remove_unlocked): (camel_object_bag_list): (camel_object_bag_abort): (camel_object_bag_remove): New functions to implement a utility object which can manage a 'bag' of weakly ref'd children in an atomic & threadsafe way. svn path=/trunk/; revision=19056
* Properly handle the case where the namespace is "". Fixes bug #34975Jeffrey Stedfast2002-12-052-5/+8
| | | | | | | | | | 2002-12-04 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store-summary.c (camel_imap_store_summary_add_from_full): Properly handle the case where the namespace is "". Fixes bug #34975 svn path=/trunk/; revision=19002
* If we have a namespace of "", then always match any path.Not Zed2002-11-221-4/+6
| | | | | | | | | | | | 2002-11-21 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store-summary.c (camel_imap_store_summary_namespace_find_path): If we have a namespace of "", then always match any path. (camel_imap_store_summary_namespace_find_full): Same, for full names. Should address #33309 & friends. svn path=/trunk/; revision=18884
* If the namespace is at/below INBOX, check for the INBOX explicitly (sinceJeffrey Stedfast2002-11-181-20/+65
| | | | | | | | | | | | 2002-11-15 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (imap_connect_online): If the namespace is at/below INBOX, check for the INBOX explicitly (since it obviously won't show up in a LSUB INBOX.*). If either INBOX is not returned in the response or if the folder flags contain \NoSelect, subscribe to INBOX and then try LSUB again. svn path=/trunk/; revision=18824
* Use g_strerror when setting an exception string (we need it to be inJeffrey Stedfast2002-11-115-12/+23
| | | | | | | | | | | | | | | | | | | 2002-11-11 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (get_message_simple): Use g_strerror when setting an exception string (we need it to be in UTF-8). * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Use g_strerror when setting an exception string (we need it to be in UTF-8). * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Use g_strerror when setting an exception string (we need it to be in UTF-8). (pop3_get_message): Same. svn path=/trunk/; revision=18690
* Use g_strerror when setting an exception string (we need it to be inJeffrey Stedfast2002-11-1115-168/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-11-11 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-spool-summary.c (spool_summary_sync_full): Use g_strerror when setting an exception string (we need it to be in UTF-8). (spool_summary_check): Here too. * providers/local/camel-spool-store.c (construct): Use g_strerror when setting an exception string (we need it to be in UTF-8). (get_folder): Same. (scan_dir): Here too. * providers/local/camel-spool-folder.c (spool_lock): Use g_strerror when setting an exception string (we need it to be in UTF-8). * providers/local/camel-mh-summary.c (mh_summary_check): Use g_strerror when setting an exception string (we need it to be in UTF-8). * providers/local/camel-mh-store.c (delete_folder): Use g_strerror when setting an exception string (we need it to be in UTF-8). * providers/local/camel-mbox-summary.c (summary_update): Use g_strerror when setting an exception string (we need it to be in UTF-8). (mbox_summary_sync_full): Here too. (mbox_summary_sync_quick): Same. (mbox_summary_sync): Also here. (camel_mbox_summary_sync_mbox): Again here. * providers/local/camel-mbox-folder.c (mbox_lock): Use g_strerror when setting an exception string (we need it to be in UTF-8). (mbox_append_message): Same. (mbox_get_message): Here too. * providers/local/camel-maildir-summary.c (maildir_summary_load): Use g_strerror when setting an exception string (we need it to be in UTF-8). (maildir_summary_check): Same. * providers/local/camel-maildir-store.c (get_folder): Use g_strerror when setting an exception string (we need it to be in UTF-8). (delete_folder): Same. (delete_folder): Here too. * providers/local/camel-local-summary.c (local_summary_sync): Use g_strerror when setting an exception string (we need it to be in UTF-8). * providers/local/camel-local-store.c (get_folder): Use g_strerror when setting an exception string (we need it to be in UTF-8). (create_folder): Same. (xrename): Here too. (rename_folder): And here. (delete_folder): Also here. * camel-provider.c (camel_provider_init): For debugging printfs, we want to use normal strerror (we want locale charset, not UTF-8). * camel-movemail.c (camel_movemail): Use g_strerror when setting an exception string (we need it to be in UTF-8). (movemail_external): Same. (camel_movemail_copy_file): Here too. (camel_movemail_solaris): Also here. * camel-mime-utils.c (rfc2047_decode_word): For debugging printfs, we want to use normal strerror (we want locale charset, not UTF-8). (header_encode_param): Same. * camel-mime-part-utils.c (convert_buffer): For debugging printfs, we want to use normal strerror (we want locale charset, not UTF-8). * camel-lock-client.c (camel_lock_helper_init): Use g_strerror when setting an exception string (we need it to be in UTF-8). * camel-data-cache.c (camel_data_cache_remove): Use g_strerror when setting an exception string (we need it to be in UTF-8). * camel-tcp-stream-raw.c (flaky_tcp_write): For debugging printfs, we want to use normal strerror (we want locale charset, not UTF-8). (flaky_tcp_read): Same. * camel-gpg-context.c (gpg_ctx_op_step): For debugging printfs, we want to use normal strerror (we want locale charset, not UTF-8). * camel-service.c (camel_gethostbyname): Use g_strerror when setting an exception string (we need it to be in UTF-8). * camel-lock.c (camel_lock_dot): Use g_strerror when setting an exception string (we need it to be in UTF-8). (camel_lock_fcntl): Same. svn path=/trunk/; revision=18689
* Use g_path_get_basename instead of g_strdup (g_basename (filename)).Jeffrey Stedfast2002-11-021-1/+1
| | | | | | | | | 2002-11-01 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-local-store.c (delete_folder): Use g_path_get_basename instead of g_strdup (g_basename (filename)). svn path=/trunk/; revision=18498
* Removed hash-table-utils.[c,h] from the build.Jeffrey Stedfast2002-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-10-31 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Removed hash-table-utils.[c,h] from the build. * hash-table-utils.[c,h]: Removed. * string-util.c: Imported g_strcase[hash,equal] into here so we can remove hash-table-utils.[c,h]. * camel-medium.c: Removed #include "hash-table-utils.h" * camel-mime-message.c: Same here. * camel-mime-part.c: And here. * camel-session.c: Here too. * providers/imap/camel-imap-store-summary.c: #include string-utils.h instead of hash-table-utils.h * camel-charset-map.c: Same. * camel-folder-summary.c: Here too. * camel-provider.c: Again here. * camel-store-summary.c: And again... svn path=/trunk/; revision=18473
* ** For bug #31647 and bug #31456.Not Zed2002-10-244-77/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-10-24 Not Zed <NotZed@Ximian.com> ** For bug #31647 and bug #31456. * camel-store-summary.c (store_info_string): for STORE_INFO_NAME, skip the leading /. * providers/imap/camel-imap-store.c (parse_list_response_as_folder_info): Remove jeff's last patch, and use the store summary to create the name and path of the folderinfo so it manages namespace issues. (get_folder_info_online): Just pass @top directly to build_folder_info always, since namespace is mapped to 1 tree level. (imap_build_folder_info): Remove jeff's last patch, dont strip leading /'s, they shouldn't exist. (imap_connect_online): Remove adding the INBOX here, we add it later. (get_subscribed_folders): Make sure INBOX is always in the list. some imap servers dont seem to let you subscribe to it(?), so always have it act as subscribed. * camel-store.c (camel_folder_info_build): back out the last 2 patches from Jeff (for #31456) to get the original behaviour. (camel_folder_info_build): When creating a fake parent, dont strip the namespace from the full_name. malloc keys in hash since we dont have them anymore. (free_name): Helper to free names. * providers/imap/camel-imap-store-summary.c (camel_imap_store_summary_namespace_new): Canonicalise the namespace (strip trailing dir_sep), and change the path to remove any /'s. (camel_imap_store_summary_namespace_find_path): (camel_imap_store_summary_namespace_find_full): new, find namespace by path/full name. (camel_imap_store_summary_full_from_path): Changed to a simple wrapper around path_to_full, after checking namespace. (camel_imap_store_summary_add_from_full): map the namespace if present. (camel_imap_store_summary_path_to_full): If namespace exists, unmap it. svn path=/trunk/; revision=18424
* Canonicalise the source_uri to not have a path. Fixes bug #32268.Jeffrey Stedfast2002-10-231-25/+30
| | | | | | | | | | | | | | | | | | | | | | 2002-10-18 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_folder): Canonicalise the source_uri to not have a path. Fixes bug #32268. 2002-10-17 Jeffrey Stedfast <fejj@ximian.com> Possible fix for bug #32270 * providers/pop3/camel-pop3-store.c (try_sasl): If we get an I/O error, we should not be setting the CANT_AUTH exception but should instead be setting the SYSTEM exception. Also check for EINTR which signifies a USER_CANCEL exception. (pop3_try_authenticate): If the auth mechanism isn't supported, don't set the CANT_AUTH exception since then we will loop and try again with the same data which will just cause an infinite loop. (pop3_connect): Simplified a bit. svn path=/trunk/; revision=18412
* If the response from the IMAP server is "No", don't set theJeffrey Stedfast2002-10-101-1/+1
| | | | | | | | | | | | | 2002-10-08 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-command.c (imap_read_response): If the response from the IMAP server is "No", don't set the SERVICE_UNAVAILABLE exception, this makes error reporting in the UI for deleting IMAP folders that cannot be deleted inaccurate (ie, it reports "Cannot delete in offline mode" which is not the problem). svn path=/trunk/; revision=18356
* Fixes bug #31752Jeffrey Stedfast2002-10-082-12/+27
| | | | | | | | | | | | | | 2002-10-07 Jeffrey Stedfast <fejj@ximian.com> Fixes bug #31752 * providers/smtp/camel-smtp-transport.c (connect_to_server): Don't forget to send another EHLO command to the server once we toggle into STARTTLS mode. (smtp_helo): Reset any flags set using the EHLO response and also any authtypes. svn path=/trunk/; revision=18334
* Add missing ;.Michael Zucci2002-10-031-1/+1
| | | | svn path=/trunk/; revision=18315
* /home/notzed/gnome/head/evolution/camelNot Zed2002-10-032-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-10-02 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (get_matching): Set *set to NULL if we dont get any matches. (imap_sync_online): If we get no matches, skip any work, also reorder some code to make it easier to skip. See #31031. * providers/imap/camel-imap-store.c (imap_check_folder_still_extant): Default to "TRUE", if the list command failed, it probably means a server problem, assume the worst. This makes imap_refresh_info not clear the exception and crash. Fixes crash of #31000. 2002-10-01 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (imap_refresh_info): Make sure we pass the exception to imap_folder_selected(), otherwise failures can be lost. See bug #31000. 2002-10-01 Not Zed <NotZed@Ximian.com> * camel-folder.c (thaw): Add an assertion that the frozen count>0. (freeze): Same for >= 0. * camel-vee-folder.c (camel_vee_folder_remove_folder): Use the unmatched freeze_count when thawing folders removed from unmatched, rather than the folder's freeze_count. Might be related to #27391. svn path=/trunk/; revision=18314
* Use strtol when decoding the timezone (since it can be negative) and don'tJeffrey Stedfast2002-10-021-1/+2
| | | | | | | | | | | | 2002-10-01 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (decode_internaldate): Use strtol when decoding the timezone (since it can be negative) and don't forget to increment inptr to the start of the time (ie, don't leave inptr pointing to the year when decoding the hour:min:sec). svn path=/trunk/; revision=18283
* Fixes bug #31456.Jeffrey Stedfast2002-10-011-34/+51
| | | | | | | | | | | | | | | | | | | | | | | | 2002-09-30 Jeffrey Stedfast <fejj@ximian.com> Fixes bug #31456. * providers/imap/camel-imap-store.c (imap_connect_online): Don't LSUB "" "*", instead get both an LSUB containing the subfolders of the namespace and an LSUB of INBOX (assuming namespace was non-empty). This fix really has nothing to do with bug #31456 but is what should have been done in the first place. (parse_list_response_as_folder_info): Simplify a tad and strip extra leading /'s from fi->path. (imap_build_folder_info): Strip extra leading /'s from fi->path. * camel-store.c (camel_folder_info_build): Don't strip the namespace from the fi->full_name when hashing or creating fake parent folder-infos. Fixes a bug I found while trying to reproduce bug #31456. (camel_folder_info_build_path): Strip off extra leading dir_sep chars from the path. svn path=/trunk/; revision=18273
* Don't strip the namespace from the fi->full_name when hasing or creatingJeffrey Stedfast2002-10-011-1/+1
| | | | | | | | | | | 2002-09-30 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (camel_folder_info_build): Don't strip the namespace from the fi->full_name when hasing or creating fake parent folders. Fixes a bug I found while trying to reproduce bug #31456. svn path=/trunk/; revision=18270
* Remove debug content_info_dump, could cause a crash, and not really neededNot Zed2002-09-301-2/+0
| | | | | | | | | | | | | 2002-09-30 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (imap_get_message): Remove debug content_info_dump, could cause a crash, and not really needed anymore. * camel-folder-summary.c (camel_content_info_dump): Check ci->type != NULL before dereferencing it. Should fix crash #31331. svn path=/trunk/; revision=18259
* New function to decode the INTERNALDATE response from an IMAP server so weJeffrey Stedfast2002-09-282-12/+124
| | | | | | | | | | | | | | | | | | | | 2002-09-27 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (decode_internaldate): New function to decode the INTERNALDATE response from an IMAP server so we don't have to use my broken-date-parser routines. 2002-09-27 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (connect_to_server): NULL-check the streams before unreffing them in the case of a failure during ssl negotiations. * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): Check SSL_ResetHandshake() for errors. Also force a handshake after we've reset the handshake state on the socket. svn path=/trunk/; revision=18252
* Use the summary's last uid as the one to fetch from, ignoring the cache.Not Zed2002-09-272-22/+32
| | | | | | | | | | | | | | | 2002-09-27 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (imap_update_summary): Use the summary's last uid as the one to fetch from, ignoring the cache. Use strotul instead of atoi as well. * providers/imap/camel-imap-store.c (get_folder_counts): If we have the folder open, and the unread count has changed, refresh it. Should fix #30399 enough. Also in non-check-all mode, if we have the folder open, use it anyway. svn path=/trunk/; revision=18242
* Treat spool as a local folder, so the ref checks work right.Not Zed2002-09-261-3/+1
| | | | | | | | | | | | 2002-09-26 Not Zed <NotZed@Ximian.com> * tests/folder/test2.c (main): Treat spool as a local folder, so the ref checks work right. * providers/local/camel-spool-store.c (get_folder): Use creat() instead of open() to create file. svn path=/trunk/; revision=18231
* Implement FOLDER_CREATE flag. (scan_dir): Dont free name on exception, itsNot Zed2002-09-263-20/+87
| | | | | | | | | | | | | | | | | | | | 2002-09-26 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-store.c (get_folder): Implement FOLDER_CREATE flag. (scan_dir): Dont free name on exception, its alloca'd. (scan_dir): If we start scanning from a file, just add that directly. (scan_dir): Allow empty files to also show up in folder list, as well as files starting with "From ". * providers/local/camel-spool-folder.c (camel_spool_folder_new): Check folder != NULL before writing to it. * providers/local/camel-local-store.c (create_folder): Handle a parent of NULL for creating top-level dirs. Part of #31186. svn path=/trunk/; revision=18230
* Store the folder flags in the store summary. (get_one_folder_offline): SetNot Zed2002-09-261-3/+19
| | | | | | | | | | | | 2002-09-26 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (parse_list_response_as_folder_info): Store the folder flags in the store summary. (get_one_folder_offline): Set the noselect url parameter if this is a noselect folder, from the stored summary flags. #30877. svn path=/trunk/; revision=18229
* Decode the INTERNALDATE if we've got one. (imap_update_summary): InsteadJeffrey Stedfast2002-09-241-5/+22
| | | | | | | | | | | | | | | | 2002-09-23 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (add_message_from_data): Decode the INTERNALDATE if we've got one. (imap_update_summary): Instead of requesting a list of specific headers, request HEADER.FIELDS.NOT (RECEIVED) to reduce bandwidth usage even more. (parse_fetch_response): Change slightly to allow HEADER.FIELDS or HEADER.FIELDS.NOT so that we can make changes in imap_update_summary and not need to keep changing this function to match. Also parse an INTERNALDATE response. svn path=/trunk/; revision=18178
* fix non-ANSI switch statement.Dan Winship2002-09-232-0/+2
| | | | | | | | | | | | | * camel-mime-parser.c (folder_scan_drop_step): fix non-ANSI switch statement. * camel-service.c (service_getv): Likewise. * providers/imap/camel-imap-store.c (imap_getv): Likewise. * providers/pop3/camel-pop3-folder.c (cmd_builduid): Likewise. svn path=/trunk/; revision=18157
* Don't increment the response pointer when deciding what type of headerJeffrey Stedfast2002-09-191-4/+8
| | | | | | | | | | | | | 2002-09-19 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (parse_fetch_response): Don't increment the response pointer when deciding what type of header response we got, this screws up the string that we strdup into the part_spec string later. Also, instead of using the entire blob of HEADER.FIELDS that we get in the response, shorten it to just HEADER.FIELDS to use as the part_spec key. svn path=/trunk/; revision=18111
* Include MIME-VERSION and CONTENT-TYPE.Jeffrey Stedfast2002-09-191-1/+1
| | | | | | | | | 2002-09-18 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (CAMEL_MESSAGE_INFO_HEADERS): Include MIME-VERSION and CONTENT-TYPE. svn path=/trunk/; revision=18108
* If we get an ALERT, pass it to the user. An rfc2060 MUST, and bug #22496.Not Zed2002-09-191-0/+10
| | | | | | | | | | 2002-09-18 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-command.c (camel_imap_command_response): If we get an ALERT, pass it to the user. An rfc2060 MUST, and bug #22496. svn path=/trunk/; revision=18107
* Handle when the response is from a HEADER.FIELDS (if so, we don't want toJeffrey Stedfast2002-09-191-5/+18
| | | | | | | | | | | | 2002-09-17 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (parse_fetch_response): Handle when the response is from a HEADER.FIELDS (if so, we don't want to cache the result). (imap_update_summary): Request specific headers when building the CamelMessageInfo's rather than fetching the full headers. svn path=/trunk/; revision=18102
* If header_msgid_decode fails for the content-id field, just grab whateverJeffrey Stedfast2002-09-151-1/+1
| | | | | | | | | | | 2002-09-13 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-part.c (process_header): If header_msgid_decode fails for the content-id field, just grab whatever is between the <>'s (yes, this means that the content-id is invalid - but what can ya do?). Addresses bug #21027. svn path=/trunk/; revision=18071
* Do proper error checking and return -1 on fail.Jeffrey Stedfast2002-09-112-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 2002-09-10 Jeffrey Stedfast <fejj@ximian.com> * camel-folder-summary.c (perform_content_info_save): Do proper error checking and return -1 on fail. (camel_folder_summary_save): Check the return of perform_content_info_save and a few other output calls within the message_info_save loop. If any of them fail, save errno, close the file, and return -1. If we finish the loop without fail, fflush the stream and then fsync (fflush only flushes user-space buffers, you still need to fsync afterward to flush the data to disk). If either fail, treat it as an exception by saving errno, closing the stream, and returning -1. I suspect that this also fixes bug #30150 because the old code would fclose if fflush or fclose failed in the check after the loop (man fclose(3) states that any further calls using the stream (even another call to fclose) will have undefined behaviour no matter what the first fclose call returned). * providers/local/camel-local-summary.c (camel_local_summary_init): Don't malloc a private struct of 0 size. svn path=/trunk/; revision=18036
* Clear the exception even if we failed to get the message (part) from theJeffrey Stedfast2002-09-111-0/+1
| | | | | | | | | | | 2002-09-10 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_fetch_data): Clear the exception even if we failed to get the message (part) from the imap-message-cache if we are online and able to try fetching it from the IMAP server. svn path=/trunk/; revision=18035
* Fixes bug #4224Jeffrey Stedfast2002-09-104-14/+28
| | | | | | | | | | | | | | | | | | 2002-09-09 Jeffrey Stedfast <fejj@ximian.com> Fixes bug #4224 * providers/imap/camel-imap-folder.c (camel_imap_folder_fetch_data): Pass ex into camel_imap_message_cache_get(). * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_get): Now takes an exception and sets it on fail. (camel_imap_message_cache_copy): Updated to properly handle cache_get error conditions. svn path=/trunk/; revision=18027
* clear nonfatal stuff.Not Zed2002-09-043-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-09-04 Not Zed <NotZed@Ximian.com> * tests/folder/test4.c (main): clear nonfatal stuff. * tests/folder/test6.c (main): check inbox and 'another folder' because some servers do different things w/ inbox. * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_get): Dont try to open the directory instead of an empty "" uid. * providers/imap/camel-imap-folder.c (imap_get_message): we dont want to g_return_if_fail, we need to set an exception and always handle the case. (get_message_simple): Set an exception if we get a construct failure. (imap_refresh_info): if we're refreshing inbox, force a reselect. this is required for at least cryus. CHECK doesnt work either :( * tests/lib/folders.c (test_folder_basic): for non-local stores, the folder will have an extra ref for selection, take this into account when checking ref leaks. (test_folder_message_ops): Dont try to delete folder with messages in it, it works generally with imap. also, change params so we can test different mailbox types. (test_folder_message_ops): disconnect remote services before finishing off. doesn't need to stricly but makes ref count checking more accurate. (test_folder_message_ops): removed explicit remote sync, imap does it itself now ... * providers/imap/camel-imap-store.c: (camel_imap_store_finalize): call service_disconnect, so it isn't called later in the finalise chain, to properly cleanup on exit. svn path=/trunk/; revision=17962
* Lots of changes, too numerous to list. Changed to useNot Zed2002-09-037-385/+1078
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-09-04 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c, providers/imap/camel-imap-folder.c: Lots of changes, too numerous to list. Changed to use camel-imap-store-summary to cache list requests. Changed to use a canonicalised url path with / instead of per-store directory separator. Indirects folder name so invalid folder names can still be accessed. Summary now stored in a new expandable format in .ev-store-summary. 2002-08-28 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (construct): Load store summary if it exists. (can_work_offline): Just see if we have any folders to say whether we can work offline or not. Should probably always just return true. 2002-08-27 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store-summary.[ch]: New files to handle offline definition of folders, etc. * camel-url.h: Define CamelURL to be struct _CamelURL rather than anonymous struct. * camel-store-summary.[ch]: a few api tweaks. Also, the summary header is versioned separately at each level, so that version upgrades can be handled separately. Renamed FolderInfo -> StoreInfo to avoid namespace with current FolderInfo code. This should be reversed when the FolderInfo code is rationalised to this new base. 2002-08-23 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-command.c (camel_imap_command): domt encode folder name. * providers/imap/camel-imap-folder.c (do_copy): dont encode folder name. (do_append): dont encode folder name. * providers/imap/camel-imap-store.c (get_folder_status): don encode folder name in imap request. (get_folder_online): here too for creating folder. (rename_folder): Assume the incoming 'new name' is a utf8 path, whereas the 'old name' is as from get folder info (raw). (create_folder): Dont encode parent_name, assume its the raw thing. 2002-08-22 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (get_folder_online): Select based on unconverted name. (imap_build_folder_info): New function to create a folderinfo properly based on raw name. (subscribe_folder): Use above helper. (imap_folder_effectively_unsubscribed): Same here. (imap_forget_folder): Same here. (get_one_folder_offline): " 2002-08-21 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (parse_list_response_as_folder_info): Setup path properly, as decoded path with / separator. Setup full_name as non-decoded raw name. Keep url as decoded path but with server separator ... (ick). (create_folder): Dont call build_path anymore, get_folders() does it for us. (subscribe_folder): Build the path ourself. (imap_folder_effectively_unsubscribed): Same here. (get_subscribed_folders): list using %S not %F, we're using the raw server provided name directly. (subscribe_folder): As above, for SUBSCRIBE. (unsubscribe_folder): Same here. (delete_folder): Same. (rename_folder_info): Same here for source name. (rename_folder): And here? (get_folders_online): Amd here. * providers/imap/camel-imap-utils.c: (imap_parse_list_response): Dont decode the mailbox. * camel-utf8.[ch]: some new utf8 & utf7 utilities. * providers/imap/camel-imap-utils.c (imap_mailbox_encode): (imap_mailbox_decode): use camel_utf7/8* functions instead. : Add config.h and alloca.h headers. svn path=/trunk/; revision=17943
* Change the case sensitive search of subject to expect case insensitiveNot Zed2002-08-292-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-08-29 Not Zed <NotZed@Ximian.com> * tests/folder/test3.c: Change the case sensitive search of subject to expect case insensitive results, as the behaviour has changed. (main): Made the search content before sync nonfatal. its something that needs to be fixed but not practical concern in evolution. * camel-block-file.c (block_file_validate_root): Only spit out the invalid root warnings if the file isn't empty. * camel-text-index.c (text_index_compress_nosync): Swap the path as well when we compress. * camel-mime-parser.c (folder_scan_content): Treat the end of file as a boundary if we're scanning From lines, and drop the last \n. (folder_scan_init_with_fd): Dont pre-read from the fd, and init eof. (folder_scan_init_with_stream): Similar. (folder_read): Handle eof, and set eof on 0 read. (folder_seek): Dont pre-read after a seek, and reset eof flag. (camel_mime_parser_init_with_fd): Fix doco, no pre-read occurs anymore. (camel_mime_parser_init_with_stream): Same. * providers/local/camel-mbox-summary.c (camel_mbox_summary_sync_mbox): Add a \n to end of content of each message, not at start. * providers/local/camel-mbox-folder.c (mbox_append_message): Instead of appending "\nFrom " to a mailbox, start with "From ", and append a \n after the message always. For better mutt/elm compatability. Also, unlock after we've stat'd. (mbox_append_message): Set the message's from_pos exactly as the mbox size. svn path=/trunk/; revision=17921
* fixes a crash on systems that dont have utf7 in iconv.Not Zed2002-08-281-251/+15
| | | | | | | | | | | | | | 2002-08-28 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-utils.c (imap_mailbox_encode): Chagned to use camel_utf8_utf7 code. (imap_mailbox_decode): As above, using camel_utf8_utf7. 'UTF-7' isn't a widely support iconv() codeset, and besides the new code is simpler. * camel-utf8.[ch]: robust utilities for working with utf8 and utf7. svn path=/trunk/; revision=17886
* oops, my deadlock fix wasn't quite right. this should work nowJeffrey Stedfast2002-08-271-19/+19
| | | | svn path=/trunk/; revision=17868
* If the response is NULL, just return. (now works the same way asJeffrey Stedfast2002-08-271-0/+3
| | | | | | | | | | | 2002-08-26 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-command.c (camel_imap_response_free_without_processing): If the response is NULL, just return. (now works the same way as imap_response_free which allowed a NULL response argument). Fixes bug #25491. svn path=/trunk/; revision=17863
* removed a no-longer needed #defineJeffrey Stedfast2002-08-271-3/+0
| | | | svn path=/trunk/; revision=17862
* Lock the CamelService->priv->connect_lock instead of using our ownJeffrey Stedfast2002-08-275-102/+85
| | | | | | | | | | | | | | 2002-08-26 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c: * providers/imap/camel-imap-folder.c: * providers/imap/camel-imap-command.c: Lock the CamelService->priv->connect_lock instead of using our own command_lock. This fixes bug #28177. svn path=/trunk/; revision=17861
* If we fail to send the EHLO/HELO command successfully, setJeffrey Stedfast2002-08-241-3/+24
| | | | | | | | | | | | | | | | | | 2002-08-23 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_helo): If we fail to send the EHLO/HELO command successfully, set transport->connected to FALSE when we close the tcp connection. Also updated to work on an IPv6 network. (smtp_connect): transport->authtypes can be NULL, so NULL-protect the call to g_hash_table_size() - this should fix a warning that was reported on the evolution@ximian.com mailing list. (smtp_set_exception): If the status message is multi-line, add a \n between lines. (connect_to_server): If we are going to ignore the EHLO/HELO error as if it were non-fatal, then we should clear the exception. svn path=/trunk/; revision=17852
* If current_folder is not NULL and the summary for that folder is dirty,Jeffrey Stedfast2002-08-232-8/+32
| | | | | | | | | | 2002-08-22 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (imap_noop): If current_folder is not NULL and the summary for that folder is dirty, sync the flags rather than sending a NOOP. svn path=/trunk/; revision=17842
* Workaround for Courier imap's brokeness when LSUBing the INBOX folder whenJeffrey Stedfast2002-08-232-11/+31
| | | | | | | | | | 2002-08-22 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c (imap_parse_list_response): Workaround for Courier imap's brokeness when LSUBing the INBOX folder when it isn't subscribed to. Fixes bug #28929. svn path=/trunk/; revision=17841
* Override the default noop implementation.Jeffrey Stedfast2002-08-211-1/+21
| | | | | | | | | | | | | | | 2002-08-20 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (imap_noop): Override the default noop implementation. * camel-store.c (camel_store_noop): New virtual method to ping a store. * camel-session.c (get_service): Register a timeout that calls camel_store_noop() every 10 minutes. svn path=/trunk/; revision=17822
* Don't let the minimum recursive depth be negative. (get_folders): PassJeffrey Stedfast2002-08-211-6/+6
| | | | | | | | | | | | 2002-08-20 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (get_folders): Don't let the minimum recursive depth be negative. (get_folders): Pass flags & CAMEL_FOLDER_INFO_SUBSCRIBED as the `lsub' argument to get_folders_online() otherwise we'll end up doing a LIST when we really wanted to do an LSUB. svn path=/trunk/; revision=17819
* Set CAMEL_URL_NEED_PATH for the vFolder provider.Jeffrey Stedfast2002-08-211-1/+1
| | | | | | | | | 2002-08-20 Jeffrey Stedfast <fejj@ximian.com> * camel-session.c: Set CAMEL_URL_NEED_PATH for the vFolder provider. svn path=/trunk/; revision=17817
* Changed the STOREINFO_VERSION - should fix bug #28571, but if it doesn't -Jeffrey Stedfast2002-08-201-1/+1
| | | | | | | | | | 2002-08-19 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c: Changed the STOREINFO_VERSION - should fix bug #28571, but if it doesn't - oh well, I don't care. I'm considering it fixed no matter what. svn path=/trunk/; revision=17809
* Ugh, actually do what i just said i did, last patch wasMichael Zucci2002-08-161-1/+1
| | | | | | wrong. svn path=/trunk/; revision=17784
* Fix the logic check for working out if we add inbox or not, we do it if weNot Zed2002-08-161-2/+4
| | | | | | | | | | 2002-08-16 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (get_folders): Fix the logic check for working out if we add inbox or not, we do it if we listed the namespace. svn path=/trunk/; revision=17783
* added a flags field, defined some flags, currently only used by imap. ThisNot Zed2002-08-154-193/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-08-15 Not Zed <NotZed@Ximian.com> * camel-store.h (CamelFolderInfo): added a flags field, defined some flags, currently only used by imap. This and below is first step to getting incremental folder tree loading. * providers/imap/camel-imap-store.c (get_subscribed_folders): If the subscribed list is empty, always add inbox. (imap_connect_offline): If the 'storeinfo' namespace isn't the same as our own (if its set), then ignore it, assume we changed settings. Otherwise you can't change the namespace ... (get_folders): allow the env variable CAMEL_IMAP_MAX_DEPTH to override the default maximum recursion depth if 10 levels. (camel_imap_store_readline): Dont depend the log debug on d(x) being defined. (get_folder_info_online): changed to use new functions/names. 2002-08-14 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (get_subscribed_folders): Removed the by_hand sillyness. Return an array instead. (get_folders): New method to get folders recursively without having to use '*'. Uses '%', and stops if it gets too deep (current max of 10). (get_folder_counts): New method to fill out unread counts on folderinfo tree. (get_subscribed_folders): Fix some failure logic. * providers/imap/camel-imap-utils.[ch]: Changed IMAP_LIST_FLAGS to use the new CamelFolderInfoFlags directly. svn path=/trunk/; revision=17777
* New function, generate a UID that has better chances of being unique.Peter Williams2002-08-101-6/+19
| | | | | | | | | | | 2002-08-02 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-folder.c (get_temp_uid): New function, generate a UID that has better chances of being unique. (imap_append_offline): Use it here. (imap_transfer_offline): And here. svn path=/trunk/; revision=17757
* Tweak how we build the tree based on whether a full tree or a subtree isPeter Williams2002-08-101-1/+21
| | | | | | | | | | | | | | 2002-08-09 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-store.c (get_folder_info_online): Tweak how we build the tree based on whether a full tree or a subtree is being requested. Fixes subscribe dialog on UW servers. (get_one_folder_offline): Don't add folders that we're not subscribed to; fixes UW folders that weren't being marked as NoSelect because the storeinfo doesn't record that information. svn path=/trunk/; revision=17755
* When renaming our cache, add the "/folders" to the path.Peter Williams2002-08-101-1/+4
| | | | | | | | | 2002-08-09 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-folder.c (imap_rename): When renaming our cache, add the "/folders" to the path. svn path=/trunk/; revision=17752
* Set some default permanent_flags. This is the other cause of bug #28038.Jeffrey Stedfast2002-08-081-3/+9
| | | | | | | | | | | | | | | | | 2002-08-08 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set some default permanent_flags. This is the other cause of bug #28038. (imap_refresh_info): After calling camel_imap_command() with a NULL format value (this is a shortcut to change the current_folder by SELECTing it), call camel_imap_folder_selected(). This may have been why permanent_flags never got set on the folder even after going online in bug #28038. (imap_update_summary): Same here. Also NULL-guard camel_imap_response_free(). svn path=/trunk/; revision=17743
* Set some default permanent_flags. This is the other cause of bug #28038.Jeffrey Stedfast2002-08-081-0/+3
| | | | | | | | | | 2002-08-08 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_init): Set some default permanent_flags. This is the other cause of bug #28038. svn path=/trunk/; revision=17741
* Oops - outbuf pointed to alloca'd memory but we were g_free'ing it afterJeffrey Stedfast2002-08-081-2/+1
| | | | | | | | | | | | | 2002-08-07 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_encode_param): Oops - outbuf pointed to alloca'd memory but we were g_free'ing it after using it. Instead use g_malloc for this outbuf buffer since it may be kinda large. Also don't depend on a single byte to nul-terminate the outbuf buffer so as to be safe with charsets such as UCS2 and UCS4, instead keep a pointer to the end of the buffer. svn path=/trunk/; revision=17737
* Only add the stream to the gdatalist if it is non-NULL.Jeffrey Stedfast2002-08-081-2/+3
| | | | | | | | | 2002-08-07 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (parse_fetch_response): Only add the stream to the gdatalist if it is non-NULL. svn path=/trunk/; revision=17735
* If writing to the sendmail pipe fails, wait for the sendmail process toJeffrey Stedfast2002-08-061-12/+20
| | | | | | | | | | | 2002-08-06 Jeffrey Stedfast <fejj@ximian.com> * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to): If writing to the sendmail pipe fails, wait for the sendmail process to exit before returning. Fixes bug #19636. svn path=/trunk/; revision=17711
* Add messageinfo to id table, and store array index in messageinfo too.Not Zed2002-08-062-82/+58
| | | | | | | | | | | | | | | | | | | | | 2002-08-06 Not Zed <NotZed@Ximian.com> * providers/pop3/camel-pop3-folder.c (cmd_list): Add messageinfo to id table, and store array index in messageinfo too. (fi_to_index): Removed, use index member of messageinfo, fixed callers. (cmd_builduid): Parse the headers of the data, and ignore any status or x-status headers. (uid_to_fi): Removed, use the hashtable instead. (id_to_fi): Same. (cmd_uidl): Add messageinfo to uid table. (pop3_refresh_info): Setup hash tables, and fill out uid table for nonuid capable servers. (pop3_finalize): Destroy hash tables. Only free resources if the uids table is not null (if finalised before we ran refresh info). (id_to_fi): Removed. Use id hash table instead, fixed caller. svn path=/trunk/; revision=17706
* If we are asking for the toplevel folders, use the IMAP store's namespaceJeffrey Stedfast2002-08-062-35/+15
| | | | | | | | | | | | | | | | 2002-08-05 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (get_folder_info_online): If we are asking for the toplevel folders, use the IMAP store's namespace as the toplevel folder rather than an empty string. Fixes bug #28574. (imap_forget_folder): Rearrange the code so that name can never be used uninitialised. * providers/imap/camel-imap-utils.c (imap_namespace_concat): Removed. svn path=/trunk/; revision=17699
* Add CAMEL_MESSAGE_ANSWERED_ALL, for folders that can distinguish aDan Winship2002-08-051-1/+2
| | | | | | | | | | | * camel-folder-summary.h (CamelMessageFlags): Add CAMEL_MESSAGE_ANSWERED_ALL, for folders that can distinguish a reply-to-sender from a reply-to-all. (eg, Exchange) * providers/local/camel-local-folder.c (local_init): Add ANSWERED_ALL to permanent_flags too. svn path=/trunk/; revision=17694
* Fixes bug #26237.Jeffrey Stedfast2002-08-032-55/+20
| | | | | | | | | | | | | | | 2002-08-02 Jeffrey Stedfast <fejj@ximian.com> Fixes bug #26237. * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): Don't prepend any namespace shit in the %F case. * providers/imap/camel-imap-utils.c (imap_parse_list_response): Don't strip off the namespace. svn path=/trunk/; revision=17693
* If the folder name contains the directory separator, reject it.Peter Williams2002-08-031-1/+9
| | | | | | | | | 2002-08-01 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-store.c (create_folder): If the folder name contains the directory separator, reject it. svn path=/trunk/; revision=17690
* Clear the summary after building the 'removed uid' list.Not Zed2002-08-021-1/+1
| | | | | | | | | 2002-08-02 Not Zed <NotZed@Ximian.com> * providers/local/camel-mbox-summary.c (mbox_summary_check): Clear the summary after building the 'removed uid' list. svn path=/trunk/; revision=17686
* revert jeff's patch below, and do it slightly differently, and stop theNot Zed2002-08-021-26/+37
| | | | | | | | | | | | | | | | | | 2002-08-02 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (message_info_load): revert jeff's patch below, and do it slightly differently, and stop the auto-reformatting bullshit. 2002-08-02 Not Zed <NotZed@Ximian.com> * providers/local/camel-maildir-summary.c (message_info_new): If we get a duplicate, just re-use the old info. (remove_summary): Add any removed to a change list. (maildir_summary_check): If we find new ones in 'cur' track them in the change list. Removed FIXME about it. For #18348. svn path=/trunk/; revision=17685
* camel:Peter Williams2002-08-011-92/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-07-29 Peter Williams <peterw@ximian.com> Fix bug #28238 * providers/imap/camel-imap-store.c (imap_forget_folder): New function, breaking out the code in delete_folder() to handle when a folder is removed. (imap_folder_effectively_unsubscribed): New function, breaking out the code in unsubscribe_folder() to handle when a folder is unsubscribed. (imap_check_folder_still_extant): New function, check whether a folder exists by LIST'ing it. (imap_store_refresh_folders): Add code here to check if the folder still exists if we're unable to refresh its info. If so, pretend that it was unsubscribed (to get the mailer to remove it from the tree) and delete its cache. If somehow this goofs up, the worst that can happen is that we must redownload the headers. (get_folder_status): If we can't get the status, behave as above. (delete_folder): Call imap_forget_folder() where the bulk of this code has gone. (unsubscribe_folder): Call imap_folder_effectively_unsubscribed() where the bulk of this code has gone. mail: 2002-07-31 Peter Williams <peterw@ximian.com> * mail-folder-cache.c: Add another bitfield "unsub" (real_flush_updates): If unsubscribing, manually remove the folder from the shell. (unset_folder_info): Add another parameter which is used to set the unsub member. (store_folder_unsubscribed): Pass true for @unsub. (unset_folder_info_hash): Pass false for @unsub. * subscribe-dialog.c (fe_done_subscribing): Don't notify the shell here. The folder cache does it now, and it was broken to make the CORBA call in another thread anyway. svn path=/trunk/; revision=17669
* Disable my fix to not cache headers as it means that each time we load theJeffrey Stedfast2002-08-011-6/+8
| | | | | | | | | | 2002-07-31 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (parse_fetch_response): Disable my fix to not cache headers as it means that each time we load the message, we've got to re-fecth the headers. svn path=/trunk/; revision=17665
* Use the same command-counter mojo that the append code uses in case thePeter Williams2002-07-311-1/+2
| | | | | | | | | | 2002-07-30 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-folder.c (imap_transfer_offline): Use the same command-counter mojo that the append code uses in case the use tries to copy the same message to the folder repeatedly. svn path=/trunk/; revision=17641
* If the path exists and is a directory, return non-NULL. Missed this beforeJeffrey Stedfast2002-07-274-10/+10
| | | | | | | | | | 2002-07-26 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-local-store.c (get_folder): If the path exists and is a directory, return non-NULL. Missed this before which is how we could return NULL even on success. Oops. svn path=/trunk/; revision=17618
* The flags'n'tags copy was unnecessary. Removed it.Peter Williams2002-07-271-4/+0
| | | | | | | | | | 2002-07-26 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-summary.c (camel_imap_summary_add_offline_uncached): The flags'n'tags copy was unnecessary. Removed it. svn path=/trunk/; revision=17607
* Revert Jeff's previous change, it broke local folders. UninitializedPeter Williams2002-07-274-11/+13
| | | | | | | | | 2002-07-26 Peter Williams <peterw@ximian.com> * Revert Jeff's previous change, it broke local folders. Uninitialized exceptions or something. svn path=/trunk/; revision=17605
* ioops, this file tooJeffrey Stedfast2002-07-261-3/+2
| | | | svn path=/trunk/; revision=17600
* If we're gonna do an elite hack, lets do it right.Jeffrey Stedfast2002-07-263-10/+9
| | | | | | | | | | | | | | | | | | | | | 2002-07-25 Jeffrey Stedfast <fejj@ximian.com> If we're gonna do an elite hack, lets do it right. * providers/local/camel-local-store.c (get_folder): On success, return non-NULL so that our caller doesn't have to depend on 'ex' being non-NULL in order to work correctly. * providers/local/camel-mbox-store.c (get_folder): Don't bother checking if an exception was set, just use the return value of camel-local-store's get_folder. * providers/local/camel-maildir-store.c (get_folder): Same as the mbox change. * providers/local/camel-mh-store.c (get_folder): Here too. svn path=/trunk/; revision=17599
* Prototype.Peter Williams2002-07-264-7/+42
| | | | | | | | | | | | | | | | | | | | | | 2002-07-25 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-summary.h (camel_imap_summary_add_offline_uncached): Prototype. * providers/imap/camel-imap-summary.c (camel_imap_summary_add_offline_uncached): New function to add an uncached message to the summary while offline. * providers/imap/camel-imap-store.c (imap_connect_online): Only refresh the folders if the disco diary is empty (ie, we're not resyncing.) * providers/imap/camel-imap-folder.c (imap_transfer_offline): Emit an event for the source if deleting its originals. Also, if we can't load the message, still process it, using the new imap summary function. svn path=/trunk/; revision=17596
* Remove "possibly non-fatal" exception strings, all exceptions are fatalJeffrey Stedfast2002-07-262-36/+102
| | | | | | | | | | | | | | | | | | | 2002-07-25 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c: Remove "possibly non-fatal" exception strings, all exceptions are fatal unless their caller decides otherwise. (connect_to_server): If smtp_helo() fails due to us getting disconnected, treat the exception as fatal. (smtp_connect): Abort if smtp_helo() fails and we got disconnected. (smtp_send_to): If smtp_mail() fails, abort the send operation. (smtp_set_exception): If respbuf was NULL, then we got disconnected and so update our state accordingly. (smtp_disconnect): Only send a QUIT if we are still in the connected state (or, at least think we are). svn path=/trunk/; revision=17595
* It would help to mark the UIDs as deleted before we try to expunge themPeter Williams2002-07-261-6/+16
| | | | | | | | | | | | | | 2002-07-24 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-folder.c (imap_expunge_uids_resyncing): It would help to mark the UIDs as deleted before we try to expunge them (in the case when no other UIDs were marked deleted this didn't happen.) Also fix an FMR. (imap_expunge_uids_offline): Trigger a folder_changed event with our own changeinfo because camel_imap_response_free won't be able to do that for us. svn path=/trunk/; revision=17589
* When writing the summary, use TRUNC flag, duh. Also, write to a temp fileNot Zed2002-07-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 2002-07-25 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_save): When writing the summary, use TRUNC flag, duh. Also, write to a temp file first, and rename when closed successfully, and check ferror() and fclose() against 0 rather than -1. * providers/local/camel-mbox-summary.c (summary_update): Decrement i if we remove the summary item so we dont skip every 2nd one. * camel-mime-utils.c (header_decode_mailbox): Use rfc2047_decode_word explicitly incase we just found an encoded word. Stops us re-decoding the string twice, which fixes memory corruption in #26330 when the HUGE string is used later. 2002-07-24 Not Zed <NotZed@Ximian.com> * camel-partition-table.c (camel_key_table_next): Didn't unlock if we exited on an empty key list. svn path=/trunk/; revision=17570
* Sync before doing an expunge if we dont have uidplus. See #25766.Not Zed2002-07-241-1/+16
| | | | | | | | | | 2002-07-24 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (imap_expunge_uids_online): Sync before doing an expunge if we dont have uidplus. See #25766. (imap_expunge_uids_resyncing): Same here. svn path=/trunk/; revision=17562
* Move folders to a subdirectory of storage_path, rather than in it. Bye byeNot Zed2002-07-241-12/+23
| | | | | | | | | | | | | | 2002-07-24 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (get_folder_online): Move folders to a subdirectory of storage_path, rather than in it. Bye bye everyones settings. See 24947. (get_folder_offline): And here too. (delete_folder): And here too. (rename_folder): and here too. (get_folder_info_offline): And here too. I love code reuse. svn path=/trunk/; revision=17561
* Duplicated the very much hack in imap_store_refresh_folders() to avoid aNot Zed2002-07-241-1/+4
| | | | | | | | | | | 2002-07-24 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (get_folder_info_online): Duplicated the very much hack in imap_store_refresh_folders() to avoid a deadlock in #27959. A decent fix has to wait for a rewrite. svn path=/trunk/; revision=17560
* Got rid of the stupid "tryagain" semantics, which didn't work.Not Zed2002-07-171-31/+32
| | | | | | | | | | 2002-07-17 Not Zed <NotZed@Ximian.com> * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Got rid of the stupid "tryagain" semantics, which didn't work. (pop3_connect): Fixed here to only retry under proper conditions. svn path=/trunk/; revision=17488
* Clean up some improper usage of CamelExceptions (looking atPeter Williams2002-07-173-10/+14
| | | | | | | | | | | | | | | | | 2002-07-16 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-folder.c (imap_sync_online): Clean up some improper usage of CamelExceptions (looking at camel_exception_is_set when ex = NULL). * providers/imap/camel-imap-store.c (get_folder_online): Here too. * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_new): Nothing sets the exception so don't bother to check it at the end of this function. Prevents a warning about checking a NULL exception's value. svn path=/trunk/; revision=17482
* Make the standard AUTH format take priority over the AUTH= priority, sinceJeffrey Stedfast2002-07-172-18/+35
| | | | | | | | | | | | 2002-07-16 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_helo): Make the standard AUTH format take priority over the AUTH= priority, since sometimes servers only list a subset of the supported authtypes in the AUTH= response while they list all authtypes in the standard AUTH response. Fixes "bug" #27841. svn path=/trunk/; revision=17479
* If we're not online and the message isn't in our cache, give up.Peter Williams2002-07-161-1/+7
| | | | | | | | | 2002-07-15 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-folder.c (imap_get_message): If we're not online and the message isn't in our cache, give up. svn path=/trunk/; revision=17475
* Get rid of the constant 'required' variable, just use the value whenJeffrey Stedfast2002-07-161-3/+1
| | | | | | | | | | 2002-07-15 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_data): Get rid of the constant 'required' variable, just use the value when calling set_best_encoding. svn path=/trunk/; revision=17465
* Changed the mbox and spool provider descriptions to try and be more clear.Jeffrey Stedfast2002-07-161-2/+2
| | | | | | | | | | | | | | 2002-07-15 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-local-provider.c: Changed the mbox and spool provider descriptions to try and be more clear. I'm not sure I like the mention of Evolution in the mbox provider description, but there was no other way to make it clear that it MOVED mail out of the mbox folder into a folder managed by Evolution without mentioning Evolution. *sigh* Anyways, to me "retrieve" means move, but apparently this isn't clear to the weak minded. svn path=/trunk/; revision=17464
* >= is not appropriate here because the sequences are 1-based; so seq =Peter Williams2002-07-161-2/+3
| | | | | | | | | | | | 2002-07-15 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-folder.c (imap_rescan): >= is not appropriate here because the sequences are 1-based; so seq = summary_len is valid. Hopefully addresses 15646, because this caused the last message in a folder to be reloaded, replacing its CamelMessageInfo, and the tree view was using the old CamelMessageInfo. svn path=/trunk/; revision=17460
* Only assign a uid if indexing is enabled. This stops us always assigning aNot Zed2002-07-151-1/+14
| | | | | | | | | | | | | | | | | | | | | 2002-07-13 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_info_new_from_message): Only assign a uid if indexing is enabled. This stops us always assigning a uid in the imap folder and disco folder? * providers/imap/camel-imap-folder.c (imap_update_summary): Also check the uid is set at all, another bit of a fix for #15667. 2002-07-09 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (imap_update_summary): Check for existing messages of the same uid before doing anything. If it exists, do nothing (perhaps it should merge?). A dirty hack for #15667. svn path=/trunk/; revision=17450
* Handle multipart/encrypted parts too.Jeffrey Stedfast2002-07-121-6/+10
| | | | | | | | | | | | | 2002-07-12 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (get_content): Handle multipart/encrypted parts too. * camel-mime-part-utils.c (camel_mime_part_construct_content_from_parser): Handle multipart/encrypted types too. svn path=/trunk/; revision=17434
* Don't let any parts have a binary encoding.Jeffrey Stedfast2002-07-121-1/+1
| | | | | | | | | 2002-07-11 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_data): Don't let any parts have a binary encoding. svn path=/trunk/; revision=17433
* oops, apparently I didn't save?Jeffrey Stedfast2002-07-121-0/+1
| | | | svn path=/trunk/; revision=17429
* Fixes bug #27672Jeffrey Stedfast2002-07-121-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | 2002-07-11 Jeffrey Stedfast <fejj@ximian.com> Fixes bug #27672 * camel-mime-filter-bestenc.c: Conditionally #include <config.h> * camel-mime-filter-linewrap.c: Same here... although we could probably just get rid of this filter? We don't seem to use it anywhere since we try to QP/Base64 encode any text parts with long lines. Besides, we couldn't use this filter for SMTP anyway since we can't risk possibly linewrapping a binary mime part. I dunno, maybe this could be useful in the composer though? *shrug* * providers/smtp/camel-smtp-transport.c (smtp_data): Always call camel_mime_message_set_best_encoding() even if the server allows 8BITMIME and even if we don't have any 8bit parts because we may have parts with long lines (>998 octets) which also need to be encoded. * camel-mime-message.c (check_8bit): Don't forget to check for the binary encoding here as well. svn path=/trunk/; revision=17428
* If we are fetching HEADERs, don't cache the stream - instead just create aJeffrey Stedfast2002-07-121-23/+34
| | | | | | | | | | | 2002-07-11 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (parse_fetch_response): If we are fetching HEADERs, don't cache the stream - instead just create a mem-stream and return that. This reduces a significant amount of overhead due to disk i/o. svn path=/trunk/; revision=17424
* Set the IS_SOURCE provider flag.Jeffrey Stedfast2002-07-051-1/+2
| | | | | | | | | 2002-07-04 Jeffrey Stedfast <fejj@ximian.com> * providers/nntp/camel-nntp-provider.c: Set the IS_SOURCE provider flag. svn path=/trunk/; revision=17369
* Change all exceptions to report which POP server failed (and tried to makeJeffrey Stedfast2002-07-051-21/+25
| | | | | | | | | | 2002-07-04 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-store.c: Change all exceptions to report which POP server failed (and tried to make a few of the exceptions a bit more clear). svn path=/trunk/; revision=17367
* If we get an exception from the child sync, update the exception string soNot Zed2002-07-031-1/+2
| | | | | | | | | | | | | | | | | | | | 2002-07-03 Not Zed <NotZed@Ximian.com> * camel-vee-folder.c (vee_sync): If we get an exception from the child sync, update the exception string so we know where it really was. * camel-vee-store.c (change_folder): Util to emit created/deleted events. (vee_get_folder): If the folder has path elements, and its parents dont exist, create dummy no-select nodes. This is for bug #4246. (vee_delete_folder): Use change_folder() to save code. * providers/local/camel-mbox-folder.c (mbox_set_message_flags): Only set xevchange if we're storing status headers in pine format, so we dont do a full sync every time any flag changes. svn path=/trunk/; revision=17360
* Remove the #include for camel-spoold-store.hJeffrey Stedfast2002-06-261-1/+0
| | | | | | | | | 2002-06-25 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-local-provider.c: Remove the #include for camel-spoold-store.h svn path=/trunk/; revision=17285
* Include <sys/time.h> for struct timeval.Not Zed2002-06-2618-2403/+888
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-06-26 Not Zed <NotZed@Ximian.com> * camel-gpg-context.c: Include <sys/time.h> for struct timeval. * providers/local/camel-local-provider.c (camel_provider_module_init): Removed spoold provider. The spool provider does it now. 2002-06-25 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-folder.c (camel_spool_folder_new): Support a new xstatus option - folders update/honour the Status/X-Status headers in addition to X-Evolution. * providers/local/camel-local-summary.c (camel_local_summary_write_headers): If supplied with an additional status or xstatus arg, write a Status header and/or X-Status. Also fix the case of properly terminating the headers if an xev line isn't supplied. * providers/local/Makefile.am (libcamellocalinclude_HEADERS,SOURCES): Removed spoold-store.[ch]. * providers/local/camel-local-provider.c (camel_provider_module_init): For the spoold type, just use the spool store instead. * providers/local/camel-spool-store.h: Added a type field, so the 1 store can implement different types without having to subclass. * providers/local/camel-spool-store.c (camel_spool_store_get_toplevel_dir): Removed, inherits from local store now. (construct): If we're pointing to a file, treat it as mbox mode, otherwise treat it as 'elm' mode. (get_folder): Only test for INBOX in mbox mode. (get_folder_info_elm): (get_folder_info_mbox): Two alternatives for getting folder info, depending on the type of folder we're looking at. (get_folder_info_mbox): Make the url include the protocol. (scan_dir): " * providers/local/camel-spoold-store.c (camel_spoold_store_get_toplevel_dir): Removed, inherits from local store now. * camel-folder.c (get_message_user_tag): Dont use a g_return_if_fail for info==NULL. This is not an error. (set_message_user_tag): And same here. (set_message_user_flag): Sigh, and here. (get_message_user_flag): And here. (set_message_flags): and here ... (get_message_flags): Dum de dum, de done at last. * providers/local/camel-mbox-folder.c (mbox_get_message): Check for new messages whenever we retrieve one. In the common no-update case, this is a single stat. (mbox_get_message): If we need to rescan, then force a full rescan to make sure it does the right thing. (mbox_get_message): Cleanup the exception handling a bit, if we do get an error, propagate any folder changes anyway as well. (mbox_set_message_user_flag): Argh more of these stupid g_returns taht shouldn't be. (mbox_set_message_user_tag): Here too. (mbox_set_message_flags): If the read flag is being changed, mark it as an xevchange (i.e. Status line change). * providers/local/camel-mbox-summary.c (summary_rebuild): Merged into summary_update. (summary_update): Changed to allow it to update existing lists of messages without clearing out the summary. (mbox_summary_check): Dont clear the summary, just re-scan. (message_info_new): Attempt to support the 'Status: RO' elm/pine thing. (camel_mbox_summary_encode_status): (camel_mbox_summary_decode_status): Util functions for creating/parsing the Status line. (camel_mbox_summary_sync_mbox): Write out the status line if we're going to try support it. (camel_mbox_summary_xstatus): Implement option to control read/write of (x-)status. (message_info_new): Do x-status stuff based on run-time option. (camel_mbox_summary_sync_mbox): " (mbox_summary_add): If x-status enabled, then always add status/x-status headers to message. * camel-folder-summary.c (summary_assign_uid): If the messageinfo is already in the summary, AND is the same messageinfo, dont do anything, return a value to indicate this. (camel_folder_summary_add): Do nothing if this info already in the summary, so we can perform updates. 2002-06-24 Not Zed <NotZed@Ximian.com> * providers/local/camel-local-summary.c (camel_local_summary_check_force): New method to force the next summary check to be a full check, set if a mismatch occurs. * camel-folder-summary.c (camel_folder_summary_load): If we have no summary path set, dont do any i/o, rather than abort. (camel_folder_summary_save): " (camel_folder_summary_header_load): " * providers/local/camel-spool-store.h: Inherit from camel mbox store, even if we override almost everything. * providers/local/camel-local-folder.c (camel_local_folder_construct): If the base path points to a file, use that as the folder path as well. * providers/local/camel-spool-folder.h: Inherit from camel-mbox-folder. * providers/local/camel-spool-summary.c (spool_summary_sync_full): Use camel_mbox_summary_sync_mbox to do most of the work. * providers/local/camel-spool-summary.[ch]: Make spool-summary inherit from mbox summary rather than foldersummary. * providers/local/camel-mbox-summary.c (mbox_summary_sync): Make sync_full/quick virtual methods. (camel_mbox_summary_sync_mbox): The full sync method put into a simple function that sync's from fd to fd. (mbox_summary_sync_full): Use summary_sync_mbox to do the real work. (mbox_summary_check): Create removed events if the folder gets cleared. Also, dont clear the summary before a rebuild, try to merge. svn path=/trunk/; revision=17284
* Make sure we hold the command_lock before accessing current_folder.Jeffrey Stedfast2002-06-202-2/+20
| | | | | | | | | | | | | | | | | | | 2002-06-19 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_refresh_info): Make sure we hold the command_lock before accessing current_folder. (imap_append_online): Same. (imap_transfer_online): Same. * providers/imap/camel-imap-store.c (delete_folder): We need to hold the command_lock before we can set the current_folder to NULL. (rename_folder): Same. (get_folder_info_online): We need to make sure we hold the command_lock in order to use current_folder. (everywhere): Same. svn path=/trunk/; revision=17233
* Don't bother trying to authenticate (and thus don't throw up an errorJeffrey Stedfast2002-06-191-5/+6
| | | | | | | | | | | | | | | | 2002-06-19 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): Don't bother trying to authenticate (and thus don't throw up an error dialog) unless the server is an ESMTP server and supports authentication. * camel-sasl-plain.c: Change the user-friendly name to PLAIN, this is what it should be. Not "Password" because user's immediately think that they need authentication when they see "Password" even if they don't need it at all. svn path=/trunk/; revision=17232
* Unlock the command_lock after each UID STORE command so that otherJeffrey Stedfast2002-06-151-5/+10
| | | | | | | | | | 2002-06-14 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_sync_online): Unlock the command_lock after each UID STORE command so that other (probably more important) threads can send their requests. svn path=/trunk/; revision=17188
* Updated to use ctx->sign_protocol rather than ctx->protocol.Jeffrey Stedfast2002-06-151-1/+1
| | | | | | | | | | | | | | 2002-06-14 Jeffrey Stedfast <fejj@ximian.com> * camel-multipart-signed.c: Updated to use ctx->sign_protocol rather than ctx->protocol. * camel-cipher-context.h: Add an ecnryption protocol member. * camel-pgp-context.c (camel_pgp_context_init): Set the encryption protocol. svn path=/trunk/; revision=17186
* Remove the CONF_DEFAULT_PATH entry, as this is handled by the url configNot Zed2002-06-066-33/+469
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-06-04 Not Zed <NotZed@Ximian.com> * providers/local/camel-local-provider.c: Remove the CONF_DEFAULT_PATH entry, as this is handled by the url config stuff. This made it basically impossible to configure any local folder from the gui. * providers/local/camel-local-folder.c (local_refresh_info): Force a refresh. Should work for all local folders to force them to refresh. * providers/local/camel-maildir-folder.c (maildir_refresh_info): Removed, moved into camel-local-folder. * providers/local/camel-mh-summary.c (mh_summary_next_uid_string): Once we assign or get a uid, tell the summary of this, so the next uid we get will be higher than any previously. * camel-object.c (camel_object_ref, camel_object_unref): I got sick of casting, these now take void * like they should, and perform their own run-time type checking. * providers/local/camel-mh-store.c (recursive_scan): Changed to use stat, not lstat (*shrug* maybe someone wants to softlink their maildir tree?). (inode_hash): (inode_equal): (inode_free): Copied from camel-maildir store (should put into camel-local-store or utils?). (recursive_scan): Changed to check for re-visiting inodes. Also, it builds the tree itself, rather than using folder_info_build. (add_folder): Changed to folder_info_new. (recursive_scan): Properly honour the recursive flag. Also, lookup unread count from folder. (folder_info_new): Init unread message count to -1, since we dont know yet. (folder_info_new): Take the name as an argument, and perform the merging here. (folders_update): Util func to add/remove folders from .folders file. I'm assuming its sorted. (get_folder): Add the folder to .folders if we created a new one, and if it exists. (delete_folder): Remove from .folders, etc. (folders_scan): If we have a .folders file, read and use that instead. (recursive_scan): Handle scanning from a particular directory properly. (rename_folder): Implement so we can track any changes to the .folders file if its turned on. ** Applied patch below from Greg Hudson. 2002-05-10 Greg Hudson <ghudson@mit.edu> * camel-mh-store.c (get_inbox, get_folder_info, recursive_scan, add_folder): Implement support for MH stores. * camel-mh-summary.c (mh_summary_check, sort_uid_cmp): Sort MH messages by message number (uid), like we sort maildir messages by date. * camel-local-provider.c (mh_provider): Turn on source and store flags. svn path=/trunk/; revision=17130
* setup/free the mech string.Not Zed2002-06-032-1/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-06-02 Not Zed <NotZed@Ximian.com> * camel-sasl.c (camel_sasl_new): (camel_sasl_finalize): setup/free the mech string. * camel-sasl.h: Added 'mech' mechanism string. 2002-06-01 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (imap_getv): Implement. Only the object_description arg. (camel_imap_folder_get_type): Init parent_class holder. * providers/local/camel-local-folder.c (local_getv): Implement, object_description arg. * camel-folder.c (folder_getv): Implement, add a bunch of args you can get -> camel_folder_get_unread_count etc will be going RSN i hope. (camel_folder_finalize): Free cached description string. * camel-object.c (cobject_getv): Implement CAMEL_OBJECT_ARG_DESCRIPTION, just return the classname of the object. (camel_object_getv): (camel_object_get): (camel_object_setv): (camel_object_set): Take object = void *, to simplify usage. (camel_object_setv): Removed unecessary locals. (camel_object_getv): Same. (camel_object_free): New method, free an arg, upto implementations whether args are static/const or not. (cobject_free): Implement a dummy do nothing free. 2002-05-31 Not Zed <NotZed@Ximian.com> * camel-vee-folder.c (camel_vee_folder_get_location): new function to get the real location (folder) (and uid) of a vfolder object. Using the folderinfo, since we already have it, maybe it should use the uid. svn path=/trunk/; revision=17073
* When the part is a multipart/signed, make sure to free the part_specJeffrey Stedfast2002-06-011-13/+14
| | | | | | | | | | 2002-05-31 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (get_content): When the part is a multipart/signed, make sure to free the part_spec before returning (the other types already did this properly). svn path=/trunk/; revision=17066
* Free the path buffer when we're done with it.Jeffrey Stedfast2002-06-012-2/+6
| | | | | | | | | | | | | 2002-05-31 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_get): Free the path buffer when we're done with it. * providers/imap/camel-imap-folder.c (imap_update_summary): Free the final tagged response buffer. svn path=/trunk/; revision=17065
* If we fail to read a literal, free the temporary string buffer.Jeffrey Stedfast2002-06-011-6/+5
| | | | | | | | | 2002-05-31 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-command.c (imap_read_untagged): If we fail to read a literal, free the temporary string buffer. svn path=/trunk/; revision=17063
* Revert my fix from the other day since camel_imap_command_response()Jeffrey Stedfast2002-06-012-6/+9
| | | | | | | | | | | | | | | 2002-05-31 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_rescan): Revert my fix from the other day since camel_imap_command_response() doesn't guarentee that resp will be set to NULL on error. * providers/imap/camel-imap-command.c (camel_imap_command_response): Use a different variable to get the return of imap_parse_untagged so that we don't lose the pointer to the original malloc'd respbuf buffer. svn path=/trunk/; revision=17061
* Added a protocol field for users to use.Not Zed2002-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-05-30 Not Zed <NotZed@Ximian.com> * camel-cipher-context.h: Added a protocol field for users to use. * camel-stream-filter.c (do_read): Sigh, the pre-size is READ_PAD not READ_SIZE. Big difference. (READ_PAD): Bumped upto 128 from 64, so we can fit a typical line in full. * providers/imap/camel-imap-folder.c (get_content): Changed to load multipart/signed as an opaque block into the right kind of object. * camel-multipart.h (struct _CamelMultipart): Removed the boundary field. It wans't actually used anywhere. * camel-seekable-substream.c (camel_seekable_substream_new_with_seekable_stream_and_bounds): Shortened this stupidly long name to just :new(), its the only way its ever used. Fixed all callers. * camel-multipart-signed.[ch]: new wrapper for multipart/signed types. We need to treat the entire content as a blob of data for transport purposes. This also cleans up a lot of the sign/verify handling. * camel-mime-part-utils.c (camel_mime_part_construct_content_from_parser): Just call camel_multipart_construct_from_parser for multipart parts, also use a multipart_signed for multipart/signed types. * camel-multipart.c (camel_multipart_construct_from_parser): New virtual function for multiparts to buld themselves. (construct_from_parser): Implement for normal multiparts. (toplevel): Got rid of a warning, it'll never be an abstract class. * camel-pgp-context.c (pgp_hash_to_id): (pgp_id_to_hash): Implement. (camel_pgp_context_init): Init the pgp protocol specifier. * camel-cipher-context.c (camel_cipher_id_to_hash): (camel_cipher_hash_to_id): Util virtual methods to handle the cipher id string. * camel-mime-filter-canon.[ch]: A new filter, end/start of line canonicalisation filter. Can escape "From " and strip trailing whitespace, and canonicalise the end of line to crlf or to lf. 2002-05-29 Not Zed <NotZed@Ximian.com> * camel-multipart.h (struct _CamelMultipart): Removed the 'parent', nothing used it, anywhere. Cleaned up some formatting slightly. svn path=/trunk/; revision=17057
* On error, don't leak the GByteArray buffer.Jeffrey Stedfast2002-05-311-0/+1
| | | | | | | | | 2002-05-30 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (camel_imap_store_readline): On error, don't leak the GByteArray buffer. svn path=/trunk/; revision=17054
* Free the response before checking for errors. I'm not sure this'llJeffrey Stedfast2002-05-311-4/+33
| | | | | | | | | | | | | 2002-05-30 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_rescan): Free the response before checking for errors. I'm not sure this'll actually fix the memory leak here, but it might? Certainly can't hurt. * camel-block-file.c (camel_block_file_finalise): Destroy the blocks hash table. svn path=/trunk/; revision=17053
* Only free the LOGOUT response if it is non-NULL.Jeffrey Stedfast2002-05-301-1/+2
| | | | | | | | | 2002-05-29 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (connect_to_server): Only free the LOGOUT response if it is non-NULL. svn path=/trunk/; revision=17036
* Implement. Run a summary check to update for any newly arrived messages.Not Zed2002-05-292-1/+20
| | | | | | | | | | | | | 2002-05-28 Not Zed <NotZed@Ximian.com> * providers/local/camel-maildir-folder.c (maildir_refresh_info): Implement. Run a summary check to update for any newly arrived messages. * providers/local/camel-maildir-store.c (scan_dir): If we have a folder, execute a refresh_info on it, to suck in any new stuff. svn path=/trunk/; revision=17029
* On connection failure, unref the tcp stream.Jeffrey Stedfast2002-05-285-77/+207
| | | | | | | | | | | | | | | | | | | | | | | 2002-05-27 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (connect_to_server): On connection failure, unref the tcp stream. * providers/pop3/camel-pop3-store.c (connect_to_server): On connection failure, unref the tcp stream. * providers/imap/camel-imap-store.c (connect_to_server): On connection failure, unref the tcp stream. * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types): Our parent class is no longer CamelRemoteStore. (nntp_store_init): Same. (camel_nntp_store_get_type): Here too. (nntp_connect): Rewritten to try to connect via SSL. Also remove code using CamelRemoteStore. (camel_nntp_command): Don't call camel_remote_store_connected(). svn path=/trunk/; revision=17022
* Helps if we allocate enough space here. Also, start smoking the sameJeffrey Stedfast2002-05-252-4/+12
| | | | | | | | | | | | 2002-05-24 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (content_info_get_part_spec): Helps if we allocate enough space here. Also, start smoking the same purple flavoured IMAP crack when counting parts (parts don't count if their parent part is a message/* part with a parent part). Fixes bug #25260. svn path=/trunk/; revision=17014
* Use the new readline function.Jeffrey Stedfast2002-05-253-18/+34
| | | | | | | | | | | | | | | | | 2002-05-24 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-command.c (imap_read_untagged): Use the new readline function. * providers/imap/camel-imap-store.c (connect_to_server): Use the new camel_imap_store_readline() function which doesn't suck quite as bad as the original camel_remote_store_recv_line() function. (camel_imap_store_readline): New function to replace camel_remote_store_recv_line(). This function is at least safe with embedded nul chars. Not that any of our callers use it *sigh*. svn path=/trunk/; revision=17012
* Added some NULL protection fixes.Jeffrey Stedfast2002-05-241-8/+21
| | | | | | | | | 2002-05-24 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (connect_to_server): Added some NULL protection fixes. svn path=/trunk/; revision=16997
* Removed from the build. Glory glory hallelujah.Jeffrey Stedfast2002-05-234-152/+445
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-05-22 Jeffrey Stedfast <fejj@ximian.com> * camel-remote-store.c: Removed from the build. Glory glory hallelujah. * camel-disco-store.c: Updated to inherit from CamelStore rather than CamelRemoteStore. * providers/imap/camel-imap-command.c (imap_command_start): Don't use the camel-remote-store shit to send a string. Just use camel_stream_printf for chrissakes. * providers/imap/camel-imap-store.c: Updated to not depend on CamelRemoteStore and to handle STARTTLS. (imap_disconnect_online): Unref the streams. (imap_keepalive): Removed. (camel_imap_store_connected): New function to replace camel_remote_store_connected(). (camel_imap_store_finalize): Unref the streams. (camel_imap_store_recv_line): New function to replace camel_remote_store_recv_line(). (imap_get_capability): Renamed from connect_to_server (connect_to_server): New function to try and connect to the server. (connect_to_server_wrapper): New wrapper function around connect_to_server that takes the ssl modes into consideration. (query_auth_types): Don't bother calling our parent's implementation of query_auth_types() since CamelDiscoStore doesn't have any anyway. (imap_get_name): New method to implement CamelService::get_name svn path=/trunk/; revision=16975
* Don't call some retarded function to simply set an exception.Jeffrey Stedfast2002-05-223-4/+8
| | | | | | | | | 2002-05-16 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (get_folder_offline): Don't call some retarded function to simply set an exception. svn path=/trunk/; revision=16970
* New function to parse a NAMESPACE response properly.Jeffrey Stedfast2002-05-164-32/+283
| | | | | | | | | | | | 2002-05-15 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c (imap_parse_namespace_response): New function to parse a NAMESPACE response properly. (imap_namespaces_destroy): New function to destroy the returned structure from the above function. svn path=/trunk/; revision=16927
* If the part_spec is an empty string for a leaft part, use "1" since weJeffrey Stedfast2002-05-161-3/+1
| | | | | | | | | | 2002-05-15 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (get_content): If the part_spec is an empty string for a leaft part, use "1" since we don't actually want to get the raw message headers too. svn path=/trunk/; revision=16923
* removed. (imap_store_refresh_folders): Copy the folders first, thenNot Zed2002-05-151-9/+19
| | | | | | | | | | | | | | | | | | | 2002-05-15 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (refresh_folder_info): removed. (imap_store_refresh_folders): Copy the folders first, then refresh them, outside of the cache_lock, which could cause deadlocks because of a workaround for crappo exchange. (imap_disconnect_online): Dont pass an exception to LOGOUT command. The required response 'BYE' always sets an exception when we call LOGOUT. This also interfered with a lot of other processing causing partial failures and messed up offline/online state. * camel-disco-folder.c (disco_prepare_for_offline): Do progress reporting. svn path=/trunk/; revision=16797
* fixed a simple logic mistakeJeffrey Stedfast2002-05-151-1/+4
| | | | svn path=/trunk/; revision=16795
* Fixes bug #24136.Jeffrey Stedfast2002-05-152-17/+94
| | | | | | | | | | | | | | | | | | | | 2002-05-14 Jeffrey Stedfast <fejj@ximian.com> Fixes bug #24136. * providers/imap/camel-imap-folder.c (content_info_get_part_spec): New function to take a CamelMessageContentInfo and generate a part-specification string. (get_content): Stop passing around part_spec strings and use content_info_get_part_spec instead. * camel-folder-summary.c (camel_content_info_dump): Made this into a public debugging function. * providers/imap/camel-imap-utils.c (imap_parse_body): Make sure to set the parent of any message/rfc822 subparts. svn path=/trunk/; revision=16793
* Previous fix reverted.Jeffrey Stedfast2002-05-151-6/+1
| | | | | | | | | 2002-05-13 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_get_message): Previous fix reverted. svn path=/trunk/; revision=16790
* Previous fix reverted. (get_content): Handle the case where a multipart'sJeffrey Stedfast2002-05-152-6/+10
| | | | | | | | | | | 2002-05-13 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_get_message): Previous fix reverted. (get_content): Handle the case where a multipart's parent is a message/rfc822 part. Fixes bug #24136. svn path=/trunk/; revision=16789
* Overload the setv/getv CamelObject virtual methods. (imap_setv):Jeffrey Stedfast2002-05-142-1/+125
| | | | | | | | | | | 2002-05-13 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (camel_imap_store_class_init): Overload the setv/getv CamelObject virtual methods. (imap_setv): Implemented. (imap_getv): Implemented. svn path=/trunk/; revision=16771
* Add a "char **appended_uid" argument, for the caller to optionally pass inDan Winship2002-05-145-46/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-folder.c (camel_folder_append_message): Add a "char **appended_uid" argument, for the caller to optionally pass in a variable to receive the UID of the appended message (if the provider knows it). (camel_folder_transfer_messages_to): Likewise, add "GPtrArray **transferred_uids" (transfer_messages_to): Update default implementation to handle transferred_uids. * camel-disco-folder.c (disco_append_message, disco_transfer_messages_to): Update for API changes. * camel-disco-diary.c (camel_disco_diary_replay): Update the diary's temporary uid->real uid map when replaying appends and transfers. * providers/imap/camel-imap-folder.c (imap_append_offline, imap_append_online, imap_transfer_offline): Pass back the new UIDs, when requested and available. (imap_append_resyncing): Pass back the new UIDs when requested and available. Remove the diary uidmap managing code since CamelDiscoDiary can handle that itself now. (imap_transfer_online, imap_transfer_resyncing): Update for new APIs, but don't actually pass back the new UIDs yet. (It's tricky since the COPYUID response may not be in the same order as the input uids.) * providers/local/camel-maildir-folder.c (maildir_append_message): Pass back the new UID if requested. * providers/local/camel-mbox-folder.c (mbox_append_message): Likewise. * providers/local/camel-mh-folder.c (mh_append_message): Likewise. * providers/local/camel-spool-folder.c (spool_append_message): Likewise. * camel-digest-folder.c (digest_append_message, digest_transfer_messages_to): Update for API changes. * camel-filter-driver.c (camel_filter_driver_filter_message, do_copy, do_move): Update for API changes. * camel-vee-folder.c (vee_append_message, vee_transfer_messages_to): Likewise. * camel-vtrash-folder.c (vtrash_append_message, vtrash_transfer_messages_to): Likewise. svn path=/trunk/; revision=16765
* Fetch the BODYSTRUCTURE rather than BODY since BODY seems to be lackingJeffrey Stedfast2002-05-111-1/+1
| | | | | | | | | | 2002-05-10 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_get_message): Fetch the BODYSTRUCTURE rather than BODY since BODY seems to be lacking some of the data we need. This fixes bug #24131. svn path=/trunk/; revision=16762
* Replace copy_messages_to and move_messages_to with a single function thatDan Winship2002-05-111-39/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-folder.c (camel_folder_transfer_messages_to): Replace copy_messages_to and move_messages_to with a single function that just takes a "delete_originals" flag. Also, use the vtrash implementation if *either* folder is a vtrash. (transfer_messages_to): Make this use camel_operation_progress (previously move_messages_to did but copy_messages_to didn't), and freeze/thaw the folder(s) if doing multiple messages. * camel-vtrash-folder.c (vtrash_transfer_messages_to): Update for move/copy merge. Move the "move messages into vtrash" code here from mail-ops.c. Now all of the vtrash move/copy special casing is in camel instead of half of it being here and half in mail/. (This should also make it so that "Move to Trash" will work in filter rules.) * camel-vee-folder.c (vee_transfer_messages_to): Make this just return an exception, since it will only be called when trying to move/copy messages from one vfolder to another. (vee_append_message): Add this too so we get a nicer error message than the default "unimplemented" one in camel-folder.c. * camel-digest-folder.c: Replace copy_messages_to and move_messages_to with transfer_messages_to. * camel-disco-folder.c: Likewise * camel-disco-diary.c (camel_disco_diary_log, camel_disco_diary_replay): replace MOVE/COPY with TRANSFER. * providers/imap/camel-imap-folder.c (imap_transfer_offline, imap_transfer_online, imap_transfer_resyncing): Update for changes. (This ends up being a bit more complicated than it was before for now, but later disconnected operation changes should resimplify it.) * camel-filter-driver.c (camel_filter_driver_filter_message, do_copy, do_move): Use transfer_messages_to instead of copy. svn path=/trunk/; revision=16744
* Instead of testing for SERVICE_CONNECTED, we need to also handleNot Zed2002-05-091-1/+1
| | | | | | | | | | | | | 2002-05-09 Not Zed <NotZed@Ximian.com> * camel-service.c (camel_service_disconnect): Instead of testing for SERVICE_CONNECTED, we need to also handle SERVICE_CONNECTING too, as it will often have setup some details before it failed. Make it !DISCONNECTED (and !DISCONNECTING for recursive calls, which happen). Fixes #23782, and maybe also #21604 and many other random crashes. svn path=/trunk/; revision=16730
* camel_pop3_engine_iterate doesn't return the state, it returns -1 on fail,Jeffrey Stedfast2002-05-081-7/+7
| | | | | | | | | | | | 2002-05-08 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): camel_pop3_engine_iterate doesn't return the state, it returns -1 on fail, 0 when finished processing request or >0 if more ops are in the queue, so don't check status against CAMEL_POP3_STATE_OK, instead check pcp->state against that. svn path=/trunk/; revision=16719
* Check for LOGIN xxxx as well if debug is on, so we dont print passwords toNot Zed2002-05-0715-30/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-05-07 Not Zed <NotZed@Ximian.com> * camel-remote-store.c (remote_send_string): Check for LOGIN xxxx as well if debug is on, so we dont print passwords to evolution logs. * providers/imap/camel-imap-utils.c (imap_is_atom_char): This was really broken. 1. isprint() is locale dependent, and 2. it looked up an 8 bit value in a 7 bit table without truncating it. I've removed the isprint() stuff and just put it directly into the special table, which i've expanded to the right size too. * providers/imap/*: Applied patch from Preston Elder <prez@magick.tm> to make camel only use literals if it needs to for simple strings. Changed slightly to use imap_is_atom() and more consistent formatting. providers/imap/camel-imap-utils.c (imap_is_atom): Chagned from imap_needs_quoting(). ** Merged in camel-object2 branch. Simpler camelobject implementation + object args interface. * camel.c (camel_init): Call camel_object_get_type() to make sure camel_object_type is initialised. * camel-object.h (CAMEL_OBJECT_TYPE): Changed to return global camel_object_type pointer, not call camel_object_get_type. svn path=/trunk/; revision=16701
* If the pop3 command status is -1, then we probably have a TCP error (?) soJeffrey Stedfast2002-05-072-15/+22
| | | | | | | | | | | | | 2002-05-06 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): If the pop3 command status is -1, then we probably have a TCP error (?) so set a SYSTEM exception so our caller can distinguish between a "bad password" and a "tcp error". (pop3_connect): Only uncache the password on "bad password" errors. svn path=/trunk/; revision=16700
* Call camel_mime_message_encode_8bit_parts() which fixes bug #10885.Jeffrey Stedfast2002-05-071-3/+1
| | | | | | | | | 2002-05-06 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (do_append): Call camel_mime_message_encode_8bit_parts() which fixes bug #10885. svn path=/trunk/; revision=16698
* We want to set unread_count to get_unread_message_count, notNot Zed2002-04-291-2/+1
| | | | | | | | | | | 2002-04-29 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-store.c (get_folder_info): We want to set unread_count to get_unread_message_count, not get_message_count(). Might fix #17174. Also removed FIXME: as it was fixed. svn path=/trunk/; revision=16629
* Don't link to libibex.a anymore.Jeffrey Stedfast2002-04-273-4/+1
| | | | | | | | | | | | 2002-04-26 Jeffrey Stedfast <fejj@ximian.com> * providers/local/Makefile.am: Don't link to libibex.a anymore. * providers/nntp/Makefile.am: Same. * providers/imap/Makefile.am: And again here. svn path=/trunk/; revision=16609
* Don't put a space between the "RCPT TO:" and the "<recipient>" strings -Jeffrey Stedfast2002-04-261-5/+3
| | | | | | | | | | | | 2002-04-25 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't put a space between the "RCPT TO:" and the "<recipient>" strings - rfc0821 was not clear on this but it seems rfc2821 defines a grammar excluding that SP. (smtp_mail): Same. svn path=/trunk/; revision=16588
* Configure the default paths for mh, mbox, maildir, spools, etc.Jeffrey Stedfast2002-04-251-15/+52
| | | | | | | | | | | | | 2002-04-24 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-local-provider.c (camel_provider_module_init): Configure the default paths for mh, mbox, maildir, spools, etc. * camel-provider.h: Add a CAMEL_PROVIDER_CONF_LABEL enum and define some default CamelProviderConfEntry macros. svn path=/trunk/; revision=16580
* Free the LIST pop3 command.Jeffrey Stedfast2002-04-201-2/+4
| | | | | | | | | | | 2002-04-19 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Free the LIST pop3 command. * camel-data-cache.c (data_cache_finalise): Free the cdc->path. svn path=/trunk/; revision=16550
* If we get a failure, make sure we set an exception.Not Zed2002-04-181-2/+6
| | | | | | | | | | | | | | 2002-04-18 Not Zed <NotZed@Ximian.com> * providers/local/camel-local-store.c (rename_folder): If we get a failure, make sure we set an exception. * camel-text-index.c (camel_text_index_rename): If the file doesn't exist, just assume it never did, dont return failure. (text_index_rename): Add '.index' to the path name we're using, since we dont get it passed in. svn path=/trunk/; revision=16505
* When doing a contains match, split the words and perform an and on it.Not Zed2002-04-183-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-04-18 Not Zed <NotZed@Ximian.com> * camel-folder-search.c (check_header): When doing a contains match, split the words and perform an and on it. (match_words_messages): If we have an index, but were forced to do a full search, first lookup a subset of messages using the index and a simplified word set. Only do a manual search of this subset. 2002-04-17 Not Zed <NotZed@Ximian.com> * camel-folder-search.c (match_message_index): Changed to take a utf8 string not a regex pattern. (match_words_index): Matches against a camel_search_words list. (match_words_1message): Matches a single message against a camel_search_words list. (match_words_message): Same, but gets the message from the folder for you. (match_words_messages): Matches a list of messages against a words list. (search_body_contains): Rewritten to handle multiple word searches. For #23371. * providers/imap/camel-imap-search.c (sync_match): Split words when searching, to support multiple search words. Also, try searching specifying charset of utf8 if we can, if that fails, fall back to not specifying charset. TODO: It should translate the strings into the locale default charset? * providers/imap/camel-imap-store.c (connect_to_server): Added new cap - utf8_search, if set, we tell the server we're searching using utf8, otherwise we dont (incorrectly, since we always use utf8 to search). * camel-search-private.c (camel_ustrstrcase): Make this class public. (camel_search_words_split): Split a word into multiple words based on whitespace, and keep track of whether the word is simple (indexable directly), or not. (camel_search_words_free): Free 'em. svn path=/trunk/; revision=16501
* Get rid of an unused variable.Jeffrey Stedfast2002-04-171-6/+12
| | | | | | | | | | | | | | | | | | | 2002-04-16 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_folder): Get rid of an unused variable. * providers/smtp/camel-smtp-transport.c (smtp_helo): Use camel_gethostbyaddr since gethostbyaddr is not reentrant. * camel-http-stream.c (http_connect): Updated after the rename of camel_get_host_byname. * camel-service.c (camel_gethostbyname): Renamed. (camel_gethostbyaddr): New cancellable/reentrant version of gethostbyaddr. svn path=/trunk/; revision=16484
* Added #include <sys/types.h> for dirent.h which needs it on MacOS X.Jeffrey Stedfast2002-04-154-1/+8
| | | | | | | | | | | | | | | | | | | 2002-04-14 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-spoold-store.c: Added #include <sys/types.h> for dirent.h which needs it on MacOS X. * providers/local/camel-maildir-store.c: Same. * providers/nntp/camel-nntp-store.c: Same. * providers/imap/camel-imap-message-cache.c: Same. * camel-provider.c: Same. * camel-data-cache.c: Same. svn path=/trunk/; revision=16466
* fix the nntp provider makefile.amJeffrey Stedfast2002-04-141-18/+3
| | | | svn path=/trunk/; revision=16460
* If the last message(s) were deleted, and we had any messages output,Not Zed2002-04-112-1/+8
| | | | | | | | | | | | | | | | | 2002-04-11 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-summary.c (spool_summary_sync_full): If the last message(s) were deleted, and we had any messages output, account for the lost \n of the following From line by adding an extra \n. fix for #8214. 2002-04-10 Not Zed <NotZed@Ximian.com> * camel-mime-part-utils.c (convert_buffer): If we get a 0 length input, return a 0 lenght output as valid - fixes bugs with some iconv impl and its simpler anyway. svn path=/trunk/; revision=16438
* Set the UID_SET_LIMIT value to 4096. I ran into an issue tonight whereJeffrey Stedfast2002-04-111-1/+3
| | | | | | | | | | | | | | | 2002-04-11 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c: Set the UID_SET_LIMIT value to 4096. I ran into an issue tonight where apparently the IMAP server changed the UIDVALIDITY and so Evo needed to re-fetch all headers and it was trying to send a uid set of some 25k (yes, I have a very large INBOX). Anyways, it was set to unlimited before. Courier IMAPd can safely handle up to ~16k per token, but UW IMAPd can only handle 8k per command-line, so I set it to 4k just to be safe. svn path=/trunk/; revision=16436
* If (body-contains) is not passed any arguments, return empty/false. FixesNot Zed2002-04-051-1/+1
| | | | | | | | | | 2002-04-04 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-search.c (imap_body_contains): If (body-contains) is not passed any arguments, return empty/false. Fixes a crash exposed by #15001. svn path=/trunk/; revision=16362
* make service_cache be an array of CAMEL_NUM_PROVIDER_TYPES elements so youDan Winship2002-04-046-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-provider.h (CamelProvider): make service_cache be an array of CAMEL_NUM_PROVIDER_TYPES elements so you can have a single provider offer both stores and transports. (Eg, Exchange, NNTP) * providers/imap/camel-imap-provider.c: Don't initialize service_cache here. (The session code can do it itself since the url_hash and url_equal functions are stored as part of the provider.) * providers/nntp/camel-nntp-provider.c: Likewise. * providers/local/camel-local-provider.c: Likewise. * providers/pop3/camel-pop3-provider.c: Likewise. * providers/sendmail/camel-sendmail-provider.c: Likewise. * providers/smtp/camel-smtp-provider.c: Likewise. * camel-session.c (register_provider): Initialize the provider's service cache(s) here. (camel_session_class_init): Don't initialize. vee_provider.service_cache here. (camel_session_destroy_provider): Update to destroy multiple service_caches. (service_cache_remove, get_service): Tweak these a bit to deal with multiple service_caches. svn path=/trunk/; revision=16330
* Turn indexing back on, fingers crossed ...Not Zed2002-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 2002-04-03 Not Zed <NotZed@Ximian.com> * providers/local/camel-local-folder.c (camel_local_folder_construct): Turn indexing back on, fingers crossed ... * camel-block-file.c (sync_nolock): #!@$@$#@~#$ DF@#$!Q@$#!@$#!#%. Well it helps if we're iterating a list to iterate the node pointer ... * camel-text-index.c (text_index_sync): Sync the key tables explcitly. (text_index_sync): Debug out frag info. (camel_text_index_dump): Added a (rather large, but optional) raw dumping mode for debugging purposes. * camel-partition-table.c (camel_key_table_finalise): Sync root block when done. svn path=/trunk/; revision=16329
* Put back in the exception setup stuff i disabled for debugging.Not Zed2002-04-021-4/+3
| | | | | | | | | 2002-04-02 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (imap_keepalive): Put back in the exception setup stuff i disabled for debugging. svn path=/trunk/; revision=16320
* Temporarily disable indexing.Not Zed2002-04-025-13/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-04-02 Not Zed <NotZed@Ximian.com> * providers/local/camel-local-folder.c (camel_local_folder_construct): Temporarily disable indexing. 2002-03-28 Not Zed <NotZed@Ximian.com> * camel-partition-table.c (camel_key_table_lookup): Change range checking assert to a warning. * providers/pop3/camel-pop3-folder.c (pop3_finalize): Make sure we flush out all outstanding commands before finalising, stops being finalised while outsanding requests are processed by the store finalise. (pop3_get_message): Instead of pre-fetching all messages, just pre-fetch a maxiumum number at any one time, stops us running out of cache fd's. * providers/nntp/camel-nntp-folder.c (nntp_folder_init/finalise): Setup priv data + locks, & free. * providers/imap/camel-imap-folder.c (imap_rescan): Batch all message_chagned events into a single folder_changed event (otherwise updates can be >>> expensive, like >5 hours for 80K messages changing!). Alternately it could use folder freeze/unfreeze perhaps. 2002-03-27 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (imap_keepalive): Pass an exception to called code so it behaves properly since it uses the passed exception to check returns. svn path=/trunk/; revision=16319
* Use -avoid-version instead of -version-info 0:0:0, and specify -module.Dan Winship2002-04-026-7/+6
| | | | | | | | | | | | | | | | | | | | | * providers/imap/Makefile.am (libcamelimap_la_LDFLAGS): Use -avoid-version instead of -version-info 0:0:0, and specify -module. (From Max Horn <max@quendi.de>). * providers/local/Makefile.am (libcamellocal_la_LDFLAGS): Likewise. * providers/nntp/Makefile.am (libcamelnntp_la_LDFLAGS): Likewise. * providers/sendmail/Makefile.am (libcamelsendmail_la_LDFLAGS): Likewise. * providers/smtp/Makefile.am (libcamelsmtp_la_LDFLAGS): Likewise. * providers/pop3/Makefile.am (libcamelpop3_la_LDFLAGS): Likewise. Also remove $(KRB4_LDFLAGS) since KPOP is gone. (INCLUDES): and $(KRB4_CFLAGS) svn path=/trunk/; revision=16305
* Change the message arg to a CamelMimeMessage instead of a CamelMedium.Dan Winship2002-03-292-136/+39
| | | | | | | | | | | | | | | | | | | | | | | * camel-transport.c (camel_transport_send_to): Change the message arg to a CamelMimeMessage instead of a CamelMedium. Even the NNTP provider returns CamelMimeMessages, and we're never going to support anything more exotic than that. Also do a few more g_return_if_fails here instead of in the providers. (camel_transport_can_send): No longer needed. (camel_transport_send): Remove this too. It wasn't being used any more, and it doesn't behave exactly the same in sendmail and smtp. * providers/smtp/camel-smtp-transport.c (smtp_send, smtp_can_send): Gone. (smtp_send_to): Update for arg change. (smtp_data): Make this take a CamelMimeMessage too. * providers/sendmail/camel-sendmail-transport.c (sendmail_send, sendmail_can_send): Gone. (sendmail_send_to): Update for arg change, and merge in the part that used to be shared with sendmail_send. svn path=/trunk/; revision=16278
* When we add a new name, up all of the cache limits, because we're probablyNot Zed2002-03-2519-58/+120
| | | | | | | | | | | | | | | | | | | 2002-03-25 Not Zed <NotZed@Ximian.com> * camel-text-index.c (text_index_add_name): When we add a new name, up all of the cache limits, because we're probably going to be adding more. (text_index_sync): Drop the cache limits back down again, we dont need them when looking words up. ** MERGE camel_index branch. * camel-text-index.[ch]: Added files i forgot to add (eep nearly lost all this work!) * camel-block-file.c (sync_nolock): Fix an infinite loop in syncing. svn path=/trunk/; revision=16242
* Updated to use the same logic as the POP code.Jeffrey Stedfast2002-03-191-8/+5
| | | | | | | | | | 2002-03-18 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (connect_to_server_wrapper): Updated to use the same logic as the POP code. svn path=/trunk/; revision=16203
* No longer takes a stls_supported argument since we no longer need it withJeffrey Stedfast2002-03-191-16/+9
| | | | | | | | | | | | | | 2002-03-18 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-store.c (connect_to_server): No longer takes a stls_supported argument since we no longer need it with the new logic. (connect_to_server_wrapper): New logic: First try connecting to the SSL port (995 by default), if that fails with SERVICE_UNAVAILABLE, then we attempt to connect (to port 110 by default) and try to use STARTTLS. svn path=/trunk/; revision=16202
* Added a work-around for SMTP servers that can't read the RFCs and thusJeffrey Stedfast2002-03-141-1/+17
| | | | | | | | | | | 2002-03-13 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_auth): Added a work-around for SMTP servers that can't read the RFCs and thus implement SASL incorrectly. Oh well, that's life in the world of mail clients I guess. svn path=/trunk/; revision=16152
* reverted my USER/PASS quoting fixJeffrey Stedfast2002-03-141-2/+2
| | | | svn path=/trunk/; revision=16148
* Quote the USER and PASS arguments since some people have spaces in theirJeffrey Stedfast2002-03-141-2/+2
| | | | | | | | | | 2002-03-13 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Quote the USER and PASS arguments since some people have spaces in their user-names and/or passwords. svn path=/trunk/; revision=16144
* oops, musta backspaced over a brace?Jeffrey Stedfast2002-03-121-1/+1
| | | | svn path=/trunk/; revision=16098
* These fixes should fix bug #21737.Jeffrey Stedfast2002-03-122-17/+20
| | | | | | | | | | | | | | | | 2002-03-11 Jeffrey Stedfast <fejj@ximian.com> These fixes should fix bug #21737. * providers/smtp/camel-smtp-transport.c (connect_to_server_wrapper): Same as with the POP code. * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper): Slight restructuring of the if-statements for the USE_SSL_ALWAYS case so that we can't possibly return TRUE unless we really did connect successfully. svn path=/trunk/; revision=16097
* Rename the OpenSSL implementation of things to match the NSSDan Winship2002-03-112-54/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implementation so that callers don't need to care which one is being used. * camel-tcp-stream-openssl.c: Implement CamelTcpStreamSSL, not CamelTcpStreamOpenSSL. Rename methods as well. Replace the camel-tcp-stream-openssl.h include with camel-tcp-stream-ssl.h. * camel-tcp-stream-openssl.h: Gone. * camel-tcp-stream-ssl.c: Add a note explaining that this implementation is only used for NSS, and that OpenSSL's implementation is in another file. (Should probably do some CVS renaming magic at some point.) * camel-http-stream.c (http_connect): Remove OpenSSL refs; the previously-NSS-specific code works for both now. * camel-remote-store.c: Likewise. * providers/smtp/camel-smtp-transport.c: Likewise. * providers/pop3/camel-pop3-store.c: Likewise. * Makefile.am (libcamelinclude_HEADERS): Remove camel-tcp-stream-openssl.h svn path=/trunk/; revision=16093
* Remove this: it couldn't be generically used, because different subclassesDan Winship2002-03-112-47/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-tcp-stream.c (camel_tcp_stream_get_socket): Remove this: it couldn't be generically used, because different subclasses returned entirely different types of data. (camel_tcp_stream_get_local_address, camel_tcp_stream_get_remote_address): Add these to replace what get_socket was being used for. (camel_tcp_address_new, camel_tcp_address_free): Utility functions for get_{local,remote}_address. * providers/smtp/camel-smtp-transport.c: Change localaddr to a CamelTcpAddress *. (connect_to_server): Call camel_tcp_stream_get_local_address to get the local IP address. (smtp_disconnect): free localaddr. (smtp_helo): Update for localaddr change. * camel-tcp-stream-raw.c (stream_get_socket): Remove (stream_get_local_address, stream_get_remote_address): Implement. * camel-tcp-stream-ssl.c (stream_get_socket): Remove (stream_get_local_address, stream_get_remote_address): Implement. * camel-tcp-stream-openssl.c (stream_get_socket): Remove (stream_get_local_address, stream_get_remote_address): Implement. svn path=/trunk/; revision=16092
* Don't call camel_remote_store_get_authtypes since we no longer subclassJeffrey Stedfast2002-03-096-50/+272
| | | | | | | | | | | | | | | | | | | | | | 2002-03-08 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-provider.c (camel_provider_module_init): Don't call camel_remote_store_get_authtypes since we no longer subclass camel-remote-store. * providers/pop3/camel-pop3-engine.c: Added STARTTLS to the capabilities to look for. (camel_pop3_engine_reget_capabilities): New function to re-get capabilities. * providers/pop3/camel-pop3-store.c: Updated to not subclass CamelRemoteStore. (connect_to_server): Rewritten to not depend on CamelRemoteStore's connect implementation. Also added support for STLS (aka STARTTLS). svn path=/trunk/; revision=15998
* Fix to work with OpenSSL.Jeffrey Stedfast2002-03-071-3/+5
| | | | | | | | | 2002-03-06 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (connect_to_server): Fix to work with OpenSSL. svn path=/trunk/; revision=15959
* Make this compile.Dan Winship2002-03-071-1/+1
| | | | | | | * providers/smtp/camel-smtp-transport.c (smtp_construct): Make this compile. svn path=/trunk/; revision=15946
* treat "" as "always" to maintain compatablity with old config settingsJeffrey Stedfast2002-03-061-1/+2
| | | | svn path=/trunk/; revision=15939
* Start the ssl stream off in non-ssl mode (useful for STARTTLS).Jeffrey Stedfast2002-03-063-33/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-03-05 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_new_raw): Start the ssl stream off in non-ssl mode (useful for STARTTLS). (camel_tcp_stream_openssl_enable_ssl): New function to toggle an ssl stream into ssl mode. (open_ssl_connection): Close the sockfd on fail so our caller doesn't have to - this also allows us to save the original errno. (stream_connect): If we want ssl mode, do our ssl stuff. (camel_tcp_stream_openssl_class_init): Init some SSL stuff here instead of in open_ssl_connection since these only ever need to be called once. (stream_read): Only use SSL_read if we are in ssl mode. (stream_write): Only use SSL_write if we are in ssl mode. * providers/smtp/camel-smtp-transport.c (smtp_helo): Check for the STARTTLS extension. (connect_to_server): Try to use STARTTLS whenever possible rather than the old way of doing things. (connect_to_server_wrapper): Wrapper around connect_to_server() to first try STARTTLS and then attempt normal SSL mode if we can't connect via STARTTLS. * camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): New function to toggle an ssl stream into ssl mode. (camel_tcp_stream_ssl_new_raw): Start the ssl stream off in non-ssl mode (useful for STARTTLS). (stream_connect): Only connect in SSL mode if required. svn path=/trunk/; revision=15937
* Since the AUTH token sometimes uses '=' instead of whitespace, don't useJeffrey Stedfast2002-02-131-1/+2
| | | | | | | | | | 2002-02-12 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_helo): Since the AUTH token sometimes uses '=' instead of whitespace, don't use smtp_token_next here. svn path=/trunk/; revision=15688
* Duh, when we grab the apop stamp it needs to include the <> as well, INot Zed2002-02-092-4/+4
| | | | | | | | | | | | | | 2002-02-09 Not Zed <NotZed@Ximian.com> * providers/pop3/camel-pop3-engine.c (get_capabilities): Duh, when we grab the apop stamp it needs to include the <> as well, I even read the rfc, silly me. * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Doh, when iterating the authtype list, it helps to goto the next node. Found with help from miles. svn path=/trunk/; revision=15636
* The day number has to be 2 chars wide, space filled to work properly withNot Zed2002-02-0811-20/+500
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-02-08 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-summary.c (camel_spool_summary_build_from): The day number has to be 2 chars wide, space filled to work properly with pine, etc. * providers/local/camel-spoold-store.[ch]: new type of provider 'spool directory', which lets you view external mbox dirs without adding any extra cruft. Perhaps it should use . files to store summaries? Still a bit experimental, there's a warning when you select it in the account editor. Finished off most of #1185. Can't rename or move folders. * camel-mime-utils.c (header_decode_date): If the date is 100->1900 then we actually want to use it as the year in the tm struct, not year+100. e.g. year 102 -> 2002, not 2102. 2002-02-07 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-store.c (get_folder): Pass path into spool_folder_new. * providers/local/camel-spool-folder.c (camel_spool_folder_new): (camel_spool_folder_construct): Take the full path to the folder and use that as the file path, independent of the full_name we use. 2002-02-07 Not Zed <NotZed@Ximian.com> * providers/local/camel-local-provider.c: Added new type, spoold provider, spoold: for local directories. * providers/imap/camel-imap-store.c (get_one_folder_offline): Create offline uri's in a compatible manner to online ones. svn path=/trunk/; revision=15606
* Implementation of NTLM (aka "Secure Password Authentication") auth, takenDan Winship2002-02-081-1/+1
| | | | | | | | | | | | | | | | | * camel-sasl-ntlm.c: Implementation of NTLM (aka "Secure Password Authentication") auth, taken from soup. * Makefile.am (libcamel_la_SOURCES, libcamel_la_HEADERS): Add camel-sasl-ntlm. * camel-sasl.c: Add refs to camel-sasl-ntlm. * providers/imap/camel-imap-store.c (try_auth): Use imap_next_word() to skip over the "+ " of the continuation rather than just "resp + 2" since Exchange (incorrectly) returns "+" instead of "+ " for an empty continuation response. svn path=/trunk/; revision=15605
* Use "pop" instead of "pop3" so current configurations continue to work.Jeffrey Stedfast2002-01-311-1/+1
| | | | | | | | | 2002-01-30 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-provider.c: Use "pop" instead of "pop3" so current configurations continue to work. svn path=/trunk/; revision=15532
* Changed name from "NT Login" to simply "Login".Not Zed2002-01-3010-666/+1608
| | | | | | | | | | | | | | | | | | | | | | | 2002-01-30 Not Zed <NotZed@Ximian.com> * camel-sasl-login.c: Changed name from "NT Login" to simply "Login". * providers/pop3/*: Entirely new pop implmentation, supporting pipelining. 2002-01-29 Not Zed <NotZed@Ximian.com> * camel-data-cache.c (free_busy): We dont want to unref the stream, instead, stop listening to the finalised events, and free the path only. 2002-01-25 Not Zed <NotZed@Ximian.com> * camel-data-cache.c (stream_finalised): Remove the object from the busy_stream hashtable, not the busy_path hashtable. svn path=/trunk/; revision=15521
* Added more kludge to an existing Exchange IMAP 5.5 kludge to work aroundJeffrey Stedfast2002-01-301-1/+5
| | | | | | | | | | 2002-01-29 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_update_summary): Added more kludge to an existing Exchange IMAP 5.5 kludge to work around it returning multiple messages with the same UIDs. svn path=/trunk/; revision=15513
* New function to decode an enhanced status code. (smtp_set_exception): SetsJeffrey Stedfast2002-01-291-95/+126
| | | | | | | | | | | | | | | | | | 2002-01-28 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_decode_status_code): New function to decode an enhanced status code. (smtp_set_exception): Sets an exception based on the Enhanced-Status-Code. (esmtp_get_authtypes): Don't diplicate the key in the hash since the key and value are the same. (smtp_rcpt): Include the failed recipient in the error message to be more helpful to the user. * camel-mime-utils.c (hex_decode): Make sure to allocate enough for the NUL byte. svn path=/trunk/; revision=15500
* Use flags rather than a bunch of gboolean variables. (smtp_connect): Same.Jeffrey Stedfast2002-01-292-71/+154
| | | | | | | | | | | | | | | | | | | | | 2002-01-28 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_construct): (connect_to_server): Use flags rather than a bunch of gboolean variables. (smtp_connect): Same. (smtp_mail): Here too. Use the enhanced status codes if available. (smtp_data): And again here. (smtp_helo): Finally here. Also detect the ENHANCEDSTATUSCODES extension. (smtp_rcpt): Use the enhanced status codes if available. (smtp_rset): Here too. (smtp_quit): And finally here. * camel-transport.h: Removed gboolean supports_8bit since this is pretty local to only SMTP for now. svn path=/trunk/; revision=15498
* Clean up some of the Makefiles so we dont' link every library multipleEttore Perazzoli2002-01-251-2/+2
| | | | | | times, causing big libtool 1.4 pain. svn path=/trunk/; revision=15461
* As a temporary solution, just printf ("\a"); to make a beep :-)Jeffrey Stedfast2002-01-224-41/+65
| | | | | | | | | | | | | | | | | 2002-01-21 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (do_beep): As a temporary solution, just printf ("\a"); to make a beep :-) * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): Encode the mailbox to UTF-7 here. * providers/imap/camel-imap-utils.c (imap_parse_list_response): Decode the mailbox name as we parse the list response. (imap_mailbox_decode): It's only an illegal mailbox name if it didn't switch back to US-ASCII mode. svn path=/trunk/; revision=15421
* New function to decode an IMAP mailbox name from modified UTF-7 encodingJeffrey Stedfast2002-01-192-1/+266
| | | | | | | | | | | | 2002-01-18 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c (imap_mailbox_decode): New function to decode an IMAP mailbox name from modified UTF-7 encoding to UTF-8. (imap_mailbox_encode): New function to convert a mailbox name from UTF-8 to IMAP's modified UTF-7 encoding. svn path=/trunk/; revision=15361
* Updated to match the new send_to API. (smtp_send): Get the from addressJeffrey Stedfast2002-01-162-12/+18
| | | | | | | | | | | | | | | | | 2002-01-15 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to match the new send_to API. (smtp_send): Get the from address and pass that along to smtp_send_to(). * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to): Updated to match the new send_to API. * camel-transport.c (camel_transport_send_to): Now takes a from argument too. svn path=/trunk/; revision=15328
* Sort the needheaders UID array and fixed to respect the UID_SET_LIMIT.Jeffrey Stedfast2002-01-161-28/+41
| | | | | | | | | | | | | | 2002-01-15 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_update_summary): Sort the needheaders UID array and fixed to respect the UID_SET_LIMIT. This should now finish the fixification of bug #2529. There's still the possible issue that a command-line (The only command-line I can think of that can still be too long is a SEARCH command, but this can't possibly be fixed until we rewrite the imap code to use Zucchi's ImapEngine idea). svn path=/trunk/; revision=15327
* Updated to use the new imap_uid_array_to_set() interface.Jeffrey Stedfast2002-01-153-110/+171
| | | | | | | | | | | | | | | | | | | | | 2002-01-14 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_expunge_uids_online): Updated to use the new imap_uid_array_to_set() interface. (imap_expunge_uids_resyncing): Same. (do_copy): Here too. (imap_update_summary): Added a FIXME comment to rewrite allowing for a uid-set limitation. (get_matching): Copy some of the logic over from imap_uid_adday_to_set() to limit the length of the uid-set string. (imap_sync_online): Added a comment to explain what is going on with get_matching() since the behavior has changed slightly. * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Modify the interface so that we can limit the size of the uid set string returned. svn path=/trunk/; revision=15318
* Rewritten to use a cache for body searches when online. Will need someNot Zed2002-01-143-111/+384
| | | | | | | | | | | | | | | | | | | | 2002-01-14 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-search.c (imap_body_contains): Rewritten to use a cache for body searches when online. Will need some heavy testing but so far seems to be beneficial. * providers/imap/camel-imap-folder.c (imap_search_by_expression, search_by_uids): dont initialise search object here. (camel_imap_folder_new): Setup search object here with pointer to cache dir. 2001-12-01 Not Zed <NotZed@Ximian.com> * camel-store-summary.[ch]: New class to store a store's folder list in. Not yet completed. svn path=/trunk/; revision=15314
* Kludge around a bug in Exchange 5.5 that reports 2 messages with the sameJeffrey Stedfast2002-01-121-2/+24
| | | | | | | | | | 2002-01-11 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge around a bug in Exchange 5.5 that reports 2 messages with the same UID. Fixes bug #17694. Replaces the fix from yesterday. svn path=/trunk/; revision=15298
* If PATH_MAX doesn't exist, use _POSIX_PATH_MAX.Jeffrey Stedfast2002-01-111-0/+8
| | | | | | | | | 2002-01-10 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-local-folder.c: If PATH_MAX doesn't exist, use _POSIX_PATH_MAX. svn path=/trunk/; revision=15291
* If mi is NULL, don't bother updating it. Should fix bug #17694.Jeffrey Stedfast2002-01-111-0/+5
| | | | | | | | | 2002-01-10 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_update_summary): If mi is NULL, don't bother updating it. Should fix bug #17694. svn path=/trunk/; revision=15290
* Kludge around Microsoft Exchange 5.5 (bug #5348) by forgetting ourJeffrey Stedfast2002-01-111-19/+36
| | | | | | | | | | | 2002-01-10 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_update_summary): Kludge around Microsoft Exchange 5.5 (bug #5348) by forgetting our currently selected folder and re-SELECTing it so that the Exchange server has a chance to realise it has new messages. svn path=/trunk/; revision=15284
* If the mbox file is a symlink, follow the symlink and get the One TrueJeffrey Stedfast2002-01-101-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-01-09 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-mbox-folder.c (camel_mbox_folder_new): If the mbox file is a symlink, follow the symlink and get the One True Path so that we can rewrite the mbox later without worrying about clobbering the symlink. 2002-01-08 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-search.c (TODO): There are a few sexp callbacks that could be modified to use fms->info rather than using a message object (like date and possibly mlist stuff) but *only* if the date exists on the CamelMessageInfo object (since it may be blank except for message flags). (camel_filter_search_get_message): New internal convenience function to make sure that the FilterMessageSearch has loaded the message (and to load the message if this isn't the case). (check_header): Call camel_filter_search_get_message(). (header_exists): Same. (header_regex): Here too. (header_full_regex): And here. (body_contains): Again here. (body_regex): Here too. (get_sent_date): Here also. (get_received_date): Same. (get_source): Here if we need to. (camel_filter_search_match): Now takes a callback function/data pair for on-demand message loading so that we don't necessarily have to load the message if the defined filter rules don't require it. * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't bother fetching the message here, let camel_filter_driver_filter_message() worry about this. (get_message_cb): New utility callback to fetch a message. (camel_filter_driver_filter_message): Only fetch the message if we absolutely need it to get a CamelMessageInfo. Instead of passing a message object to camel_filter_search_match(), pass get_message_cb and some user_data so that the matching code can fetch the message on demand. svn path=/trunk/; revision=15276
* Change the prototype for camel_address_get_type to return a CamelTypeJeffrey Stedfast2001-12-212-52/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | 2001-12-20 Jeffrey Stedfast <fejj@ximian.com> * camel-address.h: Change the prototype for camel_address_get_type to return a CamelType (since internally this is what it returns and also in case we decide to write a replacement for the current CamelObject it'd be easier to drop in). * camel-internet-address.h: Same but for camel_internet_address_get_type() * providers/smtp/camel-smtp-transport.c (smtp_send_to): Updated to use a CamelAddress of recipients. (smtp_send): Since smtp_send_to now takes a CamelAddress recipients argument, our lives have been simplified and we can now just concat To/Cc/Bcc into a recipients addr and send away. * providers/sendmail/camel-sendmail-transport.c (sendmail_send_to): Updated to use a CamelAddress of recipients. * camel-transport.c (camel_transport_send_to): Now takes a CamelAddress argument for the recipient list rather than a GList. svn path=/trunk/; revision=15197
* install in the right directory. (accidentally didn't commit these before)Dan Winship2001-12-202-9/+4
| | | | svn path=/trunk/; revision=15186
* only use major and minor version in the camel providerdir, not micro and nanoDan Winship2001-12-185-21/+8
| | | | svn path=/trunk/; revision=15121
* Reverted my previous changes here since it doesn't actually work afterall.Jeffrey Stedfast2001-12-172-26/+26
| | | | | | | | | | | | 2001-12-16 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (get_content): Reverted my previous changes here since it doesn't actually work afterall. * providers/imap/camel-imap-wrapper.c (imap_wrapper_hydrate): Update to do uudecoding when appropriate. svn path=/trunk/; revision=15098
* Try to use the original boundary so luis will stop bugging me about "dataJeffrey Stedfast2001-12-171-1/+7
| | | | | | | | | | | | 2001-12-16 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (get_content): Try to use the original boundary so luis will stop bugging me about "data corruption". Also preserve other params in the multipart content-type by dumping it to a string and setting it on the mime part. svn path=/trunk/; revision=15094
* Try to use the original boundary so luis will stop bugging me about "dataJeffrey Stedfast2001-12-171-2/+4
| | | | | | | | | | 2001-12-16 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (get_content): Try to use the original boundary so luis will stop bugging me about "data corruption". svn path=/trunk/; revision=15093
* Don't use regex matching. Fixes bug #16227.Jeffrey Stedfast2001-12-015-76/+93
| | | | | | | | | | | | | | | | | | | | 2001-11-29 Jeffrey Stedfast <fejj@ximian.com> * camel-folder-search.c (search_body_contains): Don't use regex matching. Fixes bug #16227. * camel-mime-message.c (best_encoding): Check the content-object's mime type, not the mime part types. Should fix bug #15843. 2001-11-27 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (get_content): Return NULL if construct_from_stream fails. (get_message): Same. (get_message_simple): Here too. (add_message_from_data): And here. svn path=/trunk/; revision=14834
* Completely new implementation of NNTP.Not Zed2001-11-3010-872/+1759
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-11-30 Not Zed <NotZed@Ximian.com> * providers/nntp/camel-nntp-*.c: Completely new implementation of NNTP. Doesn't support subscriptions yet (lists all folders), but should be more reliable (faster?), and has an integrated cache. * camel-exception.c (camel_exception_new): Use e_memchunks for exception blocks. (camel_exception_free): Same. * camel-data-cache.[ch]: New object for managing on-disk caches of anything that can be stored in a camel-stream. * camel-file-utils.c (camel_file_util_mkdir): New function, just a nicer place to put this (than camel-store), should be removed from camel-store. (camel_file_util_safe_filename): New function to url-encode a filename. * camel-mime-parser.c (drop_states): New func to drop the parser state to initial state. (folder_scan_init_with_fd): (folder_scan_init_with_stream): Call above func to reset state if the stream is changed on us so we can change streams to reuse a parser object. svn path=/trunk/; revision=14822
* If the uid doesn't have a ',' in it, fail to crash.Not Zed2001-11-283-14/+47
| | | | | | | | | | | | | | | | | | | | 2001-11-25 Not Zed <NotZed@Ximian.com> * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message): If the uid doesn't have a ',' in it, fail to crash. * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_article_is_read): check group != NULL before scanning. (camel_nntp_newsrc_get_highest_article_read): " (camel_nntp_newsrc_get_num_articles_read): " (camel_nntp_newsrc_mark_range_read): " * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_overview_fmt): IF we dont have nntp_list_follows, dont try and get a list response. (nntp_store_get_folder_info): Set path part of folderinfo. svn path=/trunk/; revision=14799
* Check to see that errno is non-zero before returning g_strerror. If it'sJeffrey Stedfast2001-11-271-1/+4
| | | | | | | | | | 2001-11-20 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (get_smtp_error_string): Check to see that errno is non-zero before returning g_strerror. If it's 0, then we have an unknown error. svn path=/trunk/; revision=14790
* Abort if body == NULL.Jeffrey Stedfast2001-11-171-1/+1
| | | | | | | | | 2001-11-16 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c (imap_parse_body): Abort if body == NULL. svn path=/trunk/; revision=14738
* see the ChangeLog, I forgetJeffrey Stedfast2001-11-171-4/+4
| | | | svn path=/trunk/; revision=14736
* If we get a BYE response, call camel_service_disconnect() and set anJeffrey Stedfast2001-11-171-13/+20
| | | | | | | | | | | | | 2001-11-14 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-command.c (camel_imap_command_response): If we get a BYE response, call camel_service_disconnect() and set an exception. Also do the check for "* BYE" first instead of passing it off imap_read_untagged() since we'll just waste time in there mallocing left and right only to arrive at the single response line "* BYE" again :-) svn path=/trunk/; revision=14735
* If we get a user cancel and that causes us to fail to authenticate, abort92001-11-101-0/+3
| | | | | | | | | | 2001-11-09 <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (imap_auth_loop): If we get a user cancel and that causes us to fail to authenticate, abort rather than loop forever. Fix for #14951. svn path=/trunk/; revision=14648
* Now takes a command-length argument so we can 1) avoid duping the commandJeffrey Stedfast2001-11-094-28/+47
| | | | | | | | | | | | | | | | | | | | | | | | 2001-11-06 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-command.c (camel_imap_command_continuation): Now takes a command-length argument so we can 1) avoid duping the command string yet again, yay. 2) we now don't have to worry about embedded nul-chars screwing us over (we still need to avoid allowing them into the string but at least now it won't mess us up). * providers/imap/camel-imap-folder.c (do_append): Instead of appending a nul char to the end of the byte array and then passing that off as if it were a string to camel_imap_command_continuation, instead pass the byte-array length since that function now takes a length argument. Yay. Also encode any 8bit parts to avoid the possibility of sending embedded nul chars to the imap server. * providers/imap/camel-imap-store.c (try_auth): Updated to pass a command-length argument to camel_imap_command_continuation(). svn path=/trunk/; revision=14637
* Same as below.12001-11-013-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-10-31 <NotZed@Ximian.com> * providers/local/camel-spool-folder.c (spool_get_message): Same as below. * providers/local/camel-maildir-folder.c (maildir_get_message): Same as below. * providers/local/camel-mbox-folder.c (mbox_get_message): Set USER_CANCEL if failed due to EINTR. * camel-filter-driver.c (camel_filter_driver_filter_mbox): If construct from parser fails due to user cancel, set USER_CANCEL on exception. * camel-mime-part.c (construct_from_parser): Return error if the parser had an io error. * camel-mime-message.c (construct_from_parser): Check error on parser/return error. * camel-mime-parser.c (folder_scan_init): Init error number. (camel_mime_parser_errno): New function, return errno of any io failures. (folder_read): Set errno if a failure occured. (folder_seek): Same. (folder_scan_init_with_fd): Setup errno depeding on ok/failure. (folder_scan_init_with_stream): Same. svn path=/trunk/; revision=14559
* Remove the X-Evolution header before anyone else gets to see this private02001-10-301-0/+2
| | | | | | | | | | | 2001-10-30 <NotZed@Ximian.com> * providers/local/camel-mbox-folder.c (mbox_get_message): Remove the X-Evolution header before anyone else gets to see this private thing. Shoudl fix 11676 since we were inheriting flags from X-Evolution headers we didn't want to. svn path=/trunk/; revision=14453
* If we can't retrieve the message, ignore it, it can't match.02001-10-302-10/+8
| | | | | | | | | | | | | | | | | | 2001-10-30 <NotZed@Ximian.com> * camel-folder-search.c (match_message): If we can't retrieve the message, ignore it, it can't match. * providers/imap/camel-imap-search.c (camel_imap_search_class_init): Setup parent class pointer. (imap_body_contains): If offline, just use the parent body_contains method which will get the messages and search them manually. * providers/imap/camel-imap-folder.c (imap_search_by_expression, imap_search_by_uids): Remove offline check. svn path=/trunk/; revision=14442
* Dont try to move ibex if we have none.02001-10-301-4/+7
| | | | | | | | | 2001-10-30 <NotZed@Ximian.com> * providers/local/camel-local-store.c (rename_folder): Dont try to move ibex if we have none. svn path=/trunk/; revision=14429
* w(x) out some warnings.02001-10-301-1/+2
| | | | | | | | | | | | 2001-10-30 <NotZed@Ximian.com> * camel-mime-utils.c (header_decode_mailbox): w(x) out some warnings. * providers/local/camel-local-summary.c (camel_local_summary_load): Remove the warning about not loading summary file - its a valid case for new folders. svn path=/trunk/; revision=14411
* If we get an empty name, then mark that as NoSelect. Workaround fix for02001-10-301-2/+2
| | | | | | | | | | 2001-10-30 <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (parse_list_response_as_folder_info): If we get an empty name, then mark that as NoSelect. Workaround fix for #13239. svn path=/trunk/; revision=14392
* Set an X-Evolution-Source header on the returned message so replies comeDan Winship2001-10-301-0/+9
| | | | | | | | * providers/imap/camel-imap-folder.c (get_message_simple, imap_get_message): Set an X-Evolution-Source header on the returned message so replies come from the right identity. svn path=/trunk/; revision=14388
* Don't emit a folder_subscribed signal if we are in the process of renamingJeffrey Stedfast2001-10-303-60/+96
| | | | | | | | | | | | | | | | | | 2001-10-29 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (subscribe_folder): Don't emit a folder_subscribed signal if we are in the process of renaming folders. (unsubscribe_folder): Same here but for the unsubscribe signal. (rename_folder): Unsubscribe from the folder being renamed and any subfolders it may have before actually renaming. Once the folder has been renamed, re-subscribe to it and it's subfolders with the new name. * camel-store.c (camel_folder_info_build): Sort the folder info's before constructing the tree. svn path=/trunk/; revision=14378
* Don't free the hash table key if the folder wasn't found in the hashDan Winship2001-10-301-4/+5
| | | | | | | | | | * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't free the hash table key if the folder wasn't found in the hash table. I'm not sure where the bug is/was that made it possible to add a folder to the tree after creating it failed, but now if that happens, it won't crash if you try to delete it again. (#11492) svn path=/trunk/; revision=14348
* Turn off w() -> warnings.92001-10-295-4/+114
| | | | | | | | | | | | | | | | | | | 2001-10-29 <NotZed@Ximian.com> * camel-mime-utils.c: Turn off w() -> warnings. * providers/imap/camel-imap-store.c (rename_folder): Also rename the message cache. (rename_folder): Fix subscribed folders table with rename(s). * providers/imap/camel-imap-folder.c (imap_rename): Implement, rename the cache dir pointer. * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_set_path): New method to set the path used by a message cache. svn path=/trunk/; revision=14327
* Changed to call ibex_move to rename it internally.82001-10-281-9/+44
| | | | | | | | | 2001-10-28 <NotZed@Ximian.com> * providers/local/camel-local-store.c (rename_folder): Changed to call ibex_move to rename it internally. svn path=/trunk/; revision=14294
* Use path not protocol as the path part of the uri of the folder_created82001-10-284-8/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-10-28 <NotZed@Ximian.com> * providers/local/camel-local-folder.c (camel_local_folder_construct): Use path not protocol as the path part of the uri of the folder_created event. * providers/local/camel-maildir-store.c (scan_dir): If FAST is set, dont try and scan for unread counts. * providers/local/camel-local-store.c (create_folder): Implement, just return the folderinfo of the folder matched, not all of it. * camel-store.c (camel_store_rename_folder): Rename the camelfolders before emitting the folderchanged event (otherwise vstore fails to pick up change. * camel-store.c (camel_store_init): Always use a default dir_sep of '/'. * camel-store.h (struct _CamelStore): Added a dir_sep to the base store so rename and whatnot can work, temporary fix for mixed dir separator in folder name api's. * providers/imap/camel-map-store.c: (imap_connect_online): Also set the store's dir_sep here. (imap_connect_offline): " svn path=/trunk/; revision=14275
* More fixing of the license texts.Ettore Perazzoli2001-10-2812-140/+132
| | | | svn path=/trunk/; revision=14217
* More fixing of the license texts.Ettore Perazzoli2001-10-287-77/+77
| | | | svn path=/trunk/; revision=14216
* Fixing the license text.Ettore Perazzoli2001-10-2857-57/+0
| | | | svn path=/trunk/; revision=14212
* Finished implementation.72001-10-272-20/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-10-27 <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (rename_folder): Finished implementation. * providers/local/camel-local-folder.c (local_rename): Implement local rename of folder objects. 2001-10-26 <NotZed@Ximian.com> * camel-vee-folder.c (camel_vee_folder_class_init): Hook into rename function. (vee_rename): Implement the veefolder rename function. (camel_vee_folder_class_init): (folder_changed_change): Kill a warning with a cast. * camel-vee-store.c (vee_rename_folder): Emit a folder_renamed event properly, also call parent to do some rename stuff. * camel-store.h: Added a CamelRenameInfo for the rename event. * camel-folder.c (camel_folder_rename): New function to rename a folder object. (camel_folder_class_init): Added a renamed event. (folder_rename): Default impl, set full_name, and set name assuming the dir separator is '/'. * camel-store.c (camel_store_class_init): Added folder_renamed event. (camel_store_rename_folder): Rename an active folder object if we have one, and update the folder table. (rename_folder): Make a default implementation that handles updating the folder tree. svn path=/trunk/; revision=14204
* Don't bother checking ex since we can rely on the response being NULL onJeffrey Stedfast2001-10-271-12/+61
| | | | | | | | | | 2001-10-26 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (delete_folder): Don't bother checking ex since we can rely on the response being NULL on error. (rename_folder): Implemented. svn path=/trunk/; revision=14201
* Update the licensing information to require version 2 of the GPLEttore Perazzoli2001-10-2757-114/+114
| | | | | | (instead of version 2 or any later version). svn path=/trunk/; revision=14190
* Check to make sure that the dataset is non-NULL before using and/orJeffrey Stedfast2001-10-271-19/+25
| | | | | | | | | | 2001-10-26 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_get_message): Check to make sure that the dataset is non-NULL before using and/or freeing. svn path=/trunk/; revision=14181
* Lets try putting a camel_stream_reset() here. Logic being that the streamJeffrey Stedfast2001-10-271-0/+1
| | | | | | | | | | | | | 2001-10-26 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_get): Lets try putting a camel_stream_reset() here. Logic being that the stream may have been read from since it was cached and thus our caller may try reading from it and get no data from it since it is already at the EOS. This may fix bug #12943. svn path=/trunk/; revision=14165
* Don't let fi->name be NULL.Dan Winship2001-10-251-0/+2
| | | | | | | * providers/imap/camel-imap-store.c (unsubscribe_folder): Don't let fi->name be NULL. svn path=/trunk/; revision=14079
* made d(x) x recompile again.32001-10-231-5/+5
| | | | | | | | 2001-10-23 <NotZed@Ximian.com> * providers/local/camel-mbox-summary.c: made d(x) x recompile again. svn path=/trunk/; revision=13932
* No, use Storing, as the other code does :p (spool_summary_check): Check22001-10-231-3/+3
| | | | | | | | | | 2001-10-22 <NotZed@Ximian.com> * providers/local/camel-spool-summary.c (summary_rebuild): No, use Storing, as the other code does :p (spool_summary_check): Check for consistency. svn path=/trunk/; revision=13904
* s/summarising/summarizing/. (spool_summary_check): s/summarise/summarize/.Jon Trowbridge2001-10-231-3/+3
| | | | | | | | | | 2001-10-22 Jon Trowbridge <trow@ximian.com> * providers/local/camel-spool-summary.c (summary_rebuild): s/summarising/summarizing/. (spool_summary_check): s/summarise/summarize/. svn path=/trunk/; revision=13902
* Added CAMEL_CFLAGS so we get the right iconv stuff, patch from Yanko82001-10-195-0/+5
| | | | | | | | | | 2001-10-18 <NotZed@Ximian.com> * providers/(imap|local|pop3|sendmail|smtp)/Makefile.am: Added CAMEL_CFLAGS so we get the right iconv stuff, patch from Yanko Kaneti <yaneti@declera.com> svn path=/trunk/; revision=13783
* Flush the stream here, not sure it really matters but it might (hopefully)Jeffrey Stedfast2001-10-191-0/+1
| | | | | | | | | | 2001-10-18 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-message-cache.c (insert_finish): Flush the stream here, not sure it really matters but it might (hopefully) fix bug #12943. svn path=/trunk/; revision=13779
* String cleanup for bug #6640.Jeffrey Stedfast2001-10-191-2/+2
| | | | | | | | | 2001-10-18 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-local-provider.c: String cleanup for bug #6640. svn path=/trunk/; revision=13777
* Fix my Cyrus imapd workaround...instead of checking to see if info->flagsJeffrey Stedfast2001-10-191-5/+5
| | | | | | | | | | 2001-10-18 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_sync_online): Fix my Cyrus imapd workaround...instead of checking to see if info->flags == FLAGGED, just check to see if it contains any IMAP flags. svn path=/trunk/; revision=13770
* Use '.' as the inbox name for filter new messages test.72001-10-181-1/+1
| | | | | | | | | | 2001-10-17 <NotZed@Ximian.com> * providers/local/camel-maildir-folder.c (camel_maildir_folder_new): Use '.' as the inbox name for filter new messages test. svn path=/trunk/; revision=13742
* Same as maildir and mbox append-message.Jeffrey Stedfast2001-10-182-6/+14
| | | | | | | | | | | | | | | | | | | | | | | 2001-10-17 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-mh-folder.c (mh_append_message): Same as maildir and mbox append-message. * providers/local/camel-maildir-folder.c (maildir_append_message): Same as mbox append. * camel-exception.c (camel_exception_set): Make sure the new description isn't the same as the old description pointer before freeing the old one. (camel_exception_setv): Don't free the old description until we set the new one this way we can reuse the old description in the new description. * providers/local/camel-mbox-folder.c (mbox_append_message): If errno == EINTR, then we got a user-cancel so set the exception appropriately so that we don't make the user shit his pants. svn path=/trunk/; revision=13739
* Make sure the new description isn't the same as the old descriptionJeffrey Stedfast2001-10-181-4/+8
| | | | | | | | | | | | | | | | | 2001-10-17 Jeffrey Stedfast <fejj@ximian.com> * camel-exception.c (camel_exception_set): Make sure the new description isn't the same as the old description pointer before freeing the old one. (camel_exception_setv): Don't free the old description until we set the new one this way we can reuse the old description in the new description. * providers/local/camel-mbox-folder.c (mbox_append_message): If errno == EINTR, then we got a user-cancel so set the exception appropriately so that we don't make the user shit his pants. svn path=/trunk/; revision=13737
* Patch from Danw, Use unread count of -1 to mark unflagged messages. Make72001-10-182-9/+12
| | | | | | | | | | | | | | | 2001-10-17 <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (get_folder_info_online): (parse_list_response_as_folder_info): Patch from Danw, Use unread count of -1 to mark unflagged messages. Make sure any folder we dont lookup explicitly is marked as -1. Should fix #9947 and friends. * providers/local/camel-mbox-summary.c (mbox_summary_sync): Only touch the summary if the timestamp or size changed. svn path=/trunk/; revision=13731
* If CAMEL_DEBUG is defined, print some useful ref/unref info.Jeffrey Stedfast2001-10-171-1/+1
| | | | | | | | | | | | | | | | 2001-10-16 Jeffrey Stedfast <fejj@ximian.com> * camel-object.[c,h]: If CAMEL_DEBUG is defined, print some useful ref/unref info. * providers/imap/camel-imap-store.c (delete_folder): Fixed an assignment warning. * camel-uid-cache.c (camel_uid_cache_new): Make sure that the parent directory exists before trying to open the filename, if it doesn't, create it. svn path=/trunk/; revision=13707
* Replace the Bcc headers in a single location and don't flush the dataJeffrey Stedfast2001-10-141-21/+16
| | | | | | | | | | 2001-10-13 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_data): Replace the Bcc headers in a single location and don't flush the data unless the write was successful. svn path=/trunk/; revision=13662
* oops, it should remove the bcc header, not the cc headerJeffrey Stedfast2001-10-131-8/+29
| | | | svn path=/trunk/; revision=13643
* Remove the stripheader filter from the build.Jeffrey Stedfast2001-10-131-8/+15
| | | | | | | | | | | | | | | | 2001-10-12 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Remove the stripheader filter from the build. * camel-mime-filter-stripheader.[c,h]: Removed. * providers/smtp/camel-smtp-transport.c (smtp_data): Check the return value of camel_stream_flush to make sure it flushed the data successfully before continuing. Don't use the stripheader filter, it was completely broken - instead remove the header and set it again after we send. svn path=/trunk/; revision=13641
* oops, we want get_unread_message_count, not get_message_count!02001-10-111-1/+1
| | | | | | | | | | | | | | 2001-10-10 <NotZed@Ximian.com> * providers/local/camel-maildir-store.c (scan_dir): oops, we want get_unread_message_count, not get_message_count! 2001-10-09 <NotZed@Ximian.com> * camel-service.c (camel_service_disconnect): Duplicate connect code that unregisters a cancel op if we created one. svn path=/trunk/; revision=13561
* Implement.92001-10-105-5/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-10-09 <NotZed@Ximian.com> * providers/local/camel-spool-folder.c (spool_search_by_uids): Implement. * providers/imap/camel-imap-search.c (imap_body_contains): If searching a sub-set of the total message count, then use a UID range to search only specific messages. * camel-vee-folder.c (vee_folder_change_match): Removed. (folder_changed_add_uid): Helper func for changed code. (folder_changed_remove_uid): " (folder_changed_change_uid): " (folder_changed): Rewritten. Supports proper auto-updating of changes, but not removals till a sync occurs. (vee_search_by_uids): Implement. (folder_changed): Changed to call an async threaded function to do the actual folder updating. * camel-folder-summary.c (camel_flag_list_copy): New func to copy a whole list of flags. (camel_tag_list_copy): New func to copy a whole list of flags. * providers/imap/camel-imap-folder.c (imap_search_by_uids): Implement. * providers/local/camel-local-folder.c (local_search_by_uids): Implement. * camel-folder.c (camel_folder_search_by_uids): New function, search a subset of uid's. (search_by_uids): Default impl, return error. svn path=/trunk/; revision=13532
* replace the ever-growing list of gbooleans with a single guint32 forDan Winship2001-10-096-25/+12
| | | | | | | | | | | | | | | | | | | | | | * camel-folder.h (struct _CamelFolder): replace the ever-growing list of gbooleans with a single guint32 for flags. * camel-folder.c: Update folder flag setting/checking. * providers/pop3/camel-pop3-folder.c (camel_pop3_folder_init): * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): * providers/local/camel-spool-folder.c (spool_init, camel_spool_folder_new): * providers/local/camel-maildir-folder.c (camel_maildir_folder_new): * providers/local/camel-local-folder.c (local_init): * providers/imap/camel-imap-folder.c (camel_imap_folder_init, camel_imap_folder_new): * camel-vtrash-folder.c (camel_vtrash_folder_init): * camel-vee-folder.c (camel_vee_folder_init): * camel-digest-folder.c (camel_digest_folder_init): update folder flag setting. svn path=/trunk/; revision=13509
* Unlock the store before returning error. (noted by NotZed)Dan Winship2001-10-091-1/+3
| | | | | | | * providers/imap/camel-imap-store.c (get_folder_online): Unlock the store before returning error. (noted by NotZed) svn path=/trunk/; revision=13501