Commit Graph

1681 Commits

Author SHA1 Message Date
ae6f93814a Make sure the cancel_fd isn't -1.
2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-pgp-context.c (crypto_exec_with_passwd): Make sure the
	cancel_fd isn't -1.

svn path=/trunk/; revision=13781
2001-10-19 00:30:36 +00:00
4eb2a82d5c Flush the stream here, not sure it really matters but it might (hopefully)
2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-message-cache.c (insert_finish): Flush
	the stream here, not sure it really matters but it might
	(hopefully) fix bug #12943.

svn path=/trunk/; revision=13779
2001-10-18 23:15:34 +00:00
20d53760e9 Make user-cancellable.
2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-pgp-context.c (crypto_exec_with_passwd): Make
	user-cancellable.

svn path=/trunk/; revision=13778
2001-10-18 22:48:26 +00:00
1751506d44 String cleanup for bug #6640.
2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/local/camel-local-provider.c: String cleanup for bug
	#6640.

svn path=/trunk/; revision=13777
2001-10-18 22:26:06 +00:00
16dae9615e Fix my Cyrus imapd workaround...instead of checking to see if info->flags
2001-10-18  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-folder.c (imap_sync_online): Fix my
	Cyrus imapd workaround...instead of checking to see if info->flags
	== FLAGGED, just check to see if it contains any IMAP flags.

svn path=/trunk/; revision=13770
2001-10-18 20:38:45 +00:00
7
66fe416457 Use '.' as the inbox name for filter new messages test.
2001-10-17    <NotZed@Ximian.com>

        * providers/local/camel-maildir-folder.c
        (camel_maildir_folder_new): Use '.' as the inbox name for filter
        new messages test.

svn path=/trunk/; revision=13742
2001-10-17 22:59:15 +00:00
7
4b9dbd4269 New function to clone a folderinfo tree.
2001-10-17    <NotZed@Ximian.com>

        * camel-store.c (camel_folder_info_clone): New function to clone a
        folderinfo tree.

svn path=/trunk/; revision=13740
2001-10-17 22:44:27 +00:00
460c0c3323 Same as maildir and mbox append-message.
2001-10-17  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/local/camel-mh-folder.c (mh_append_message): Same as
	maildir and mbox append-message.

	* providers/local/camel-maildir-folder.c (maildir_append_message):
	Same as mbox append.

	* camel-exception.c (camel_exception_set): Make sure the new
	description isn't the same as the old description pointer before
	freeing the old one.
	(camel_exception_setv): Don't free the old description until we
	set the new one this way we can reuse the old description in the
	new description.

	* providers/local/camel-mbox-folder.c (mbox_append_message): If
	errno == EINTR, then we got a user-cancel so set the exception
	appropriately so that we don't make the user shit his pants.

svn path=/trunk/; revision=13739
2001-10-17 22:23:29 +00:00
982357f35c Make sure the new description isn't the same as the old description
2001-10-17  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-exception.c (camel_exception_set): Make sure the new
	description isn't the same as the old description pointer before
	freeing the old one.
	(camel_exception_setv): Don't free the old description until we
	set the new one this way we can reuse the old description in the
	new description.

	* providers/local/camel-mbox-folder.c (mbox_append_message): If
	errno == EINTR, then we got a user-cancel so set the exception
	appropriately so that we don't make the user shit his pants.

svn path=/trunk/; revision=13737
2001-10-17 22:16:46 +00:00
8d85900822 Add an optimization for when destination folder is the same as the source
2001-10-17  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-filter-driver.c (do_copy): Add an optimization for when
	destination folder is the same as the source folder.

svn path=/trunk/; revision=13735
2001-10-17 21:33:41 +00:00
7
3ced16bfa2 Patch from Danw, Use unread count of -1 to mark unflagged messages. Make
2001-10-17    <NotZed@Ximian.com>

        * providers/imap/camel-imap-store.c (get_folder_info_online):
        (parse_list_response_as_folder_info): Patch from Danw, Use unread
        count of -1 to mark unflagged messages.  Make sure any folder we
        dont lookup explicitly is marked as -1.  Should fix #9947 and
        friends.

        * providers/local/camel-mbox-summary.c (mbox_summary_sync): Only
        touch the summary if the timestamp or size changed.

svn path=/trunk/; revision=13731
2001-10-17 20:38:15 +00:00
8b135a085a Set the DELETED flag on directly on the info if the source folder doesn't
2001-10-17  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-filter-driver.c (camel_filter_driver_filter_message): Set
	the DELETED flag on directly on the info if the source folder
	doesn't have summary capability.

svn path=/trunk/; revision=13729
2001-10-17 20:23:42 +00:00
846fe128cb As below.
2001-10-17  Not Zed  <NotZed@Ximian.com>

        * camel-tcp-stream-raw.c (stream_write): As below.

        * camel-stream-fs.c (stream_write): If not checking cancellation,
        make sure we write out everything asked of us.

svn path=/trunk/; revision=13717
2001-10-17 04:09:17 +00:00
4d00a548d0 Rearange the order of the gpg options slightly otherwise it might try to
2001-10-16  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-pgp-context.c (pgp_verify): Rearange the order of the gpg
	options slightly otherwise it might try to use "--no-tty" as the
	filename to verify :-)

svn path=/trunk/; revision=13714
2001-10-17 00:12:33 +00:00
fac0dbd69c If CAMEL_DEBUG is defined, print some useful ref/unref info.
2001-10-16  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-object.[c,h]: If CAMEL_DEBUG is defined, print some useful
	ref/unref info.

	* providers/imap/camel-imap-store.c (delete_folder): Fixed an
	assignment warning.

	* camel-uid-cache.c (camel_uid_cache_new): Make sure that the
	parent directory exists before trying to open the filename, if it
	doesn't, create it.

svn path=/trunk/; revision=13707
2001-10-16 21:47:34 +00:00
6
a009ea9f2d If no content, dont try and decode further and spit meaningless warnings.
2001-10-16    <NotZed@Ximian.com>

        * camel-mime-utils.c (header_address_decode): If no content, dont
        try and decode further and spit meaningless warnings.

svn path=/trunk/; revision=13702
2001-10-16 20:35:49 +00:00
e1d0f3dc45 Only perform the operation on the folder if the folder has summary
2001-10-16  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-filter-driver.c (do_flag): Only perform the operation on
	the folder if the folder has summary capability, else just poke
	the info directly. Fixes the "Filters don't work" bug.
	(do_score): Same.
	(do_colour): And here too.

svn path=/trunk/; revision=13697
2001-10-16 19:03:16 +00:00
f74417fca8 Save the errno before calling fcntl so fcntl doesn't overwrite errno in
2001-10-15  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-stream-fs.c (stream_read): Save the errno before calling
	fcntl so fcntl doesn't overwrite errno in case of a previous
	error.
	(stream_write): Same.

svn path=/trunk/; revision=13687
2001-10-15 22:10:19 +00:00
a60f38bc6e Replace the Bcc headers in a single location and don't flush the data
2001-10-13  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/smtp/camel-smtp-transport.c (smtp_data): Replace the
	Bcc headers in a single location and don't flush the data unless
	the write was successful.

svn path=/trunk/; revision=13662
2001-10-13 18:21:31 +00:00
2d5c3e4c42 oops, it should remove the bcc header, not the cc header
svn path=/trunk/; revision=13643
2001-10-12 23:09:34 +00:00
dad441ba03 Remove the stripheader filter from the build.
2001-10-12  Jeffrey Stedfast  <fejj@ximian.com>

	* Makefile.am: Remove the stripheader filter from the build.

	* camel-mime-filter-stripheader.[c,h]: Removed.

	* providers/smtp/camel-smtp-transport.c (smtp_data): Check the
	return value of camel_stream_flush to make sure it flushed the
	data successfully before continuing. Don't use the stripheader
	filter, it was completely broken - instead remove the header and
	set it again after we send.

svn path=/trunk/; revision=13641
2001-10-12 22:45:10 +00:00
2
47d5ddd057 Unhook from all events before removing folder.
2001-10-12    <NotZed@Ximian.com>

        * camel-vee-folder.c (camel_vee_folder_remove_folder): Unhook from
        all events before removing folder.
        (camel_vee_folder_add_folder): Hook onto delete event.
        (camel_vee_folder_finalise): Unhook from deleted event for suibfolder.
        (subfolder_deleted): When the folder is deleted, remove it from
        the vfolder automagically.

svn path=/trunk/; revision=13639
2001-10-12 22:27:56 +00:00
1
6335fc8ec8 convert the uids list to a subset appropriate for each subfolder before
2001-10-11    <NotZed@Ximian.com>

        * camel-vee-folder.c (vee_search_by_uids): convert the uids list
        to a subset appropriate for each subfolder before trying to search
        on it.

svn path=/trunk/; revision=13607
2001-10-11 23:39:08 +00:00
1
a5fa3f992d Removed charset/locale charset lookup and iconv_open/close functions,
2001-10-11    <NotZed@Ximian.com>

        * camel-charset-map.[ch]: Removed charset/locale charset lookup
        and iconv_open/close functions, moved to gal.  Fixed all callers.

svn path=/trunk/; revision=13602
2001-10-11 22:08:20 +00:00
d965c00a22 Same.
2001-10-11  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-ssl.c (ssl_cert_is_saved): Same.

	* camel-tcp-stream-openssl.c (ssl_cert_is_saved): Instead of
	opening the file, stat it and make sure that it belongs to us.

svn path=/trunk/; revision=13600
2001-10-11 21:57:20 +00:00
f3e2d67d4d Same hack as below.
2001-10-10  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-tcp-stream-openssl.c (ssl_verify): Same hack as below.

	* camel-tcp-stream-ssl.c (ssl_bad_cert): Hack around the fact that
	adding a cert to nss's certdb seems to not work.

svn path=/trunk/; revision=13575
2001-10-10 22:13:05 +00:00
0
12c3606459 Only re-build the folder if we're expunging. Also only clear out the
2001-10-10    <NotZed@Ximian.com>

        * camel-vee-folder.c (vee_sync): Only re-build the folder if we're
        expunging.  Also only clear out the changed folders list if we're
        expungung and everything worked.

svn path=/trunk/; revision=13573
2001-10-10 21:50:42 +00:00
55cf0a3f33 slight wording changes, mainly LGPL=>GPL
svn path=/trunk/; revision=13572
2001-10-10 21:50:30 +00:00
e055b4a0fd Added a hack for Solaris systems.
2001-10-10  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-charset-map.c (camel_charset_map_init): Added a hack for
	Solaris systems.

svn path=/trunk/; revision=13569
2001-10-10 21:36:22 +00:00
0
6e1a9c1903 oops, we want get_unread_message_count, not get_message_count!
2001-10-10    <NotZed@Ximian.com>

        * providers/local/camel-maildir-store.c (scan_dir): oops, we want
        get_unread_message_count, not get_message_count!

2001-10-09    <NotZed@Ximian.com>

        * camel-service.c (camel_service_disconnect): Duplicate connect
        code that unregisters a cancel op if we created one.

svn path=/trunk/; revision=13561
2001-10-10 19:48:27 +00:00
cde89b0c78 updated
svn path=/trunk/; revision=13559
2001-10-10 19:03:29 +00:00
9
b457da9a98 Another go at getting the logic right again. Make transients only update
2001-10-09    <NotZed@Ximian.com>

        * camel-operation.c (camel_operation_progress): Another go at
        getting the logic right again.  Make transients only update after
        5 seconds (CAMEL_OPERATION_TRANSIENT_DELAY)
        (camel_operation_end): Likewise.

svn path=/trunk/; revision=13536
2001-10-09 23:36:31 +00:00
f9a1de69f0 Forgot a little bit of debug.
svn path=/trunk/; revision=13534
2001-10-09 23:13:21 +00:00
9
d5e090651b Implement.
2001-10-09    <NotZed@Ximian.com>

        * providers/local/camel-spool-folder.c (spool_search_by_uids):
        Implement.

        * providers/imap/camel-imap-search.c (imap_body_contains): If
        searching a sub-set of the total message count, then use a UID
        range to search only specific messages.

        * camel-vee-folder.c (vee_folder_change_match): Removed.
        (folder_changed_add_uid): Helper func for changed code.
        (folder_changed_remove_uid): "
        (folder_changed_change_uid): "
        (folder_changed): Rewritten.  Supports proper auto-updating of
        changes, but not removals till a sync occurs.
        (vee_search_by_uids): Implement.
        (folder_changed): Changed to call an async threaded function to do
        the actual folder updating.

        * camel-folder-summary.c (camel_flag_list_copy): New func to copy
        a whole list of flags.
        (camel_tag_list_copy): New func to copy a whole list of flags.

        * providers/imap/camel-imap-folder.c (imap_search_by_uids):
        Implement.

        * providers/local/camel-local-folder.c (local_search_by_uids):
        Implement.

        * camel-folder.c (camel_folder_search_by_uids): New function,
        search a subset of uid's.
        (search_by_uids): Default impl, return error.

svn path=/trunk/; revision=13532
2001-10-09 22:26:01 +00:00
5931b31034 replace the ever-growing list of gbooleans with a single guint32 for
* camel-folder.h (struct _CamelFolder): replace the ever-growing
	list of gbooleans with a single guint32 for flags.

	* camel-folder.c: Update folder flag setting/checking.

	* providers/pop3/camel-pop3-folder.c (camel_pop3_folder_init):
	* providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
	* providers/local/camel-spool-folder.c (spool_init,
	camel_spool_folder_new):
	* providers/local/camel-maildir-folder.c (camel_maildir_folder_new):
	* providers/local/camel-local-folder.c (local_init):
	* providers/imap/camel-imap-folder.c (camel_imap_folder_init,
	camel_imap_folder_new):
	* camel-vtrash-folder.c (camel_vtrash_folder_init):
	* camel-vee-folder.c (camel_vee_folder_init):
	* camel-digest-folder.c (camel_digest_folder_init): update folder
	flag setting.

svn path=/trunk/; revision=13509
2001-10-09 03:07:39 +00:00
b86c7ca1cf Unlock the store before returning error. (noted by NotZed)
* providers/imap/camel-imap-store.c (get_folder_online): Unlock
	the store before returning error. (noted by NotZed)

svn path=/trunk/; revision=13501
2001-10-08 16:29:32 +00:00
15b182a1fc Fix a slight error in logic. Just because the last word was an encoded
2001-10-06  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c (header_decode_text): Fix a slight error in
	logic. Just because the last word was an encoded word doesn't mean
	we ignore the lwsp padding, we only ignore it if the last word and
	*this* word are encoded.

svn path=/trunk/; revision=13490
2001-10-06 23:44:46 +00:00
9ab12dd363 Implemented uuencoding and decoding. (complete): Implemented uuencoding
2001-10-06  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-filter-basic.c (filter): Implemented uuencoding and
	decoding.
	(complete): Implemented uuencoding and decoding.

	* camel-mime-utils.c (uuencode_close): New function to flush the
	uu encoder.
	(uuencode_step): New function to uuencode a block of data.

svn path=/trunk/; revision=13476
2001-10-06 07:19:41 +00:00
5
5ad2032478 Use a folder_subscribed event rather than a folder_created one.
2001-10-05    <NotZed@Ximian.com>

        * providers/imap/camel-imap-store.c (subscribe_folder): Use a
        folder_subscribed event rather than a folder_created one.
        (unsubscribe_folder): Similarly for unsubscribed/deleted.
        (create_folder): Emit a folder_created event on the folders we
        added.  Not sure hsould probably check which ones are new and
        which ones are just existing ones?
        (delete_folder): Emit a folder_deletd event when we've deleted the
        folder.  Part of fix for #11831.

        * camel-store.c (camel_store_class_init): Added
        folder_subscribed/unsubscribed events.

svn path=/trunk/; revision=13471
2001-10-05 21:49:17 +00:00
ba39d4fff5 Turn off warnings. (get_name): Same.
2001-10-05  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-service.c (camel_service_finalize): Turn off warnings.
	(get_name): Same.

	* camel-sasl.c (sasl_challenge): Turn off warnings.

	* camel-tcp-stream.c (tcp_connect): Turn off warnings.
	(tcp_getsockopt): Same.
	(tcp_setsockopt): Here too.
	(tcp_get_socket): And here.

	* camel-folder.c (folder_sync): Turn off warnings.
	(expunge): Same.
	(append_message): Here too.
	(get_message): And here.
	(search_by_expression): And again here.
	(folder_changed): Here too.

	* camel-store.c (get_folder): Set an exception and turn off
	debugging g_warnings.
	(create_folder): Same.
	(delete_folder): Here too.
	(rename_folder): And here.
	(get_trash): And here.
	(get_folder_info): Same.
	(free_folder_info): And again here.
	(camel_folder_info_build): Here too.
	(folder_subscribed): Same.
	(subscribe_folder): Here too.
	(unsubscribe_folder): And here.

svn path=/trunk/; revision=13458
2001-10-05 19:38:24 +00:00
5
796292fb21 Try harder to get broken names out of addresses. Unencoded ,'s in names
2001-10-05    <NotZed@Ximian.com>

	* camel-mime-utils.c (header_decode_mailbox): Try harder to get
	broken names out of addresses.  Unencoded ,'s in names will still
	break it, but well what can you do eh?
	(header_decode_mailbox): Always add .'s into address we've scanned
	past a '.', even if we can't decode the next part.  Fix for some
	annoying bug #.

svn path=/trunk/; revision=13453
2001-10-05 18:52:21 +00:00
4
d8eb6abb18 Change the order of execution slightly. We delete the folder first, then
2001-10-04    <NotZed@Ximian.com>

        * camel-store.c (camel_store_delete_folder): Change the order of
        execution slightly.  We delete the folder first, then call the
        classes delete folder, then cleanup the hashtable afterwards.
        This is so deletes of vfolders work, since vee-store uses the
        folder hashtable to store all of is vfolders :-/

svn path=/trunk/; revision=13448
2001-10-05 18:08:22 +00:00
c90023337c tedfast <fejj@ximian.com>
tedfast  <fejj@ximian.com>

	* camel-service.c (camel_service_connect): Unregister the
	operation before unreffing it.

svn path=/trunk/; revision=13413
2001-10-04 18:12:36 +00:00
16d6bd7083 Unregister the operation before unreffing it.
2001-10-04  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-service.c (camel_service_connect): Unregister the
	operation before unreffing it.

svn path=/trunk/; revision=13412
2001-10-04 18:12:22 +00:00
3
fc2062d77e Remove now unused 'recents' array/freeing func.
2001-10-03    <NotZed@Ximian.com>

        * providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
        Remove now unused 'recents' array/freeing func.

        * camel-object.c (camel_object_trigger_event): Oops, always run
        the prep function, even if we have no hooks listening.  Causes
        incoming imap recents to get ignored bythe camel-folder filter
        inbox code.

svn path=/trunk/; revision=13398
2001-10-03 23:57:41 +00:00
3
a39364e258 Dont explicitly save metadata, its saved in summary_sync.
2001-10-03    <NotZed@Ximian.com>

        * providers/local/camel-local-folder.c (local_sync): Dont
        explicitly save metadata, its saved in summary_sync.

        * providers/local/camel-mh-summary.c: Call superclass.
        (mh_summary_check): Dont save ibex.

        * providers/local/camel-maildir-summary.c: Call superclass method.
        (maildir_summary_check): Dont save ibex explictly.

        * providers/local/camel-mbox-summary.c: Call super-class sync when
        done, saves summary/ibex, etc.
        (mbox_summary_check): Dont save ibex.
        (mbox_summary_sync): Call summary_check rather than trying to
        update from our known position.

        * providers/local/camel-local-summary.c
        (camel_local_summary_check): Dont save the summary or index here.
        (local_summary_sync): Save the summary/index here.

svn path=/trunk/; revision=13397
2001-10-03 23:05:06 +00:00
3
1ecc7068f5 Added MATCH_NEWLINE flag, -> REG_NEWLINE.
2001-10-03    <NotZed@Ximian.com>

	* camel-search-private.c (camel_search_build_match_regex): Added
	MATCH_NEWLINE flag, -> REG_NEWLINE.

	* camel-lock-helper.c: Include <string.h> to kill some warnings.

	* camel-filter-search.c (get_full_header): Put \n's between each
	line we generate.
	(header_full_regex): Dont drop the first argument to the command
	-> empty matches!
	(header_full_regex): Set match_newline for building regex.
	(body_regex): And here too.  These all fix #9877.

svn path=/trunk/; revision=13392
2001-10-03 22:17:10 +00:00
7708b2d8a0 Call camel_folder_delete() on the folder if it's "alive".
2001-10-03  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-store.c (camel_store_delete_folder): Call
	camel_folder_delete() on the folder if it's "alive".

	* camel-folder.c (camel_folder_delete): Mark the folder as
	deleted, perform any folder specific cleanup and emit the deleted
	event.
	(camel_folder_sync): Only sync the folder if it hasn't been
	deleted.
	(camel_folder_expunge): Same.

svn path=/trunk/; revision=13388
2001-10-03 21:25:04 +00:00
28d74c0920 Strange are the ways of alloca. Fixes 11543.
* providers/local/camel-local-provider.c (local_url_equal):
	Strange are the ways of alloca. Fixes 11543.

svn path=/trunk/; revision=13375
2001-10-03 15:50:58 +00:00
7b834caab7 remove unused variable
svn path=/trunk/; revision=13364
2001-10-03 02:56:40 +00:00