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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.)
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.
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.
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.
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.
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.
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.
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.
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.
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.
Jeffrey Stedfast [Sun, 13 May 2001 01:44:16 +0000 (01:44 +0000)]
er, OptionSet
Jeffrey Stedfast [Sun, 13 May 2001 01:42:48 +0000 (01:42 +0000)]
s/SSL_Enable/SSL_SetOption
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.
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).
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 *
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.
Jeffrey Stedfast [Thu, 10 May 2001 20:42:22 +0000 (20:42 +0000)]
Don't abort if the Service is NULL, this is perfectly valid for cipher
2001-05-10 Jeffrey Stedfast <fejj@ximian.com>
* camel-session.c (camel_session_get_password): Don't abort if the
Service is NULL, this is perfectly valid for cipher contexts.
Peter Williams [Thu, 10 May 2001 02:51:20 +0000 (02:51 +0000)]
Pass appropriate parameters to CF_CLASS and add comment explaining why my
2001-05-09 Peter Williams <peterw@ximian.com>
* providers/imap/camel-imap-folder.c (imap_move_messages_to): Pass
appropriate parameters to CF_CLASS and add comment explaining why
my initial attempt at a solution didn't work.
Dan Winship [Wed, 9 May 2001 21:57:32 +0000 (21:57 +0000)]
Set the disconnected status. (camel_disco_store_can_work_offline): Return
* camel-disco-store.c (camel_disco_set_status): Set the
disconnected status.
(camel_disco_store_can_work_offline): Return whether or not a
given CamelDiscoStore can work offline or not.
* camel-disco-folder.c (camel_disco_folder_cache_message):
Explicitly tell a folder to cache a message. (Better than using
get_message, because for IMAP that doesn't guarantee you'll get
all the message parts.)
(camel_disco_folder_prepare_for_offline): Prepare a folder for
offline use by caching all messages meeting given search criteria
(and doing anything else the particular folder implementation
needs).
* camel-session.c (camel_session_set_online,
camel_session_is_online): A session-wide online/offline toggle.
(camel_session_init): Set online to TRUE.
* providers/imap/camel-imap-store.c (can_work_offline):
Implementation of CamelDiscoStore::can_work_offline. (Checks that
the store has been used online at least once.)
(imap_get_folder_online, imap_get_folder_offline): Deal with
request for "inbox" properly. ("Don't you mean... 'INBOX'?").
* providers/imap/camel-imap-folder.c (imap_cache_message):
Implementation of CamelDiscoFolder::cache_message.
* camel.h: Add camel-disco-store.h and camel-disco-folder.h
Dan Winship [Wed, 9 May 2001 21:55:57 +0000 (21:55 +0000)]
remove something jeff didn't mean to commit
Jeffrey Stedfast [Wed, 9 May 2001 20:17:12 +0000 (20:17 +0000)]
Wrap the content-id with <>'s.
2001-05-09 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-part.c (camel_mime_part_set_content_id): Wrap the
content-id with <>'s.
Jeffrey Stedfast [Mon, 7 May 2001 20:33:25 +0000 (20:33 +0000)]
Add support for using OpenSSL.
2001-05-04 Jeffrey Stedfast <fejj@ximian.com>
* providers/smtp/camel-smtp-transport.c (connect_to_server): Add
support for using OpenSSL.
* camel-remote-store.c (remote_connect): Add support for using the
OpenSSL implementation.
* camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a
NULL as the last argument to alert_user - prototype doesn't take
that argument anymore?
* camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
(ssl_verify): Use a global hash table to try and lookup the
CamelTcpStreamOpenSSL object given the ssl context since OpenSSL
doesn't think one needs to pass data around, we should all be
living in a world of global variables, duh!
Dan Winship [Sun, 6 May 2001 15:33:36 +0000 (15:33 +0000)]
Fix another build problem. (Um, anyone else could have done this...)
* Makefile.am (libcamelinclude_HEADERS): Fix another build
problem. (Um, anyone else could have done this...)
Dan Winship [Fri, 4 May 2001 15:26:13 +0000 (15:26 +0000)]
Fix up refcounting on current_folder.
* providers/imap/camel-imap-store.c (get_folder_online): Fix up
refcounting on current_folder.
* camel-disco-folder.c, camel-disco-store.h: Remove
CamelDiscoDiary refs that weren't supposed to escape yet.
Dan Winship [Thu, 3 May 2001 20:52:59 +0000 (20:52 +0000)]
new abstract class for disconnectable remote stores
* camel-disco-store.c: new abstract class for disconnectable
remote stores
* camel-disco-folder.c: new abstract class for folders on
disconnectable stores.
* Makefile.am: Add camel-disco-folder.[ch] and
camel-disco-store.[ch].
* providers/imap/camel-imap-store.c: Make this a subclass of
CamelDiscoStore, and fix up the offline interfaces for the changes
since they were first written (particularly the fact that some
IMAP stores don't just use subscribed folders).
* providers/imap/camel-imap-folder.c: Make this a subclass of
CamelDiscoFolder, although most ops still fail in disconnected
mode.
* camel-store.c (camel_store_get_folder_info): Change gboolean,
gboolean, gboolean to guint32 in the prototype for this function.
* providers/local/camel-local-store.c (get_folder_info): Update
for prototype change.
Dan Winship [Wed, 2 May 2001 19:53:53 +0000 (19:53 +0000)]
Clean this up a bit. Add a "tag_prefix" member. Move "useful_lsub" into
* providers/imap/camel-imap-store.h: Clean this up a bit. Add a
"tag_prefix" member. Move "useful_lsub" into capabilities.
* providers/imap/camel-imap-store.c (camel_imap_store_init):
Initialize the tag_prefix, based on a static variable.
* providers/imap/camel-imap-command.c (camel_imap_command): Use
the store's tag_prefix character rather than "A" at the start of
the tag. Makes the verbose debug output easier to parse when
connected to multiple IMAP servers. (Well, unless you're connected
to more than 26 servers...)
Dan Winship [Wed, 2 May 2001 16:50:43 +0000 (16:50 +0000)]
Fix this up... it was losing count in some cases and giving a more verbose
* providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Fix
this up... it was losing count in some cases and giving a more
verbose answer than it needed to.
Dan Winship [Wed, 2 May 2001 13:53:21 +0000 (13:53 +0000)]
Rescue the KPOP code from bit rot.
* providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit
rot.
Anders Carlsson [Tue, 1 May 2001 19:44:45 +0000 (19:44 +0000)]
Remove the last argument from camel_session_alert_user.
2001-05-01 Anders Carlsson <andersca@codefactory.se>
* camel-tcp-stream-ssl.c (ssl_bad_cert): Remove the last argument from
camel_session_alert_user.
Dan Winship [Tue, 1 May 2001 19:16:14 +0000 (19:16 +0000)]
Redo command locking. Since command_lock is recursive, we can just get a
* providers/imap/camel-imap-command.c (camel_imap_command): Redo
command locking. Since command_lock is recursive, we can just get
a lock here, and release it either on error, or when the caller
frees the response data. (This simplifies a lot of stuff, and
fixes some problems with camel_imap_folder_changed being called
without the command_lock locked because of the 2001-03-22 change.)
(camel_imap_response_free):
(camel_imap_response_free_without_processing):
(camel_imap_response_extract):
(camel_imap_response_extract_continuation): These all take a
CamelImapStore now as well, to deal with locking.
* providers/imap/camel-imap-private.h: Add
CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can
be made to call e_mutex_assert_locked.
* providers/imap/camel-imap-folder.c, camel-imap-search.c,
camel-imap-store.c: Simplify using new locking stuff. Add a few
CAMEL_IMAP_STORE_ASSERT_LOCKED checks.
Dan Winship [Tue, 1 May 2001 15:44:06 +0000 (15:44 +0000)]
remove unused assignment that calls non-existent function.
Dan Winship [Tue, 1 May 2001 14:51:36 +0000 (14:51 +0000)]
Support the IMAP UIDPLUS extension (RFC 2359), which lets you
resync after disconnected operation more efficiently, but also
makes it possible to do appends and moves/copies more efficiently
now.
* providers/imap/camel-imap-folder.c (imap_append_message): If the
server supports UIDPLUS, grab the APPENDUID response and cache the
message into the folder's message cache.
(imap_copy_messages_to): Likewise, for COPYUID, copy any message
parts we have cached between the source and destination folder
caches.
(imap_get_message): If the entire message is already in the cache,
just return that rather than building it from parts.
(imap_update_summary): Fetch just the "UID FLAGS RFC822.SIZE" of
the new messages first, then only fetch the headers for messages
where we don't already have the headers cached.
* providers/imap/camel-imap-message-cache.c: Add gtk-doc comments.
(cache_put): Fix refcounting stuff here.
(camel_imap_message_cache_insert_stream,
camel_imap_message_cache_insert_wrapper): New.
(camel_imap_message_cache_get): Fix a bug here so the memory
caching actually works.
(camel_imap_message_cache_copy): New routine, used by
imap_copy_messages_to.
* providers/imap/camel-imap-utils.c (imap_uid_set_to_array):
Inverse operation of imap_uid_array_to_set. Used to parse COPYUID
response.
Dan Winship [Mon, 30 Apr 2001 18:13:45 +0000 (18:13 +0000)]
New-and-improved version of get_uid_set() from camel-imap-folder.c. Looks
* providers/imap/camel-imap-utils.c (imap_uid_array_to_set):
New-and-improved version of get_uid_set() from
camel-imap-folder.c. Looks at the summary as it goes so that if
you ask for messages 5, 6, 8, and 9, and there is no message 7,
then you get "5:9" instead of "5:6,8:9"
* providers/imap/camel-imap-folder.c (imap_copy_messages_to): Use
imap_uid_array_to_set() rather than get_uid_set().
(get_uid_set): Gone
Dan Winship [Fri, 27 Apr 2001 21:08:08 +0000 (21:08 +0000)]
Redo this a lot so that instead of having a class full of callbacks, we
* camel-session.c: Redo this a lot so that instead of having a
class full of callbacks, we have a subclassable class. Also,
replace the increasingly horrifying
camel_session_query_authenticator with three new routines,
camel_session_get_password, camel_session_forget_password, and
camel_session_alert_user.
* camel-pgp-context.c:
* camel-pkcs7-context.c:
* camel-smime-context.c:
* providers/imap/camel-imap-store.c:
* providers/pop3/camel-pop3-store.c:
* providers/smtp/camel-smtp-transport.c:
Use camel_session_get_password / camel_session_forget_password.
* camel-tcp-stream-ssl.c (ssl_bad_cert): Use
camel_session_alert_user.
Jeffrey Stedfast [Fri, 27 Apr 2001 00:16:41 +0000 (00:16 +0000)]
Automagically call camel_shutdown() atexit() ;-) (camel_init): Also
2001-04-26 Jeffrey Stedfast <fejj@ximian.com>
* camel.c (camel_init): Automagically call camel_shutdown()
atexit() ;-)
(camel_init): Also initialize NSS databases as read/write for
S/MIME and if NSS fails to init, try initializing with volatile
databases.
* camel-file-utils.h: #include <sys/types.h> for off_t.
Jeffrey Stedfast [Thu, 26 Apr 2001 20:19:48 +0000 (20:19 +0000)]
#include <sys/types.h> for off_t.
2001-04-26 Jeffrey Stedfast <fejj@ximian.com>
* camel-file-utils.h: #include <sys/types.h> for off_t.
Jeffrey Stedfast [Thu, 26 Apr 2001 20:09:28 +0000 (20:09 +0000)]
#include "nss.h" rather than <nss.h> due to the non-mozilla nss.h file living in /usr/include
Dan Winship [Thu, 26 Apr 2001 19:44:50 +0000 (19:44 +0000)]
New file, with the int, string, time_t, and off_t encode/decode routines
* camel-file-utils.c: New file, with the int, string, time_t, and
off_t encode/decode routines from camel-folder-summary.c moved
here and renamed, for the enjoyment of non-CamelFolderSummary
subclasses.
* Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c
(libcamelinclude_HEADERS): and camel-file-utils.h
* camel-folder-summary.c: Remove functions that were moved to
camel-file-utils.c, update uses of them for the new names.
(camel_folder_summary_{en,de}code_token are still here.)
* providers/local/camel-mbox-summary.c: Use camel_file_util_*
names
* providers/imap/camel-imap-summary.c: Use camel_file_util_* names
* providers/imap/camel-imap-store.c (imap_store_setup_online,
imap_store_setup_offline): Use camel_file_util_* names, which
makes much more sense since this isn't folder summary stuff.
Dan Winship [Thu, 26 Apr 2001 18:21:32 +0000 (18:21 +0000)]
Remove UNICODE_CFLAGS (and some other stuff that's redundant with
* Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other
stuff that's redundant with EXTRA_GNOME_CFLAGS)
(libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS.
* camel-search-private.c:
* camel-pgp-context.c:
* camel-mime-utils.c: Use gunicode interfaces rather than
libunicode.
* camel-charset-map.c: Use gunicode rather than libunicode. (The
charmap-regen code still depends on libunicode though.)
* camel-mime-filter-charset.h:
* tests/message/test2.c (convert): Use iconv rather than
unicode_iconv.
* providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD):
* providers/pop3/Makefile.am (libcamelpop3_la_LIBADD):
* providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove
UNICODE_LIBS.
* camel.c (camel_init): Remove call to unicode_init.
* camel-mime-parser.c: Remove unused unicode.h include.
Dan Winship [Thu, 26 Apr 2001 16:48:35 +0000 (16:48 +0000)]
Use e_gethostbyname_r. (camel_service_gethost): Remove unused var.
* camel-service.c (get_host): Use e_gethostbyname_r.
(camel_service_gethost): Remove unused var.
Not Zed [Thu, 26 Apr 2001 01:09:05 +0000 (01:09 +0000)]
Applied jacob's patches for e-poolv stuff.
2001-04-26 Not Zed <NotZed@Ximian.com>
* Applied jacob's patches for e-poolv stuff.
Jeffrey Stedfast [Tue, 24 Apr 2001 00:03:29 +0000 (00:03 +0000)]
Add camel-vee-folder.h and camel-digest-folder.h
2001-04-23 Jeffrey Stedfast <fejj@ximian.com>
* camel.h: Add camel-vee-folder.h and camel-digest-folder.h
* camel-digest-folder.[c,h]: New class that can be used to browse
a multipart/digest message as if it were a CamelFolder.
Jeffrey Stedfast [Tue, 24 Apr 2001 00:01:51 +0000 (00:01 +0000)]
New class that can be used to browse a multipart/digest message as if it
2001-04-23 Jeffrey Stedfast <fejj@ximian.com>
* camel-digest-folder.[c,h]: New class that can be used to browse
a multipart/digest message as if it were a CamelFolder.
Jeffrey Stedfast [Mon, 23 Apr 2001 00:20:19 +0000 (00:20 +0000)]
Oops, don't use the return value of iconv() as a string length, it only
2001-04-22 Jeffrey Stedfast <fejj@ximian.com>
* camel-pgp-context.c (pgp_verify): Oops, don't use the return
value of iconv() as a string length, it only tells us the number
of non-reversable character conversions. This fixes it so we
actually see the gpg output in the message viewer.
Mikael Hallendal [Mon, 23 Apr 2001 00:16:10 +0000 (00:16 +0000)]
Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.
2001-04-23 Mikael Hallendal <micke@codefactory.se>
* providers/nntp/Makefile.am (INCLUDES):
Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.
Jeffrey Stedfast [Fri, 20 Apr 2001 21:21:34 +0000 (21:21 +0000)]
Implemented using the secmime.h convenience functions. (smime_clearsign):
2001-04-20 Jeffrey Stedfast <fejj@ximian.com>
* camel-smime-context.c (smime_sign): Implemented using the
secmime.h convenience functions.
(smime_clearsign): We just error our here, there is no clearsign
for smime.
(smime_verify): Copied code over from the pkcs7 verify - same
state, ugly and unknown :-)
(smime_encrypt): Implemented using the secmime.h convenience
functions.
(smime_decrypt): Same as the code in pkcs7-context.
Jeffrey Stedfast [Thu, 19 Apr 2001 23:15:51 +0000 (23:15 +0000)]
Implemented. (pkcs7_clearsign): Implemented. (get_zero_len_passwd):
2001-04-19 Jeffrey Stedfast <fejj@ximian.com>
* camel-pkcs7-context.c (pkcs7_sign): Implemented.
(pkcs7_clearsign): Implemented.
(get_zero_len_passwd): Convenience function to try a 0-length key
on the certificate db - if this works then there is no need to
prompt the user.
(get_password): Callback to get the password.
(camel_cipher_hash_to_nss): Convenience function to convert a
CamelCipherHash to an NSS HASH_HashType.
(nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag.
(pkcs7_digest): Digest function for use with pkcs7_sign().
(sign_encode_cb): Callback to write the signed data to the output
stream.
(pkcs7_verify): Hacked on a bit more but am still a bit on the
confused side. This might work but I wouldn't hold my breath. The
sign/clearsign should be close if not correct, but this one...god
only knows.
(pkcs7_decrypt): Implemented.
(pkcs7_encrypt): Implemented (mostly, still need to handle when
'sign' is TRUE).
Jeffrey Stedfast [Thu, 19 Apr 2001 19:38:40 +0000 (19:38 +0000)]
Implemented. (pkcs7_clearsign): Implemented. (get_zero_len_passwd):
2001-04-19 Jeffrey Stedfast <fejj@ximian.com>
* camel-pkcs7-context.c (pkcs7_sign): Implemented.
(pkcs7_clearsign): Implemented.
(get_zero_len_passwd): Convenience function to try a 0-length key
on the certificate db - if this works then there is no need to
prompt the user.
(get_password): Callback to get the password.
(camel_cipher_hash_to_nss): Convenience function to convert a
CamelCipherHash to an NSS HASH_HashType.
(nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag.
(pkcs7_digest): Digest function for use with pkcs7_sign().
(sign_encode_cb): Callback to write the signed data to the output
stream.
(pkcs7_verify): Hacked on a bit more but am still a bit on the
confused side. This might work but I wouldn't hold my breath. The
sign/clearsign should be close if not correct, but this one...god
only knows.
Dan Winship [Wed, 18 Apr 2001 19:05:24 +0000 (19:05 +0000)]
missed this with the last commit (pop3 and imap memory leaks)
Dan Winship [Wed, 18 Apr 2001 17:59:56 +0000 (17:59 +0000)]
Free base_url and storage_path.
* providers/imap/camel-imap-store.c (camel_imap_store_finalize):
Free base_url and storage_path.
* providers/pop3/camel-pop3-store.c (finalize): Free the
implementation string.
(camel_pop3_command): Clarify documentation to mention that
@ex isn't set (and *@ret is) on CAMEL_POP3_ERR.
(connect_to_server): Set @ex properly on CAMEL_POP3_ERR.
* providers/pop3/camel-pop3-folder.c (pop3_refresh_info,
pop3_get_message): Set @ex properly on CAMEL_POP3_ERR.
Jeffrey Stedfast [Tue, 17 Apr 2001 22:18:25 +0000 (22:18 +0000)]
New source files to handle Pkcs7 encryption, decryption, signing, and
2001-04-17 Jeffrey Stedfast <fejj@ximian.com>
* camel-pkcs7-context.[c,h]: New source files to handle Pkcs7
encryption, decryption, signing, and verifying. Not yet
complete. I'm sensing this is going to take a while seeing as how
NSS is just so well documented.
Dan Winship [Tue, 17 Apr 2001 20:29:40 +0000 (20:29 +0000)]
more memory leaks
Jeffrey Stedfast [Tue, 17 Apr 2001 02:08:30 +0000 (02:08 +0000)]
don't use g_return's
Jeffrey Stedfast [Mon, 16 Apr 2001 23:02:05 +0000 (23:02 +0000)]
Don't we want to tell where we are by using the start of the message? I
2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
* providers/local/camel-mbox-summary.c (summary_rebuild): Don't we
want to tell where we are by using the start of the message? I
think this should be using camel_mime_parser_tell_start_from()
instead. Also divide by the size *before* multiplying by 100 so
that we don't overflow the int which was giving us negative values
for our progress status (oops).
Jeffrey Stedfast [Mon, 16 Apr 2001 19:16:53 +0000 (19:16 +0000)]
Added a prototype for stamp().
2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
* camel-operation.c: Added a prototype for stamp().
* camel-charset-map.c (camel_charset_locale_name): #include
string.h so we don't get a warning about strchr being undefined
and also init charset to NULL.
* camel-pgp-context.c (pgp_verify): Go back to doing the utf8
conversion by hand so that we don't depend on gal.
Jeffrey Stedfast [Mon, 16 Apr 2001 19:01:46 +0000 (19:01 +0000)]
Go back to doing the utf8 conversion by hand so that we don't depend on
2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
* camel-pgp-context.c (pgp_verify): Go back to doing the utf8
conversion by hand so that we don't depend on gal.
Jeffrey Stedfast [Mon, 16 Apr 2001 17:10:03 +0000 (17:10 +0000)]
oops, forgot to commit this with the last files
Jeffrey Stedfast [Mon, 16 Apr 2001 17:09:38 +0000 (17:09 +0000)]
Remove the EXTRA_GNOME_CFLAGS include.
2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
* Makefile.am: Remove the EXTRA_GNOME_CFLAGS include.
* camel-store.c (camel_mkdir_hier): Convenience function that it
seems a number of camel-store implementations used gal for.
* providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets
not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier()
instead.
* providers/nntp/camel-imap-store.c: Lets not depend on gal for
just e_mkdir_hier() - use camel_mkdir_hier() instead.
* camel-session.c (camel_session_get_storage_path): Don't depend
on e_mkdir_heir() anymore, use the CamelStore version.
* camel-folder-search.h: Removed gal dependency, why was this even
there in the first place?
* providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h
here, so remove it.
* string-utils.c (strstrcase): New function, well more like old
function brought back to life so we don't have to depend on gal.
* providers/imap/camel-imap-store.c (imap_store_setup_online): Use
strstrcase rather than e_strstrcase so we don't depend on gal.
(get_unread_online): Same here.
* providers/smtp/camel-smtp-transport.c (smtp_helo): Use
strstrcase.
Jeffrey Stedfast [Mon, 16 Apr 2001 16:05:33 +0000 (16:05 +0000)]
eh?
Jeffrey Stedfast [Sun, 15 Apr 2001 21:54:12 +0000 (21:54 +0000)]
oops, &pattern
Jeffrey Stedfast [Sun, 15 Apr 2001 21:39:37 +0000 (21:39 +0000)]
regex doesn't set errno and regcomp returns 0 on success and any other
2001-04-15 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-utils.c (header_raw_check_mailing_list): regex
doesn't set errno and regcomp returns 0 on success and any other
value for an error (so don't *just* check for -1).
Jeffrey Stedfast [Sat, 14 Apr 2001 21:20:44 +0000 (21:20 +0000)]
Check to make sure the context is a valid context in all the user
2001-04-14 Jeffrey Stedfast <fejj@ximian.com>
* camel-cipher-context.c: Check to make sure the context is a
valid context in all the user functions.
Jon Trowbridge [Fri, 13 Apr 2001 22:21:47 +0000 (22:21 +0000)]
s/imap_store/store/, fixing a typo that was causing the build to fail.
2001-04-13 Jon Trowbridge <trow@ximian.com>
* providers/imap/camel-imap-store.c (imap_disconnect):
s/imap_store/store/, fixing a typo that was causing the build to
fail.
Jon Trowbridge [Fri, 13 Apr 2001 22:07:59 +0000 (22:07 +0000)]
Make the (previously unused) get-source command actually do the right
2001-04-13 Jon Trowbridge <trow@gnu.org>
* camel-filter-search.c (get_source): Make the (previously unused)
get-source command actually do the right thing, properly shrouding
any passed-in source and falling back to use the source attached
to the mime message.
2001-04-13 Jon Trowbridge <trow@gnu.org>
* filtertypes.xml: Add XML specs for source account filtering.
* filter-element.c (filter_element_new_type_name): Recognize
type "source", construct a FilterSource.
* filter-source.c: Added. A FilterElement for the account e-mail
comes from.
Dan Winship [Fri, 13 Apr 2001 21:36:09 +0000 (21:36 +0000)]
Plug leaks.
* camel-object.c (camel_object_hook_event):
* camel-uid-cache.c (camel_uid_cache_get_new_uids):
* camel-url.c (camel_url_new_with_base): Plug leaks.
* camel-remote-store.c (camel_remote_store_init): Don't
re-initialize the folders hash table.
* providers/imap/camel-imap-store.c (imap_disconnect): Free
authtypes since they'll be re-read on re-connect.
(get_folder_info): Free folderinfos that we're discarding from the
list.
Jeffrey Stedfast [Thu, 12 Apr 2001 22:03:23 +0000 (22:03 +0000)]
Oops, lets not get into a recursive call here ;-)
2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
* camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not
get into a recursive call here ;-)
* tests/smime/pgp.c: Updated to reflect changes to the PGP code.
* tests/smime/pgp-mime.c: Same.
Jeffrey Stedfast [Thu, 12 Apr 2001 21:18:40 +0000 (21:18 +0000)]
Updated to reflect the few changes made to the CamelPgpContext class.
2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
* camel-pgp-mime.c: Updated to reflect the few changes made to the
CamelPgpContext class.
* camel-pgp-context.c: Updated to subclass of CamelCipherContext.
* camel-cipher-context.[c,h]: New base class for
CamelPgpContext. Also contains the replacement for
CamelPgpValidity, CamelCipherValidity.
Dan Winship [Thu, 12 Apr 2001 19:37:08 +0000 (19:37 +0000)]
Fix a pair of array bounds reads noted by purify
* camel-mime-filter-crlf.c (filter): Fix a pair of array bounds
reads noted by purify
Jeffrey Stedfast [Thu, 12 Apr 2001 18:48:00 +0000 (18:48 +0000)]
oh, and the tcp-stream headers.
Jeffrey Stedfast [Thu, 12 Apr 2001 18:46:54 +0000 (18:46 +0000)]
#include the pgp stuff.
2001-04-12 Jeffrey Stedfast <fejj@ximian.com>
* camel.h: #include the pgp stuff.
Dan Winship [Thu, 12 Apr 2001 17:22:54 +0000 (17:22 +0000)]
Plug memory leaks.
* providers/imap/camel-imap-message-cache.c
(camel_imap_message_cache_remove):
* camel-url.c (camel_url_to_string): Plug memory leaks.
Jeffrey Stedfast [Thu, 12 Apr 2001 15:40:05 +0000 (15:40 +0000)]
s/IMAP/SMTP
Dan Winship [Wed, 11 Apr 2001 21:39:37 +0000 (21:39 +0000)]
Simplify peterw's imap_is_atom_char fix.
* providers/imap/camel-imap-utils.c (imap_parse_string_generic):
Simplify peterw's imap_is_atom_char fix.
Jeffrey Stedfast [Wed, 11 Apr 2001 20:10:24 +0000 (20:10 +0000)]
Added pgp-mime.c to the tests.
2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
* tests/smime/Makefile.am: Added pgp-mime.c to the tests.
* tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions.
* Makefile.am: Add camel-pgp-mime.[c,h] to the build.
* camel-pgp-mime.c: Made a number of fixes to get it to compile
and also fixed a few logic errors (mostly forgetting to reset
streams) so that it worked (thanks to the pgp-mime test program).
JP Rosevear [Wed, 11 Apr 2001 16:10:30 +0000 (16:10 +0000)]
Check if gethostbyname_r take five params
2001-04-11 JP Rosevear <jpr@ximian.com>
* configure.in: Check if gethostbyname_r take five params
* acconfig.h: add GETHOSTBYNAME_R_FIVE_ARGS
2001-04-11 JP Rosevear <jpr@ximian.com>
* providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome
files are included in the top level camel headers and the gtk
include dir is now versioned and such
* providers/local/Makefile.am: ditto
* providers/pop3/Makefile.am: ditto
* providers/smtp/Makefile.am: ditto
* providers/sendmail/Makefile.am: ditto
* camel-service.c: use five arg version of gethostbyname_r if
appropriate
(camel_get_host_byname): check if msg->herr is non-zero instead of
checking if msg->hp is null since we may not always have msg->hp
Jeffrey Stedfast [Wed, 11 Apr 2001 15:50:04 +0000 (15:50 +0000)]
add camel-charset-map.h to the list of includes
Jeffrey Stedfast [Wed, 11 Apr 2001 15:45:35 +0000 (15:45 +0000)]
Use camel_charset_locale_name() to get the locale charset rather than
2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
* camel-sasl-digest-md5.c (digest_response): Use
camel_charset_locale_name() to get the locale charset rather than
checking the CHARSET environment variable. This is a much less
ugly hack. Also: If we fail to be able to convert to UTF8, then
disavow all knowledge of the charset parameter.
* camel-charset-map.c (camel_charset_locale_name): New function to
return the locale charset (or NULL if US-ASCII).
Jeffrey Stedfast [Wed, 11 Apr 2001 14:02:14 +0000 (14:02 +0000)]
Use e_utf8_from_locale_string() rather than trying to do it manually since
2001-04-11 Jeffrey Stedfast <fejj@ximian.com>
* camel-pgp-context.c (camel_pgp_verify): Use
e_utf8_from_locale_string() rather than trying to do it manually
since Lauris's version works much better.
Jeffrey Stedfast [Tue, 10 Apr 2001 15:47:00 +0000 (15:47 +0000)]
Added camel-pgp-context.[c,h] to the build. Also added tests/smime/pgp.c
2001-04-06 Jeffrey Stedfast <fejj@ximian.com>
* Makefile.am: Added camel-pgp-context.[c,h] to the build. Also
added tests/smime/pgp.c and Makefile.am
* tests/smime/pgp.c: New test suite for PGP functions.
* camel-pgp-context.c: Various fixes to get it to build.
Peter Williams [Sun, 8 Apr 2001 00:38:00 +0000 (00:38 +0000)]
It would be a good idea to recognize '\0'. Before, this code was running
001-04-07 Peter Williams <peterw@ximian.com>
* providers/imap/camel-imap-utils.c (imap_parse_string_generic): It
would be a good idea to recognize '\0'. Before, this code was running
off the ends of strings and intermittently coredumping (if it didn't
hit an imap_atom_char first) -- whoops!
Not Zed [Thu, 5 Apr 2001 02:31:47 +0000 (02:31 +0000)]
merge from evolution-0-10-branch to evolution-0-10-merge-0
2001-04-05 Not Zed <NotZed@Ximian.com>
* merge from evolution-0-10-branch to evolution-0-10-merge-0
Jeffrey Stedfast [Wed, 4 Apr 2001 02:00:25 +0000 (02:00 +0000)]
Added tests/ back in
2001-04-03 Jeffrey Stedfast <fejj@ximian.com>
* Makefile.am: Added tests/ back in
* camel-mime-utils.c (header_decode_text): Ignore whitespace
between encoded words (there were a few cases where it didn't
before).
(header_encode_string): Preserve whitespace between words that are
to be encoded by encoding them too.
(header_encode_phrase): Same here but with phrases.
Dan Winship [Tue, 3 Apr 2001 22:03:18 +0000 (22:03 +0000)]
(imap_update_summary): When reading message flags, set the
server_flags field as well, and don't overwrite any flags set by
camel_folder_summary_info_new_from_message. Might help with some
of the flag problems...
Dan Winship [Tue, 3 Apr 2001 21:46:32 +0000 (21:46 +0000)]
(imap_get_message): If the server_level < IMAP4rev1, always fetch
messages all-at-once, since they don't support the [#.MIME]
syntax.
Dan Winship [Tue, 3 Apr 2001 21:32:52 +0000 (21:32 +0000)]
If we don't change any flags or expunge, send a NOOP to give the server a
* providers/imap/camel-imap-folder.c (imap_sync): If we don't
change any flags or expunge, send a NOOP to give the server a
chance to send EXISTS, etc, messages.
Dan Winship [Mon, 2 Apr 2001 20:57:39 +0000 (20:57 +0000)]
Remove the "quick_login" member, which is unnecessary.
* camel-service.h: Remove the "quick_login" member, which is
unnecessary.
* providers/smtp/camel-smtp-transport.c (smtp_auth): Remove the
references to quick_login and fix this to use the CamelSasl
interfaces correctly to do the same thing.
(connect_to_server): Split this out of smtp_connect
(smtp_connect): Use connect_to_server. When re-EHLO'ing after
auth, ignore errors.
(query_auth_types): Use connect_to_server rather than
smtp_connect, so it doesn't try to authenticate. Add LOGIN
authtype to the list of authtypes to check for.
* providers/smtp/camel-smtp-provider.c
(camel_provider_module_init): Add LOGIN authtype to the authtypes
list explicitly.
* camel-sasl.c (camel_sasl_authtype_list): Don't list LOGIN here:
it's not a real SASL authtype and is only used for SMTP.
* camel-sasl-plain.c:
* camel-sasl-login.c:
* camel-sasl-kerberos4.c:
* camel-sasl-cram-md5.c:
* camel-sasl-anonymous.c:
* providers/pop3/camel-pop3-provider.c: Remove "quick_login"
argument from authtypes.
Gediminas Paulauskas [Mon, 2 Apr 2001 20:29:42 +0000 (20:29 +0000)]
marked report status strings for tanslation, fixes #1973
Jeffrey Stedfast [Mon, 2 Apr 2001 07:24:37 +0000 (07:24 +0000)]
mutex lock & unlock the context. (camel_pgp_clearsign): Same.
2001-04-02 Jeffrey Stedfast <fejj@ximian.com>
* camel-pgp-context.c (camel_pgp_sign): mutex lock & unlock the context.
(camel_pgp_clearsign): Same.
(camel_pgp_verify): Same.
(camel_pgp_encrypt): Same.
(camel_pgp_decrypt): And finally here...
Jeffrey Stedfast [Mon, 2 Apr 2001 07:10:28 +0000 (07:10 +0000)]
Update the function prototypes to match those found in
2001-04-02 Jeffrey Stedfast <fejj@ximian.com>
* camel-pgp-context.h: Update the function prototypes to match
those found in camel-pgp-context.c.
* camel-pgp-context.c: Updated.
* camel-pgp-mime.c (camel_pgp_mime_part_sign): Implemented.
(camel_pgp_mime_part_verify): Implemented.
(camel_pgp_mime_part_encrypt): Implemented.
(camel_pgp_mime_part_decrypt): Implemented.
Jeffrey Stedfast [Sun, 1 Apr 2001 22:54:44 +0000 (22:54 +0000)]
New files to handle the LOGIN SASL mechanism.
2001-04-01 Jeffrey Stedfast <fejj@ximian.com>
* camel-sasl-login.[c,h]: New files to handle the LOGIN SASL
mechanism.
* camel-sasl-plain.c: Removed the definition of
camel_sasl_login_authtype.
* camel-sasl.c (camel_sasl_new): Oops. I thought LOGIN was an
alias to PLAIN. I was wrong. These two SASL objects have to be
separate.
* providers/smtp/camel-smtp-transport.c (smtp_auth): Updated to
check for and use authmech->quick_login when available.