Michael Zucci [Wed, 17 Jan 2001 01:07:02 +0000 (01:07 +0000)]
Index: ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.684
diff -r1.684 ChangeLog
0a1,34
> 2001-01-17 Not Zed <NotZed@Ximian.com>
>
> * camel-folder.c (free_summary): Call
> camel_folder_summary_array_free() to do the work.
> (get_summary): Use camel_folder_summary_array() to get the array
> atomically. These fixes allow folder/test8 to work again, and fix
> a sort of race where the summary size can change while we were
> making a copy of it.
>
> * camel-folder-summary.c (camel_folder_summary_array): Get the
> summary array atomically, so it can't contain empty records.
> (camel_folder_summary_array_free): And free it.
>
> * tests/lib/camel-test.c (die): If we are verbose & in threads,
> then goto sleep so we can debug.
>
> * tests/folder/test8.c (worker): Add a missing pull() for
> comnparing content.
>
> * camel-filter-search.c: Fix the symbol table, so match-all is an
> immediate function, as it should be.
>
> * tests/folder/test9.c (main): New test, tests some filtering
> things.
>
> * tests/message/test3.c (main): Dont use a boundary string with
> spaces in it. Folding can corrupt it. Maybe the folding isn't
> working entirely right, but anyway.
>
> * camel-session.c: Debug out the debug.
>
> * camel-filter-driver.c (camel_filter_driver_filter_folder): Plug
> a messageinfo leak.
>
1a36,94
>
> * camel-filter-search.c (header_exists): Changed to support
> multiple args (or'd together).
> (header_contains): Cleaned up to match the search code. Why did
> fejj change it? I'll never know.
> (header_matches):
> (header_starts_with):
> (header_ends_with): Big cleanup of fejj's "i'm the cut & paste
> king" code. Also properly handle or'ing of additional args to
> match what the folder-search code should do.
> (check_match): New function which does the annoying matching
> stuff (for header matches).
> (check_header): Similarly, handles or'ing of the matches together.
> (header_contains):
> (header_matches):
> (header_starts_with):
> (header_ends_with): Call check_header to do the actual work.
> (header_soundex): And here too.
> (match_all): Yeah like match-all isn't passed expression results,
> its passed expression terms. Fix this so match-all works like it
> should, by executing the contained expression.
> (message_body_contains): Copied directly from
> camel-folder-search.c, a more robust/faster/simpler body search
> code.
> (mime_part_matches): Removed entirely.
> (handle_multipart): Removed entirely.
> (build_match_regex): Copied from camel-folder-search. Builds a
> set of simple strings into a regex pattern that matches any of
> them (for faster & simpler matching). Expanded to accept regex
> patterns itself, so it can merge them together.
> (body_contains): Use build match/match message to match using a
> built regex.
> (body_regex): Likewise, this time we tell it we're building a
> regex though.
> (header_full_regex): Use build_match_regex to take the drudgery
> out of it, and expand it to handle multiple regex's at once.
> (get_full_header): slightly cleaner (well i dunno, the sprintf
> stuff just got to me).
> (header_regex): Cleaned up to use build_match_Regex too, and to
> properly check types.
> (filter_message_search): Just allocate 'fms' on the stack.
>
> * camel-filter-driver.c (camel_filter_driver_finalise):
> (camel_filter_driver_init):
> (camel_filter_driver_class_init):
> (camel_filter_driver_get_type): Changed from gtk object to camel
> object.
> (camel_filter_driver_add_rule): New function to add a rule to be
> processed in sexp form.
> (camel_filter_driver_init): Init the rules list.
> (camel_filter_driver_finalise): Clear the rules/rules list.
> (camel_filter_driver_filter_message): Scan rules list directly
> rather than creating on the fly.
>
> * Makefile.am (libcamelinclude_HEADERS): Added camel-filter-driver.h
> (libcamel_la_SOURCES): Added camel-filter-driver.c, code taken
> from filter-driver, which can drive, uh, filters based on sexp's.
> (libcamelinclude_HEADERS):
> (libcamel_la_SOURCES): Added camel-filter-search.[ch]
Dan Winship [Wed, 17 Jan 2001 00:27:19 +0000 (00:27 +0000)]
Delayed loading of IMAP message parts.
* camel-types.h: typedef CamelMessageInfo and
CamelMessageContentInfo here
* camel-folder-summary.h: Add a "size" field to
CamelMessageContentInfo.
* camel-folder-summary.c (camel_folder_summary_content_info_new,
camel_folder_summary_content_info_free): Renamed and made
non-static for providers that construct their own content info.
(content_info_load, content_info_save): load/save size
* camel-data-wrapper.c (camel_data_wrapper_is_offline): New
function to return if a data wrapper's contents are "offline". (So
that, for example, we don't make thumbnails of images that haven't
been loaded off the IMAP server yet.) Defaults to FALSE.
* providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
Fix a bug in re-selecting a folder when messages have been
expunged from it by another client in the meantime.
(imap_get_message): Rewrite. If the message is larger than a
certain size, just create a skeleton message containing
CamelImapWrappers that will read parts as needed. This way, large
attachments only need to be downloaded if the user looks at them,
and multipart/alternative alternatives that aren't used will never
be downloaded at all.
(imap_update_summary): Rewrite this a bunch too to make the
parsing more robust.
* providers/imap/camel-imap-summary.c
(CAMEL_IMAP_SUMMARY_VERSION): bump.
(camel_imap_summary_new): Set build_content to TRUE.
(content_info_load, content_info_save): Only save/load the content
for messages that have it. (The content info gets created as a
side effect of imap_get_message.)
* providers/imap/camel-imap-utils.c (imap_parse_body): New routine
(and helpers) to parse an IMAP 'body' FETCH response and fill in a
CamelMessageContentInfo from it.
* providers/imap/Makefile.am (libcamelimap_la_SOURCES,
libcamelimap_la_HEADERS): add camel-imap-wrapper.
Dan Winship [Tue, 16 Jan 2001 23:27:51 +0000 (23:27 +0000)]
fcntl(fd, F_GETFL) returns the flags as the return value, not via a passed
* camel-tcp-stream-raw.c (stream_getsockopt, stream_setsockopt):
* camel-stream-fs.c (stream_read, stream_write):
* camel-remote-store.c (socket_connect): fcntl(fd, F_GETFL)
returns the flags as the return value, not via a passed in
pointer. And F_SETFL looks for an int, not a long, and you have to
pass it what it's expecting because it's a va_arg parameter. (Yes,
the man page lies on Linux. But check the UNIX98 spec or the glibc
source.) Also, fix another bug in socket_connect: if we manage to
connect right away, unset O_NONBLOCK so it doesn't mess us up
later.
Fixes a bunch of problems with non-blocking I/O being done in the
allegedly-blocking case and then returning EWOULDBLOCK.
Chris Toshok [Tue, 16 Jan 2001 23:19:40 +0000 (23:19 +0000)]
set to nntp if ENABLE_NNTP (SUBDIRS): use $(NNTP_DIR)
2001-01-16 Chris Toshok <toshok@ximian.com>
* providers/Makefile.am (NNTP_DIR): set to nntp if ENABLE_NNTP
(SUBDIRS): use $(NNTP_DIR)
Jeffrey Stedfast [Tue, 16 Jan 2001 22:28:16 +0000 (22:28 +0000)]
Don't check errno as it's not being set. Fixes bug #1150.
2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
* providers/smtp/camel-smtp-transport.c (smtp_rcpt): Don't check
errno as it's not being set. Fixes bug #1150.
Jeffrey Stedfast [Tue, 16 Jan 2001 07:19:49 +0000 (07:19 +0000)]
Ugh, this design is ugly like my butt.
2001-01-16 Jeffrey Stedfast <fejj@ximian.com>
Ugh, this design is ugly like my butt.
* camel-session.c (camel_session_query_cert_authenticator): New
function which will be useful when we integrate SSL.
* camel-tcp-stream-ssl.c (ssl_auth_cert): Callback to authenticate
a certificate.
(ssl_bad_cert): Callback that gets the reason the certificate is
bad and then calls camel's cert-authenticator callback to notify
the user and to allow the user to override the check.
(stream_connect): Set the URL we expect to connect with and setup
the auth_cert and bad_cert callbacks.
(camel_tcp_stream_ssl_new): Now takes a CamelSession and a
expected_host argument that it will use for certificate
authentication.
(camel_tcp_stream_ssl_finalize): Unref the session and free the
expected_host.
Not Zed [Tue, 16 Jan 2001 03:54:45 +0000 (03:54 +0000)]
Chganged len back to be unsigned. And do a simple range check on the
2001-01-16 Not Zed <NotZed@Ximian.com>
* camel-folder-summary.c (camel_folder_summary_decode_string):
Chganged len back to be unsigned. And do a simple range check on
the string value to try and detect corrupted summary files.
* providers/imap/camel-imap-command.c (imap_read_untagged): Handle
cancelled stream reads with an appropriate exception.
* providers/imap/camel-imap-private.h: Fix the include-once
macro. Doh, confliced with camel-private.h.
* providers/imap/camel-imap-store.c (imap_store_refresh_folders):
A copy of camel_remote_store_refresh_folders. We avoid locking
each folder when we call it though. This should be removed when i
can work out how to remove the folder lock from this function
easily.
* camel-stream-fs.c (stream_write): Fix n' argument of select.
(stream_read): Likewise.
* camel-remote-store.c (socket_connect): Bump the connect timeout
upto 4 minutes.
(socket_connect): Oops, fix the 'n' argument of select.
* camel-session.c (camel_cancel_cancel): If we are given no
cancellation node, then do it for all active ones.
Jeffrey Stedfast [Tue, 16 Jan 2001 00:54:18 +0000 (00:54 +0000)]
If the close() is successful, set the fd to -1.
2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
* camel-stream-fs.c (stream_close): If the close() is successful,
set the fd to -1.
* camel-tcp-stream-raw.c: Removed the disconnect() method.
(stream_close): If the close() is successful, set the sockfd to
-1.
* camel-tcp-stream-ssl.c: Removed the disconnect() method.
(stream_close): If the close() is successful, set the sockfd to
NULL.
* camel-tcp-stream.c (camel_tcp_stream_disconnect): Removed,
easier to just use the close() method as it did the same thing
anyway.
Jeffrey Stedfast [Mon, 15 Jan 2001 23:31:40 +0000 (23:31 +0000)]
Updated to be able to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.
2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
* camel-tcp-stream-raw.c (stream_getsockopt): Updated to be able
to get the CAMEL_SOCKOPT_NONBLOCKING socket opt.
(stream_setsockopt): Updated to be able to set the
CAMEL_SOCKOPT_NONBLOCKING socket opt.
Peter Williams [Mon, 15 Jan 2001 21:35:40 +0000 (21:35 +0000)]
Lock around the imap_rescan, which needs it.
2001-01-15 Peter Williams <peterw@ximian.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_new): Lock around the
imap_rescan, which needs it.
Not Zed [Mon, 15 Jan 2001 07:55:30 +0000 (07:55 +0000)]
A cancellable connection routine. (remote_send_string): Return cancelled
2001-01-15 Not Zed <NotZed@Ximian.com>
* camel-remote-store.c (socket_connect): A cancellable connection
routine.
(remote_send_string): Return cancelled exception if we were.
(remote_send_stream): "
(remote_recv_line): "
* camel-stream-fs.c (stream_read): First cut at cancellation
stuff. Its looking a bit ugly.
Jeffrey Stedfast [Mon, 15 Jan 2001 06:25:23 +0000 (06:25 +0000)]
Uses an SSL socket now although there's still a few things missing (like
2001-01-15 Jeffrey Stedfast <fejj@ximian.com>
* camel-tcp-stream-ssl.c (stream_connect): Uses an SSL socket now
although there's still a few things missing (like certificate
handling and such).
* camel.c (camel_ssl_init): A replacement function for
camel_init() that also initializes SSL.
Jeffrey Stedfast [Sun, 14 Jan 2001 22:48:09 +0000 (22:48 +0000)]
Implemented. (stream_setsockopt): Implemented.
2001-01-14 Jeffrey Stedfast <fejj@ximian.com>
* camel-tcp-stream-ssl.c (stream_getsockopt): Implemented.
(stream_setsockopt): Implemented.
* camel-tcp-stream-raw.c (stream_getsockopt): Implemented.
(stream_setsockopt): Implemented.
* camel-tcp-stream.c (camel_tcp_stream_getsockopt): New method.
(camel_tcp_stream_setsockopt): Another new method. I think you get
the idea of what these are for so I won't explain them.
Jeffrey Stedfast [Sun, 14 Jan 2001 08:21:00 +0000 (08:21 +0000)]
New CamelTcpStream class that implements nspr sockets and eventually will
2001-01-14 Jeffrey Stedfast <fejj@helixcode.com>
* camel-tcp-stream-ssl.[c,h]: New CamelTcpStream class that
implements nspr sockets and eventually will use nss for
SSL/TLS. Currently doesn't do any SSL/TLS but it should still
work. It's functionally equivalent to CamelTcpStreamRaw at the
moment only it uses nspr i/o.
* camel-tcp-stream-raw.[c,h]: New CamelTcpStream class that
implements native sockets. Should be usable but may have some bugs
yet.
Jeffrey Stedfast [Sun, 14 Jan 2001 04:40:46 +0000 (04:40 +0000)]
New abstract class for TCP streams. The next step is to write child
2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
* camel-tcp-stream.[c,h]: New abstract class for TCP streams. The
next step is to write child classes (CamelTcpStreamBSD and
CamelTcpStreamSSL). The BSD stream will use normal BSD sockets
while SSL will use Mozilla's NSPR and NSS libraries to do Secure
Socket Layers which wille ventually replace CamelStreamSSL which I
just commit'd. Oh well.
Jeffrey Stedfast [Sun, 14 Jan 2001 02:44:59 +0000 (02:44 +0000)]
New stream for handling SSL/TLS connections.
2001-01-13 Jeffrey Stedfast <fejj@ximian.com>
* camel-stream-ssl.[c,h]: New stream for handling SSL/TLS
connections.
Michael Zucci [Fri, 12 Jan 2001 03:43:53 +0000 (03:43 +0000)]
(camel_folder_thread_messages_new): Added casts to rmeove some
warnings for the analites out there.
Not Zed [Fri, 12 Jan 2001 02:48:45 +0000 (02:48 +0000)]
Perform a final pass, removing any pseudo nodes we added earlier. Quick
2001-01-12 Not Zed <NotZed@Ximian.com>
* camel-folder-thread.c (camel_folder_thread_messages_new):
Perform a final pass, removing any pseudo nodes we added earlier.
Quick patch to test the idea.
Dan Winship [Thu, 11 Jan 2001 23:56:50 +0000 (23:56 +0000)]
(imap_copy_message_to): Fix this up: sync flags to the server
before copying so that they end up correct in the remote folder.
And poke the destination folder after doing the copy so it notices
the new message right away.
(imap_move_message_to): Call imap_copy_message_to for most of the
work rather than duplicating the code (since it's much more
complicated now).
Dan Winship [Thu, 11 Jan 2001 22:50:10 +0000 (22:50 +0000)]
Fix a bug in previous commit: don't check for deleted messages if there
* providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
Fix a bug in previous commit: don't check for deleted messages if
there are no known messages in the folder (because it would end up
sending "FETCH 0 ...").
Dan Winship [Thu, 11 Jan 2001 22:04:29 +0000 (22:04 +0000)]
New function to check for added/deleted messages when re-selecting a
* providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
New function to check for added/deleted messages when re-selecting
a folder.
(imap_refresh_info, imap_rescan, imap_update_summary): Various
locking tweaks that turn out to be irrelevant since command_lock
is recursive, but whatever.
* providers/imap/camel-imap-command.c (camel_imap_command): When
selecting a new folder, call camel_imap_folder_selected on it.
Dan Winship [Thu, 11 Jan 2001 21:53:34 +0000 (21:53 +0000)]
Fix a locking problem. (One branch of an if statement was returning with
* camel-folder.c (camel_folder_copy_message_to): Fix a locking
problem. (One branch of an if statement was returning with the
lock still locked.) Also remove the deprecation comments, to match
move_message_to.
Jeffrey Stedfast [Wed, 10 Jan 2001 21:28:28 +0000 (21:28 +0000)]
Changed the descriptions for mh, mbox, and maildir to be more
2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
* providers/local/camel-local-provider.c: Changed the descriptions
for mh, mbox, and maildir to be more "user-friendly".
Dan Winship [Wed, 10 Jan 2001 20:20:02 +0000 (20:20 +0000)]
New header to prevent recursive #include problems
* providers/imap/camel-imap-types.h: New header to prevent
recursive #include problems
Dan Winship [Wed, 10 Jan 2001 20:19:45 +0000 (20:19 +0000)]
New header to prevent recursive #include problems
* providers/imap/camel-imap-types.h: New header to prevent
recursive #include problems
* providers/imap/*.h: Replace some #includes with #include
"camel-imap-types.h", remove typedefs that were moved to
camel-imap-types.h
* providers/imap/*.c: Add #includes to make up for #includes
removed from .h files
* providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add
camel-imap-types.h
Dan Winship [Wed, 10 Jan 2001 17:10:44 +0000 (17:10 +0000)]
New class function, parallel to camel_folder_sync. (The default
* camel-store.c (camel_store_sync): New class function, parallel
to camel_folder_sync. (The default implementation just calls
camel_folder_sync on each cached folder.)
* providers/imap/camel-imap-store.c (get_folder_info): Call
camel_store_sync before doing anything else so that the IMAP
server and Camel are working from the same data. Don't ask the
server for the unread message count of the current folder, since
UW will return often-incorrect cached data, and we can calculate
it without talking to the server anyway.
Dan Winship [Tue, 9 Jan 2001 22:25:50 +0000 (22:25 +0000)]
Mostly IMAP changes. Use the NAMESPACE extension (where
available). Deal with servers that don't return LIST flags in
response to LSUB (like UW) to get rid of the "not a selectable
folder" error messages in the UI. Take advantage of the \Marked
and \Unmarked flags to try to speed up the folder scan by not
doing STATUS on unmarked folders. Some further tweaks on the shape
of the resulting folder tree in various situations...
* camel-store.h: Remove the (read) message_count, since nothing
uses it, and we can speed up IMAP a bit this way.
* camel-store.c (camel_folder_info_build): Redo this a bit to make
it more useful for IMAP since that's the only thing that uses it.
* camel-remote-store.c (camel_remote_store_connected): Public
function to check if the store is connected, and try to connect it
if it's not.
(remote_send_string, remote_send_stream, remote_recv_line): Use
that.
* providers/imap/camel-imap-store.c (camel_imap_store_finalize):
fix up for changes.
(camel_imap_store_init): Initialize subscribed_folders to NULL
rather than an empty hash table.
(imap_connect): Get the list of subscribed folders here. If the
server doesn't claim that any of them are either Marked or
Unmarked, then assume that it doesn't do that for LSUB and
remember that for later. If the server supports the NAMESPACE
extension and the user didn't specify a namespace, use the
server-provided one.
(imap_disconnect): Free the list of subscribed folders, and the
namespace.
(get_folder): check camel_remote_store_connected
(get_folder_info): check camel_remote_store_connected. Add a bunch
of new cleverness. If we learned that the server doesn't do LSUB
usefully, do a bunch of LISTs by hand. Then, if we're getting
unread counts, only do it for folders that weren't listed as
Unmarked. Also, deal with namespaces that end with the separator
character, and update for changes to camel_folder_info_build.
(folder_subscribed): Add a g_return_val_if_fail.
(subscribe_folder, unsubscribe_folder): check
camel_remote_store_connected.
* providers/nntp/camel-nntp-store.c (build_folder_info,
build_folder_info_from_grouplist, nntp_store_get_folder_info):
Don't fill in message_count since it doesn't exist any more.
Dan Winship [Tue, 9 Jan 2001 19:27:27 +0000 (19:27 +0000)]
Kill off a long-hated Camel kludge: "empty" URLs and
query_auth_types_generic.
* camel-url.c: Remove "empty" from CamelURL.
(camel_url_new): No longer set it.
(camel_url_to_string): Treat "" as equivalent to NULL for
authmech. (Unrelated change, but it simplifies some stuff with the
new config dialog.)
* camel-service.c (camel_service_new): Remove url->empty check: if
the URL isn't valid, we don't create the service.
(camel_service_query_auth_types): No longer need to switch between
generic and connected variants.
* providers/smtp/camel-smtp-transport.c (query_auth_types):
* providers/pop3/camel-pop3-store.c (query_auth_types):
* providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
* providers/imap/camel-imap-store.c (query_auth_types):
* camel-remote-store.c (remote_query_auth_types): Remove generic
version, rename connected version.
Not Zed [Sat, 6 Jan 2001 02:25:04 +0000 (02:25 +0000)]
Dont try and unref a messageinfo that wasn't there, and use the right free
2001-01-06 Not Zed <NotZed@HelixCode.com>
* providers/vee/camel-vee-folder.c (vee_folder_build_folder): Dont
try and unref a messageinfo that wasn't there, and use the right
free function too. Modified patch from Iain.
(vee_move_message_to): New method, call the real folders'
move_message_to method.
JP Rosevear [Thu, 4 Jan 2001 21:48:22 +0000 (21:48 +0000)]
Remove conflict thingie from a while back
JP Rosevear [Thu, 4 Jan 2001 21:47:21 +0000 (21:47 +0000)]
oops, forgot the changelog entry
JP Rosevear [Thu, 4 Jan 2001 19:40:10 +0000 (19:40 +0000)]
fix includes for compilation
2001-01-04 JP Rosevear <jpr@helixcode.com>
* tests/lib/Makefile.am: fix includes for compilation
* tests/message/Makefile.am: Build test3 again
* tests/message/test2.c: Kill warnings with header includes
* tests/message/test3.c: ditto
* tests/lib/streams.c: ditto
* tests/lib/camel-test.c: ditto
* tests/lib/messages.c: ditto
* tests/lib/folders.c: ditto
Dan Winship [Thu, 4 Jan 2001 18:53:41 +0000 (18:53 +0000)]
oops. commit-o
Dan Winship [Thu, 4 Jan 2001 18:40:57 +0000 (18:40 +0000)]
Fix two problems in figuring out server-expunged messages.
* providers/imap/camel-imap-folder.c (imap_rescan): Fix two
problems in figuring out server-expunged messages.
Dan Winship [Thu, 4 Jan 2001 16:57:39 +0000 (16:57 +0000)]
Fix two problems in figuring out server-expunged messages.
* providers/imap/camel-imap-folder.c (imap_rescan): Fix two
problems in figuring out server-expunged messages.
Not Zed [Thu, 4 Jan 2001 07:28:40 +0000 (07:28 +0000)]
If we have a lot of messages changed, promote it to a folder changed
2001-01-04 Not Zed <NotZed@HelixCode.com>
* camel-folder.c (thaw): If we have a lot of messages changed,
promote it to a folder changed event.
Jeffrey Stedfast [Thu, 4 Jan 2001 06:40:33 +0000 (06:40 +0000)]
Implemented. (search_header_exists): Implemented.
2000-01-03 Jeffrey Stedfast <fejj@helixcode.com>
* camel-folder-search.c (search_header_matches): Implemented.
(search_header_exists): Implemented.
(search_header_starts_with): Implemented.
(search_header_ends_with): Implemented.
Christopher James Lahey [Wed, 3 Jan 2001 17:33:11 +0000 (17:33 +0000)]
Initialize the exists variable so that we don't do random things if the
2001-01-03 Christopher James Lahey <clahey@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_new):
Initialize the exists variable so that we don't do random things
if the imap server misbehaves.
Not Zed [Wed, 3 Jan 2001 00:15:54 +0000 (00:15 +0000)]
REmove warning, this isn't really deprecated, sigh.
2000-12-29 Not Zed <NotZed@HelixCode.com>
* camel-folder.c (camel_folder_move_message_to): REmove warning,
this isn't really deprecated, sigh.
* camel-mime-utils.c (header_fold): Comment out some debug.
Chris Lahey [Tue, 2 Jan 2001 23:49:44 +0000 (23:49 +0000)]
Finishing the removal of these directories.
Christopher James Lahey [Tue, 2 Jan 2001 23:48:27 +0000 (23:48 +0000)]
Removed these directories since they're unused.
2001-01-02 Christopher James Lahey <clahey@helixcode.com>
* providers/maildir/, providers/mbox/, providers/mh/: Removed
these directories since they're unused.
Dan Winship [Tue, 2 Jan 2001 22:13:32 +0000 (22:13 +0000)]
fix off-by-one
Dan Winship [Tue, 2 Jan 2001 22:07:44 +0000 (22:07 +0000)]
IMAP randomness.
* providers/imap/camel-imap-stream.[ch]: Remove. To be replaced.
* providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Remove
camel-imap-stream.h
* providers/imap/camel-imap-utils.c (imap_parse_flag_list): Take a
char ** instead of char *, to return the position at the end of
parsing like the string parsing functions.
(imap_parse_string_generic): New function to parse a string,
nstring, or astring.
(imap_parse_nstring, imap_parse_astring): Now macros
(imap_parse_string): Added
* providers/imap/camel-imap-folder.h: Remove the "exists" field
from CamelImapFolder.
* providers/imap/camel-imap-folder.c: Remove unused include of
camel-imap-stream.h.
(camel_imap_folder_init): Remove no-longer-relevant summary
initialization.
(camel_imap_folder_new): Update for imap_parse_flag_list change,
exists removal, and imap_rescan.
(imap_rescan): New function that does most of the work of the old
imap_refresh_info, but taking "exists" as an argument instead of
getting it from the folder. Also calls camel_imap_folder_changed
to do the summary updating and signalling, rather than duplicating
that code.
(imap_refresh_info): Just call imap_rescan (using the size of the
folder summary as "exists").
(imap_update_summary): Update for imap_parse_flag_list change
(camel_imap_folder_changed): Update for "exists" change.
Dan Winship [Tue, 2 Jan 2001 19:33:34 +0000 (19:33 +0000)]
New function to return just foo/bar with no parameters.
* camel-mime-utils.c (header_content_type_simple): New function to
return just foo/bar with no parameters.
* camel-data-wrapper.c (get_mime_type): Use
header_content_type_simple rather than header_content_type_format.
Dan Winship [Thu, 28 Dec 2000 19:28:39 +0000 (19:28 +0000)]
Remove this. It was only a thin wrapper around struct _header_content_type
* gmime-content-field.[ch]: Remove this. It was only a thin
wrapper around struct _header_content_type anyway, and didn't
match the naming scheme of anything else.
* Makefile.am: Remove gmime-content-field.[ch]
* camel.h: Remove gmime-content-field.h
* camel-types.h: Add CamelContentType as a typedef for struct
_header_content_type (especially for use outside of camel).
* camel-multipart.c:
* camel-mime-part.c:
* camel-mime-message.c:
* camel-folder-summary.c:
* camel-folder-search.c:
* camel-data-wrapper.[ch]: Use CamelContentType and
header_content_type_* functions rather than the GMime stuff.
* camel-mime-part-utils.c:
* camel-medium.c: Remove unused gmime-content-field.h include.
Dan Winship [Wed, 27 Dec 2000 19:10:06 +0000 (19:10 +0000)]
Fix the APOP check to not crash on servers that don't return any
* providers/pop3/camel-pop3-store.c (connect_to_server): Fix the
APOP check to not crash on servers that don't return any
information on the +OK greeting line.
Michael Zucci [Sun, 24 Dec 2000 01:42:27 +0000 (01:42 +0000)]
(camel_imap_folder_changed): Make sure we unref the summary lookup.
Michael Zucci [Sun, 24 Dec 2000 01:41:17 +0000 (01:41 +0000)]
clean up a stubborn and hard to remove imap_folder->summary.
Michael Zucci [Sun, 24 Dec 2000 00:51:54 +0000 (00:51 +0000)]
Minor compilation fixes.
Not Zed [Sun, 24 Dec 2000 00:46:20 +0000 (00:46 +0000)]
Lock the command channel while searching. (imap_body_contains): If
2000-12-24 Not Zed <NotZed@HelixCode.com>
* providers/imap/camel-imap-search.c (imap_body_contains): Lock
the command channel while searching.
(imap_body_contains): If performing a whole uid search, then add
references to our own summary items, dont look it up in the
folder. This way they can't vanish unexpectedly.
* providers/imap/camel-imap-folder.h (CamelImapFolder): Added a
private field.
* providers/imap/camel-imap-private.h: Added lock for imap
searches.
* Merge from camel-mt-branch.
* providers/imap/camel-imap-folder.c (imap_update_summary): Merge
fix, use the folder->summary.
(imap_get_message_flags, imap_set_message_flags,
imap_get_message_user_flag, imap_set_message_user_flag): Removed
again.
(camel_imap_folder_init): Setup private data/lock.
(imap_finalize): Free private data/search lock.
(imap_search_free): Lock the search_lock.
(imap_search_by_expression): Lock the search lock when using the
search object. Also copy/ref hte summary, rather than getting it
directly.
(imap_refresh_info): Free any info lookups. Use folder->summary
not imap_folder->summary. And lock around commands.
Dan Winship [Fri, 22 Dec 2000 20:33:00 +0000 (20:33 +0000)]
When getting the top-level folder list, include INBOX even if it's not
* providers/imap/camel-imap-store.c (get_folder_info): When
getting the top-level folder list, include INBOX even if it's not
subscribed. Don't show subscribed folders outside of the given
namespace. Do a better job of pruning the namespace from the
returned folder tree.
Dan Winship [Thu, 21 Dec 2000 19:50:09 +0000 (19:50 +0000)]
New CamelFolderSearch subclass that just reimplements body_contains (using
* providers/imap/camel-imap-search.c: New CamelFolderSearch
subclass that just reimplements body_contains (using the IMAP
SEARCH command). All other kinds of searching are done against the
local summary.
* providers/imap/camel-imap-folder.c (imap_search_by_expression):
Use a CamelImapSearch to do searching.
* providers/imap/camel-imap-utils.c (imap_translate_sexp, etc): No
longer needed.
* camel-folder-search.h: Add missing CAMEL_FOLDER_SEARCH_TYPE
#define
Dan Winship [Thu, 21 Dec 2000 17:14:07 +0000 (17:14 +0000)]
Update the doc comment: since it always NUL-terminates the buffer, it
* camel-stream-buffer.c (camel_stream_buffer_gets): Update the
doc comment: since it always NUL-terminates the buffer, it reads
at most @max-1 bytes, not @max.
* camel-remote-store.c (remote_recv_line): Fix the "did
camel_stream_buffer_gets fill the whole buffer" check. Fixes a bug
when reading lines longer than 1024 characters (eg, IMAP SEARCH
responses in very large folders).
Dan Winship [Tue, 19 Dec 2000 20:40:12 +0000 (20:40 +0000)]
Oops. Don't do "FETCH 1:0" when the folder is empty.
* providers/imap/camel-imap-folder.c (imap_refresh_info): Oops.
Don't do "FETCH 1:0" when the folder is empty.
(imap_protocol_get_summary_specifier): Request RFC822.SIZE too.
(imap_update_summary): Parse RFC822.SIZE and add it to the
summary.
Dan Winship [Tue, 19 Dec 2000 19:42:15 +0000 (19:42 +0000)]
Add "guint32 server_flags" to CamelImapMessageInfo to keep track of the
* providers/imap/camel-imap-summary.c: Add "guint32 server_flags"
to CamelImapMessageInfo to keep track of the last known message
flag state on the server.
(message_info_save, message_info_load): Save/load the
server_flags.
* providers/imap/camel-imap-folder.c: Make this use
CamelFolderChangeInfo and emit folder_changed notifications as it
gets them rather than only on refresh_info.
(imap_refresh_info): Notice flags that get cleared on the server
as well as flags that get set.
(imap_update_summary): Remove a comment that never actually
applied to the committed code.
Dan Winship [Mon, 18 Dec 2000 19:17:17 +0000 (19:17 +0000)]
Change the semantics of fmt: Now %S (capital S) means an IMAP "string",
* providers/imap/camel-imap-command.c (camel_imap_command): Change
the semantics of fmt: Now %S (capital S) means an IMAP "string",
(which can be sent as either a quoted string or a literal). If
the server supports LITERAL+, these will be sent as extended
literals (which don't require any special escaping). Otherwise
they'll be sent as quoted strings (and it now properly deals with
" or \ in the string).
(imap_command_strdup_vprintf): Utility routine that does the real
work for the functionality mentioned above.
* providers/imap/camel-imap-utils.c (imap_quote_string): Turns a
string into a proper IMAP "quoted string".
* providers/imap/camel-imap-store.c:
* providers/imap/camel-imap-folder.c: Use %S instead of "%s" where
appropriate.
Jeffrey Stedfast [Fri, 15 Dec 2000 21:33:21 +0000 (21:33 +0000)]
When checking to see if we need to fold the header, when we come accross a
2000-12-15 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-utils.c (header_fold): When checking to see if we
need to fold the header, when we come accross a \n, make sure to
start at p + 1 the next time through the loop or else we get into
an infinite loop.
Dan Winship [Wed, 13 Dec 2000 19:56:34 +0000 (19:56 +0000)]
change a bunch of IS_CAMEL_* macros to CAMEL_IS_*
* Namespace cleanup: change a bunch of IS_CAMEL_* macros to
CAMEL_IS_*
Chris Toshok [Wed, 13 Dec 2000 19:40:53 +0000 (19:40 +0000)]
add #include <sys/types.h> for freebsd.
2000-12-13 Chris Toshok <toshok@helixcode.com>
* providers/imap/camel-imap-auth.c: add #include <sys/types.h> for
freebsd.
Christopher James Lahey [Tue, 12 Dec 2000 23:31:40 +0000 (23:31 +0000)]
Added #ifndef NO_WARNINGS around a #warning. Added (void) to the prototype
2000-12-12 Christopher James Lahey <clahey@helixcode.com>
* camel-folder-summary.c, camel-folder-summary.h: Added #ifndef
NO_WARNINGS around a #warning. Added (void) to the prototype and
declaration of camel_message_info_new.
* camel-mime-message.h: Added an include for
camel-mime-filter-bestenc.h. Added a prototype for
camel_mime_message_set_best_encoding. Reformatted prototypes to
line up.
* camel-mime-parser.c: Added #if d(!)0 around the states string
lookup table since it's only used in debugging output.
* camel-seekable-substream.c (stream_flush): Added a cast.
* providers/imap/camel-imap-auth.c: Added #include <netinet/in.h>.
* providers/imap/camel-imap-folder.c (imap_refresh_info): Made uid
and flags const to fix warnings here.
* providers/imap/camel-imap-store.c (get_folder_info): Made p
const to fix warnings here.
Dan Winship [Tue, 12 Dec 2000 23:10:39 +0000 (23:10 +0000)]
Add missing .h file. (From campd.)
* tests/lib/Makefile.am: Add missing .h file. (From campd.)
Michael Zucci [Mon, 11 Dec 2000 11:40:15 +0000 (11:40 +0000)]
Remove use of linewrap filter. Headers are now wrapped. encode_8bit
* providers/smtp/camel-smtp-transport.c (smtp_data): Remove use of
linewrap filter. Headers are now wrapped. encode_8bit already
enforces a 998 octet line limit.
(smtp_data): Also fixed a memleak, we always have to unref our own
copy of the filters. We also dont need to remove them manually,
so dont bother. The type's an int too ...
* camel-internet-address.c (internet_unformat): When scanning past
quotes, remove them also.
(camel_internet_address_format_address): If the name contains "'s,
or ','s then strip and quotes and wrap the whole lot in one set of
quotes.
* Makefile.am (noinst_HEADERS): We dont want to install
camel-charset-map-private.h, ever. There are probably other
similar files ..?
* camel-mime-part.c (write_to_stream): Fold header lines
appropriately as we're writing them out.
* camel-mime-utils.c (header_fold): Add a new argument, headerlen,
tells it how long the associated header token is.
(header_fold): Also,k check to see if we need to fold first, using
a better algorithm, and also accept already-folded lines, and
re-process accordingly.
(rfc2047_decode_word): Add a little buffer space to iconv output
for shifting overheads?
(rfc2047_decode_word): finish the iconv with a null call, to flush
shift state, etc.
(rfc2047_encode_word): Attempt to break up long words into
appropriately sized, independent, chunks. See rfc2047, section 2.
(header_decode_mailbox): Dont add in extra spaces into the output
if we are decoding adjacent encoded words. We can only guess this
case, as some broken mailers put encoded words inside quoted
words.
(header_encode_phrase): Dont merge words if they are going to end
up too long. Also change back ot only merge consecutive words of
the same type. e.g. 'foo. blah fum.' -> "foo." blah "fum." or
'iam an. idiot' -> iam "an." idiot
Not Zed [Mon, 11 Dec 2000 04:09:03 +0000 (04:09 +0000)]
Hrm, we actually want to call set_header, not add_header here, probably
2000-12-11 Not Zed <NotZed@HelixCode.com>
* camel-medium.c (camel_medium_set_header): Hrm, we actually want
to call set_header, not add_header here, probably explains some
duplicate X-Evolution headers i was trying to track down. Also
changed the api to handle a NULL value == remove the header.
* providers/local/camel-maildir-summary.c
(maildir_summary_decode_x_evolution): Always return error, we dont
use x-evolution for maildir.
(maildir_summary_encode_x_evolution): Always return a NULL string,
likewise.
(maildir_summary_add): Hook in here, since the _new function
doesn't have access to any flags from the caller. If we have
flags, then update the filename again. Not ideal, but should
work.
Michael Zucci [Fri, 8 Dec 2000 18:06:19 +0000 (18:06 +0000)]
oops
JP Rosevear [Fri, 8 Dec 2000 17:55:41 +0000 (17:55 +0000)]
Shush
JP Rosevear [Fri, 8 Dec 2000 17:52:27 +0000 (17:52 +0000)]
Remove test3 from build until the files show up
2000-12-08 JP Rosevear <jpr@helixcode.com>
* tests/message/Makefile.am: Remove test3 from build until the files
show up
2000-12-08 JP Rosevear <jpr@helixcode.com>
* Makefile.am: Remove files from extra_dist since they are already
listed
Not Zed [Fri, 8 Dec 2000 14:22:36 +0000 (14:22 +0000)]
Change the sign of the default date offset when none is supplied.
2000-12-09 Not Zed <NotZed@HelixCode.com>
* camel-mime-message.c (camel_mime_message_set_date): Change the
sign of the default date offset when none is supplied.
(camel_mime_message_set_date): Also do dst if its dst (forward 1
hour). Fixes #928 + some.
Not Zed [Thu, 7 Dec 2000 22:28:59 +0000 (22:28 +0000)]
Change line no format so that emacs can detect it.
2000-12-06 Not Zed <NotZed@HelixCode.com>
* tests/lib/camel-test.h (check): Change line no format so that
emacs can detect it.
Jeffrey Stedfast [Thu, 7 Dec 2000 02:02:43 +0000 (02:02 +0000)]
We want to bitwise-or the server and cached flags here so that we keep the
2000-12-06 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_refresh_info): We want
to bitwise-or the server and cached flags here so that we keep the
flags that we have set locally and set any additional flags that a
parallel connection may have set.
Jeffrey Stedfast [Tue, 5 Dec 2000 23:47:50 +0000 (23:47 +0000)]
If the data wrapper fails to be written to the stream, unref it and the
2000-12-05 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.c (smtp_data): If the data
wrapper fails to be written to the stream, unref it and the
filters before returning.
Dan Winship [Tue, 5 Dec 2000 22:58:41 +0000 (22:58 +0000)]
(imap_refresh_info): Fix a really really really dumb bug.
Dan Winship [Tue, 5 Dec 2000 22:20:10 +0000 (22:20 +0000)]
use BODY.PEEK[] rather than RFC822, so the message doesn't get marked as
* providers/imap/camel-imap-folder.c (imap_get_message): use
BODY.PEEK[] rather than RFC822, so the message doesn't get marked
as \Seen.
Dan Winship [Tue, 5 Dec 2000 16:46:15 +0000 (16:46 +0000)]
Fix the check for "flags aren't actually changing".
* providers/imap/camel-imap-folder.c (imap_set_message_flags): Fix
the check for "flags aren't actually changing".
* providers/local/camel-local-folder.c (local_set_message_flags,
local_set_message_user_flag, local_set_message_user_tag): Don't
emit message_changed unless the flags actually changed.
* providers/nntp/camel-nntp-folder.c
(nntp_folder_set_message_flags): Don't emit message_changed unless
the flags actually changed. Fix the check for marked as seen.
Michael Zucci [Tue, 5 Dec 2000 12:07:01 +0000 (12:07 +0000)]
Stream testing stuff.
Not Zed [Tue, 5 Dec 2000 11:50:32 +0000 (11:50 +0000)]
stream_flush does make sense for a substream afterall (if you have a
2000-12-05 Not Zed <NotZed@HelixCode.com>
* camel-seekable-substream.c (stream_flush): stream_flush does
make sense for a substream afterall (if you have a stream_write).
(stream_write): Implement this.
(stream_seek): Change the STREAM_END behaviour to be more sane.
if bounded go from the end of the bound, if unbounded, go from the
end of the parent stream.
* camel-stream-mem.c (stream_read): Dont return error if reading
past the end of data, just return 0.
* camel-stream-fs.c (camel_stream_fs_init): Initialise the stream
to be unbound.
(stream_seek): Fix the logic when seeking from the end of an
unbounded stream.
(camel_stream_fs_new_with_fd): If the fd is invalid (-1), then
return NULL immediately.
(stream_seek): Range check a SEEK_END so it fits within
bound_start.
2000-12-01 Not Zed <NotZed@HelixCode.com>
* tests/lib/folders.c (test_folder_basic): New test to perform
basic store operations on folders (taken from folders/test1).
(test_folder_message_ops): Tkane the guts out of folders/test2.
Jeffrey Stedfast [Mon, 4 Dec 2000 22:37:45 +0000 (22:37 +0000)]
i18n-ize exception strings. (get_name): And here. (_send_to): Here too.
2000-12-04 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.c (smtp_connect): i18n-ize
exception strings.
(get_name): And here.
(_send_to): Here too.
(smtp_helo): And here and there...
(smtp_mail): And around the square...
(smtp_rcpt): Saying catch me if you can...
(smtp_data): And here three.
(smtp_rset): And here.
(smtp_quit): And finally here.
Michael Zucci [Mon, 4 Dec 2000 12:59:01 +0000 (12:59 +0000)]
added some imap tests, tho they dont get far yet and dont
recover automatically.
Jeffrey Stedfast [Sat, 2 Dec 2000 03:55:18 +0000 (03:55 +0000)]
Added system_flag to CamelFolderSearchClass
2000-12-01 Jeffrey Stedfast <fejj@helixcode.com>
* camel-folder-search.h: Added system_flag to CamelFolderSearchClass
* camel-folder-summary.c (camel_system_flag_get): Convenience
function to return whether or not a flag is set using a string as
the flag name.
(camel_system_flag): Return the integer value of the flag string.
* camel-folder-search.c (search_system_flag): New ESExp callback
for allowing vfoldering on CamelMessageInfo flags.
Dan Winship [Fri, 1 Dec 2000 17:32:42 +0000 (17:32 +0000)]
Don't g_return_if_fail if the service is already disconnected. Just
* camel-service.c (camel_service_disconnect): Don't
g_return_if_fail if the service is already disconnected. Just
return.
* providers/pop3/camel-pop3-store.c (pop3_try_authenticate):
Return FALSE (don't try again) if we get CAMEL_POP3_FAIL.
(pop3_connect): If we don't succeed, disconnect.
Jeffrey Stedfast [Fri, 1 Dec 2000 04:25:43 +0000 (04:25 +0000)]
Fix a possible bug where 'name' could be uninitialized.
2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c
(parse_list_response_as_folder_info): Fix a possible bug where
'name' could be uninitialized.
* camel-folder-summary.c (camel_message_info_new): New convenience
function, doesn't do much but it sure makes code cleaner to read.
(camel_message_info_new_from_header): This one makes my life heaven.
Jeffrey Stedfast [Fri, 1 Dec 2000 00:34:33 +0000 (00:34 +0000)]
New convenience function, doesn't do much but it sure makes code cleaner
2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
* camel-folder-summary.c (camel_message_info_new): New convenience
function, doesn't do much but it sure makes code cleaner to read.
(camel_message_info_new_from_header): This one makes my life heaven.
Jeffrey Stedfast [Thu, 30 Nov 2000 21:15:09 +0000 (21:15 +0000)]
Handle the case where the summary failed to load - clear the summary and
2000-11-30 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-summary.c (camel_imap_summary_new):
Handle the case where the summary failed to load - clear the
summary and then set the dirty bit so that it is sure to save
later. Is this the right fix?
Dan Winship [Thu, 30 Nov 2000 20:53:55 +0000 (20:53 +0000)]
Remove unused variable.
* camel-exception.c (camel_exception_setv): Remove unused
variable.
Not Zed [Thu, 30 Nov 2000 11:05:36 +0000 (11:05 +0000)]
Remove assertion that content is there, when it no longer can be.
2000-11-30 Not Zed <NotZed@HelixCode.com>
* providers/local/camel-mbox-folder.c (mbox_get_message): Remove
assertion that content is there, when it no longer can be.
* camel-folder-summary.h: Removed pos/bodypos/endpos from
camelmeessagecontentinfo.
(CamelMessageFlags): Added an attachments flag.
* providers/local/camel-local-summary.h: Added load virtual
function.
* tests/lib/folders.c (test_message_info): Accessors.
(test_folder_message): "
* camel-folder-thread.c (get_root_subject): Fix accessors.
(dump_tree_rec): "
* camel-folder-search.c (camel_folder_search_execute_expression):
Accessors for messageinfo.
(search_match_all): "
(search_header_contains): "
(search_header_contains): "
(search_body_contains): "
(camel_folder_search_execute_expression): Use mepool_strdup.
* providers/local/camel-mbox-summary.c (summary_update): Accessors
for messageinfo.
(mbox_summary_sync_full): "
* providers/local/camel-mh-summary.c (remove_summary): Accessors
for messageinfo.
(mh_summary_check): "
(mh_summary_sync_message): "
(mh_summary_sync): "
* providers/local/camel-mh-folder.c (mh_append_message): Use
accessor for uid.
* providers/local/camel-local-summary.c
(local_summary_decode_x_evolution): Use accessor to uid.
(local_summary_encode_x_evolution): Likewise.
(message_info_new): And here.
(camel_local_summary_load): Call virtual load function.
(local_summary_load): Default load function, load summary.
(camel_local_summary_load): Check file exists before trying to
load.
(camel_local_summary_construct): Turn off building content info!
(CAMEL_LOCAL_SUMMARY_VERSION): Bump, since we dont build content
info anymore.
(camel_local_summary_load): After a successful load/check, do a
save too so we dont have to go through it again randomly.
* providers/nntp/camel-nntp-utils.c (get_XOVER_headers): Use
accessors for messageinfo.
* providers/nntp/camel-nntp-folder.c (nntp_folder_get_uids): Use
accessors for uid.
* providers/imap/camel-imap-folder.c (imap_refresh_info): Use
accessor for uid.
(imap_sync): Likewise.
(imap_get_uids): Likewise.
(imap_update_summary): And here.
* providers/vee/camel-vee-folder.c (vfolder_remove_match): Use
accessor for uid.
(vfolder_add_match): Handle estrv stuff.
(vfolder_change_match): Accessor for uid.
(get_real_message): "
(vee_get_uids): "
(vee_folder_build): " + estrv.
(vee_folder_build_folder): "
* providers/local/camel-maildir-folder.c (maildir_append_message):
Use acccessors for uid's.
(maildir_get_message): Here too.
* providers/local/camel-maildir-summary.c
(camel_maildir_summary_init): Setup the string count for us.
(message_info_new): Access the string array directly.
(message_info_free): No need to free string if using array.
(camel_maildir_summary_info_to_name): Use accessor to get to uid.
(remove_summary): And here.
(maildir_summary_check): Likewise.
(maildir_summary_sync): And here.
(maildir_summary_load): Load up a cache of uid->filename mappings
before loading the actual summary file. This saves us having to
waste the diskspace storing the filenames in the summary itself,
and also helps us sync the summary better on load.
(message_info_load): If we have the load_map setup, and the uid
exists, then set the filename cache from it, and update the flags
from the name, incase our summary mismatches it.
* camel-folder-summary.c (camel_folder_summary_init): Setup string
count for compressed info record. An optional compile mode which
stores all strings for a given messageinfo into a packed array,
which should save 36-50 bytes/record.
(camel_folder_summary_info_new): Init the string array.
(message_info_new): Set the string array items, as required.
(message_info_load): And here too.
(message_info_save): Use accessors to get to strings.
(message_info_free): Free strings as one.
(camel_message_info_dup_to): Handle packed array case.
(camel_folder_summary_add): Use accessors. And pack the strv
before storing it.
(summary_assign_uid): New function to assign a unique uid to a
message, if it doesn't have one.
(camel_folder_summary_add): Call assign_uid instead of doing it
ourselves.
(camel_folder_summary_info_new_from_parser): "
(camel_folder_summary_info_new_from_message): "
(camel_folder_summary_encode_string): constify.
(camel_folder_summary_encode_token): "
(summary_build_content_info_message): Fix accessors to messageinfo.
(CAMEL_FOLDER_SUMMARY_VERSION): Bumped, for removal of
contentinfo->pos data.
(camel_folder_summary_info_new_from_parser): Calculate the size
based on the parser position, not the removed contentinfo stuff.
(camel_folder_summary_info_new_from_message): Remove size stuff.
(camel_folder_summary_offset_content): Removed, no longer means anything.
(content_info_new):
(content_info_load):
(content_info_save):
(summary_build_content_info): Remove stuff for contentinfo->pos*.
(summary_build_content_info): Take a msginfo argument, set
attachments flag if we find any attachments.
(summary_build_content_info_message): set attachments flag if we
find any attachments.
(camel_folder_summary_info_new_from_parser): Always scan the
content info, even if we dont save it.
(camel_folder_summary_info_new_from_message): And here too.
(summary_build_content_info): Only create the contentinfo stuff if
we have it turned on, otherwise just parse and discard.
(summary_build_content_info_message): Likewise.
Jeffrey Stedfast [Wed, 29 Nov 2000 21:35:14 +0000 (21:35 +0000)]
Updated the gtk-doc comment.
2000-11-29 Jeffrey Stedfast <fejj@helixcode.com>
* camel-store.c (camel_store_get_folder): Updated the gtk-doc
comment.
Dan Winship [Wed, 29 Nov 2000 20:41:08 +0000 (20:41 +0000)]
Use iconv instead of unicode_iconv.
* camel-mime-utils.c:
* camel-mime-filter-charset.c: Use iconv instead of unicode_iconv.
Dan Winship [Wed, 29 Nov 2000 20:04:16 +0000 (20:04 +0000)]
Fix some off-by-one-ness.
* providers/imap/camel-imap-command.c (imap_read_untagged): Fix
some off-by-one-ness.
* camel-stream-buffer.c (stream_read): Fix another bug found in
previously-unused code here.
Ettore Perazzoli [Wed, 29 Nov 2000 12:33:21 +0000 (12:33 +0000)]
Builddir != srcdir loving.
Not Zed [Wed, 29 Nov 2000 10:49:05 +0000 (10:49 +0000)]
Add a missed unref.
2000-11-29 Not Zed <NotZed@HelixCode.com>
* tests/message/test2.c (main): Add a missed unref.
* camel-stream-mem.c (camel_stream_mem_set_buffer): We must set
ourselves as the owner of the byte-array.
Weird, someone has modified this file (its been reindented), but i
can't see any changelogs ...
* tests/lib/messages.c (content_finalise): Fix memleak in tester,
free byte array when our content object is deleted.
* camel-folder-search.c (camel_folder_search_finalize): Yeah
great, so the sexp is a gtk object, not a camel object. Isn't
that going to be fun to fix?
* camel-session.c (camel_session_finalise): Free the storage path.
* providers/local/camel-local-store.c (camel_local_store_init): If
store->folders is setup, free it first, then overwrite. Hmm,
this seems a bit crappy to me.
* camel-store.c (camel_store_init): Dont setup store->folders if
its already setup.
* camel-exception.c (camel_exception_setv): Removed a memleak. no
need to strdup after a strdup_printf!!!
* camel-address.c (camel_address_finalize): Free the address
ptrarray, once finished.
* providers/local/camel-local-folder.c (local_finalize): Make sure
we dont leave the folder locked on close.
(local_finalize): Free summary/search.
* providers/local/camel-mh-summary.c (mh_summary_next_uid_string):
Small memleak, always free name after using it.
* camel-mime-part.c (set_content_object): Free txt after setting
the header.
* providers/local/camel-maildir-summary.c (maildir_summary_check):
Fix a memleak, close the dir after scanning new.
(message_info_free): Added so we can free the filename cached in
the messageinfo.
(camel_maildir_summary_finalise): Free the hostname.
* tests/folder/test[12].c (main): Clear out camel-test before
starting.
* providers/local/camel-mbox-summary.c (mbox_summary_sync_quick):
Because encode_x_evolution folds the line (sigh, because
encode_param does, unlike every other function in
camel-mime-utils), unfold the encoded result before comparing.
(mbox_summary_sync_quick): Another small memleak, free xevnew once
finished with it.
* camel-mime-utils.c (header_decode_quoted_string): Removed a
redundant check for c=0.
(header_unfold): New function to un-fold headers.
* providers/local/camel-local-summary.c
(local_summary_encode_x_evolution): some problems with encoding
tags, using the wrong output strings.
(local_summary_encode_x_evolution): We dont need to append a ;
either, param_list_format_append() will do it for us.
`
JP Rosevear [Wed, 29 Nov 2000 03:54:09 +0000 (03:54 +0000)]
Shush
JP Rosevear [Tue, 28 Nov 2000 22:58:58 +0000 (22:58 +0000)]
Add USE_FLOCK, USE_FCNTL, USE_FLOCK
2000-11-28 JP Rosevear <jpr@helixcode.com>
* acconfig.h: Add USE_FLOCK, USE_FCNTL, USE_FLOCK
* configure.in: Auto* magic for various camel locking types
2000-11-28 JP Rosevear <jpr@helixcode.com>
* camel-lock.c: No longer hard code the enabled lock types
Dan Winship [Tue, 28 Nov 2000 21:27:16 +0000 (21:27 +0000)]
Don't set exception to g_strerror (errno) when nread == 0, because it
* camel-remote-store.c (remote_recv_line): Don't set exception to
g_strerror (errno) when nread == 0, because it won't have been
set.
Dan Winship [Tue, 28 Nov 2000 20:36:46 +0000 (20:36 +0000)]
Don't try to free things if they haven't been set yet.
* providers/pop3/camel-pop3-folder.c (pop3_finalize): Don't try to
free things if they haven't been set yet.
Jeffrey Stedfast [Tue, 28 Nov 2000 17:29:40 +0000 (17:29 +0000)]
send NULL so we don't have to clear the exception
Jeffrey Stedfast [Tue, 28 Nov 2000 17:25:19 +0000 (17:25 +0000)]
Clear the exception if EHLO fails before trying HELO in the cases where
2000-11-28 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.c (smtp_connect): Clear the
exception if EHLO fails before trying HELO in the cases where the
SMTP provider doesn't announce its ESMTPness.
Not Zed [Tue, 28 Nov 2000 13:13:23 +0000 (13:13 +0000)]
Set the info size's properly, oops!
2000-11-28 Not Zed <NotZed@HelixCode.com>
* providers/local/camel-maildir-summary.c
(camel_maildir_summary_init): Set the info size's properly, oops!
* tests/lib/folders.[ch]: Folder testing helpers.
* tests/folder/test2.c: Test basic message ops on folders.
* tests/folder/test1.c (main): Test basic folder ops on (local)
stores.
* providers/local/camel-local-provider.c
(camel_provider_module_init): Removed some debug.
* providers/local/camel-maildir-folder.c
(camel_maildir_folder_class_init): fix parent class.
* providers/local/camel-mh-folder.c (camel_mh_folder_class_init):
Fix parent class (damn cut & paste).
* providers/local/camel-maildir-store.c (get_folder): Call parent
impl.
(camel_maildir_store_class_init): Fix parent class setup.
(delete_folder): Check the folder exists before trying to delete
it.
(delete_folder): Try and make the delete operation atomic/rollback
failures. e.g. if one directory isn't empty, then create the
other empty ones back. Also clear the tmp directory fully first.
* providers/local/camel-mbox-store.c (get_folder): Call parent
impl.
(camel_mbox_store_class_init): parent class is camel_local_store,
not camel_folder, oops.
(delete_folder): Return an error if it doesn't exist, rather than
covering it up.
* providers/local/camel-mh-store.c (get_folder): Call parent impl.
(camel_mh_store_class_init): fix parent class setup.
(delete_folder): Error if it doesn't exist now.
* camel-folder.c (camel_folder_move_message_to):
(camel_folder_copy_message_to): Added warnings as these functions
are going to be removed later.
* camel-store.c (camel_store_get_root_folder): Fix for an early
api change. We want CAMEL_STORE_FOLDER_CREATE, not TRUE, since
its a flag.
(camel_store_get_default_folder): And here too.
* providers/local/camel-local-store.c (xrename): Handle renaming
folders differently to renaming files.
(get_default_folder_name): local stores dont have a default
folder, so make it so. Or at least, it doesn't seem to make sense
to have one.
(get_root_folder_name): Same for root.
(get_folder): Added parent implementation, that makes sure the
service path exists, if we are creating a new folder (but doesn't
create the folder).
2000-11-27 Not Zed <NotZed@HelixCode.com>
* providers/local/camel-local-store.c (xrename): Fixed races. Use
link/unlink, rather than rename, to properly detect overwriting
another file. And allow some files to be missing.
* providers/Makefile.am: Removed mh, mbox, added local, to the default.
Radek Doulik [Tue, 28 Nov 2000 12:54:31 +0000 (12:54 +0000)]
add scan = scan->next; to avoid infinite loop
2000-11-28 Radek Doulik <rodo@helixcode.com>
* providers/local/camel-local-summary.c
(local_summary_decode_x_evolution): add scan = scan->next; to
avoid infinite loop
Dan Winship [Tue, 28 Nov 2000 03:26:51 +0000 (03:26 +0000)]
Make this gratuitously more complicated. No wait, I mean, fix bugs. Now
* providers/imap/camel-imap-command.c (imap_read_untagged): Make
this gratuitously more complicated. No wait, I mean, fix bugs. Now
fully handles NULs in the data stream (which "can't happen" but
do) and also handles responses containing multiple literals. Also
does less copying than the original code.
* camel-stream-buffer.c (stream_read): Fix a bug that could make
it lose sync and/or overrun buffers.
JP Rosevear [Mon, 27 Nov 2000 20:30:51 +0000 (20:30 +0000)]
Remove "complete" field
2000-11-27 JP Rosevear <jpr@helixcode.com>
* conduit/address-conduit.h: Remove "complete" field
* conduit/address-conduit.c (print_local): Make it print useful debug
info
(print_remote): ditto
(local_record_from_ecard): Make sure phone numbers get out to the pilot
(ecard_from_remote_record): Set phone strings to "" if they are null
(sequence_complete): unref the book view
(view_cb): ref the book view
(free_prepare): do nothing
* backend/pas/pas-backend-file.c (pas_backend_file_book_view_free):
Destroy the card lists with the rest of the view.
(pas_backend_file_changes): Don't destroy the card lists here
(pas_backend_file_book_view_free): Free the card/id lists in the
change context here, the correct place.
(pas_backend_file_changes): instead of here...
2000-11-27 JP Rosevear <jpr@helixcode.com>
* conduits/todo/todo-conduit.c (free_prepare): Ditto
* conduits/calendar/calendar-conduit.c (free_prepare): Adjust
free_prepare to the correct signal parameters. Don't actually
do anything - there is a semantic discrepancy that needs to be
resolved.
2000-11-27 JP Rosevear <jpr@helixcode.com>
* providers/local/.cvsignore: shush
Not Zed [Mon, 27 Nov 2000 02:18:00 +0000 (02:18 +0000)]
Removed mh, mbox, added local, to the default.
2000-11-27 Not Zed <NotZed@HelixCode.com>
* providers/Makefile.am: Removed mh, mbox, added local, to the default.