platform/upstream/evolution-data-server.git
22 years agoIf the original message is deleted, reset the deleted flag when we're
Jeffrey Stedfast [Mon, 23 Sep 2002 20:48:50 +0000 (20:48 +0000)]
If the original message is deleted, reset the deleted flag when we're

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.

22 years agoDecode the INTERNALDATE if we've got one. (imap_update_summary): Instead
Jeffrey Stedfast [Mon, 23 Sep 2002 20:03:17 +0000 (20:03 +0000)]
Decode the INTERNALDATE if we've got one. (imap_update_summary): Instead

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.

22 years agofix non-ANSI switch statement.
Dan Winship [Sun, 22 Sep 2002 23:49:06 +0000 (23:49 +0000)]
fix non-ANSI switch statement.

        * 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.

22 years agoNew regression test for word splitting/search input parsing code.
Not Zed [Fri, 20 Sep 2002 05:30:27 +0000 (05:30 +0000)]
New regression test for word splitting/search input parsing code.

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.

22 years agoTake new session arg. Update callers. (symbols[]): changed get-source to
Not Zed [Thu, 19 Sep 2002 13:26:38 +0000 (13:26 +0000)]
Take new session arg. Update callers. (symbols[]): changed get-source to

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.

22 years agoDon't increment the response pointer when deciding what type of header
Jeffrey Stedfast [Thu, 19 Sep 2002 06:17:16 +0000 (06:17 +0000)]
Don't increment the response pointer when deciding what type of header

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.

22 years agofixed a merge conflict
Jeffrey Stedfast [Thu, 19 Sep 2002 02:38:20 +0000 (02:38 +0000)]
fixed a merge conflict

22 years agoInclude MIME-VERSION and CONTENT-TYPE.
Jeffrey Stedfast [Thu, 19 Sep 2002 02:37:26 +0000 (02:37 +0000)]
Include MIME-VERSION and CONTENT-TYPE.

2002-09-18  Jeffrey Stedfast  <fejj@ximian.com>

* providers/imap/camel-imap-folder.c (CAMEL_MESSAGE_INFO_HEADERS):
Include MIME-VERSION and CONTENT-TYPE.

22 years agoIf we get an ALERT, pass it to the user. An rfc2060 MUST, and bug #22496.
Not Zed [Thu, 19 Sep 2002 01:41:38 +0000 (01:41 +0000)]
If we get an ALERT, pass it to the user. An rfc2060 MUST, and bug #22496.

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.

22 years agoHandle when the response is from a HEADER.FIELDS (if so, we don't want to
Jeffrey Stedfast [Wed, 18 Sep 2002 19:00:09 +0000 (19:00 +0000)]
Handle when the response is from a HEADER.FIELDS (if so, we don't want to

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.

22 years agoIf header_msgid_decode fails for the content-id field, just grab whatever
Jeffrey Stedfast [Sun, 15 Sep 2002 03:29:41 +0000 (03:29 +0000)]
If header_msgid_decode fails for the content-id field, just grab whatever

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.

22 years agoIf header_msgid_decode fails for the content-id field, just grab whatever
Jeffrey Stedfast [Fri, 13 Sep 2002 21:36:28 +0000 (21:36 +0000)]
If header_msgid_decode fails for the content-id field, just grab whatever

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.

22 years agoRevert a patch that I had not meant to commit that was aimed at fixing bug
Jeffrey Stedfast [Wed, 11 Sep 2002 05:40:01 +0000 (05:40 +0000)]
Revert a patch that I had not meant to commit that was aimed at fixing bug

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.

22 years agoSame as below. Also save errno before closing the file so our caller can
Jeffrey Stedfast [Tue, 10 Sep 2002 21:39:56 +0000 (21:39 +0000)]
Same as below. Also save errno before closing the file so our caller can

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.

22 years agoDo proper error checking and return -1 on fail.
Jeffrey Stedfast [Tue, 10 Sep 2002 21:10:49 +0000 (21:10 +0000)]
Do proper error checking and return -1 on fail.

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.

22 years agoClear the exception even if we failed to get the message (part) from the
Jeffrey Stedfast [Tue, 10 Sep 2002 20:26:23 +0000 (20:26 +0000)]
Clear the exception even if we failed to get the message (part) from the

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.

22 years agoRemove the hash table entry using the right path. Related to #29731.
Not Zed [Tue, 10 Sep 2002 11:37:34 +0000 (11:37 +0000)]
Remove the hash table entry using the right path. Related to #29731.

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): "

22 years agoFixes bug #4224
Jeffrey Stedfast [Mon, 9 Sep 2002 20:28:35 +0000 (20:28 +0000)]
Fixes bug #4224

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.

22 years agoUse e_mktime_utc.
Dan Winship [Thu, 5 Sep 2002 14:26:30 +0000 (14:26 +0000)]
Use e_mktime_utc.

* 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.

22 years agoclear nonfatal stuff.
Not Zed [Wed, 4 Sep 2002 08:13:38 +0000 (08:13 +0000)]
clear nonfatal stuff.

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.

22 years agoIf we fake the from eof file boundary, also make sure we say we matched
Not Zed [Wed, 4 Sep 2002 03:15:06 +0000 (03:15 +0000)]
If we fake the from eof file boundary, also make sure we say we matched

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.

22 years agoLots of changes, too numerous to list. Changed to use
Not Zed [Tue, 3 Sep 2002 14:55:03 +0000 (14:55 +0000)]
Lots of changes, too numerous to list. Changed to use

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.

22 years agoChange the case sensitive search of subject to expect case insensitive
Not Zed [Thu, 29 Aug 2002 12:04:34 +0000 (12:04 +0000)]
Change the case sensitive search of subject to expect case insensitive

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.

22 years ago updated readme
Michael Zucci [Thu, 29 Aug 2002 09:58:33 +0000 (09:58 +0000)]
updated readme

22 years agoFixed `set' to hold the correct value when setting the flags.
Jeffrey Stedfast [Thu, 29 Aug 2002 03:46:53 +0000 (03:46 +0000)]
Fixed `set' to hold the correct value when setting the flags.

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.

22 years agosimplified
Jeffrey Stedfast [Thu, 29 Aug 2002 03:41:08 +0000 (03:41 +0000)]
simplified

22 years agoFixed `set' to hold the correct value when setting the flags.
Jeffrey Stedfast [Thu, 29 Aug 2002 03:40:07 +0000 (03:40 +0000)]
Fixed `set' to hold the correct value when setting the flags.

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.

22 years agoMatch file: urls too.
Jeffrey Stedfast [Wed, 28 Aug 2002 19:52:58 +0000 (19:52 +0000)]
Match file: urls too.

2002-08-28  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-filter-tohtml.c (is_protocol): Match file: urls too.

22 years agofix exposes a regression in mbox :-/
Not Zed [Wed, 28 Aug 2002 13:04:29 +0000 (13:04 +0000)]
fix exposes a regression in mbox :-/

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.

22 years agosome utf7/utf8 tests.
Not Zed [Wed, 28 Aug 2002 12:35:16 +0000 (12:35 +0000)]
some utf7/utf8 tests.

2002-08-28  Not Zed  <NotZed@Ximian.com>

        * tests/misc/utf7.c: some utf7/utf8 tests.

22 years agofixes a crash on systems that dont have utf7 in iconv.
Not Zed [Wed, 28 Aug 2002 07:45:17 +0000 (07:45 +0000)]
fixes a crash on systems that dont have utf7 in iconv.

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.

22 years agoNow takes a third argument to specify whether or not to group messages by
Jeffrey Stedfast [Tue, 27 Aug 2002 21:45:22 +0000 (21:45 +0000)]
Now takes a third argument to specify whether or not to group messages by

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.

22 years agooops, my deadlock fix wasn't quite right. this should work now
Jeffrey Stedfast [Mon, 26 Aug 2002 21:01:40 +0000 (21:01 +0000)]
oops, my deadlock fix wasn't quite right. this should work now

22 years agoIf the response is NULL, just return. (now works the same way as
Jeffrey Stedfast [Mon, 26 Aug 2002 17:44:28 +0000 (17:44 +0000)]
If the response is NULL, just return. (now works the same way as

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.

22 years agoremoved a no-longer needed #define
Jeffrey Stedfast [Mon, 26 Aug 2002 16:47:24 +0000 (16:47 +0000)]
removed a no-longer needed #define

22 years agoLock the CamelService->priv->connect_lock instead of using our own
Jeffrey Stedfast [Mon, 26 Aug 2002 16:45:50 +0000 (16:45 +0000)]
Lock the CamelService->priv->connect_lock instead of using our own

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.

22 years agoIf we fail to send the EHLO/HELO command successfully, set
Jeffrey Stedfast [Fri, 23 Aug 2002 20:56:35 +0000 (20:56 +0000)]
If we fail to send the EHLO/HELO command successfully, set

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.

22 years agoIf current_folder is not NULL and the summary for that folder is dirty,
Jeffrey Stedfast [Thu, 22 Aug 2002 20:23:16 +0000 (20:23 +0000)]
If current_folder is not NULL and the summary for that folder is dirty,

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.

22 years agoWorkaround for Courier imap's brokeness when LSUBing the INBOX folder when
Jeffrey Stedfast [Thu, 22 Aug 2002 19:28:22 +0000 (19:28 +0000)]
Workaround for Courier imap's brokeness when LSUBing the INBOX folder when

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.

22 years agoDon't register the noop timeout here anymore, we're gonna handle all this
Jeffrey Stedfast [Wed, 21 Aug 2002 18:17:21 +0000 (18:17 +0000)]
Don't register the noop timeout here anymore, we're gonna handle all this

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.

22 years agoup the timeout to 10 minutes
Jeffrey Stedfast [Tue, 20 Aug 2002 22:07:59 +0000 (22:07 +0000)]
up the timeout to 10 minutes

22 years agoOverride the default noop implementation.
Jeffrey Stedfast [Tue, 20 Aug 2002 21:44:29 +0000 (21:44 +0000)]
Override the default noop implementation.

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.

22 years agoPlug some large leaks in the indexing code.
Peter Williams [Tue, 20 Aug 2002 19:34:28 +0000 (19:34 +0000)]
Plug some large leaks in the indexing code.

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.

22 years agoDon't let the minimum recursive depth be negative. (get_folders): Pass
Jeffrey Stedfast [Tue, 20 Aug 2002 19:23:15 +0000 (19:23 +0000)]
Don't let the minimum recursive depth be negative. (get_folders): Pass

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.

22 years agoSet CAMEL_URL_NEED_PATH for the vFolder provider.
Jeffrey Stedfast [Tue, 20 Aug 2002 17:44:28 +0000 (17:44 +0000)]
Set CAMEL_URL_NEED_PATH for the vFolder provider.

2002-08-20  Jeffrey Stedfast  <fejj@ximian.com>

* camel-session.c: Set CAMEL_URL_NEED_PATH for the vFolder
provider.

22 years agoChanged the STOREINFO_VERSION - should fix bug #28571, but if it doesn't -
Jeffrey Stedfast [Mon, 19 Aug 2002 21:56:51 +0000 (21:56 +0000)]
Changed the STOREINFO_VERSION - should fix bug #28571, but if it doesn't -

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.

22 years agoIf the diagnostics are empty, just explain that gpg failed to execute.
Jeffrey Stedfast [Mon, 19 Aug 2002 21:10:34 +0000 (21:10 +0000)]
If the diagnostics are empty, just explain that gpg failed to execute.

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.

22 years agoUpdated to pass the needed arguments to camel_init() and to init gthreads
Jeffrey Stedfast [Mon, 19 Aug 2002 20:14:15 +0000 (20:14 +0000)]
Updated to pass the needed arguments to camel_init() and to init gthreads

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.

22 years agoIf the passed-in URL contains a path, but the service doesn't allow paths,
Dan Winship [Mon, 19 Aug 2002 13:28:10 +0000 (13:28 +0000)]
If the passed-in URL contains a path, but the service doesn't allow paths,

* 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

22 years agoerr, oops.
Chris Toshok [Fri, 16 Aug 2002 18:32:06 +0000 (18:32 +0000)]
err, oops.

22 years agoremove the outer parens from the expansion of camel_argv_{start,end} since
Chris Toshok [Fri, 16 Aug 2002 18:31:07 +0000 (18:31 +0000)]
remove the outer parens from the expansion of camel_argv_{start,end} since

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.

22 years ago Ugh, actually do what i just said i did, last patch was
Michael Zucci [Fri, 16 Aug 2002 08:43:39 +0000 (08:43 +0000)]
Ugh, actually do what i just said i did, last patch was
wrong.

22 years agoFix the logic check for working out if we add inbox or not, we do it if we
Not Zed [Fri, 16 Aug 2002 08:40:19 +0000 (08:40 +0000)]
Fix the logic check for working out if we add inbox or not, we do it if we

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.

22 years agoadded a flags field, defined some flags, currently only used by imap. This
Not Zed [Thu, 15 Aug 2002 06:17:09 +0000 (06:17 +0000)]
added a flags field, defined some flags, currently only used by imap. This

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.

22 years agoNew function, generate a UID that has better chances of being unique.
Peter Williams [Fri, 9 Aug 2002 22:01:44 +0000 (22:01 +0000)]
New function, generate a UID that has better chances of being unique.

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.

22 years agoTweak how we build the tree based on whether a full tree or a subtree is
Peter Williams [Fri, 9 Aug 2002 19:37:31 +0000 (19:37 +0000)]
Tweak how we build the tree based on whether a full tree or a subtree is

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.

22 years agoWhen renaming our cache, add the "/folders" to the path.
Peter Williams [Fri, 9 Aug 2002 16:53:38 +0000 (16:53 +0000)]
When renaming our cache, add the "/folders" to the path.

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.

22 years agoSet some default permanent_flags. This is the other cause of bug #28038.
Jeffrey Stedfast [Thu, 8 Aug 2002 06:22:24 +0000 (06:22 +0000)]
Set some default permanent_flags. This is the other cause of bug #28038.

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().

22 years agoSet some default permanent_flags. This is the other cause of bug #28038.
Jeffrey Stedfast [Thu, 8 Aug 2002 05:55:41 +0000 (05:55 +0000)]
Set some default permanent_flags. This is the other cause of bug #28038.

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.

22 years agoOops - outbuf pointed to alloca'd memory but we were g_free'ing it after
Jeffrey Stedfast [Thu, 8 Aug 2002 00:11:29 +0000 (00:11 +0000)]
Oops - outbuf pointed to alloca'd memory but we were g_free'ing it after

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.

22 years agoOnly add the stream to the gdatalist if it is non-NULL.
Jeffrey Stedfast [Wed, 7 Aug 2002 20:07:46 +0000 (20:07 +0000)]
Only add the stream to the gdatalist if it is non-NULL.

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.

22 years agoIf writing to the sendmail pipe fails, wait for the sendmail process to
Jeffrey Stedfast [Tue, 6 Aug 2002 05:21:34 +0000 (05:21 +0000)]
If writing to the sendmail pipe fails, wait for the sendmail process to

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.

22 years agoAdd messageinfo to id table, and store array index in messageinfo too.
Not Zed [Tue, 6 Aug 2002 04:11:33 +0000 (04:11 +0000)]
Add messageinfo to id table, and store array index in messageinfo too.

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.

22 years agoAlways set a g_atexit handler to flush/save the camel-certdb.
Jeffrey Stedfast [Mon, 5 Aug 2002 20:04:05 +0000 (20:04 +0000)]
Always set a g_atexit handler to flush/save the camel-certdb.

2002-08-05  Jeffrey Stedfast  <fejj@ximian.com>

* camel.c (camel_init): Always set a g_atexit handler to
flush/save the camel-certdb.

22 years agoIf we are asking for the toplevel folders, use the IMAP store's namespace
Jeffrey Stedfast [Mon, 5 Aug 2002 19:59:24 +0000 (19:59 +0000)]
If we are asking for the toplevel folders, use the IMAP store's namespace

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.

22 years agoAdd CAMEL_MESSAGE_ANSWERED_ALL, for folders that can distinguish a
Dan Winship [Mon, 5 Aug 2002 13:37:15 +0000 (13:37 +0000)]
Add CAMEL_MESSAGE_ANSWERED_ALL, for folders that can distinguish a

* 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.

22 years agoFixes bug #26237.
Jeffrey Stedfast [Sat, 3 Aug 2002 00:45:15 +0000 (00:45 +0000)]
Fixes bug #26237.

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.

22 years agoIf the folder name contains the directory separator, reject it.
Peter Williams [Fri, 2 Aug 2002 18:19:53 +0000 (18:19 +0000)]
If the folder name contains the directory separator, reject it.

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.

22 years agoClear the summary after building the 'removed uid' list.
Not Zed [Fri, 2 Aug 2002 05:23:51 +0000 (05:23 +0000)]
Clear the summary after building the 'removed uid' list.

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.

22 years agorevert jeff's patch below, and do it slightly differently, and stop the
Not Zed [Fri, 2 Aug 2002 05:13:38 +0000 (05:13 +0000)]
revert jeff's patch below, and do it slightly differently, and stop the

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.

22 years agoDo more error checking to prevent crashing if we fail to read a string for
Jeffrey Stedfast [Thu, 1 Aug 2002 20:20:21 +0000 (20:20 +0000)]
Do more error checking to prevent crashing if we fail to read a string for

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.

22 years agocamel:
Peter Williams [Thu, 1 Aug 2002 15:52:37 +0000 (15:52 +0000)]
camel:

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.

22 years agoDisable my fix to not cache headers as it means that each time we load the
Jeffrey Stedfast [Thu, 1 Aug 2002 03:24:22 +0000 (03:24 +0000)]
Disable my fix to not cache headers as it means that each time we load the

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.

22 years agoDon't use "isprint(c)" to mean "c >= 32 && c < 128" since it doesn't in
Jeffrey Stedfast [Wed, 31 Jul 2002 21:03:48 +0000 (21:03 +0000)]
Don't use "isprint(c)" to mean "c >= 32 && c < 128" since it doesn't in

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 @.

22 years agoUpdate the comment.
Jeffrey Stedfast [Wed, 31 Jul 2002 01:03:10 +0000 (01:03 +0000)]
Update the comment.

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.

22 years agoX509_digest() needs a pointer to an int len. Also fixed some other
Jeffrey Stedfast [Tue, 30 Jul 2002 21:10:04 +0000 (21:10 +0000)]
X509_digest() needs a pointer to an int len. Also fixed some other

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>

22 years agoadded to the build
Jeffrey Stedfast [Tue, 30 Jul 2002 19:40:02 +0000 (19:40 +0000)]
added to the build

22 years agoNew source file implementing a very basic certificate database. This is
Jeffrey Stedfast [Tue, 30 Jul 2002 19:16:11 +0000 (19:16 +0000)]
New source file implementing a very basic certificate database. This is

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.

22 years agoUse the same command-counter mojo that the append code uses in case the
Peter Williams [Tue, 30 Jul 2002 17:54:59 +0000 (17:54 +0000)]
Use the same command-counter mojo that the append code uses in case the

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.

22 years agoNew filter action to unset a system flag. The exact opposite of set_flag.
Jeffrey Stedfast [Mon, 29 Jul 2002 05:24:22 +0000 (05:24 +0000)]
New filter action to unset a system flag. The exact opposite of set_flag.

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.

22 years agoIf the path exists and is a directory, return non-NULL. Missed this before
Jeffrey Stedfast [Fri, 26 Jul 2002 19:25:02 +0000 (19:25 +0000)]
If the path exists and is a directory, return non-NULL. Missed this before

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.

22 years agoThe flags'n'tags copy was unnecessary. Removed it.
Peter Williams [Fri, 26 Jul 2002 17:21:23 +0000 (17:21 +0000)]
The flags'n'tags copy was unnecessary. Removed it.

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.

22 years agoRevert Jeff's previous change, it broke local folders. Uninitialized
Peter Williams [Fri, 26 Jul 2002 17:03:02 +0000 (17:03 +0000)]
Revert Jeff's previous change, it broke local folders. Uninitialized

2002-07-26  Peter Williams  <peterw@ximian.com>

* Revert Jeff's previous change, it broke local
folders. Uninitialized exceptions or something.

22 years agoioops, this file too
Jeffrey Stedfast [Fri, 26 Jul 2002 03:39:15 +0000 (03:39 +0000)]
ioops, this file too

22 years agoIf we're gonna do an elite hack, lets do it right.
Jeffrey Stedfast [Fri, 26 Jul 2002 03:38:49 +0000 (03:38 +0000)]
If we're gonna do an elite hack, lets do it right.

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.

22 years agoPrototype.
Peter Williams [Thu, 25 Jul 2002 22:51:58 +0000 (22:51 +0000)]
Prototype.

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.

22 years agoRemove "possibly non-fatal" exception strings, all exceptions are fatal
Jeffrey Stedfast [Thu, 25 Jul 2002 22:11:11 +0000 (22:11 +0000)]
Remove "possibly non-fatal" exception strings, all exceptions are fatal

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).

22 years agoIt would help to mark the UIDs as deleted before we try to expunge them
Peter Williams [Thu, 25 Jul 2002 18:04:44 +0000 (18:04 +0000)]
It would help to mark the UIDs as deleted before we try to expunge them

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.

22 years agoRenamed from shell_exec(). Also, we now want to pass argc/argv on to the
Jeffrey Stedfast [Thu, 25 Jul 2002 07:43:16 +0000 (07:43 +0000)]
Renamed from shell_exec(). Also, we now want to pass argc/argv on to the

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().

22 years agoUse execv ("sh", "-c", command) rather than execing the command directly.
Jeffrey Stedfast [Thu, 25 Jul 2002 06:04:55 +0000 (06:04 +0000)]
Use execv ("sh", "-c", command) rather than execing the command directly.

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.

22 years agoWhen writing the summary, use TRUNC flag, duh. Also, write to a temp file
Not Zed [Wed, 24 Jul 2002 15:13:43 +0000 (15:13 +0000)]
When writing the summary, use TRUNC flag, duh. Also, write to a temp file

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.

22 years agoSync before doing an expunge if we dont have uidplus. See #25766.
Not Zed [Wed, 24 Jul 2002 03:41:24 +0000 (03:41 +0000)]
Sync before doing an expunge if we dont have uidplus. See #25766.

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.

22 years agoMove folders to a subdirectory of storage_path, rather than in it. Bye bye
Not Zed [Wed, 24 Jul 2002 02:51:44 +0000 (02:51 +0000)]
Move folders to a subdirectory of storage_path, rather than in it. Bye bye

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.

22 years agoDuplicated the very much hack in imap_store_refresh_folders() to avoid a
Not Zed [Wed, 24 Jul 2002 02:33:26 +0000 (02:33 +0000)]
Duplicated the very much hack in imap_store_refresh_folders() to avoid a

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.

22 years ago#include <string.h> for memcpy.
Jeffrey Stedfast [Tue, 23 Jul 2002 05:14:58 +0000 (05:14 +0000)]
#include <string.h> for memcpy.

2002-07-23  Jeffrey Stedfast  <fejj@ximian.com>

* camel-tcp-stream.c: #include <string.h> for memcpy.

22 years agos/Out/Our in a debug printf
Jeffrey Stedfast [Mon, 22 Jul 2002 23:08:37 +0000 (23:08 +0000)]
s/Out/Our in a debug printf

22 years agoOops, forgot to implement this. Fixes #24604.
Not Zed [Mon, 22 Jul 2002 07:28:49 +0000 (07:28 +0000)]
Oops, forgot to implement this. Fixes #24604.

2002-07-22  Not Zed  <NotZed@Ximian.com>

        * camel-vee-folder.c (vee_set_message_user_tag): Oops, forgot to
        implement this.  Fixes #24604.

22 years agoOnly add a \r if the character before the \n wasn't already a \r - this
Jeffrey Stedfast [Mon, 22 Jul 2002 03:17:04 +0000 (03:17 +0000)]
Only add a \r if the character before the \n wasn't already a \r - this

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.
`

22 years agoChanged to use a different length calculator.
Not Zed [Fri, 19 Jul 2002 11:25:02 +0000 (11:25 +0000)]
Changed to use a different length calculator.

2002-07-19  Not Zed  <NotZed@Ximian.com>

        * camel-mime-part-utils.c (convert_buffer): Changed to use a
        different length calculator.

22 years ago#include <glib.h> #include <libgnome/gnome-defs.h>
Jeffrey Stedfast [Wed, 17 Jul 2002 22:42:36 +0000 (22:42 +0000)]
#include <glib.h> #include <libgnome/gnome-defs.h>

#include <glib.h>
#include <libgnome/gnome-defs.h>

apparently needed for gnome-i18n.h