aboutsummaryrefslogtreecommitdiffstats
path: root/camel
Commit message (Collapse)AuthorAgeFilesLines
* 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-1820-117/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Replace calls to g_string_sprintfa() with g_string_append_printf() sinceJeffrey Stedfast2002-12-184-80/+92
| | | | | | | | | | | | | | 2002-12-17 Jeffrey Stedfast <fejj@ximian.com> * 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=19153
* Detect text/html parts that were marked as text/plain and re-tag them asJeffrey Stedfast2002-12-172-14/+39
| | | | | | | | | | | | | 2002-12-16 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): Detect text/html parts that were marked as text/plain and re-tag them as text/html parts. Note: currently just checks if the first non-lwsp char is a '<' - but we might need to be smarter about this? *sigh* Stupid Windows mailers. svn path=/trunk/; revision=19143
* New convenience function to replace calls to e_text_to_html() in theJeffrey Stedfast2002-12-173-0/+32
| | | | | | | | | | 2002-12-16 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-filter-tohtml.c (camel_text_to_html): New convenience function to replace calls to e_text_to_html() in the mailer/composer etc. svn path=/trunk/; revision=19128
* #include some headers we had forgotten to add previously, also addedJeffrey Stedfast2002-12-166-1/+455
| | | | | | | | | | | | 2002-12-16 Jeffrey Stedfast <fejj@ximian.com> * camel.h: #include some headers we had forgotten to add previously, also added camel-mime-filter-enriched.h. * camel-mime-filter-enriched.[c,h]: New stream filter to convert text/enriched and text/richtext into HTML. svn path=/trunk/; revision=19124
* Don't apply the CANON_STRIP filter here, since we are verifying whateverJeffrey Stedfast2002-12-162-3/+11
| | | | | | | | | | | 2002-12-15 Jeffrey Stedfast <fejj@ximian.com> * camel-multipart-signed.c (camel_multipart_signed_verify): Don't apply the CANON_STRIP filter here, since we are verifying whatever raw data we received (all we want to do is convert o the canonical CRLF format). svn path=/trunk/; revision=19122
* Use camel-url-scanner instead of regex.Jeffrey Stedfast2002-12-113-90/+43
| | | | | | | | | 2002-12-10 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-filter-tohtml.c (html_convert): Use camel-url-scanner instead of regex. svn path=/trunk/; revision=19087
* Fixed to not be fooled in the case where the address is followedJeffrey Stedfast2002-12-102-35/+60
| | | | | | | | | | | | | | 2002-12-09 Jeffrey Stedfast <fejj@ximian.com> * camel-url-scanner.c (camel_url_addrspec_end): Fixed to not be fooled in the case where the address is followed immediately by a period. (camel_url_web_end): Made more robust. (camel_url_scanner_scan): Oops. We need to set the match->pattern string pointer to the correct pattern before executing the start/end methods (as some of them rely on this info). svn path=/trunk/; revision=19077
* New code to scan for patterns (used only for url pattern matching atm, butJeffrey Stedfast2002-12-104-0/+477
| | | | | | | | | | 2002-12-09 Jeffrey Stedfast <fejj@ximian.com> * camel-url-scanner.c: New code to scan for patterns (used only for url pattern matching atm, but we may find other uses for this and thus rename it? I dunno). Uses ETrie. svn path=/trunk/; revision=19075
* Use a bag instead of a hashtable to track the cache streams.Not Zed2002-12-0913-449/+608
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-053-5/+14
| | | | | | | | | | 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
* Fixed to not get false positives when the token is shorter than the actualJeffrey Stedfast2002-12-042-12/+34
| | | | | | | | | | | | | 2002-12-03 Jeffrey Stedfast <fejj@ximian.com> * broken-date-parser.c (get_tzone): Fixed to not get false positives when the token is shorter than the actual timezone string (but matches the first little bit of it). (datetok): Modified to properly handle when the first char of a token is a special char (such as a '-') that is also used as a token delimiter. svn path=/trunk/; revision=18996
* Use the new camel_operation_cancel_prfd() function to get the cancellationJeffrey Stedfast2002-11-234-20/+201
| | | | | | | | | | | | | | | | | 2002-11-21 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (stream_read): Use the new camel_operation_cancel_prfd() function to get the cancellation fd so we can poll on it for cancellation stuff. (stream_write): Same. 2002-11-22 Not Zed <NotZed@Ximian.com> * camel-operation.c (camel_operation_cancel_prfd): Implement, gets a nspr pr filedesc to poll/wait on (struct _CamelOperation): include a pr filedesc. svn path=/trunk/; revision=18894
* If we have a namespace of "", then always match any path.Not Zed2002-11-222-4/+14
| | | | | | | | | | | | 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
* applied plain_signature_fix.patchRadek Doulik2002-11-203-1/+7
| | | | svn path=/trunk/; revision=18841
* Removed $(GNOME_LIBDIR) and $(GNOMEUI_LIBS)Rodney Dawes2002-11-207-12/+4
| | | | | | * tests/*/Makefile.am: Removed $(GNOME_LIBDIR) and $(GNOMEUI_LIBS) svn path=/trunk/; revision=18839
* If the namespace is at/below INBOX, check for the INBOX explicitly (sinceJeffrey Stedfast2002-11-182-20/+73
| | | | | | | | | | | | 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
* Rewritten. Much much much cleaner implementation now, though usesJeffrey Stedfast2002-11-113-332/+263
| | | | | | | | | | 2002-11-11 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-filter-tohtml.c (html_convert): Rewritten. Much much much cleaner implementation now, though uses malloc/free more often than I'd like. svn path=/trunk/; revision=18691
* Use g_strerror when setting an exception string (we need it to be inJeffrey Stedfast2002-11-116-12/+36
| | | | | | | | | | | | | | | | | | | 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-1132-255/+404
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* constify the content_type.Not Zed2002-11-083-2/+7
| | | | | | | | | 2002-11-07 Not Zed <NotZed@Ximian.com> * camel-mime-part.c (camel_mime_part_set_content_type): constify the content_type. svn path=/trunk/; revision=18660
* don't #include <gtk/gtk.h>Jeffrey Stedfast2002-11-082-3/+1
| | | | svn path=/trunk/; revision=18639
* Added.Jeffrey Stedfast2002-11-085-5/+74
| | | | | | | | | | | | 2002-11-07 Jeffrey Stedfast <fejj@ximian.com> * camel-i18n.h: Added. * camel-object.h: #include camel-i18n.h instead of gnome-i18n.h * camel-lock.c: Same. svn path=/trunk/; revision=18638
* removed gnome-defs.h, it does not exist.Rodrigo Moya2002-11-082-1/+4
| | | | | | | | 2002-11-07 Rodrigo Moya <rodrigo@ximian.com> * camel-object.h: removed gnome-defs.h, it does not exist. svn path=/trunk/; revision=18633
* Created temporary link list, we need to link with something for gettext.Not Zed2002-11-0510-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | 2002-11-05 Not Zed <NotZed@Ximian.com> * Makefile.am (camel_lock_helper_LDADD): Created temporary link list, we need to link with something for gettext. * camel.h: Remove gstring-util.h and hash-table-utils.h. * camel-text-index.c: (text_index_normalise): Changed for g_utf8_strdown api change. * camel-search-private.c: * camel-mime-utils.c: * camel-mime-part-utils.c: * camel-html-parser.c: * camel-charset-map.c: Include glib/gunicode.h from glib instead of gal. * camel-filter-driver.c: Remove include of gtk/gtk.h, should never have been there. svn path=/trunk/; revision=18542
* Removed. Glib2 has this function.Jeffrey Stedfast2002-11-022-12/+3
| | | | | | | | | 2002-11-01 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (g_string_append_len): Removed. Glib2 has this function. svn path=/trunk/; revision=18499
* Use g_path_get_basename instead of g_strdup (g_basename (filename)).Jeffrey Stedfast2002-11-022-1/+4
| | | | | | | | | 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
* Use g_path_get_dirname since g_dirname has been deprecated.Jeffrey Stedfast2002-11-022-1/+6
| | | | | | | | | 2002-11-01 Jeffrey Stedfast <fejj@ximian.com> * camel-uid-cache.c (camel_uid_cache_new): Use g_path_get_dirname since g_dirname has been deprecated. svn path=/trunk/; revision=18497
* Set the virtual method pointers to the import/export methods.Jeffrey Stedfast2002-11-015-36/+277
| | | | | | | | | | | | | | | | | | | | | | 2002-10-31 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (camel_gpg_context_class_init): Set the virtual method pointers to the import/export methods. (camel_gpg_context_init): Set the key_protocol string. (gpg_hash_to_id): Handle 2 more hash types. (gpg_id_to_hash): Same. (gpg_ctx_op_step): Slight fixes to support import/export. (gpg_ctx_parse_status): Fix to hack around the fact that importing keys doesn't write to stdout. (gpg_import_keys): Implemented. (gpg_export_keys): Implemented. * camel-cipher-context.c (camel_cipher_context_class_init): Hook up default virtual methods for import/export. (camel_cipher_import_keys): Implemented. (camel_cipher_export_keys): Implemented. svn path=/trunk/; revision=18475
* oops, commit this tooJeffrey Stedfast2002-11-011-0/+1
| | | | svn path=/trunk/; revision=18474
* Removed hash-table-utils.[c,h] from the build.Jeffrey Stedfast2002-11-0115-119/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove a ton of useless snot.Jeffrey Stedfast2002-11-0113-550/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-10-31 Jeffrey Stedfast <fejj@ximian.com> Remove a ton of useless snot. * Makefile.am: Remove gstring-util.[c,h] from the build. * gstring-util.[c,h]: Removed. * string-utils.c (string_equal_for_glist): Removed. (string_split): Removed. (string_trim): Removed. (string_prefix): Removed. (string_unquote): Removed. (strip): Removed. * hash-table-utils.c (g_hash_table_generic_free): Removed. g_str[n]casecmp functions are deprecated in glib2. * string-utils.c (strstrcase): Use strncasecmp instead of g_strncasecmp. * hash-table-utils.c (g_strcase_equal): Use strcasecmp instead of g_strcasecmp. * camel-smime-utils.c (camel_smime_is_smime_v3_signed): Same. (camel_smime_is_smime_v3_encrypted): Here too. * camel-sasl-digest-md5.c (decode_data_type): And here. (parse_server_challenge): Again here. * camel-pgp-mime.c (camel_pgp_mime_is_rfc2015_signed): Same. (camel_pgp_mime_is_rfc2015_encrypted): Same * camel-mime-part-utils.c (check_html_charset): Here too. * camel-folder-summary.c (camel_system_flag): Same. svn path=/trunk/; revision=18472
* Don't prematurely set gpg->complete to TRUE. Let gpg_ctx_op_step () set itJeffrey Stedfast2002-10-282-9/+10
| | | | | | | | | | 2002-10-25 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_parse_status): Don't prematurely set gpg->complete to TRUE. Let gpg_ctx_op_step () set it to TRUE when gpg closes the status-fd instead. svn path=/trunk/; revision=18448
* ** For bug #31647 and bug #31456.Not Zed2002-10-247-87/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-233-43/+52
| | | | | | | | | | | | | | | | | | | | | | 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
* #include "camel-stream-fs.h" for writing out the certs to diskJeffrey Stedfast2002-10-191-0/+1
| | | | svn path=/trunk/; revision=18395
* Do the filtering ourselves. This is so a problem like a missing uid (whichNot Zed2002-10-181-3/+41
| | | | | | | | | | | | 2002-10-03 Not Zed <NotZed@Ximian.com> * camel-folder.c (filter_filter): Do the filtering ourselves. This is so a problem like a missing uid (which can happen legitemitely) doesn't prematurely abort filtering. Stop on all other errors. See #31667. svn path=/trunk/; revision=18392
* If ~/.camel_certs doesn't exist, create it.Jeffrey Stedfast2002-10-182-6/+20
| | | | | | | | | 2002-10-17 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (camel_certdb_nss_cert_set): If ~/.camel_certs doesn't exist, create it. svn path=/trunk/; revision=18391
* helper, build fingerprint. (camel_certdb_nss_cert_get): Helper for nssNot Zed2002-10-175-93/+381
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-10-15 Not Zed <NotZed@Ximian.com> * camel-tcp-stream-ssl.c (cert_fingerprint): helper, build fingerprint. (camel_certdb_nss_cert_get): Helper for nss certs. Lookup cert. As well as fingerprint, the whole raw cert is checked for validity. (camel_certdb_nss_cert_add): Add an nss cert to a certdb, also saves the cert by fingerprint in ~/.camel_certs/. (ssl_bad_cert): Changed to use above functions to simplify logic. (ssl_bad_cert): Also added non-compiled code which mimics what mozilla does, but it doesn't work right :-/ (camel_certdb_nss_cert_set): Save the raw cert associated with a cert. * camel-certdb.c (certdb_cert_free): Free the raw cert data if set. 2002-10-14 Not Zed <NotZed@Ximian.com> * camel-file-utils.c (camel_file_util_encode_string): Encode a length of 0 as 1, not 0, to match the decode code. svn path=/trunk/; revision=18385
* No longer takes a path argument. (camel_gpg_context_fianlise): No need toJeffrey Stedfast2002-10-173-32/+25
| | | | | | | | | | | | | | | | | | | | 2002-10-16 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (camel_gpg_context_new): No longer takes a path argument. (camel_gpg_context_fianlise): No need to free ctx->path. (gpg_ctx_new): No longer takes a path argument either. (gpg_ctx_free): No need to free ctx->path, it's no longer used. (gpg_ctx_op_start): Don't stat the path anymore and change the first arg to execvp to "gpg" so that we use the shell's environment to find gpg. (gpg_sign): Updated. (gpg_verify): Updated. (gpg_encrypt): Updated. (gpg_decrypt): Updated. (gpg_ctx_get_argv): Removed some debug printfs. svn path=/trunk/; revision=18383
* If the hash id is NULL, return CAMEL_CIPHER_HASH_DEFAULT. Fixes bugJeffrey Stedfast2002-10-162-8/+15
| | | | | | | | | 2002-10-15 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_id_to_hash): If the hash id is NULL, return CAMEL_CIPHER_HASH_DEFAULT. Fixes bug #32229. svn path=/trunk/; revision=18371
* If the response from the IMAP server is "No", don't set theJeffrey Stedfast2002-10-102-2/+11
| | | | | | | | | | | | | 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-083-12/+39
| | | | | | | | | | | | | | 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
* Fix all mailing list regex patterns to allow any number of spaces *or*Jeffrey Stedfast2002-10-082-11/+17
| | | | | | | | | | 2002-10-06 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c: Fix all mailing list regex patterns to allow any number of spaces *or* tabs as pre-padding for the header values. svn path=/trunk/; revision=18333
* Use the content-object's rawtext flag to decide if it needs to be filteredJeffrey Stedfast2002-10-052-1/+8
| | | | | | | | | | | 2002-10-03 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-part.c (write_to_stream): Use the content-object's rawtext flag to decide if it needs to be filtered through the charset filter instead of using the mime part's rawtext flag since this will never be set. Partial fix for bug #31655. svn path=/trunk/; revision=18323
* Dont get the filter driver inside the change_lock. Its not necessary, andNot Zed2002-10-042-5/+16
| | | | | | | | | | | 2002-10-03 Not Zed <NotZed@Ximian.com> * camel-folder.c (folder_changed): Dont get the filter driver inside the change_lock. Its not necessary, and can cause deadlock with the way the mailer gets the filter driver via g_mainloop. Should fix #31572. svn path=/trunk/; revision=18321
* Map us-ascii to windows-1252 also.Jeffrey Stedfast2002-10-042-1/+7
| | | | | | | | | 2002-10-02 Jeffrey Stedfast <fejj@ximian.com> * camel-charset-map.c (camel_charset_iso_to_windows): Map us-ascii to windows-1252 also. svn path=/trunk/; revision=18318
* Add missing ;.Michael Zucci2002-10-031-1/+1
| | | | svn path=/trunk/; revision=18315
* /home/notzed/gnome/head/evolution/camelNot Zed2002-10-035-22/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-022-1/+10
| | | | | | | | | | | | 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-013-43/+79
| | | | | | | | | | | | | | | | | | | | | | | | 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-013-15/+11
| | | | | | | | | | | 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-303-4/+14
| | | | | | | | | | | | | 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-285-22/+152
| | | | | | | | | | | | | | | | | | | | 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-273-22/+43
| | | | | | | | | | | | | | | 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-263-4/+6
| | | | | | | | | | | | 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-264-20/+101
| | | | | | | | | | | | | | | | | | | | 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-262-3/+27
| | | | | | | | | | | | 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
* Handle EILSEQ by eating bytes in the input buffer until conversion isJeffrey Stedfast2002-09-262-88/+115
| | | | | | | | | | | 2002-09-23 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-filter-charset.c (complete): Handle EILSEQ by eating bytes in the input buffer until conversion is successful. The old behaviour aborted when it got EILSEQ and just dumped the raw data. (filter): Same. Fixes bug #30873. svn path=/trunk/; revision=18228
* Added a test suite for camel-mime-filter-charset and added a few test cases ↵Jeffrey Stedfast2002-09-268-11/+1059
| | | | | | for it. input charset files should be in the form "charset-%s.%d.in" where %s is the charset name that the file is in and %d is just some number as in a sequence id. Mostly just so we can have multiple test files per charset svn path=/trunk/; revision=18227
* Changed the Mailing-List rule to get the complete domain (* in wrongNot Zed2002-09-242-1/+4
| | | | | | | | | 2002-09-24 Not Zed <NotZed@Ximian.com> * camel-mime-utils.c (mail_list_magic[]): Changed the Mailing-List rule to get the complete domain (* in wrong spot). #31087. svn path=/trunk/; revision=18192
* If we have no data written to a key, dont add it, or its partition header.Not Zed2002-09-246-24/+123
| | | | | | | | | | | | | | | | | | | | | | | | 2002-09-24 Not Zed <NotZed@Ximian.com> * camel-text-index.c (text_index_compress_nosync): If we have no data written to a key, dont add it, or its partition header. 2002-09-23 Not Zed <NotZed@Ximian.com> * camel-block-file.c (sync_nolock): Mark root block dirty if we're going to sync it. (camel_key_file_finalise): de-count the active list if we close it. * camel-text-index.c (text_index_delete): Implement. (text_index_compress_nosync): Use index_delete when we're finished with the old one, so it is properly deactivated. * camel-index.c (camel_index_delete): Remove api call. Mark index deleted in new state variable. (camel_index_*): Wrap all calls in check for deleted state. svn path=/trunk/; revision=18189
* If the original message is deleted, reset the deleted flag when we'reJeffrey Stedfast2002-09-242-3/+8
| | | | | | | | | 2002-09-23 Jeffrey Stedfast <fejj@ximian.com> * camel-folder.c (transfer_message_to): If the original message is deleted, reset the deleted flag when we're done. Fixes bug #30876. svn path=/trunk/; revision=18181
* Decode the INTERNALDATE if we've got one. (imap_update_summary): InsteadJeffrey Stedfast2002-09-242-5/+34
| | | | | | | | | | | | | | | | 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-235-0/+15
| | | | | | | | | | | | | * 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
* New regression test for word splitting/search input parsing code.Not Zed2002-09-206-29/+187
| | | | | | | | | | | | | | | 2002-09-20 Not Zed <NotZed@Ximian.com> * tests/misc/split.c: New regression test for word splitting/search input parsing code. * tests/folder/test9.c (main): Fix for filter_driver api change. * camel-search-private.c (camel_search_words_split): Handle "'s and \'s to escape characters. For fat, lazy, slobs who dont like anything changing. svn path=/trunk/; revision=18130
* Take new session arg. Update callers. (symbols[]): changed get-source toNot Zed2002-09-195-39/+70
| | | | | | | | | | | | | | | | | | 2002-09-19 Not Zed <NotZed@Ximian.com> * camel-filter-search.c (camel_filter_search_match): Take new session arg. Update callers. (symbols[]): changed get-source to header-source (header_source): Chagned from get_source. Now a boolean, returns true if source matches one of the arguments. Uses the provider url comparison directly for accurate checking. Makes 'filter on source' work. * camel-filter-driver.c (camel_filter_driver_new): Take new arg, session. (camel_filter_driver_finalise): Free session. svn path=/trunk/; revision=18112
* Don't increment the response pointer when deciding what type of headerJeffrey Stedfast2002-09-192-4/+17
| | | | | | | | | | | | | 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
* fixed a merge conflictJeffrey Stedfast2002-09-191-1/+0
| | | | svn path=/trunk/; revision=18109
* Include MIME-VERSION and CONTENT-TYPE.Jeffrey Stedfast2002-09-192-1/+6
| | | | | | | | | 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-192-0/+16
| | | | | | | | | | 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-192-5/+26
| | | | | | | | | | | | 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-152-4/+6
| | | | | | | | | | | 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
* If header_msgid_decode fails for the content-id field, just grab whateverJeffrey Stedfast2002-09-142-2/+22
| | | | | | | | | | | 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=18070
* Revert a patch that I had not meant to commit that was aimed at fixing bugJeffrey Stedfast2002-09-112-30/+13
| | | | | | | | | 2002-09-11 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_encode_string): Revert a patch that I had not meant to commit that was aimed at fixing bug #29234. svn path=/trunk/; revision=18040
* Same as below. Also save errno before closing the file so our caller canJeffrey Stedfast2002-09-114-6/+34
| | | | | | | | | | | | | | | | | | | | 2002-09-10 Jeffrey Stedfast <fejj@ximian.com> * camel-store-summary.c (camel_store_summary_load): Same as below. Also save errno before closing the file so our caller can figure out why we failed. (camel_store_summary_save): Same here, but also flush the output stream to disk. * camel-folder-summary.c (camel_folder_summary_load): s/fclose(in) == -1/fclose(in) != 0/ since fclose doesn't necessarily return -1 on fail, all we really know is that it returns 0 on success and non-zero on fail. * camel-certdb.c (camel_certdb_save): fsync() the stream after we fflush it. svn path=/trunk/; revision=18037
* Do proper error checking and return -1 on fail.Jeffrey Stedfast2002-09-114-42/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-112-0/+8
| | | | | | | | | | | 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
* Remove the hash table entry using the right path. Related to #29731.Not Zed2002-09-102-2/+8
| | | | | | | | | | 2002-09-10 Not Zed <NotZed@Ximian.com> * camel-data-cache.c (data_cache_expire): Remove the hash table entry using the right path. Related to #29731. (camel_data_cache_remove): " svn path=/trunk/; revision=18031
* Fixes bug #4224Jeffrey Stedfast2002-09-106-23/+73
| | | | | | | | | | | | | | | | | | 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
* Use e_mktime_utc.Dan Winship2002-09-054-29/+18
| | | | | | | | | | | * camel-mime-utils.c (header_decode_date): Use e_mktime_utc. * camel-mime-message.c (camel_mime_message_set_date): Use e_localtime_with_offset. * broken-date-parser.c (decode_broken_date): Use e_mktime_utc. svn path=/trunk/; revision=17986
* clear nonfatal stuff.Not Zed2002-09-0410-45/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* If we fake the from eof file boundary, also make sure we say we matchedNot Zed2002-09-042-3/+15
| | | | | | | | | | | 2002-09-04 Not Zed <NotZed@Ximian.com> * camel-mime-parser.c (folder_scan_content): If we fake the from eof file boundary, also make sure we say we matched nothing. Also make the end case a little more robust to make sure we expired all hope of finding a sub-boundary. svn path=/trunk/; revision=17961
* Lots of changes, too numerous to list. Changed to useNot Zed2002-09-0313-574/+1379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-297-84/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* updated readmeMichael Zucci2002-08-291-0/+1
| | | | svn path=/trunk/; revision=17919
* Fixed `set' to hold the correct value when setting the flags.Jeffrey Stedfast2002-08-292-8/+11
| | | | | | | | | 2002-08-28 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-openssl.c (stream_setsockopt): Fixed `set' to hold the correct value when setting the flags. svn path=/trunk/; revision=17913
* simplifiedJeffrey Stedfast2002-08-291-1/+1
| | | | svn path=/trunk/; revision=17912
* Fixed `set' to hold the correct value when setting the flags.Jeffrey Stedfast2002-08-292-2/+5
| | | | | | | | | 2002-08-28 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-raw.c (stream_setsockopt): Fixed `set' to hold the correct value when setting the flags. svn path=/trunk/; revision=17911
* Match file: urls too.Jeffrey Stedfast2002-08-292-1/+6
| | | | | | | | 2002-08-28 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-filter-tohtml.c (is_protocol): Match file: urls too. svn path=/trunk/; revision=17900
* fix exposes a regression in mbox :-/Not Zed2002-08-282-5/+9
| | | | | | | | | | 2002-08-28 Not Zed <NotZed@Ximian.com> * tests/folder/test8.c (test_add_message): Change message number to use hex, so its properly unique. (worker): Same here. svn path=/trunk/; revision=17891
* some utf7/utf8 tests.Not Zed2002-08-283-2/+111
| | | | | | | | 2002-08-28 Not Zed <NotZed@Ximian.com> * tests/misc/utf7.c: some utf7/utf8 tests. svn path=/trunk/; revision=17890
* fixes a crash on systems that dont have utf7 in iconv.Not Zed2002-08-285-251/+300
| | | | | | | | | | | | | | 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
* Now takes a third argument to specify whether or not to group messages byJeffrey Stedfast2002-08-283-9/+26
| | | | | | | | | | | | | 2002-08-27 Jeffrey Stedfast <fejj@ximian.com> * camel-folder-thread.c (camel_folder_thread_messages_new): Now takes a third argument to specify whether or not to group messages by subject when threading. It seems some people don't want this feature (see bug #22791 for details). (thread_summary): If thread_by_subject is enabled, group un-threaded messages by subject otherwise don't bother. svn path=/trunk/; revision=17880
* 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-272-0/+10
| | | | | | | | | | | 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-277-103/+98
| | | | | | | | | | | | | | 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-242-3/+38
| | | | | | | | | | | | | | | | | | 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-233-8/+36
| | | | | | | | | | 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-233-11/+43
| | | | | | | | | | 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
* Don't register the noop timeout here anymore, we're gonna handle all thisJeffrey Stedfast2002-08-224-109/+11
| | | | | | | | | | | 2002-08-21 Jeffrey Stedfast <fejj@ximian.com> * camel-session.c (get_service): Don't register the noop timeout here anymore, we're gonna handle all this in the mailer now. (camel_session_register_timeout): Removed. (camel_session_remove_timeout): Removed. svn path=/trunk/; revision=17830
* up the timeout to 10 minutesJeffrey Stedfast2002-08-211-1/+1
| | | | svn path=/trunk/; revision=17823
* Override the default noop implementation.Jeffrey Stedfast2002-08-215-3/+100
| | | | | | | | | | | | | | | 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
* Plug some large leaks in the indexing code.Peter Williams2002-08-213-4/+18
| | | | | | | | | | | | | | | | | 2002-08-19 Peter Williams <peterw@ximian.com> Plug some large leaks in the indexing code. * camel-mime-filter-index.c (camel_mime_filter_index_set_index): Unref the old index if necessary. * camel-text-index.c (camel_text_index_get_type): Give it the correct parent type so that finalize handlers chain. (camel_text_index_name_get_type): Here too. (camel_text_index_cursor_get_type): Here too. (camel_text_index_key_cursor_get_type): Here too. svn path=/trunk/; revision=17820
* Don't let the minimum recursive depth be negative. (get_folders): PassJeffrey Stedfast2002-08-212-6/+12
| | | | | | | | | | | | 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-213-7/+12
| | | | | | | | | 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-202-1/+5
| | | | | | | | | | 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
* If the diagnostics are empty, just explain that gpg failed to execute.Jeffrey Stedfast2002-08-202-6/+25
| | | | | | | | | | | 2002-08-19 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_sign): If the diagnostics are empty, just explain that gpg failed to execute. (gpg_encrypt): Same. (gpg_decrypt): And here too. svn path=/trunk/; revision=17807
* Updated to pass the needed arguments to camel_init() and to init gthreadsJeffrey Stedfast2002-08-2032-357/+206
| | | | | | | | | | | | | | | | 2002-08-19 Jeffrey Stedfast <fejj@ximian.com> * tests/lib/camel-test.c (camel_test_init): Updated to pass the needed arguments to camel_init() and to init gthreads before camel (since camel expectes it to be initialised already). * tests/lib/session.c: #include <config.h> needed for ENABLE_THREADS so that sizeof (CamelSessionClass) gives the correct size. * tests/*: Updated to work with camel API changes. svn path=/trunk/; revision=17805
* If the passed-in URL contains a path, but the service doesn't allow paths,Dan Winship2002-08-192-0/+12
| | | | | | | | * camel-session.c (get_service): If the passed-in URL contains a path, but the service doesn't allow paths, then the path part must be a folder name, and we should ignore it here. #29010 svn path=/trunk/; revision=17797
* err, oops.Chris Toshok2002-08-171-2/+0
| | | | svn path=/trunk/; revision=17791
* remove the outer parens from the expansion of camel_argv_{start,end} sinceChris Toshok2002-08-172-2/+10
| | | | | | | | | | 2002-08-16 Chris Toshok <toshok@ximian.com> * camel-arg.h: remove the outer parens from the expansion of camel_argv_{start,end} since at least on freebsd va_end is #defined to be nothing, so (va_end(..)) causes a syntax error. svn path=/trunk/; revision=17790
* 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-162-2/+10
| | | | | | | | | | 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-156-193/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-102-6/+26
| | | | | | | | | | | 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-102-1/+31
| | | | | | | | | | | | | | 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-102-1/+9
| | | | | | | | | 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-082-3/+16
| | | | | | | | | | | | | | | | | 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-082-0/+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. svn path=/trunk/; revision=17741
* Oops - outbuf pointed to alloca'd memory but we were g_free'ing it afterJeffrey Stedfast2002-08-083-7/+14
| | | | | | | | | | | | | 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-082-2/+8
| | | | | | | | | 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-062-12/+27
| | | | | | | | | | | 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-063-82/+75
| | | | | | | | | | | | | | | | | | | | | 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
* Always set a g_atexit handler to flush/save the camel-certdb.Jeffrey Stedfast2002-08-062-10/+13
| | | | | | | | | 2002-08-05 Jeffrey Stedfast <fejj@ximian.com> * camel.c (camel_init): Always set a g_atexit handler to flush/save the camel-certdb. svn path=/trunk/; revision=17700
* If we are asking for the toplevel folders, use the IMAP store's namespaceJeffrey Stedfast2002-08-063-35/+27
| | | | | | | | | | | | | | | | 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-053-1/+12
| | | | | | | | | | | * 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-033-55/+31
| | | | | | | | | | | | | | | 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-032-1/+14
| | | | | | | | | 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-022-1/+4
| | | | | | | | | 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-023-68/+79
| | | | | | | | | | | | | | | | | | 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
* Do more error checking to prevent crashing if we fail to read a string forJeffrey Stedfast2002-08-022-28/+50
| | | | | | | | | | 2002-08-01 Jeffrey Stedfast <fejj@ximian.com> * camel-folder-summary.c (message_info_load): Do more error checking to prevent crashing if we fail to read a string for example. svn path=/trunk/; revision=17672
* camel:Peter Williams2002-08-012-92/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-012-7/+13
| | | | | | | | | | 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
* Don't use "isprint(c)" to mean "c >= 32 && c < 128" since it doesn't inJeffrey Stedfast2002-08-012-25/+48
| | | | | | | | | | | | | | | 2002-07-31 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-filter-tohtml.c (is_addr_char): Don't use "isprint(c)" to mean "c >= 32 && c < 128" since it doesn't in most locales. (is_url_char): Same. (is_trailing_garbage): Same. (is_domain_name_char): New macro for dns-valid characters (email_address_extract): Use is_domain_name_char rather than is_addr_char for the part after the @. svn path=/trunk/; revision=17660
* Update the comment.Jeffrey Stedfast2002-07-317-59/+231
| | | | | | | | | | | | | | | | | | | | | | | | | 2002-07-30 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream.c (camel_tcp_address_new): Update the comment. * camel-tcp-stream-raw.c (socket_connect): If building with IPv6 support and the address is an IPv6 address, connect using a sockaddr_in6 otherwise use the standard IPv4 sockaddr_in structure. (stream_get_local_address): Fix to work with IPv6 addresses. (stream_get_remote_address): Same. * camel-tcp-stream-openssl.c (socket_connect): Same as above. (stream_get_local_address): Fix to work with IPv6 addresses. (stream_get_remote_address): Same. * camel-tcp-stream-ssl.c (stream_connect): If building with IPv6 support and the address is an IPv6 address, initialise the PRNetAddr accordingly. (stream_get_local_address): Fix to work with IPv6 addresses. (stream_get_remote_address): Same. svn path=/trunk/; revision=17651
* X509_digest() needs a pointer to an int len. Also fixed some otherJeffrey Stedfast2002-07-313-4/+14
| | | | | | | | | | | 2002-07-30 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-openssl.c (ssl_verify): X509_digest() needs a pointer to an int len. Also fixed some other compiler errors. * camel-certdb.h: #include <stdio.h> svn path=/trunk/; revision=17647
* added to the buildJeffrey Stedfast2002-07-312-0/+819
| | | | svn path=/trunk/; revision=17644
* New source file implementing a very basic certificate database. This isJeffrey Stedfast2002-07-317-72/+242
| | | | | | | | | | | | | | | | | | | 2002-07-30 Jeffrey Stedfast <fejj@ximian.com> * camel-certdb.c: New source file implementing a very basic certificate database. This is mostly just here because the Mozilla NSS certdb seems to not be working for everyone's Evolution install (works fine for me and Ettore but not many other people). * camel-tcp-stream-ssl.c (ssl_bad_cert): If we have this certificate in our own CamelCertDB, then get the trust value from that and only prompt the user if the trust is unknown. * camel-tcp-stream-openssl.c (ssl_verify): Same. * camel.c (camel_init): Create our default certdb. svn path=/trunk/; revision=17642
* Use the same command-counter mojo that the append code uses in case thePeter Williams2002-07-312-1/+14
| | | | | | | | | | 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
* New filter action to unset a system flag. The exact opposite of set_flag.Jeffrey Stedfast2002-07-292-16/+44
| | | | | | | | | 2002-07-29 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (unset_flag): New filter action to unset a system flag. The exact opposite of set_flag. svn path=/trunk/; revision=17625
* If the path exists and is a directory, return non-NULL. Missed this beforeJeffrey Stedfast2002-07-275-17/+14
| | | | | | | | | | 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-272-4/+4
| | | | | | | | | | 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-275-11/+18
| | | | | | | | | 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-264-10/+26
| | | | | | | | | | | | | | | | | | | | | 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-265-7/+60
| | | | | | | | | | | | | | | | | | | | | | 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-263-43/+125
| | | | | | | | | | | | | | | | | | | 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-262-6/+26
| | | | | | | | | | | | | | 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
* Renamed from shell_exec(). Also, we now want to pass argc/argv on to theJeffrey Stedfast2002-07-254-27/+64
| | | | | | | | | | | | | 2002-07-25 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (do_shell): Renamed from shell_exec(). Also, we now want to pass argc/argv on to the CamelFilterDriverShellFunc. (camel_filter_driver_set_shell_func): Renamed a bit. * camel-filter-search.c (pipe_message): Renamed from shell_exec(). svn path=/trunk/; revision=17583
* Use execv ("sh", "-c", command) rather than execing the command directly.Jeffrey Stedfast2002-07-252-11/+9
| | | | | | | | | 2002-07-25 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-search.c (run_command): Use execv ("sh", "-c", command) rather than execing the command directly. svn path=/trunk/; revision=17582
* When writing the summary, use TRUNC flag, duh. Also, write to a temp fileNot Zed2002-07-246-9/+49
| | | | | | | | | | | | | | | | | | | | | | | | 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-242-1/+20
| | | | | | | | | | 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-242-12/+30
| | | | | | | | | | | | | | 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-242-1/+11
| | | | | | | | | | | 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
* #include <string.h> for memcpy.Jeffrey Stedfast2002-07-232-0/+6
| | | | | | | | 2002-07-23 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream.c: #include <string.h> for memcpy. svn path=/trunk/; revision=17541
* s/Out/Our in a debug printfJeffrey Stedfast2002-07-231-1/+1
| | | | svn path=/trunk/; revision=17535
* Oops, forgot to implement this. Fixes #24604.Not Zed2002-07-222-0/+20
| | | | | | | | | 2002-07-22 Not Zed <NotZed@Ximian.com> * camel-vee-folder.c (vee_set_message_user_tag): Oops, forgot to implement this. Fixes #24604. svn path=/trunk/; revision=17522
* Only add a \r if the character before the \n wasn't already a \r - thisJeffrey Stedfast2002-07-222-24/+38
| | | | | | | | | | | 2002-07-21 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-filter-crlf.c (filter): Only add a \r if the character before the \n wasn't already a \r - this covers for when people add DOS files as attachments. Fixes bug #28056. ` svn path=/trunk/; revision=17521
* Changed to use a different length calculator.Not Zed2002-07-193-14/+23
| | | | | | | | | 2002-07-19 Not Zed <NotZed@Ximian.com> * camel-mime-part-utils.c (convert_buffer): Changed to use a different length calculator. svn path=/trunk/; revision=17519
* #include <glib.h> #include <libgnome/gnome-defs.h>Jeffrey Stedfast2002-07-181-0/+2
| | | | | | | | | | #include <glib.h> #include <libgnome/gnome-defs.h> apparently needed for gnome-i18n.h svn path=/trunk/; revision=17501
* #include <libgnome/gnome-i18n.h>Jeffrey Stedfast2002-07-181-1/+1
| | | | svn path=/trunk/; revision=17500
* Add the appropriate #include for the _() macro.Jeffrey Stedfast2002-07-182-2/+6
| | | | | | | | 2002-07-17 Jeffrey Stedfast <fejj@ximian.com> * camel-lock.c: Add the appropriate #include for the _() macro. svn path=/trunk/; revision=17499
* Got rid of the stupid "tryagain" semantics, which didn't work.Not Zed2002-07-172-31/+38
| | | | | | | | | | 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
* When CRLF encoding, "empty" (after stripping trailing whitespaceJeffrey Stedfast2002-07-172-0/+10
| | | | | | | | | | 2002-07-16 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-filter-canon.c (filter): When CRLF encoding, "empty" (after stripping trailing whitespace characters) lines need to end in CRLF also, not just lines with data in them. svn path=/trunk/; revision=17485
* Clean up some improper usage of CamelExceptions (looking atPeter Williams2002-07-174-10/+27
| | | | | | | | | | | | | | | | | 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-173-18/+43
| | | | | | | | | | | | 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-162-1/+12
| | | | | | | | | 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
* Removed. (get_score): Removed. Labels & scores are stored in tags, weNot Zed2002-07-162-36/+15
| | | | | | | | | | | | | 2002-07-15 Not Zed <NotZed@Ximian.com> * camel-filter-search.c (get_label): Removed. (get_score): Removed. Labels & scores are stored in tags, we already have a function to get tags. (user_tag): Fail if we dont get valid arguments, it must be a string type. (system_flag): Same here. svn path=/trunk/; revision=17471
* Try to get the FQDN from the results of gethostname(). If that fails, thenJeffrey Stedfast2002-07-162-9/+26
| | | | | | | | | | | | 2002-07-15 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_msgid_generate): Try to get the FQDN from the results of gethostname(). If that fails, then fall back to the results gotten from gethostname() or if that fails just use "localhost.localdomain". Addresses bug #17416. (header_decode_param): Protect against a NULL value. svn path=/trunk/; revision=17470
* Get rid of the constant 'required' variable, just use the value whenJeffrey Stedfast2002-07-162-3/+5
| | | | | | | | | | 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-162-7/+18
| | | | | | | | | | | | | | 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-162-2/+11
| | | | | | | | | | | | 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-153-3/+34
| | | | | | | | | | | | | | | | | | | | | 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
* On error, do not unref the parts gotten using camel_multipart_get_part()Jeffrey Stedfast2002-07-132-8/+16
| | | | | | | | | | | | 2002-07-12 Jeffrey Stedfast <fejj@ximian.com> * camel-multipart-encrypted.c (camel_multipart_encrypted_decrypt): On error, do not unref the parts gotten using camel_multipart_get_part() since that function does not ref the parts. Also don't forget to reset the decrypted stream before trying to parse it ;-) svn path=/trunk/; revision=17445
* Updated to not use camel_type_get_global_classfuncs() since this is just aJeffrey Stedfast2002-07-122-1/+5
| | | | | | | | | | 2002-07-12 Jeffrey Stedfast <fejj@ximian.com> * camel-multipart.c (camel_multipart_class_init): Updated to not use camel_type_get_global_classfuncs() since this is just a cast macro now. svn path=/trunk/; revision=17436
* oops, changed the location of where we check for multipart/encryptedJeffrey Stedfast2002-07-121-4/+7
| | | | svn path=/trunk/; revision=17435
* Handle multipart/encrypted parts too.Jeffrey Stedfast2002-07-123-9/+26
| | | | | | | | | | | | | 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-122-1/+6
| | | | | | | | | 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-125-6/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-122-23/+39
| | | | | | | | | | | 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
* Don't forget to set an appropriate exception before returning NULL.Jeffrey Stedfast2002-07-122-0/+8
| | | | | | | | | | 2002-07-11 Jeffrey Stedfast <fejj@ximian.com> * camel-multipart-encrypted.c (camel_multipart_encrypted_decrypt): Don't forget to set an appropriate exception before returning NULL. svn path=/trunk/; revision=17418
* Make sure message is non-NULL before setting the source on it.Jeffrey Stedfast2002-07-112-1/+4
| | | | | | | | | 2002-07-10 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (get_message_cb): Make sure message is non-NULL before setting the source on it. svn path=/trunk/; revision=17415
* Renamed stdin to stdin_fd, stdout to stdout_fd, and stderr to stderr_fd inJeffrey Stedfast2002-07-112-33/+40
| | | | | | | | | | | 2002-07-10 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c: Renamed stdin to stdin_fd, stdout to stdout_fd, and stderr to stderr_fd in struct _GpgCtx since Solaris' stdin/stdout/etderr variables seem to be macros and are thus breaking the compilation. svn path=/trunk/; revision=17409
* Set the IS_SOURCE provider flag.Jeffrey Stedfast2002-07-052-1/+5
| | | | | | | | | 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-052-21/+31
| | | | | | | | | | 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-035-31/+75
| | | | | | | | | | | | | | | | | | | | 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
* Take a void object arg. (camel_object_remove_event): "Not Zed2002-07-033-12/+25
| | | | | | | | | | | | 2002-06-27 Not Zed <NotZed@Ximian.com> * camel-object.c (camel_object_hook_event): Take a void object arg. (camel_object_remove_event): " (camel_object_unhook_event): " (camel_object_trigger_event): ", also, execute events in the same order they were added, i.e. reverse hook-list order. svn path=/trunk/; revision=17359
* Don't use --no-auto-key-retrieve, this option has apparently beenJeffrey Stedfast2002-06-292-4/+16
| | | | | | | | | | 2002-06-28 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_get_argv): Don't use --no-auto-key-retrieve, this option has apparently been deprecated in gpg 1.0.7. svn path=/trunk/; revision=17321
* Loop on our reads while errno is EINTR or EAGAIN. Also make sure toJeffrey Stedfast2002-06-282-19/+55
| | | | | | | | | | | | | | | | | 2002-06-27 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_op_step): Loop on our reads while errno is EINTR or EAGAIN. Also make sure to completely read stdout and stderr by keeping better state. (gpg_ctx_parse_status): In the case of a NODATA response from gpg, try to use the diagnostics that gpg may have written to its stderr. (gpg_verify): Check that the gpg process has not exited. (gpg_ctx_op_wait): Make sure we haven't already exited (as by gpg_ctx_op_is_exited()) and if we have, retrieve the exit status from the gpg context. svn path=/trunk/; revision=17320
* Loop on our reads while errno is EINTR or EAGAIN. Also make sure toJeffrey Stedfast2002-06-282-3/+13
| | | | | | | | | | | | | 2002-06-27 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_op_step): Loop on our reads while errno is EINTR or EAGAIN. Also make sure to completely read stdout and stderr by keeping better state. (gpg_ctx_parse_status): In the case of a NODATA response from gpg, try to use the diagnostics that gpg may have written to its stderr. svn path=/trunk/; revision=17319
* Loop on our reads while errno is EINTR or EAGAIN. Also make sure toJeffrey Stedfast2002-06-282-23/+20
| | | | | | | | | | 2002-06-27 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_op_step): Loop on our reads while errno is EINTR or EAGAIN. Also make sure to completely read stdout and stderr by keeping better state. svn path=/trunk/; revision=17311
* Loop on our reads while errno is EINTR or EAGAIN.Jeffrey Stedfast2002-06-272-9/+25
| | | | | | | | | 2002-06-27 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_op_step): Loop on our reads while errno is EINTR or EAGAIN. svn path=/trunk/; revision=17307
* Removed.Jeffrey Stedfast2002-06-277-1934/+41
| | | | | | | | | | | | | | | | | 2002-06-26 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.[c,h]: Removed. * camel-pgp-mime.c (pgp_mime_part_sign_restore_part): Removed. (pgp_mime_part_sign_prepare_part): Removed. (camel_pgp_mime_part_sign): Removed. (camel_pgp_mime_part_verify): Removed. (camel_pgp_mime_part_encrypt): Removed. (camel_pgp_mime_part_decrypt): Removed. (camel_pgp_mime_is_rfc2015_signed): Documented. (camel_pgp_mime_is_rfc2015_encrypted): Same. svn path=/trunk/; revision=17303
* Oops, this needs to take a userid argument.Jeffrey Stedfast2002-06-273-5/+8
| | | | | | | | | 2002-06-26 Jeffrey Stedfast <fejj@ximian.com> * camel-multipart-encrypted.c (camel_multipart_encrypted_encrypt): Oops, this needs to take a userid argument. svn path=/trunk/; revision=17299
* Removed (never did anything anyway).Jeffrey Stedfast2002-06-275-240/+11
| | | | | | | | | | | | | | 2002-06-26 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_clearsign): Removed (never did anything anyway). * camel-pgp-context.c (pgp_clearsign): Removed. * camel-cipher-context.c (camel_cipher_clearsign): Removed unused method. svn path=/trunk/; revision=17297
* New class implementing the multipart/encrypted content type. ContainsJeffrey Stedfast2002-06-275-0/+420
| | | | | | | | | | 2002-06-26 Jeffrey Stedfast <fejj@ximian.com> * camel-multipart-encrypted.[c,h]: New class implementing the multipart/encrypted content type. Contains methods for encrypting and decrypting a multipart/encrypted MIME object. svn path=/trunk/; revision=17296
* Check for NODATA too.Jeffrey Stedfast2002-06-273-2/+15
| | | | | | | | | 2002-06-26 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_parse_status): Check for NODATA too. svn path=/trunk/; revision=17295
* Remove the #include for camel-spoold-store.hJeffrey Stedfast2002-06-262-1/+5
| | | | | | | | | 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-2622-2418/+1045
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* #include <sys/time.h>Jeffrey Stedfast2002-06-263-1/+5
| | | | | | | | 2002-06-25 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c: #include <sys/time.h> svn path=/trunk/; revision=17283
* Return the option as --digest-algo=<micalg> (gpg_ctx_parse_status): DecodeJeffrey Stedfast2002-06-252-20/+82
| | | | | | | | | | | | | | | | 2002-06-25 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_hash_str): Return the option as --digest-algo=<micalg> (gpg_ctx_parse_status): Decode more status information and keep track of trust and such. (gpg_ctx_op_complete): Make sure we aren't waiting for gpg to write data to stdout (such as encrypted/decrypted data or a signature). (gpg_encrypt): Remove the fejj@stampede.org hard-coded value (which had only meant to be for testing). svn path=/trunk/; revision=17271
* implemented camel_gpg_context_set_always_trust()Jeffrey Stedfast2002-06-252-0/+19
| | | | svn path=/trunk/; revision=17269
* Use --command-fd rather than --passphrase-fd since what we really want isJeffrey Stedfast2002-06-252-1/+8
| | | | | | | | | | | | | 2002-06-24 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_get_argv): Use --command-fd rather than --passphrase-fd since what we really want is an interactive mode (besides, --passphrase-fd requires a passphrase to be sent before --status-fd will send a NEED_PASSPHRASE status message). (gpg_ctx_parse_status): When we encounter a BAD_PASSPHRASE, tell the session to uncache it. svn path=/trunk/; revision=17268
* Use --command-fd rather than --passphrase-fd since what we really want isJeffrey Stedfast2002-06-252-100/+76
| | | | | | | | | | | 2002-06-24 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_get_argv): Use --command-fd rather than --passphrase-fd since what we really want is an interactive mode (besides, --passphrase-fd requires a passphrase to be sent before --status-fd will send a NEED_PASSPHRASE status message). svn path=/trunk/; revision=17267
* Check for ERRSIG also. (gpg_ctx_op_step): Don't try writing a passphraseJeffrey Stedfast2002-06-242-6/+14
| | | | | | | | | | | 2002-06-23 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_parse_status): Check for ERRSIG also. (gpg_ctx_op_step): Don't try writing a passphrase unless our operation requires it. svn path=/trunk/; revision=17263
* Return -1 on error. (gpg_decrypt): Same. (gpg_sign): Again here.Jeffrey Stedfast2002-06-233-56/+117
| | | | | | | | | | | | | | | 2002-06-22 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_encrypt): Return -1 on error. (gpg_decrypt): Same. (gpg_sign): Again here. (gpg_ctx_op_step): Only attenmpt to read from the status-fd if we are not already 'complete'. * camel-pgp-mime.c (camel_pgp_mime_part_encrypt): Flush the filtered stream. svn path=/trunk/; revision=17257
* more fixes, now verifying works and signing almost works as well, except gpg ↵Jeffrey Stedfast2002-06-221-7/+30
| | | | | | is running out of memory for me? not sure if that is a gpg or evo bug svn path=/trunk/; revision=17256
* yay, I get to hold more state because Unix pipes suck so badly. This isJeffrey Stedfast2002-06-221-101/+220
| | | | | | | | getting very close to working now... I think that as soon as I debug this segfault, it will work. Probably dereferencing a NULL pointer or something stupid like that. svn path=/trunk/; revision=17255
* added camel_gpg_context_new which I had forgotten beforeJeffrey Stedfast2002-06-221-0/+28
| | | | svn path=/trunk/; revision=17252
* New source files implementing the CamelCipherContext class for gnupg.Jeffrey Stedfast2002-06-229-32/+1286
| | | | | | | | | | | | | | | | | | | 2002-06-21 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.[c,h]: New source files implementing the CamelCipherContext class for gnupg. * camel-pgp-context.c (camel_pgp_context_new): Return a CamelCipherContext. * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Take a CamelCipherContext argument rather than a CamelPgpContext since we now have a CamelGpgContext also. (camel_pgp_mime_part_encrypt): Same. (camel_pgp_mime_part_verify): Same. (camel_pgp_mime_part_sign): Same. svn path=/trunk/; revision=17251
* Updated to support searching as well as making it use CamelDigestSummary.Jeffrey Stedfast2002-06-215-106/+325
| | | | | | | | | | | | | | | | | 2002-06-20 Jeffrey Stedfast <fejj@ximian.com> * camel-digest-folder.c: Updated to support searching as well as making it use CamelDigestSummary. * camel-digest-summary.[c,h]: New class to handle the summary for CamelDigestFolder. * camel-tcp-stream-ssl.c (set_errno): PR_IO_TIMEOUT_ERROR should map to ETIMEDOUT and not EAGAIN. (stream_connect): Reset the PR_Poll() timeout back to 2 minutes as this wasn't the problem afterall. svn path=/trunk/; revision=17249
* PR_IO_TIMEOUT_ERROR should map to ETIMEDOUT and not EAGAIN.Jeffrey Stedfast2002-06-202-2/+9
| | | | | | | | | | | 2002-06-20 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (set_errno): PR_IO_TIMEOUT_ERROR should map to ETIMEDOUT and not EAGAIN. (stream_connect): Reset the PR_Poll() timeout back to 2 minutes as this wasn't the problem afterall. svn path=/trunk/; revision=17246
* Drop back to initial state if we came from eof state.Not Zed2002-06-202-1/+7
| | | | | | | | | 2002-06-19 Not Zed <NotZed@Ximian.com> * camel-mime-parser.c (folder_scan_drop_step): Drop back to initial state if we came from eof state. svn path=/trunk/; revision=17245
* Set the poll timeout to be PR_INTERVAL_MIN, this one shouldn't need to beJeffrey Stedfast2002-06-202-1/+5
| | | | | | | | | | 2002-06-19 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (stream_connect): Set the poll timeout to be PR_INTERVAL_MIN, this one shouldn't need to be 2 minutes (plus it blocks my connection at home for far too long). svn path=/trunk/; revision=17234
* Make sure we hold the command_lock before accessing current_folder.Jeffrey Stedfast2002-06-203-2/+35
| | | | | | | | | | | | | | | | | | | 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-193-6/+19
| | | | | | | | | | | | | | | | 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
* Update the freeze state of the new source folder.Jeffrey Stedfast2002-06-183-4/+37
| | | | | | | | | | | 2002-06-17 Jeffrey Stedfast <fejj@ximian.com> * camel-vee-folder.c (camel_vee_folder_add_folder): Update the freeze state of the new source folder. (camel_vee_folder_remove_folder): Undo any freeze state that we have imposed on this source folder. svn path=/trunk/; revision=17216
* remove the camel-remote-store private structJeffrey Stedfast2002-06-181-17/+1
| | | | svn path=/trunk/; revision=17209
* Freeze source folders. (vee_thaw): Thaw all source folders. Fixes bugJeffrey Stedfast2002-06-152-0/+56
| | | | | | | | | 2002-06-14 Jeffrey Stedfast <fejj@ximian.com> * camel-vee-folder.c (vee_freeze): Freeze source folders. (vee_thaw): Thaw all source folders. Fixes bug #24317. svn path=/trunk/; revision=17189
* Unlock the command_lock after each UID STORE command so that otherJeffrey Stedfast2002-06-152-5/+14
| | | | | | | | | | 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
* Fixed compiler warnings.Jeffrey Stedfast2002-06-1510-15/+31
| | | | | | | | | | | | | | | 2002-06-14 Jeffrey Stedfast <fejj@ximian.com> * camel-arg.c: * camel-disco-diary.c: * camel-index-control.c: * camel-mime-part.c: * camel-pgp-mime.c: * camel-store.c: * camel-tcp-stream-ssl.c: * camel-text-index.c: Fixed compiler warnings. svn path=/trunk/; revision=17187
* Updated to use ctx->sign_protocol rather than ctx->protocol.Jeffrey Stedfast2002-06-155-10/+22
| | | | | | | | | | | | | | 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
* Our parent class is camel_vee_folder, not camel_folder, fix setting ofNot Zed2002-06-114-180/+278
| | | | | | | | | | | | | | | | | | | | | | | 2002-06-11 Not Zed <NotZed@Ximian.com> * camel-vtrash-folder.c (camel_vtrash_folder_class_init): Our parent class is camel_vee_folder, not camel_folder, fix setting of parent folder (unused anyway, but removes a run-time warning). 2002-06-06 Not Zed <NotZed@Ximian.com> * camel-folder-thread.c (thread_summary): Do the work here. (camel_folder_thread_messages_remove): Implement. Remove some uid's from the tree. Disalbe from build, for now. (remove_uid_node_rec): Actually do the work. (camel_folder_thread_messages_add): Implement. Add some summary items to the tree. Disable from build though. (camel_folder_thread_messages_apply): Make a thread tree built using camel_folder_thread_new() map to a new set of uids, preserving some order. Meant primarily to manage deleted + added uids in a user-friendly manner. svn path=/trunk/; revision=17164
* Use CAMEL_EXCEPTION_SYSTEM rather than '1' for clarity.Jeffrey Stedfast2002-06-092-1/+6
| | | | | | | | | 2002-06-09 Jeffrey Stedfast <fejj@ximian.com> * camel-multipart-signed.c (camel_multipart_signed_verify): Use CAMEL_EXCEPTION_SYSTEM rather than '1' for clarity. svn path=/trunk/; revision=17151
* Up the timeout on the connect code to 2 minutes.Jeffrey Stedfast2002-06-072-2/+9
| | | | | | | | | 2002-06-07 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-ssl.c (stream_connect): Up the timeout on the connect code to 2 minutes. svn path=/trunk/; revision=17140
* Duh! The protocol is application/pgp-signature. TODO: need to have aNot Zed2002-06-071-1/+1
| | | | | | | | | | 2002-06-07 Not Zed <NotZed@Ximian.com> * camel-pgp-context.c (camel_pgp_context_init): Duh! The protocol is application/pgp-signature. TODO: need to have a signed and an encrypted protocol specified separately. svn path=/trunk/; revision=17139
* Parse "From: Dan Winship <danw>" (with no domain) in the way the senderDan Winship2002-06-072-1/+7
| | | | | | | | * camel-mime-utils.c (header_decode_mailbox): Parse "From: Dan Winship <danw>" (with no domain) in the way the sender meant it, even though it's completely wrong. svn path=/trunk/; revision=17137
* Remove the CONF_DEFAULT_PATH entry, as this is handled by the url configNot Zed2002-06-0610-38/+548
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Check that any unmatched operation is not concerning any vfolder. OtherNot Zed2002-06-032-10/+24
| | | | | | | | | | | | | | 2002-06-03 Not Zed <NotZed@Ximian.com> * camel-vee-folder.c (camel_vee_folder_add_folder): (folder_changed_change): (folder_changed_remove_uid): (folder_changed_add_uid): (vee_folder_build_folder): Check that any unmatched operation is not concerning any vfolder. Other vfolders should never be part of any unmatched handling. For #24615, and others probably. svn path=/trunk/; revision=17075
* setup/free the mech string.Not Zed2002-06-0313-24/+408
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-012-13/+18
| | | | | | | | | | 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-013-2/+13
| | | | | | | | | | | | | 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-012-11/+8
| | | | | | | | | 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-013-6/+18
| | | | | | | | | | | | | | | 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
* If we fail to be able to create a stream to insert into the cache, thenJeffrey Stedfast2002-06-012-0/+8
| | | | | | | | | | 2002-05-31 Jeffrey Stedfast <fejj@ximian.com> * camel-data-cache.c (camel_data_cache_get): If we fail to be able to create a stream to insert into the cache, then free the 'real' path. svn path=/trunk/; revision=17060
* Added a protocol field for users to use.Not Zed2002-05-3121-58/+1422
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-312-0/+4
| | | | | | | | | 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-313-7/+45
| | | | | | | | | | | | | 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-302-1/+7
| | | | | | | | | 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-293-1/+31
| | | | | | | | | | | | | 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
* Use the CamelMessageInfo rather than the CamelMimeMessage because theJeffrey Stedfast2002-05-292-8/+11
| | | | | | | | | | 2002-05-28 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_log): Use the CamelMessageInfo rather than the CamelMimeMessage because the message may not have been loaded (thus NULL). svn path=/trunk/; revision=17025
* On connection failure, unref the tcp stream.Jeffrey Stedfast2002-05-286-77/+226
| | | | | | | | | | | | | | | | | | | | | | | 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-253-4/+20
| | | | | | | | | | | | 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-256-59/+96
| | | | | | | | | | | | | | | | | 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-242-8/+26
| | | | | | | | | 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-2310-892/+489
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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