platform/upstream/evolution-data-server.git
23 years agoRun the filter in its own thread to prevent locking issues.
Peter Williams [Wed, 11 Jul 2001 19:12:22 +0000 (19:12 +0000)]
Run the filter in its own thread to prevent locking issues.

2001-07-11  Peter Williams  <peterw@ximian.com>

* providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
Run the filter in its own thread to prevent locking issues.
(imap_filter_timeout): New function that does the filtering called
as a CamelSession timeout.

23 years agoCreate the messageinfo itself, so we can properly set the size.
Not Zed [Wed, 11 Jul 2001 07:28:40 +0000 (07:28 +0000)]
Create the messageinfo itself, so we can properly set the size.

2001-07-11  Not Zed  <NotZed@Ximian.com>

        * camel-filter-driver.c (camel_filter_driver_filter_mbox): Create
        the messageinfo itself, so we can properly set the size.

        * camel-movemail.c (camel_movemail_solaris): Write out the from
        line between each message.

2001-07-10  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-local-summary.c (local_summary_add): Copy
        the size across from the source message info if supplied.

        * camel-stream-null.c: Added a 'written' member which keeps track
        of how much has been written to the stream.

        * camel-movemail.c (camel_movemail): If we have BROKEN_SPOOL
        defined, then use the solaris movemail to quote from lines that
        sendmail didn't.
        (camel_movemail_solaris): Compile this in if BROKEN_SPOOL defined.

23 years agoNew function to parse an HTML meta-tag.
Jeffrey Stedfast [Tue, 10 Jul 2001 22:06:56 +0000 (22:06 +0000)]
New function to parse an HTML meta-tag.

2001-07-10  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c (html_meta_param_list_decode): New function
to parse an HTML meta-tag.

* camel-mime-part-utils.c
(simple_data_wrapper_construct_from_parser): If the Content-Type
did not contain a charset parameter and it's also a text/html
part, we have 1 last place to look - in the META html tags. *sigh*

* camel-mime-message.c (camel_mime_message_get_source):
s/gint/unsigned since that's what it should be.

23 years agoForget the passphrase if the user has set that option. (pgp_clearsign):
Jeffrey Stedfast [Mon, 9 Jul 2001 21:31:09 +0000 (21:31 +0000)]
Forget the passphrase if the user has set that option. (pgp_clearsign):

2001-07-09  Jeffrey Stedfast  <fejj@ximian.com>

* camel-pgp-context.c (pgp_sign): Forget the passphrase if the
user has set that option.
(pgp_clearsign): Same.
(pgp_encrypt): And here...
(pgp_decrypt): And finally here.
(camel_pgp_context_new): Take a `remember' argument.

23 years agoOops, e_poolv_set free's it for us, so dont double-free here.
Not Zed [Mon, 9 Jul 2001 03:42:50 +0000 (03:42 +0000)]
Oops, e_poolv_set free's it for us, so dont double-free here.

2001-07-09  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-maildir-summary.c (maildir_summary_sync):
        Oops, e_poolv_set free's it for us, so dont double-free here.

23 years agoChanged so we dont have the list changing under us, just going to the next
Not Zed [Mon, 9 Jul 2001 01:49:41 +0000 (01:49 +0000)]
Changed so we dont have the list changing under us, just going to the next

2001-07-06  Not Zed  <NotZed@Ximian.com>

        * camel-vee-folder.c (camel_vee_folder_finalise): Changed so we
        dont have the list changing under us, just going to the next node
        before we call a function that might change the list is
        potentially dangerous (slight mod of peters fix).  Hmm, i think it
        would've double-unref'd it too(?)

23 years agoopenssl_table is gone. we now store/get the stream from the SSL_CTX's
Chris Toshok [Sun, 8 Jul 2001 22:15:30 +0000 (22:15 +0000)]
openssl_table is gone. we now store/get the stream from the SSL_CTX's

2001-07-08  Chris Toshok  <toshok@ximian.com>

* camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
openssl_table is gone.  we now store/get the stream from the
SSL_CTX's app_data.
(stream_read): rework the non-blocking case to account for SSL
possibly buffering data (in which case select will block even
though data is ready to be read), and to account for FreeBSD's
strange behavior of returning -1/EAGAIN even though select said
the fd was ready to be read.
(ssl_verify): openssl_table is gone.
(open_ssl_connection): set the SSL_CTX's app_data to be the
stream, remove the openssl_table code.

23 years agoDon't allow in to be NULL, so instead of doing if (in == NULL) return;,
Jeffrey Stedfast [Fri, 6 Jul 2001 21:59:14 +0000 (21:59 +0000)]
Don't allow in to be NULL, so instead of doing if (in == NULL) return;,

2001-07-06  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c (header_encode_param): Don't allow in to be
NULL, so instead of doing if (in == NULL) return;, make it a
g_return_val_if_fail and later we can make it an assert or
something.

23 years agoFixes bug #1138.
Jeffrey Stedfast [Fri, 6 Jul 2001 20:55:16 +0000 (20:55 +0000)]
Fixes bug #1138.

2001-07-06  Jeffrey Stedfast  <fejj@ximian.com>

* providers/local/camel-maildir-store.c (get_inbox): Fixes bug
#1138.

23 years agoMake the `day-of-month' digit take up 2 chars by using "%2d". Fixes bug
Jeffrey Stedfast [Fri, 6 Jul 2001 20:30:25 +0000 (20:30 +0000)]
Make the `day-of-month' digit take up 2 chars by using "%2d". Fixes bug

2001-07-06  Jeffrey Stedfast  <fejj@ximian.com>

* providers/local/camel-mbox-summary.c
(camel_mbox_summary_build_from): Make the `day-of-month' digit
take up 2 chars by using "%2d". Fixes bug #3989 for lame mailers
like Pine.

23 years agoSet the pipe fd's to nonblocking.
Jeffrey Stedfast [Fri, 6 Jul 2001 16:52:44 +0000 (16:52 +0000)]
Set the pipe fd's to nonblocking.

2001-07-06  Jeffrey Stedfast  <fejj@ximian.com>

* camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's
to nonblocking.

23 years agoMake sure that after the finalization event has happened and the
Peter Williams [Fri, 6 Jul 2001 13:00:48 +0000 (13:00 +0000)]
Make sure that after the finalization event has happened and the

2001-07-06  Peter Williams  <peterw@ximian.com>

* camel-object.c (camel_object_unref): Make sure that after the
finalization event has happened and the finalization functions
have been called that the object still has a zero refcount.

23 years agoAdd locking to camel_nntp_get_grouplist_from_server().
Joe Shaw [Fri, 6 Jul 2001 04:11:27 +0000 (04:11 +0000)]
Add locking to camel_nntp_get_grouplist_from_server().

2001-07-06  Joe Shaw  <joe@ximian.com>

* providers/nntp/camel-nntp-grouplist.c: Add locking to
camel_nntp_get_grouplist_from_server().

* providers/nntp/camel-nntp-resp-codes.h: Added
NNTP_EXTENSIONS_SUPPORTED (202).

* providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions):
Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from
a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes
out of this, but that's what was already there...) Also, put some
locking around it.
(finalize): e_mutex_destroy() the command lock
(camel_nntp_store_init): e_mutex_new() the command lock.

* providers/nntp/camel-nntp-store.h: Add locking macros.

23 years agoAdded an assert to make sure that `mi' isn't NULL.
Jeffrey Stedfast [Thu, 5 Jul 2001 22:59:46 +0000 (22:59 +0000)]
Added an assert to make sure that `mi' isn't NULL.

2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>

* camel-folder-summary.c (camel_message_info_string): Added an
assert to make sure that `mi' isn't NULL.
(camel_message_info_set_string): Same.

* providers/imap/camel-imap-command.c (camel_imap_response_free):
Create and use a temporary CamelException for use with
camel_imap_folder_changed.

23 years agoSend the --no-auto-key-retrieve argument to gpg if we are in offline mode
Jeffrey Stedfast [Thu, 5 Jul 2001 20:37:30 +0000 (20:37 +0000)]
Send the --no-auto-key-retrieve argument to gpg if we are in offline mode

2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>

* camel-pgp-context.c (pgp_verify): Send the
--no-auto-key-retrieve argument to gpg if we are in offline mode
so that we don't have to worry about gpg hanging if it can't
connect to the key servers, because now it shouldn't even attempt
to.

23 years agoSend the --no-auto-key-retrieve argument to gpg so that we don't have to
Jeffrey Stedfast [Thu, 5 Jul 2001 20:07:46 +0000 (20:07 +0000)]
Send the --no-auto-key-retrieve argument to gpg so that we don't have to

2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>

* camel-pgp-context.c (pgp_verify): Send the
--no-auto-key-retrieve argument to gpg so that we don't have to
worry about gpg hanging if it can't connect to the key servers,
because now it shouldn't even attempt to.

23 years agouse X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the
Chris Toshok [Thu, 5 Jul 2001 19:11:50 +0000 (19:11 +0000)]
use X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the

2001-07-05  Chris Toshok  <toshok@ximian.com>

* camel-tcp-stream-openssl.c (ssl_verify): use
X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the
X509_STORE_CTX to look up our stream, since it's not what we used
to insert our stream into the hashtable.
(open_ssl_connection): insert the stream into the hashtable before
calling SSL_connect, as this can cause ssl_verify to be called,
and we need to look up the stream there.  remove the stream from
the hashtable if there's an error connecting.
(stream_connect): pass the CamelTcpStreamOpenSSL* to
open_ssl_connection since it handles the hashtable stuff.  remove
hashtable stuff from here.

23 years agoif source == dest, just no-op.
Jeffrey Stedfast [Thu, 5 Jul 2001 17:41:53 +0000 (17:41 +0000)]
if source == dest, just no-op.

2001-07-05  Jeffrey Stedfast  <fejj@ximian.com>

* camel-folder.c (camel_folder_copy_messages_to): if source ==
dest, just no-op.

23 years agoMove this before the camel_vee_folder_remove_folder because that function
Peter Williams [Thu, 5 Jul 2001 16:40:45 +0000 (16:40 +0000)]
Move this before the camel_vee_folder_remove_folder because that function

2001-07-05  Peter Williams  <peterw@ximian.com>

* camel-vee-folder.c (camel_vee_folder_finalise): Move this before the
camel_vee_folder_remove_folder because that function modifies p->folders
messing up our iteration.
(camel_vee_folder_finalise): Don't unref our summary; camel-folder now
does this.

* camel-object.h (CamelObject): Add a 'destroying' flag to CamelObject.

* camel-object.c (obj_init): Clear 'destroying'.
(camel_object_unref): If 'destroying' then do not send the finalize
event and do not call finalize functions. Otherwise, set destroying
so just in case we get refed (eg event code) we don't get doubly
finalized.

23 years ago (camel_message_info_dup_to): Assign the to->strings from the
Michael Zucci [Thu, 5 Jul 2001 09:38:59 +0000 (09:38 +0000)]
  (camel_message_info_dup_to): Assign the to->strings from the
  e_poolv_cpy() call, since it may allocaote a new poolv if the
  lengths do not match.

23 years agoFix the assertion slightly, if we have a little bit of input the output
Not Zed [Thu, 5 Jul 2001 03:59:45 +0000 (03:59 +0000)]
Fix the assertion slightly, if we have a little bit of input the output

2001-07-05  Not Zed  <NotZed@Ximian.com>

        * camel-mime-filter-basic.c (filter): Fix the assertion slightly,
        if we have a little bit of input the output size could be larger,
        since we store upto 3 chars in the state.

23 years agoWhen indexing a new record, create a pseudo word 'ibexindexed' so we can
Not Zed [Thu, 5 Jul 2001 03:13:52 +0000 (03:13 +0000)]
When indexing a new record, create a pseudo word 'ibexindexed' so we can

2001-07-05  Not Zed  <NotZed@Ximian.com>

        * camel-folder-summary.c
        (camel_folder_summary_info_new_from_message): When indexing a new
        record, create a pseudo word 'ibexindexed' so we can always tell
        that a message has already been idnexed, even if it contains no
        words of its own.  Things like maildir use this check to see if
        its already been processed, and it matters if it is incorrect in
        this case (not just wasted cycles).

        (camel_folder_summary_info_new_from_parser): And same here.

        * providers/local/camel-maildir-summary.c (maildir_summary_sync):
        Changed the logicfor epoolv code to be different, we dont need to
        update hash references or any tricky stuff.
        (maildir_summary_check): Samehere.

        * camel-folder-summary.h: Removed include of e-memory.h.

23 years agoAdded NNTP_NO_PERMISSION (502) to the list of response codes.
Joe Shaw [Tue, 3 Jul 2001 21:33:47 +0000 (21:33 +0000)]
Added NNTP_NO_PERMISSION (502) to the list of response codes.

2001-07-03  Joe Shaw  <joe@ximian.com>

* providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION
(502) to the list of response codes.

* providers/nntp/camel-nntp-store.c (nntp_store_connect): If we
receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying
to reconnect, get extensions, etc. Just give up and return FALSE.

23 years agoDoh. Don't remove things from the hash table while foreach'ing it. (And
Dan Winship [Tue, 3 Jul 2001 15:24:55 +0000 (15:24 +0000)]
Doh. Don't remove things from the hash table while foreach'ing it. (And

* providers/imap/camel-imap-message-cache.c
(camel_imap_message_cache_clear): Doh. Don't remove things from
the hash table while foreach'ing it. (And can't use foreach_remove
either because we have to remove them in a weird order). Fixes
#3618.

* providers/imap/camel-imap-folder.c (imap_get_message): If the
server returns OK from the FETCH BODY, but there's no parseable
BODY response, it's probably because there's an UN-parseable BODY
response, implying the message is badly formatted, MIMEwise. In
that case, fall back to fetching the message as a single part.

23 years agoImplemented nntp_folder_search_by_expression and nntp_folder_search_free.
Sam Creasey [Tue, 3 Jul 2001 02:54:06 +0000 (02:54 +0000)]
Implemented nntp_folder_search_by_expression and nntp_folder_search_free.

2001-07-02  Sam Creasey <sammy@oh.verio.com>

        * providers/nntp/camel-nntp-folder.c: Implemented
        nntp_folder_search_by_expression and
        nntp_folder_search_free.  Basic search functionality e.g. unread
        marking now works for NNTP folders.

        * camel_filter_search.c (get_size): Added get-size sexp directive
        to get the size of a message for filters.

        * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new):
        Always check with the NNTP server after summary load -- this
        function now always expires old summary entries and syncs with
        the news server.

        * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers):
        Only fetch headers for articles not already logged in
        the summary file.

        * providers/nntp/camel-nntp-grouplist.c
        (camel_nntp_get_grouplist_from_*): change from g_list_append()
        to g_list_prepend() + g_list_reverse.  Traversing 40,000
        element linked lists sucks.

        * providers/nntp/camel-nntp-store.c (camel_nntp_command):
        Should the NNTP connection die with
        CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry
        attempt.  Timing out the NNTP link is less painful this way.

23 years agoAdd comment noting that Camel actually exists now :-)
Peter Williams [Mon, 2 Jul 2001 18:55:54 +0000 (18:55 +0000)]
Add comment noting that Camel actually exists now :-)

2001-07-02  Peter Williams  <peterw@ximian.com>

* README (Introduction): Add comment noting that Camel actually
exists now :-)

23 years agonew method to get an application-initialized filter driver.
Dan Winship [Mon, 2 Jul 2001 15:03:49 +0000 (15:03 +0000)]
new method to get an application-initialized filter driver.

* camel-session.c (camel_session_get_filter_driver): new method to
get an application-initialized filter driver.

* camel-filter-driver.c (camel_filter_driver_new): Remove the
get_folder function and data args from here...
(camel_filter_driver_set_folder_func): ...and add this function to
set/change them.

* providers/imap/camel-imap-folder.c (camel_imap_folder_new): If
this folder is INBOX and we're filtering INBOX, set a flag on the
folder for later.
(imap_update_summary): Add another argument (GPtrArray *recents),
and if it's non-NULL, add the uids of any \Recent new messages to
it.
(camel_imap_folder_changed): If doing filtering in this folder,
create a recents array and pass it to imap_update_summary. Then
get a filter driver and use it to filter the recent messages.

* providers/imap/camel-imap-summary.h:
* providers/imap/camel-imap-utils.c (imap_parse_flag_list): Add
support for the \Recent flag.

* providers/imap/camel-imap-provider.c (imap_conf_entries): enable
the "filter" option.

* camel-types.h: add CamelFilterDriver typedef here

23 years agoproperly return error if we can't create pipes.
Not Zed [Mon, 2 Jul 2001 13:59:39 +0000 (13:59 +0000)]
properly return error if we can't create pipes.

2001-07-02  Not Zed  <NotZed@Ximian.com>

        * camel-lock-client.c (camel_lock_helper_init): properly return
        error if we can't create pipes.

23 years agore-enable html indexing.
Not Zed [Mon, 2 Jul 2001 13:32:55 +0000 (13:32 +0000)]
re-enable html indexing.

2001-07-02  Not Zed  <NotZed@Ximian.com>

        * camel-folder-summary.c (summary_build_content_info): re-enable
        html indexing.

        * camel-mime-filter-html.c: Completely re-implemented using a
        custom parser.

23 years agoChange a camel_exception_clear to camel_exception_init to fix a
Dan Winship [Mon, 2 Jul 2001 13:06:56 +0000 (13:06 +0000)]
Change a camel_exception_clear to camel_exception_init to fix a

* tests/misc/url.c (main): Change a camel_exception_clear to
camel_exception_init to fix a sometimes-crash

23 years agoAdded Originator: header as a header to look for when looking for the
Jeffrey Stedfast [Fri, 29 Jun 2001 18:24:30 +0000 (18:24 +0000)]
Added Originator: header as a header to look for when looking for the

2001-06-29  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c: Added Originator: header as a header to look
for when looking for the mailing list.

23 years agoBuild the test-crlf test program.
Jeffrey Stedfast [Fri, 29 Jun 2001 18:09:45 +0000 (18:09 +0000)]
Build the test-crlf test program.

2001-06-29  Jeffrey Stedfast  <fejj@ximian.com>

* tests/mime-filter/Makefile.am: Build the test-crlf test program.

* tests/mime-filter/test-crlf.c: New test suite for the crlf
filter.

* camel-mime-filter-crlf.c (filter): Fixed to correctly encode and
decode dots.

23 years agossh
Jose Maria Celorio [Fri, 29 Jun 2001 06:23:57 +0000 (06:23 +0000)]
ssh

23 years agoAdd a CamelMimeFilterStripHeader that removes a header from mime output. Used
Peter Williams [Thu, 28 Jun 2001 20:35:43 +0000 (20:35 +0000)]
Add a CamelMimeFilterStripHeader that removes a header from mime output. Used
by sendmail to strip the BCC from the email while still sending to the BCC
recipients.

camel:

2001-06-28  Peter Williams  <peterw@ximian.com>

        * camel-mime-filter-stripheader.c: New file. Filter that strips a
        header from mime output.

        * camel-mime-filter-stripheader.h: New file. Header for the above.

        * providers/smtp/camel-smtp-transport.c (smtp_data): Use the stripheader
        filter to remove the "Bcc" header.

        * Makefile.am: Add the stripheader files.

        * tests/lib/Makefile.am (INCLUDES): Get this to compile again.

        * tests/mime-filter/test-stripheader.c: New file. Test suite for
        the CamelMimeFilterStripHeader.

        * tests/mime-filter/Makefile.am: New test section: mime filters.

mail:

2001-06-28  Peter Williams  <peterw@ximian.com>

        * mail-ops.c (mail_send_message): Revert fejj's Bcc header removal;
        this unsets the BCC recipients and so doesn't send to the Bcc'd
        people at all.

23 years agoFix a memory leak. Also if the decoded value is NULL, that means it wasn't
Jeffrey Stedfast [Thu, 28 Jun 2001 16:52:23 +0000 (16:52 +0000)]
Fix a memory leak. Also if the decoded value is NULL, that means it wasn't

2001-06-28  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c (header_decode_param_list): Fix a memory
leak. Also if the decoded value is NULL, that means it wasn't
encoded so we don't want to toss the old value.
(header_param_list_format_append): Correctly wrap long parameter
values according to rfc2184.

23 years agoIf the folder is frozen, don't refresh, just record that we need to do it
Dan Winship [Thu, 28 Jun 2001 16:50:09 +0000 (16:50 +0000)]
If the folder is frozen, don't refresh, just record that we need to do it

* providers/imap/camel-imap-folder.c (imap_refresh_info): If the
folder is frozen, don't refresh, just record that we need to do it
later.
(imap_append_online): If the APPEND doesn't trigger an immediate
EXISTS response (because the folder isn't the selected folder, or
because the server doesn't do that until the next command), call
imap_refresh_info on the folder.
(imap_copy_online): Likewise. (Replacing the unconditional NOOP
that was there before, which absolutely killed filter performance
by forcing the IMAP provider to switch back and forth between
folders after every copy or move.)
(imap_thaw): If the folder needs a refresh, do it.

* camel-folder.c (camel_folder_is_frozen): New method

23 years agoInitialize the private send_lock. (camel_transport_finalize): Free the
Jeffrey Stedfast [Wed, 27 Jun 2001 22:43:00 +0000 (22:43 +0000)]
Initialize the private send_lock. (camel_transport_finalize): Free the

2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>

* camel-transport.c (camel_transport_init): Initialize the private
send_lock.
(camel_transport_finalize): Free the private send_lock.
(camel_transport_get_type): Set the init and finalize functions.
(camel_transport_send): Lock the transport.
(camel_transport_send_to): Same.

* camel-private.h: Add CAMEL_TRANSPORT_(UN)LOCK macros.

23 years agoUpdated to match the current API.
Jeffrey Stedfast [Wed, 27 Jun 2001 22:21:05 +0000 (22:21 +0000)]
Updated to match the current API.

2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>

* tests/folder/test9.c (main): Updated to match the current API.

* tests/folder/test3.c: #include <gtk/gtk.h> since we use
gtk_init().

23 years agoUse the new header_address_fold.
Jeffrey Stedfast [Wed, 27 Jun 2001 22:14:20 +0000 (22:14 +0000)]
Use the new header_address_fold.

2001-06-27  Jeffrey Stedfast  <fejj@ximian.com>

* camel-internet-address.c
(camel_internet_address_encode_address): Use the new
header_address_fold.

* camel-mime-utils.c: Removed some old #if 0'd code of mine.
(rfc2047_encode_word): If enclen is 0, don't write an encoded word
token (=?iso-8859-7?Q??= would be an invalid token).
(header_address_fold): New function to wrap address headers -
header_fold() was force-wrapping rfc2047 encoded words which was
making the test suite fail. The *real* solution, however, is to
not create rfc2047 encoded words longer than 72 chars.

23 years agoSince we want an error opening a folder to result in the message being
Jeffrey Stedfast [Tue, 26 Jun 2001 22:45:16 +0000 (22:45 +0000)]
Since we want an error opening a folder to result in the message being

2001-06-26  Jeffrey Stedfast  <fejj@ximian.com>

* camel-filter-driver.c (open_folder): Since we want an error
opening a folder to result in the message being copied to Inbox
(assuming no other filters get a chance to `move` it), don't
record any exceptions that may occur in this function.

23 years agolock the cache around accesses
Dan Winship [Tue, 26 Jun 2001 19:20:01 +0000 (19:20 +0000)]
lock the cache around accesses

* providers/imap/camel-imap-folder.c (camel_imap_folder_selected,
imap_append_offline, imap_append_online,
camel_imap_folder_changed): lock the cache around accesses

* providers/imap/camel-imap-store.c (get_folder_online): ref the
newly-created folder (as current_folder) before calling
camel_imap_folder_selected, in case that needs to do something
that causes another folder to become current...

23 years agoD'oh. s/FALSE/CAMEL_URL_HIDE_PASSWORD/
Dan Winship [Tue, 26 Jun 2001 17:50:48 +0000 (17:50 +0000)]
D'oh. s/FALSE/CAMEL_URL_HIDE_PASSWORD/

        * camel-service.c (camel_service_get_url): D'oh.
        s/FALSE/CAMEL_URL_HIDE_PASSWORD/

23 years agoconstify args
Dan Winship [Tue, 26 Jun 2001 16:50:46 +0000 (16:50 +0000)]
constify args

* camel-url.c (camel_url_encode): constify args

23 years agog_strdup() the message source here or we will have problems later when we
Jeffrey Stedfast [Tue, 26 Jun 2001 00:18:23 +0000 (00:18 +0000)]
g_strdup() the message source here or we will have problems later when we

2001-06-25  Jeffrey Stedfast  <fejj@ximian.com>

* camel-filter-search.c (get_source): g_strdup() the message
source here or we will have problems later when we go to free the
result ;-)

23 years agoFix this: IMAP doesn't allow an extra argument to AUTHENTICATE to avoid a
Dan Winship [Mon, 25 Jun 2001 15:40:30 +0000 (15:40 +0000)]
Fix this: IMAP doesn't allow an extra argument to AUTHENTICATE to avoid a

* providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP
doesn't allow an extra argument to AUTHENTICATE to avoid a useless
round trip like some other SASL bindings do.

* providers/imap/camel-imap-command.c (imap_read_response): Deal
with IMAP servers that (incorrectly) return "+\r\n" rather than
"+ \r\n" for an empty continuation response.
(camel_imap_response_extract_continuation): Likewise.

23 years agoUpdate the copyrights, replacing Helix Code with Ximian and
Ettore Perazzoli [Sat, 23 Jun 2001 08:51:31 +0000 (08:51 +0000)]
Update the copyrights, replacing Helix Code with Ximian and
helixcode.com with ximian.com all over the place.

23 years agoNew function that decides if 2 word types are mergeable. An atom and a
Jeffrey Stedfast [Thu, 21 Jun 2001 19:53:47 +0000 (19:53 +0000)]
New function that decides if 2 word types are mergeable. An atom and a

2001-06-21  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c (word_types_compatable): New function that
decides if 2 word types are mergeable. An atom and a qstring are
mergeable; 2 qstrings are mergeable; and 2 encoded words are
mergeable.
(header_encode_phrase_merge_words): If 2 words are merged, the new
word type is the MAX of the combined types. This means that if we
merge a qstring and an atom, the resulting word type is a
qstring.

* camel-internet-address.c (internet_format):
s/g_string_sprintfa/g_string_append since this makes more sense in
this particular case.
(internet_encode): Same here.

23 years agoUse camel_address_length() rather than casting and accessing data members.
Jeffrey Stedfast [Thu, 21 Jun 2001 17:19:00 +0000 (17:19 +0000)]
Use camel_address_length() rather than casting and accessing data members.

2001-06-21  Jeffrey Stedfast  <fejj@ximian.com>

* providers/smtp/camel-smtp-transport.c (smtp_send): Use
camel_address_length() rather than casting and accessing data
members.

23 years agoIf the first char of the mailing-list name is '<', chop it off to make
Jeffrey Stedfast [Wed, 20 Jun 2001 19:46:58 +0000 (19:46 +0000)]
If the first char of the mailing-list name is '<', chop it off to make

2001-06-20  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c (header_raw_check_mailing_list): If the first
char of the mailing-list name is '<', chop it off to make Ettore
happy. Fixes bug #2153.

23 years agoupdated .cvsignore to ignore camel-lock-helper
Jeffrey Stedfast [Tue, 19 Jun 2001 18:51:01 +0000 (18:51 +0000)]
updated .cvsignore to ignore camel-lock-helper

23 years agoFixed a bug when not running setuid it wouldn't unlock.
Not Zed [Tue, 19 Jun 2001 14:21:05 +0000 (14:21 +0000)]
Fixed a bug when not running setuid it wouldn't unlock.

2001-06-19  Not Zed  <NotZed@Ximian.com>

        * camel-lock-helper.c (unlock_id): Fixed a bug when not running
        setuid it wouldn't unlock.

        * camel-movemail.c (camel_movemail): use new
        locking daemon, also return an error code.

23 years agoNote: Except for the info_free(), the NULL checks are g_return's. I felt
Jeffrey Stedfast [Mon, 18 Jun 2001 21:08:19 +0000 (21:08 +0000)]
Note: Except for the info_free(), the NULL checks are g_return's. I felt

2001-06-18  Jeffrey Stedfast  <fejj@ximian.com>

Note: Except for the info_free(), the NULL checks are
g_return's. I felt that since g_free() handles NULL that our
_free() functions should also.

* camel-folder.c (camel_folder_change_info_free): Check to make
sure that the info pointer isn't NULL.
(camel_folder_change_info_change_uid): Same.
(camel_folder_change_info_changed): Same.
(camel_folder_change_info_remove_uid): Same.
(camel_folder_change_info_add_uid): Same.
(camel_folder_change_info_build_diff): Same.
(camel_folder_change_info_cat): Same.
(camel_folder_change_info_add_source): Same.
(camel_folder_change_info_add_source_list): Same.
(camel_folder_change_info_add_update): Same.
(camel_folder_change_info_add_update_list): Same.

23 years agoRemove DB3_LDADD
Dan Winship [Mon, 18 Jun 2001 20:07:35 +0000 (20:07 +0000)]
Remove DB3_LDADD

* tests/stream/Makefile.am (LDADD):
* tests/smime/Makefile.am (LDADD):
* tests/misc/Makefile.am (LDADD):
* tests/message/Makefile.am (LDADD):
* tests/folder/Makefile.am (LDADD): Remove DB3_LDADD

23 years agoSet camel-lock-help setgid or setuid as needed
Dan Winship [Mon, 18 Jun 2001 18:17:19 +0000 (18:17 +0000)]
Set camel-lock-help setgid or setuid as needed

* Makefile.am (install-exec-local): Set camel-lock-help setgid or
setuid as needed

23 years agoOnly create a missing uid if we have indexing turned on.
Not Zed [Mon, 18 Jun 2001 14:36:44 +0000 (14:36 +0000)]
Only create a missing uid if we have indexing turned on.

2001-06-18  Not Zed  <NotZed@Ximian.com>

        * camel-folder-summary.c
        (camel_folder_summary_info_new_from_parser): Only create a missing
        uid if we have indexing turned on.

        * camel-lock-helper.c (setup_process): Function to setup
        process/sanity/security checks.  Change to the real uid as soon as
        we can.
        (lock_path): First try to lock as the real uid, if that fails, try
        the root uid.
        (unlock_id): Unlock as the uid we created the lock as.

        * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper
        location.

        * providers/local/camel-spool-folder.c (spool_lock): Implemented,
        using lock helper locking.  Need to work out if the locking
        requires a root created lock?
        (spool_unlock): Likewise.

2001-06-15  Not Zed  <NotZed@Ximian.com>

        * camel-lock-helper.c: Setuid Lock helper process.  Creates and manages
        .locks, keeping them active, removing them, etc.  What real perms it
        needs is a little system dependent.

2001-06-14  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-maildir-store.c (get_folder_info): Implement.
        (scan_dir): Does the work of scanning for maildir directories.

2001-06-13  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-spool-store.c (get_folder_info):
        Implemented, just returns a hardcoded INBOX folder.
        (free_folder_info): implemented, free's the 1 possible level of
        folder info.

        * providers/local/camel-spool-folder.c
        (camel_spool_folder_construct): Set the real unread message
        count on the folder_created thing.

23 years agoReturn the largest real UID in the cache (as an integer). Eventually to be
Dan Winship [Fri, 15 Jun 2001 18:47:04 +0000 (18:47 +0000)]
Return the largest real UID in the cache (as an integer). Eventually to be

* providers/imap/camel-imap-message-cache.c
(camel_imap_message_cache_max_uid): Return the largest real UID in
the cache (as an integer). Eventually to be used for an
optimization in the new-message fetch code.
(cache_put): Keep track of max_uid.

23 years agoAdded Mailing-List header regex so that we can do mlist magic on that
Jeffrey Stedfast [Thu, 14 Jun 2001 22:32:35 +0000 (22:32 +0000)]
Added Mailing-List header regex so that we can do mlist magic on that

2001-06-14  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c: Added Mailing-List header regex so that we
can do mlist magic on that header.

23 years agoProperly handle correct and incorrect (for the common case, ie Outlook and
Jeffrey Stedfast [Thu, 14 Jun 2001 22:24:59 +0000 (22:24 +0000)]
Properly handle correct and incorrect (for the common case, ie Outlook and

2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c (header_decode_param): Properly handle
correct and incorrect (for the common case, ie Outlook and
Netscape/Mozilla) rfc2184 values.
(header_decode_rfc2184_param): Get the param name and see if we
should expect a rfc2184 parameter value.
(rfc2184_decode): Decode a rfc2184 value.
(hex_decode): hex decode a string.
(header_decode_param_list): Handle rfc2184 encoded parameters (ie
parameters that have been split and perhaps encoded).
(header_param_list_format_append): Encode the value before seeing
if it will fit on the line. If the value does get encoded, be sure
to put a '*' before the equal-sign.
(header_encode_param): New function to rfc2184 encode a parameter
value (maybe it should be renamed?)

apparently with my last commit, I had also commit'd this but didn't realise it.

23 years agoDon't try to format the Reply-To header - we don't want to wrap the
Jeffrey Stedfast [Thu, 14 Jun 2001 17:16:33 +0000 (17:16 +0000)]
Don't try to format the Reply-To header - we don't want to wrap the

2001-06-14  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-part.c (init_header_name_table): Don't try to format
the Reply-To header - we don't want to wrap the reply-to address.

23 years agoA new provider, for spool mailboxes. Mostly a cut and paste of the mbox
Not Zed [Tue, 12 Jun 2001 14:29:28 +0000 (14:29 +0000)]
A new provider, for spool mailboxes. Mostly a cut and paste of the mbox

2001-06-12  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-spool-*.[ch]: A new provider, for spool
        mailboxes.  Mostly a cut and paste of the mbox code, but not a
        subclass CamelLocal*.  Not tested a lot, doesn't lock yet, use
        with extreme caution.

        * tests/lib/folders.c (test_folder_message_ops): Added spool arg,
        spool folders can't be deleted, renamed, etc.
        (test_folder_basic): Same.

        * tests/folder/test2.c (main): Added checks for spool type.

        * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD):
        Added db3 flags, so make check compiles, doesn't run though.

2001-05-24  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-local-provider.c
        (camel_provider_module_init): Added spool provider.

23 years agoAdd a separator between the service url and the folder name, if needed.
Jon Trowbridge [Fri, 8 Jun 2001 00:41:40 +0000 (00:41 +0000)]
Add a separator between the service url and the folder name, if needed.

2001-06-07  Jon Trowbridge  <trow@ximian.com>

* camel-filter-driver.c (camel_filter_driver_filter_folder): Add a
separator between the service url and the folder name, if needed.

23 years agoAdded an argument, so that the original source URI of the mbox can be
Jon Trowbridge [Fri, 8 Jun 2001 00:12:52 +0000 (00:12 +0000)]
Added an argument, so that the original source URI of the mbox can be

2001-06-07  Jon Trowbridge  <trow@ximian.com>

        * camel-filter-driver.c (camel_filter_driver_filter_mbox): Added
        an argument, so that the original source URI of the mbox can be
        passed in.  This is needed because this function is called
        post-movemail, so we are never reading from the original mbox
        anymore.  Without the original mbox URI, the X-Evolution-Source
        tag gets set incorrectly and filter-on-source will fail to work.
        (camel_filter_driver_filter_message): Also take an extra arg
        for the original source URI.  It is the original URI, not the
        source URI, that is used for filtering and for setting the
        X-Evolution-Source tag.

2001-06-07  Jon Trowbridge  <trow@ximian.com>

        * mail-ops.c (fetch_mail_fetch): Pass the original source URI
        to camel_filter_driver_filter_mbox.
        (mail_send_message): Pass NULL as the orginal source URI
        to camel_filter_driver_filter_message.

23 years agoDon't fetch the UID and FLAGS of messages we don't know about yet, since
Dan Winship [Wed, 6 Jun 2001 14:30:42 +0000 (14:30 +0000)]
Don't fetch the UID and FLAGS of messages we don't know about yet, since

* providers/imap/camel-imap-folder.c (imap_rescan): Don't fetch
the UID and FLAGS of messages we don't know about yet, since
they'll just get discarded.

23 years agoFix to not get into a recursive loop in get_type().
Jeffrey Stedfast [Sat, 2 Jun 2001 21:06:42 +0000 (21:06 +0000)]
Fix to not get into a recursive loop in get_type().

2001-06-01  Jeffrey Stedfast  <fejj@ximian.com>

* tests/smime/pgp.c: Fix to not get into a recursive loop in
get_type().

* tests/smime/pgp-mime.c: Same.

23 years agoNumerous fixes to get it to compile.
Jeffrey Stedfast [Thu, 31 May 2001 22:30:06 +0000 (22:30 +0000)]
Numerous fixes to get it to compile.

2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>

* camel-smime-context.c: Numerous fixes to get it to compile.

23 years agoAdded camel-cipher-context.h, camel-cms-context.h, camel-smime-context.h,
Jeffrey Stedfast [Thu, 31 May 2001 20:41:00 +0000 (20:41 +0000)]
Added camel-cipher-context.h, camel-cms-context.h, camel-smime-context.h,

2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>

* camel.h: Added camel-cipher-context.h, camel-cms-context.h,
camel-smime-context.h, and camel-smime-utils.h

23 years agoNew virtual class for manipulating cryptographic message syntax messages
Jeffrey Stedfast [Thu, 31 May 2001 20:15:35 +0000 (20:15 +0000)]
New virtual class for manipulating cryptographic message syntax messages

2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>

* camel-cms-context.[c,h]: New virtual class for manipulating
cryptographic message syntax messages (like S/MIME).

* camel-smime-context.[c,h]: Modified to inherit from the
CamelCMSContext class rather than the CamelCipherContext class.

* camel-smime.[c,h]: Removed - just use camel-smime-context
directly.

* camel-smime-utils.[c,h]: New source files. Moved the 2 useful
functions from camel-smime.[c,h] into here.

23 years agoRedo the BUILD_MAP code to not depend on libunicode. Now it only generates
Dan Winship [Wed, 30 May 2001 21:32:18 +0000 (21:32 +0000)]
Redo the BUILD_MAP code to not depend on libunicode. Now it only generates

* camel-charset-map.c: Redo the BUILD_MAP code to not depend on
libunicode. Now it only generates a map of "popular" 8bit
encodings. (It's not worthwhile to support obscure encodings,
because any mailer that supports them will support UTF8 too. And
Chinese and Japanese use mostly the same UTF8 characters so you
need to decide between those encodings based on the locale or
the charset of the message you're replying to or the input
method you used. So this is sufficient for camel_charset_best's
use.)

* camel-charset-map-private.h: Regenerated.

* camel.c (camel_shutdown): Move #ifdefs around to prevent a
warning.

23 years agoFix an obvious typo
Dan Winship [Tue, 29 May 2001 21:07:11 +0000 (21:07 +0000)]
Fix an obvious typo

23 years agoRemove this evolutionary dead end
Dan Winship [Tue, 29 May 2001 17:10:11 +0000 (17:10 +0000)]
Remove this evolutionary dead end

23 years agoCreate a CamelDiscoDiary. (imap_disconnect_offline): And free it.
Dan Winship [Tue, 29 May 2001 17:09:12 +0000 (17:09 +0000)]
Create a CamelDiscoDiary. (imap_disconnect_offline): And free it.

* providers/imap/camel-imap-store.c (imap_connect_online,
imap_connect_offline): Create a CamelDiscoDiary.
(imap_disconnect_offline): And free it.

* providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
If RESYNCING, don't do any sort of checking that the remote folder
matches the summary, beyond making sure that the UIDVALIDITY is
correct.
(imap_rescan): Add a missing camel_folder_summary_info_free when
removing a UID from the summary.
(imap_expunge_uids_offline): Implement. Fairly simple.
(imap_expunge_uids_resyncing): Implement. If the store supports
UIDPLUS, we can just use imap_expunge_uids_online. If not, we need
to temporarily undelete any messages marked deleted on the server
that aren't supposed to get expunged.
(imap_append_offline): Implement, using cache and summary
operations, and triggering the folder_changed event by hand.
(imap_append_resyncing): Implement. Redo imap_append_online a bit
in the process to make them able to share more code.
(imap_copy_offline): Implement.
(imap_copy_online): Move parts of this out into a helper.
(imap_copy_resyncing): Implement. In most cases this is just like
imap_copy_online, but if you are copying a message that was itself
copied or appended into the folder, and the server doesn't do
UIDPLUS, it will be necessary to replace at least part of the copy
operation with one or more appends.

* providers/imap/camel-imap-command.c (imap_read_response): Don't
record the current folder in the response when in RESYNCING mode.
(This means that EXISTS and EXPUNGE responses won't be processed,
which is needed because the summary may not match the folder at
this point.)
(imap_read_response): On error, call
camel_imap_response_free_without_processing, not
camel_imap_response_free.

* providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make
this work better when operating on UIDs that aren't in the summary.

* providers/imap/camel-imap-summary.c
(camel_imap_summary_add_offline): New routine used by
imap_append_offline and imap_copy_offline to create new summary
entries.

23 years agoCode for logging and replaying offline operations.
Dan Winship [Tue, 29 May 2001 17:08:53 +0000 (17:08 +0000)]
Code for logging and replaying offline operations.

* camel-disco-diary.c: Code for logging and replaying offline
operations.

* camel-disco-store.c (disco_construct): Set disco->status here
(where we can base it on the session's offline status) rather than
at init time.
(disco_connect): If we connect online and have a non-empty diary,
switch to RESYNCING mode and replay the diary to the server.
(disco_get_folder, disco_get_folder_info): Add _resyncing
variants.

* camel-disco-folder.c (disco_sync, disco_expunge_uids,
disco_append_message, disco_copy_messages_to,
disco_move_messages_to): Add _resyncing variants to switches.
(disco_expunge_uids, disco_append_message, disco_copy_messages_to,
disco_move_messages_to): Remove #ifdef'ed out diary code: let the
provider do it.
(disco_append_message): Redo the append methods to no longer
return the UID, since we're no longer doing the logging from here.

23 years agoUse g_strcasecmp() because some systems don't have strcasecmp(). Also,
Jeffrey Stedfast [Mon, 28 May 2001 18:47:24 +0000 (18:47 +0000)]
Use g_strcasecmp() because some systems don't have strcasecmp(). Also,

2001-05-28  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c (header_set_param): Use g_strcasecmp()
because some systems don't have strcasecmp(). Also, when removing
a param, make sure to free the param->name too.

23 years agochangelog entries for tests/ fixes committed yesterday
Dan Winship [Mon, 28 May 2001 18:30:23 +0000 (18:30 +0000)]
changelog entries for tests/ fixes committed yesterday

23 years agoFix an fd leak
Dan Winship [Sun, 27 May 2001 19:52:07 +0000 (19:52 +0000)]
Fix an fd leak

* tests/lib/messages.c (test_message_read_file): Fix an fd leak

* tests/lib/session.c, tests/lib/session.h: a CamelSession
subclass for the test programs.

* tests/lib/Makefile.am: include session.[ch]

* tests/folder/test*.c: Use a CamelTestSession from libcameltest
instead of cut+pasting everywhere.

* tests/misc/url.c (main): Update for a camel_url_new change at
some point.

* tests/*/.cvsignore: Add stuff.

* camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!=
mixup.

23 years agoAdd a "need_rescan" flag saying if we want to rescan the entire folder for
Dan Winship [Sat, 26 May 2001 17:17:10 +0000 (17:17 +0000)]
Add a "need_rescan" flag saying if we want to rescan the entire folder for

* providers/imap/camel-imap-folder.c: Add a "need_rescan" flag
saying if we want to rescan the entire folder for flag changes
next time it's selected.
(camel_imap_folder_init): Set need_rescan TRUE.
(camel_imap_folder_selected): If need_rescan is TRUE, call
imap_rescan.
(imap_refresh_info): Only do a full rescan if need_rescan is TRUE.
Otherwise just do a NOOP, making this a MUCH more lightweight
operation. Also, don't call imap_rescan directly if the folder
isn't selected, since that could end up causing the folder to be
scanned *twice* (imap_rescan -> camel_imap_command ->
camel_imap_folder_selected -> imap_rescan).
(imap_rescan): Set need_rescan FALSE.
(imap_sync_online): Don't NOOP if no changes were pushed: the
caller will call refresh_info if it wants to poll for changes.
Fixes evolution-mail doing lots of unnecessary extra work at
quit time.

23 years agoOops. Use a strNcmp to make sure the response begins with a 334 code, not
Jeffrey Stedfast [Fri, 25 May 2001 22:15:01 +0000 (22:15 +0000)]
Oops. Use a strNcmp to make sure the response begins with a 334 code, not

2001-05-25  Jeffrey Stedfast  <fejj@ximian.com>

* providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a
strNcmp to make sure the response begins with a 334 code, not a
strcmp. Duh.

23 years agoremove the summary info so we are not out-of-sync with the maildir folder.
Jeffrey Stedfast [Fri, 25 May 2001 19:58:37 +0000 (19:58 +0000)]
remove the summary info so we are not out-of-sync with the maildir folder.

2001-05-25  Jeffrey Stedfast  <fejj@ximian.com>

* providers/local/camel-maildir-folder.c (maildir_append_message):
remove the summary info so we are not out-of-sync with the maildir
folder.

* providers/local/camel-mh-folder.c (mh_append_message): remove
the summary info so we are not out-of-sync with the mh folder.

* providers/local/camel-mbox-folder.c (mbox_append_message):
remove the summary info so we are not out-of-sync with the mbox.

23 years agoOops, I spelled the get-default-db function name wrong.
Jeffrey Stedfast [Fri, 25 May 2001 01:12:26 +0000 (01:12 +0000)]
Oops, I spelled the get-default-db function name wrong.

2001-05-24  Jeffrey Stedfast  <fejj@ximian.com>

* camel-smime-context.c (camel_smime_context_new): Oops, I spelled
the get-default-db function name wrong.

23 years agos/folder_deleted/folder_created - result of a bad copy/paste.
Jeffrey Stedfast [Thu, 24 May 2001 02:08:59 +0000 (02:08 +0000)]
s/folder_deleted/folder_created - result of a bad copy/paste.

2001-05-23  Jeffrey Stedfast  <fejj@ximian.com>

* providers/local/camel-local-folder.c
(camel_local_folder_construct): s/folder_deleted/folder_created -
result of a bad copy/paste.

23 years agoOptimize the match "" case.
Jeffrey Stedfast [Thu, 24 May 2001 01:04:38 +0000 (01:04 +0000)]
Optimize the match "" case.

2001-05-23  Jeffrey Stedfast  <fejj@ximian.com>

* providers/imap/camel-imap-search.c (imap_body_contains):
Optimize the match "" case.

23 years agoStore the CamelFolderInfo tree that was returned from
Jeffrey Stedfast [Mon, 21 May 2001 22:53:15 +0000 (22:53 +0000)]
Store the CamelFolderInfo tree that was returned from

2001-05-21  Jeffrey Stedfast  <fejj@ximian.com>

* providers/imap/camel-imap-store.c (get_folder_info_online):
Store the CamelFolderInfo tree that was returned from
camel_folder_info_build() in a new variable, 'tree', rather than
'fi' since we later use 'fi' when syncing folders. Not only does
this fix a memory leak, but it also fixes the bug where the user
would only see the last folder in the folder list and/or it's
subfolders.

23 years agoThe service can be NULL here too, thanks to Wayne Davis for pointing this
Jeffrey Stedfast [Thu, 17 May 2001 00:34:02 +0000 (00:34 +0000)]
The service can be NULL here too, thanks to Wayne Davis for pointing this

2001-05-16  Jeffrey Stedfast  <fejj@ximian.com>

* camel-session.c (camel_session_forget_password): The service can
be NULL here too, thanks to Wayne Davis for pointing this out.

23 years agoWe don't need to be passed the certdb path anymore.
Jeffrey Stedfast [Wed, 16 May 2001 21:23:20 +0000 (21:23 +0000)]
We don't need to be passed the certdb path anymore.

2001-05-16  Jeffrey Stedfast  <fejj@ximian.com>

* camel-smime-context.c (camel_smime_context_new): We don't need
to be passed the certdb path anymore.

23 years agoNew function to return an array of all headers.
Dan Winship [Wed, 16 May 2001 18:23:15 +0000 (18:23 +0000)]
New function to return an array of all headers.

* camel-medium.c (camel_medium_get_headers): New function to
return an array of all headers.
(camel_medium_free_headers): And free them.

* camel-mime-part.c (get_headers, free_headers): Implement this
for CamelMimePart. (Works for CamelMimeMessage too.)

23 years agoDon't close or free (it wasn't allocated) the certdb.
Jeffrey Stedfast [Tue, 15 May 2001 20:14:00 +0000 (20:14 +0000)]
Don't close or free (it wasn't allocated) the certdb.

2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>

* camel-smime-context.c (camel_smime_context_finalise): Don't
close or free (it wasn't allocated) the certdb.
(camel_smime_context_new): If we get a NULL certdb handle, then
don't bother trying to create a new certdb handle since NSS_Init*
should have done that.

23 years agoDon't use EXTRA_GNOME_*, use the new CAMEL_* variables so we don't link in
Jeffrey Stedfast [Tue, 15 May 2001 19:09:03 +0000 (19:09 +0000)]
Don't use EXTRA_GNOME_*, use the new CAMEL_* variables so we don't link in

2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>

* Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_*
variables so we don't link in tons of extra cruft that we don't
need.

23 years agoAdded t the test suite - tests the S/MIME pkcs7 functions.
Jeffrey Stedfast [Tue, 15 May 2001 18:37:37 +0000 (18:37 +0000)]
Added t the test suite - tests the S/MIME pkcs7 functions.

2001-05-15  Jeffrey Stedfast  <fejj@ximian.com>

* tests/smime/pkcs7.c: Added t the test suite - tests the S/MIME
pkcs7 functions.

23 years agoLots of fixes to get this to compile.
Jeffrey Stedfast [Mon, 14 May 2001 22:38:28 +0000 (22:38 +0000)]
Lots of fixes to get this to compile.

2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>

* camel-smime-context.c: Lots of fixes to get this to compile.

23 years agobah, just mod the pgp-context macro for camel_pgp_verify so that we don't have to...
Jeffrey Stedfast [Mon, 14 May 2001 22:27:29 +0000 (22:27 +0000)]
bah, just mod the pgp-context macro for camel_pgp_verify so that we don't have to pass in a useless value.

23 years agoLots of fixes to get this to almost compile. Still struggling with the
Jeffrey Stedfast [Mon, 14 May 2001 22:25:02 +0000 (22:25 +0000)]
Lots of fixes to get this to almost compile. Still struggling with the

2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>

* camel-smime-context.c: Lots of fixes to get this to almost
compile. Still struggling with the fact that CERTCertDBHandle is
an "incomplete type". *sigh*.

* camel-smime.c (camel_smime_part_verify): Updated to pass in a
hash argument to camel_smime_verify().

* camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according
to the changes in the context API.

* camel-pgp-context.c (pgp_verify): Updated to take a
CamelCipherHash argument.

* camel-cipher-context.c (camel_cipher_verify): Now takes a hash
argument since the S/MIME code needs this.

23 years agoAdd camel-smime-context.[c,h] and camel-smime.[c,h] to the build.
Jeffrey Stedfast [Mon, 14 May 2001 21:14:34 +0000 (21:14 +0000)]
Add camel-smime-context.[c,h] and camel-smime.[c,h] to the build.

2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>

* Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h]
to the build.

* camel-smime.[c,h]: New source files for manipulating S/MIME
message parts.

23 years agoReplicate the semantics of the libunicode utf8 functions by returning NULL
Jon Trowbridge [Mon, 14 May 2001 21:04:34 +0000 (21:04 +0000)]
Replicate the semantics of the libunicode utf8 functions by returning NULL

2001-05-14  Jon Trowbridge  <trow@ximian.com>

        * camel-search-private.c (utf8_get): Replicate the semantics of
        the libunicode utf8 functions by returning NULL in the arg
        on invalid utf8.

        * camel-pgp-context.c (pgp_verify): Check for valid utf8,
        terminate loop if something looks wrong.

        * camel-mime-utils.c (header_encode_phrase_get_words): Properly
        check for invalid utf8.
        (header_encode_string): Properly check for invalid utf8.

        * camel-charset-map.c (camel_charset_step): Properly check for
        invalid utf8.

2001-05-14  Jon Trowbridge  <trow@ximian.com>

        * e-html-utils.c (is_citation): Check for bad utf8.

23 years agoSubclass CamelSession since we can no longer specify the passwd callback
Jeffrey Stedfast [Mon, 14 May 2001 20:08:25 +0000 (20:08 +0000)]
Subclass CamelSession since we can no longer specify the passwd callback

2001-05-14  Jeffrey Stedfast  <fejj@ximian.com>

* tests/folder/test9.c:
* tests/folder/test8.c:
* tests/folder/test7.c:
* tests/folder/test6.c:
* tests/folder/test5.c:
* tests/folder/test4.c:
* tests/folder/test3.c:
* tests/folder/test2.c:
* tests/folder/test1.c:
* tests/smime/pgp-mime.c:
* tests/smime/pgp.c: Subclass CamelSession since we can no longer
specify the passwd callback any other way and update code
accordingly.

23 years agoer, OptionSet
Jeffrey Stedfast [Sun, 13 May 2001 01:44:16 +0000 (01:44 +0000)]
er, OptionSet

23 years agos/SSL_Enable/SSL_SetOption
Jeffrey Stedfast [Sun, 13 May 2001 01:42:48 +0000 (01:42 +0000)]
s/SSL_Enable/SSL_SetOption

23 years agoDecode Content-Location, either correctly or Netscape-generated-brokenly.
Dan Winship [Fri, 11 May 2001 20:57:26 +0000 (20:57 +0000)]
Decode Content-Location, either correctly or Netscape-generated-brokenly.

* camel-mime-utils.c (header_location_decode): Decode
Content-Location, either correctly or Netscape-generated-brokenly.

* camel-mime-part.c (camel_mime_part_set_content_location,
camel_mime_part_get_content_location, etc): Deal with
Content-Location header.

23 years agoDon't check the initial auth response until we get into the while-loop
Jeffrey Stedfast [Fri, 11 May 2001 20:34:10 +0000 (20:34 +0000)]
Don't check the initial auth response until we get into the while-loop

2001-05-11  Jeffrey Stedfast  <fejj@ximian.com>

* providers/smtp/camel-smtp-transport.c (smtp_auth): Don't check
the initial auth response until we get into the while-loop
otherwise we have problems if the SASL mechanism supported a
client initiated challenge (like PLAIN and LOGIN do).

23 years agoMake this return CamelStream * (like the other stream new functions)
Dan Winship [Fri, 11 May 2001 17:32:02 +0000 (17:32 +0000)]
Make this return CamelStream * (like the other stream new functions)

* camel-stream-null.c (camel_stream_null_new): Make this return
CamelStream * (like the other stream new functions) instead of
CamelStreamNull *

23 years agocall SSL_Enable after the SSL_ImportFD and before PR_Connect. Otherwise,
Chris Toshok [Thu, 10 May 2001 22:03:08 +0000 (22:03 +0000)]
call SSL_Enable after the SSL_ImportFD and before PR_Connect. Otherwise,

2001-05-10  Chris Toshok  <toshok@ximian.com>

* camel-tcp-stream-ssl.c (stream_connect): call SSL_Enable after
the SSL_ImportFD and before PR_Connect.  Otherwise, NSS aborts
during the connect.