Commit Graph

1110 Commits

Author SHA1 Message Date
36eaccbb3a only free the host if it was set. removes a run-time warning.
2003-04-23  Not Zed  <NotZed@Ximian.com>

        * providers/smtp/camel-smtp-transport.c (smtp_helo): only free the
        host if it was set.  removes a run-time warning.

svn path=/trunk/; revision=20949
2003-04-24 01:51:20 +00:00
9294fc3e56 #if 0 out some code that parsed the namespaces since the results aren't
2003-04-22  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-store.c (imap_connect_online): #if 0
	out some code that parsed the namespaces since the results aren't
	used and they generate debugging output.

svn path=/trunk/; revision=20936
2003-04-23 18:14:54 +00:00
04ccbdd8e8 ** for #40989
2003-04-17  Not Zed  <NotZed@Ximian.com>

        ** for #40989

        * camel-text-index.c (text_index_delete): delete the block
        file/key file directly, not just its files.

        * providers/local/camel-local-folder.c (local_delete): implement,
        just delete the index file if it exists.
        camel-store-delete-folder will delete other data (maybe it all
        should be done here).

        * camel-block-file.c (camel_key_file_finalise): keep lock around
        decrementing key file use count.
        (camel_key_file_delete): new function to delete the key file (&
        close it off).
        (key_file_use): if we've been deleted, always fail.
        (camel_block_file_finalise): only close the file if its a valid
        fd.
        (block_file_use): if we've been deleted, always fail.
        (camel_block_file_delete): delete the block file & close.
        (struct _CamelBlockFilePrivate): fix the !ENABLE_THREADS case to
        still compile this.

svn path=/trunk/; revision=20894
2003-04-19 03:15:54 +00:00
9a3c8bf152 Turn off debugging if CAMEL_VERBOSE_DEBUG isn't set.
2003-04-10  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/smtp/camel-smtp-transport.c: Turn off debugging if
	CAMEL_VERBOSE_DEBUG isn't set.

svn path=/trunk/; revision=20803
2003-04-10 17:13:15 +00:00
2e7d1434ae filter data test cases.
2003-04-10  Not Zed  <NotZed@Ximian.com>

        * tests/mime-filter/data: filter data test cases.

        * tests/mime-filter/test-tohtml.c: New test for html filter.

        ** See bug #40969

        * camel-mime-filter-tohtml.c (html_convert): Change the logic
        slightly, scan a whole line within the main loop.

svn path=/trunk/; revision=20799
2003-04-10 11:35:00 +00:00
94286866e7 Save the content size in a temp variable until after we've successfully
2003-04-09  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-utils.c (imap_body_decode): Save the
	content size in a temp variable until after we've successfully
	parsed all of the body_type_1part expr. Also fixed a type-o in the
	body_type_mpart case that caused the parser to fail.
	(imap_parse_body): On failure to parse the body, as we iterate
	through the child nodes, set their children/parent/next nodes to
	NULL so that content_info_free() won't double-free any of the
	other nodes we have already free'd (or are about to free).

svn path=/trunk/; revision=20795
2003-04-09 21:02:34 +00:00
552a2f3af8 Fixes for bug #40778. Probably others as well.
2003-04-08  Jeffrey Stedfast  <fejj@ximian.com>

	Fixes for bug #40778. Probably others as well.

	* providers/imap/camel-imap-utils.c (parse_params): Return 0 on
	success, or -1 on fail. The other small utility functions should
	probably do the same, but I was too lazy to fix them. Setting
	inptr to NULL is just lame.
	(imap_body_decode): New function to correctly parse a BODY
	response.
	(imap_parse_body): Rewritten to use the above function.

svn path=/trunk/; revision=20773
2003-04-09 00:09:24 +00:00
e73f740c72 Make sure host->h_name is not an empty string too? Apparently for one user
2003-04-08  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/smtp/camel-smtp-transport.c (smtp_helo): Make sure
	host->h_name is not an empty string too? Apparently for one user
	his resolved hostname is "". Go figure. Probably a broken system,
	but easy enough to work around.

svn path=/trunk/; revision=20768
2003-04-08 20:20:04 +00:00
f146a1feb5 If store->engine->line is NULL, use _("Unknown error") as the error string
2003-04-08  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/pop3/camel-pop3-store.c (pop3_try_authenticate): If
	store->engine->line is NULL, use _("Unknown error") as the error
	string instead.

svn path=/trunk/; revision=20765
2003-04-08 17:48:12 +00:00
777f8cf10f remove unused var.
2003-03-28  Not Zed  <NotZed@Ximian.com>

	* providers/local/camel-spool-store.c (get_folder): remove unused
	var.

	* providers/imap/camel-imap-utils.c (imap_parse_list_response):
	moved an unused var to the #if 0'd out block.

	* providers/imap/camel-imap-store.c
	(parse_list_response_as_folder_info): remove unused vars.

	* camel-index-control.c (main): deifne camel_init() before using
	it.

	* camel-vee-store.c (vee_get_folder): removed unused var.

	* camel-stream-mem.c (stream_write): warning -> fixme.

	* camel-stream-filter.c (_CamelStreamFilterPrivate): Add a ; to
	the end of the struct definition.

	* camel-store.c (camel_store_delete_folder): remove unused var.
	(camel_store_rename_folder): "
	(camel_store_unsubscribe_folder): "

	* camel-mime-part.c (write_to_stream): Changed warning into a
	TODO.
	(construct_from_parser): removed warning, the code was fixed.

	* camel-mime-message.c (construct_from_parser): Remove the
	warning, the code was fixed.

	* camel-mime-filter-enriched.c (camel_mime_filter_enriched_new):
	Remove unused var.

	* camel-medium.c (camel_medium_get_header): Removed warning, and
	changed docs to reflect it.

	* camel-gpg-context.c (gpg_ctx_parse_status): handle MODE_EXPORT
	as a noop (warning).

	* camel-folder.c (get_message_user_tag): changed a warning into a
	fixme (its not that important).
	(camel_folder_get_message_user_tag): "

	* camel-data-cache.c (data_cache_finalise): removed unused vars.
	(data_cache_expire): "

svn path=/trunk/; revision=20556
2003-03-28 00:13:46 +00:00
a7239ab18f camel-imap-command.c (imap_read_untagged) Integer overflow fix. If server
2003-03-24  Timo Sirainen  <tss@iki.fi>

	* camel-imap-command.c (imap_read_untagged) Integer overflow fix.
	If server sent a huge literal length, only a few bytes of memory
	was allocated to it, but server could write as much data there as
	it wanted.

svn path=/trunk/; revision=20484
2003-03-24 19:05:40 +00:00
becf944b42 Handle raw 8-bit From data "correctly". (The same way we handle
raw 8-bit Subject data.)

	* camel-mime-utils.c (header_decode_mailbox): Take a charset arg
	and pass it to header_decode_string.
	(header_decode_address): Take a charset arg and pass it to
	header_decode_mailbox.
	(header_mailbox_decode): Likewise.
	(header_address_decode): Take a charset arg and pass it to
	header_decode_address.

	* camel-folder-summary.c (summary_format_address): Take a charset
	arg and pass to header_address_decode.
	(message_info_new, camel_message_info_new_from_header): Pass
	charset to summary_format_address

	* camel-internet-address.c (internet_decode): Update for
	header_address_decode change. (Unfortunately we don't have a
	charset to pass here.)

	* camel-mime-message.c (camel_mime_message_build_mbox_from): Move
	this here from camel-mbox-summary since the same functionality is
	needed by evolution-mail too (and update for header_address_decode
	change)

	* providers/local/camel-mbox-summary.c
	(camel_mbox_summary_build_from): Moved to CamelMimeMessage

svn path=/trunk/; revision=20430
2003-03-20 16:43:29 +00:00
8148ebb2d9 Removed unused variable left over from my previous fix.
2003-03-17  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part.c (process_header): Removed unused variable left
	over from my previous fix.

	* providers/smtp/camel-smtp-transport.c (smtp_send_to): Don't pass
	'has_8bit_parts' to smtp_data() anymore.
	(smtp_data): No longer takes 'has_8bit_parts' argument. Ignore
	whether or not the message has 8bit parts when deciding what the
	required encoding type we need to enforce. Fixes bug #39744.

svn path=/trunk/; revision=20312
2003-03-17 16:53:57 +00:00
95b3485141 added a comment
svn path=/trunk/; revision=20241
2003-03-10 16:48:47 +00:00
414157e544 s/g_strncasecmp/strncasecmp/g
2003-03-06  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-utils.c (imap_next_word):
	s/g_strncasecmp/strncasecmp/g

	* camel-iconv.c: Updated to be an exact copy of e-iconv (except
	names changed). We don't use this yet, but we may in the future.

	* camel-url.c (camel_url_new_with_base): Here too.

	* camel-sasl-kerberos4.c (krb4_challenge): Use camel_strdown()
	here instead of g_strdown() since the latter has been deprecated.

	* providers/imap/camel-imap-utils.c (imap_parse_body): Use
	camel_strdown() since g_ascii_strdown() does not do what we
	thought.

	* providers/imap/camel-imap-store.c:
	s/strstrcase/camel_strstrcase/g

	* providers/imap/camel-imap-folder.c (do_append):
	s/strstrcase/camel_strstrcase/
	(handle_copyuid): Same.

	* string-utils.c (camel_strdown): New function because the
	g_ascii_strdown interface sucks.
	(camel_strstrcase): Renamed from strstrcase.

svn path=/trunk/; revision=20213
2003-03-06 21:42:11 +00:00
a0c1a491f1 Fixes for bug #39168
2003-03-06  Jeffrey Stedfast  <fejj@ximian.com>

	Fixes for bug #39168

	* providers/local/camel-spool-summary.c: Get rid of the empty
	private struct.

	* providers/local/camel-mbox-summary.c: Get rid of the empty
	private struct.

	* camel-vee-store.c: Get rid of the empty private struct.

	* camel-mime-filter-from.c: Get rid of the empty private struct.

2003-03-05  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/sendmail/camel-sendmail-transport.c
	(sendmail_send_to): Add a CRLF filter to the output stream to
	convert any CRLF sequences into plain old line-feeds to work
	around a bug in some local transport programs.

svn path=/trunk/; revision=20187
2003-03-06 14:39:30 +00:00
32a764399b Same as IMAP and POP.
2003-02-28  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/smtp/camel-smtp-transport.c (connect_to_server): Same
	as IMAP and POP.

	* providers/imap/camel-imap-store.c (connect_to_server): Same as
	the POP3 code.

	* providers/pop3/camel-pop3-store.c (connect_to_server): Pass in
	appropriate flags for camel_tcp_stream_ssl_new*() functions.

	* camel-tcp-stream-ssl.c (enable_ssl): Not all ssl/tls streams
	will want to allow each of SSLv2, SSLv3 and TLSv1 so use flags to
	decide which to enable/disable.
	(camel_tcp_stream_ssl_new): Now takes a flags argument to mask out
	which SSL/TLS versions the stream should be compatable with.
	(camel_tcp_stream_ssl_new_raw): Same.

svn path=/trunk/; revision=20111
2003-02-28 21:55:06 +00:00
531d7a496f Undo jeff's changes.
2003-02-27  Not Zed  <NotZed@Ximian.com>

	* camel-multipart-signed.c: Undo jeff's changes.

	* providers/local/camel-spool-store.c (scan_dir): Fix a paste-o in
	the object_bag_get key.

svn path=/trunk/; revision=20084
2003-02-27 04:53:09 +00:00
910eaf99d2 Don't write the passwd, fixes "bug" #38601.
2003-02-24  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/pop3/camel-pop3-stream.c (stream_write): Don't write
	the passwd, fixes "bug" #38601.

svn path=/trunk/; revision=20045
2003-02-24 20:30:00 +00:00
7588597e89 New function...back from the depths of hell from whence it came
2003-02-21  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-iconv.c (camel_iconv_charset_name): New function...back
	from the depths of hell from whence it came originally. Turns out
	that g_iconv_open() is lame and can't handle all the stuff we used
	to handle in e_iconv_charset_name().
	(camel_iconv_open): Use camel_iconv_charset_name() on the to/from
	charsets rather than camel_charset_canonical_name(). Now maybe
	g_iconv_open will work for charsets such as "ks_c_5601-1987".

	* providers/pop3/camel-pop3-store.c (pop3_connect): Reget the
	capabilities after a successful authentication.

	* providers/pop3/camel-pop3-engine.c (get_capabilities): If we are
	in the TRANSACTION state and CAPA did not list UIDL as a supported
	command, try checking for it the hard way.

svn path=/trunk/; revision=20033
2003-02-24 16:09:19 +00:00
1b5bcee1ed fixed a type-o that causes a segfault
svn path=/trunk/; revision=20031
2003-02-24 15:30:08 +00:00
fc1fc5f041 Do it the same way we just made the sendmail code do it.
2003-02-23  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/smtp/camel-smtp-transport.c (smtp_data): Do it the
	same way we just made the sendmail code do it.

	* providers/sendmail/camel-sendmail-transport.c
	(sendmail_send_to): My last change but in a better way.

svn path=/trunk/; revision=20023
2003-02-24 03:47:14 +00:00
8e6446e16b s/g_slist_free1/g_slist_free_1
svn path=/trunk/; revision=20001
2003-02-23 01:52:58 +00:00
a9d623d22f Remove all Bcc headers before sending to the smtp server.
2003-02-22  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/smtp/camel-smtp-transport.c (smtp_data): Remove all
	Bcc headers before sending to the smtp server.

	* providers/sendmail/camel-sendmail-transport.c
	(sendmail_send_to): Remove all Bcc headers before sending to
	sendmail.

svn path=/trunk/; revision=20000
2003-02-23 01:23:43 +00:00
6545e80191 Same as the gpg and pkcs7 contexts.
2003-02-14  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-smime-context.c (smime_get_password): Same as the gpg and
	pkcs7 contexts.

	* camel-sasl-popb4smtp.c (popb4smtp_challenge): Updated for
	camel_session_get_password().

	* camel-pkcs7-context.c (get_password): Same as the gpg code.

	* camel-gpg-context.c (gpg_ctx_parse_status): Updated for
	camel_session_get_password().

	* providers/smtp/camel-smtp-transport.c (smtp_connect): No need to
	set USER_CANCEL exception here as it is done by
	camel_session_get_password(). Also updated for the new
	get_password() API change.

	* providers/imap/camel-imap-store.c (imap_auth_loop): Updated for
	camel_session_get_password() changes. We don't need to play the
	"bad passwd" game here too, do we? Bah, probably should but I
	don't feel like it for now. Maybe when we rewrite the IMAP
	provider.

	* camel-session.c (camel_session_get_password): Now takes a
	'reprompt' argument that will force user-input to be given even if
	we have the passwd cached.

	* providers/pop3/camel-pop3-store.c (pop3_connect): Instead of
	uncaching the passwd after we receive a -ERR from the POP server,
	set 'reprompt' to TRUE to force user-input for the next password
	prompt (ie, make sure the front-end knows not to just return the
	cached value). The front-end can then decide to fill-in the
	user-input field with the last passwd that the user supplied.
	(pop3_try_authenticate): Now takes a reprompt argument which we
	pass into camel_session_get_password().

svn path=/trunk/; revision=19912
2003-02-14 20:11:53 +00:00
3e0211a7d2 Define in terms of privincludedir. (camellibexecdir): Define in terms of
* Makefile.am (libcamelincludedir): Define in terms of
	privincludedir.
	(camellibexecdir): Define in terms of privlibexecdir
	(libcamel_la_LDFLAGS): Remove -rpath. (automake will add that)

	* providers/imap/Makefile.am (libcamelimapincludedir): Define in
	terms of privincludedir.
	(INCLUDES): Remove -I$(includedir)
	* providers/local/Makefile.am: Likewise
	* providers/nntp/Makefile.am: Likewise
	* providers/pop3/Makefile.am: Likewise
	* providers/sendmail/Makefile.am: Likewise
	* providers/smtp/Makefile.am: Likewise

svn path=/trunk/; revision=19775
2003-02-05 22:34:18 +00:00
fb9018a61e Use g_ascii_strdown() instead of g_strdown, since g_strdown is deprecated.
2003-02-04  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-utils.c (imap_parse_body): Use
	g_ascii_strdown() instead of g_strdown, since g_strdown is
	deprecated.
	(imap_parse_body): Same.

	* providers/imap/camel-imap-folder.c (decode_internaldate): Use
	strncasecmp() here too.
	(parse_fetch_response): And here.
	(camel_imap_folder_selected): Here too.

	* providers/imap/camel-imap-utils.c (imap_namespace_decode): Use
	strncasecmp() instead of g_strncasecmp() because the latter is
	deprecated.

	* providers/imap/camel-imap-store.c (imap_get_capability): Again here.
	(hash_folder_name): Here too.
	(compare_folder_name): And here.
	(get_folder_online): Again.
	(get_folder_offline): And again.

	* providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
	Same as below again.

	* providers/imap/camel-imap-command.c (camel_imap_response_free):
	Same as below.

	* providers/smtp/camel-smtp-transport.c (smtp_data): Use
	strcasecmp() because g_strcasecmp() is deprecated.

	* camel-url.c (camel_url_new_with_base): Use g_ascii_strdown()
	instead of g_strdown, since g_strdown is deprecated.

2003-01-28  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-sasl-gssapi.c (gssapi_challenge): Pass in some default
	flags to gss_init_sec_context() (these default flags are defined
	as a MUST in rfc1964).

svn path=/trunk/; revision=19748
2003-02-04 23:36:01 +00:00
5a2fc93d30 Update to the new $(BASE_VERSION)-versioned path. Likewise. Likewise.
* providers/imap/Makefile.am (libcamelimapincludedir): Update to
the new $(BASE_VERSION)-versioned path.
* providers/smtp/Makefile.am (libcamelsmtpincludedir): Likewise.
* providers/sendmail/Makefile.am (libcamelsendmailincludedir):
Likewise.
* providers/pop3/Makefile.am (libcamelpop3includedir): Likewise.
* providers/nntp/Makefile.am (libcamelnntpincludedir): Likewise.
* providers/local/Makefile.am (libcamellocalincludedir): Likewise.

* camel-lock-client.c (camel_lock_helper_init): Use
CAMEL_LIBEXECDIR instead of CAMEL_SBINDIR to find
camel-lock-helper.

* Makefile.am: Install camel-lock-helper and camel-index-control
in $(libexec)/evolution/$(BASE_VERSION)/camel.  Install
libcamel.la in $privlibdir.
(install-exec-hook): Update for the new location of
camel-lock-helper.
(libcamelincludedir): Version using $(BASE_VERSION).
(INCLUDES): Define CAMEL_LIBEXECDIR.

svn path=/trunk/; revision=19554
2003-01-22 20:08:56 +00:00
73fa3a6e62 Instead of checking recipients != NULL, check that camel_address_length
2003-01-04  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/smtp/camel-smtp-transport.c (smtp_send_to): Instead of
	checking recipients != NULL, check that camel_address_length
	(recipients) != 0 since it is illegal for recipients to be NULL
	(camel_transport_send_to already checks this).

svn path=/trunk/; revision=19235
2003-01-04 22:50:01 +00:00
d5921b4c54 commit this too
svn path=/trunk/; revision=19155
2002-12-17 21:48:23 +00:00
a84f11d6bd Replace calls to g_string_sprintfa() with g_string_append_printf() since
2002-12-17  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-utils.c: Replace calls to
	g_string_sprintfa() with g_string_append_printf() since the former
	seems to have been deprecated.

	* providers/imap/camel-imap-search.c: Same.

	* providers/imap/camel-imap-folder.c: Here too.

	* providers/local/camel-mbox-summary.c: And here.

	* providers/local/camel-local-summary.c: Replace
	g_string_sprintf() with g_string_printf().

	* camel-data-cache.c (data_cache_expire): Replace
	g_string_sprintf() with g_string_printf().

	* camel-url.c: Replace calls to g_string_sprintfa() with
	g_string_append_printf() since the former seems to have been
	deprecated.

	* camel-service.c: Same.

	* camel-mime-utils.c: Here too.

svn path=/trunk/; revision=19154
2002-12-17 21:46:44 +00:00
24b06cb2a4 Use a bag instead of a hashtable to track the cache streams.
2002-12-07  Not Zed  <NotZed@Ximian.com>

	* camel-data-cache.c (data_cache_init): Use a bag instead of a
	hashtable to track the cache streams.
	(data_cache_finalise): Same.
	(free_busy): No longer needed.
	(data_cache_expire): use bag instead of hashtable.
	(stream_finalised): No longer required.
	(camel_data_cache_add): objectbagise
	(camel_data_cache_get): "
	(camel_data_cache_remove): "
	(data_cache_path): Set the now expired date before running expiry,
	so it plays better with multiple threads.  Still a couple of
	harmless races.

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

	* providers/local/camel-spool-store.c (scan_dir): folders ->
	object bag.
	(get_folder_info_mbox): folders -> object bag.

	* providers/local/camel-mh-store.c (folder_info_new): folders ->
	object bag.

	* providers/local/camel-maildir-store.c (scan_dir): folders ->
	object bag.

	* providers/local/camel-local-store.c (rename_folder): folders ->
	object bag.

	* camel-private.h (CamelStorePrivate): Remove 'cache' lock,
	handled by the objectbag.

	* providers/imap/camel-imap-store.c (copy_folder): Removed.
	(imap_store_refresh_folders): folders -> object bag.
	(get_folder_counts): folders -> object bag.

	* camel-vee-store.c (vee_get_folder): changes for folders
	objectbag.
	(vee_get_folder_info): Change to use folders objectbag.  Also,
	dont refresh the base folder if we're in FAST mode.
	(build_info): Removed, no longer needed.
	(vee_rename_folder): Fixed for folders objectbag.

	* camel-store.c (camel_store_init): init the folders objectbag.
	(camel_store_finalize): Destroy the folders object bag.
	(folder_matches):
	(folder_finalize): Removed, now handled implicitly by the
	objectbag.
	(camel_store_get_folder): object bag changes.
	(camel_store_delete_folder): "
	(get_subfolders): Removed, now handled without a callback.
	(camel_store_rename_folder): Changed to use object bag of folders.
	(trash_add_folder): Removed.
	(init_trash): use folders object bag.
	(copy_folder_cache):
	(sync_folder): Removed, no longer needed.  Weird arsed code anyway.
	(store_sync): Use folder object bag instead of hashtable.
	(camel_store_unsubscribe_folder): "
	(camel_store_init): remove cache_lock init, no longer used.
	(camel_store_finalize): Same for cleanup.

2002-12-05  Not Zed  <NotZed@Ximian.com>

	* camel-store.h (struct _CamelStore): change folders from a
	hashtable into a CamelObjectBag.

	* camel-object.c (camel_object_ref): Use type_lock instead of
	class lock for ref counting.
	(camel_object_unref): Use type_lock instead of class lock for
	unref.
	(camel_object_unref): If the object is 'bagged', then also look
	hooks, and remove it from any bags.
	(camel_object_bag_new):
	(camel_object_bag_destroy):
	(camel_object_bag_add):
	(camel_object_bag_get):
	(camel_object_bag_remove_unlocked):
	(camel_object_bag_list):
	(camel_object_bag_abort):
	(camel_object_bag_remove): New functions to implement a utility
	object which can manage a 'bag' of weakly ref'd children in an
	atomic & threadsafe way.

svn path=/trunk/; revision=19056
2002-12-09 00:28:06 +00:00
d4b7008db3 Properly handle the case where the namespace is "". Fixes bug #34975
2002-12-04  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-store-summary.c
	(camel_imap_store_summary_add_from_full): Properly handle the case
	where the namespace is "". Fixes bug #34975

svn path=/trunk/; revision=19002
2002-12-04 16:17:02 +00:00
239c8b9bf7 If we have a namespace of "", then always match any path.
2002-11-21  Not Zed  <NotZed@Ximian.com>

        * providers/imap/camel-imap-store-summary.c
        (camel_imap_store_summary_namespace_find_path): If we have a
        namespace of "", then always match any path.
        (camel_imap_store_summary_namespace_find_full): Same, for full
        names. Should address #33309 & friends.

svn path=/trunk/; revision=18884
2002-11-22 03:12:10 +00:00
7ac3df4983 If the namespace is at/below INBOX, check for the INBOX explicitly (since
2002-11-15  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-store.c (imap_connect_online): If the
	namespace is at/below INBOX, check for the INBOX explicitly (since
	it obviously won't show up in a LSUB INBOX.*). If either INBOX is
	not returned in the response or if the folder flags contain
	\NoSelect, subscribe to INBOX and then try LSUB again.

svn path=/trunk/; revision=18824
2002-11-18 13:23:32 +00:00
e1ef0a9ced Use g_strerror when setting an exception string (we need it to be in
2002-11-11  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-folder.c (get_message_simple): Use
	g_strerror when setting an exception string (we need it to be in
	UTF-8).

	* providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Use
	g_strerror when setting an exception string (we need it to be in
	UTF-8).

	* providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Use
	g_strerror when setting an exception string (we need it to be in
	UTF-8).
	(pop3_get_message): Same.

svn path=/trunk/; revision=18690
2002-11-11 06:40:28 +00:00
3eabd14ace Use g_strerror when setting an exception string (we need it to be in
2002-11-11  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/local/camel-spool-summary.c (spool_summary_sync_full):
	Use g_strerror when setting an exception string (we need it to be
	in UTF-8).
	(spool_summary_check): Here too.

	* providers/local/camel-spool-store.c (construct): Use g_strerror
	when setting an exception string (we need it to be in UTF-8).
	(get_folder): Same.
	(scan_dir): Here too.

	* providers/local/camel-spool-folder.c (spool_lock): Use
	g_strerror when setting an exception string (we need it to be in
	UTF-8).

	* providers/local/camel-mh-summary.c (mh_summary_check): Use
	g_strerror when setting an exception string (we need it to be in
	UTF-8).

	* providers/local/camel-mh-store.c (delete_folder): Use g_strerror
	when setting an exception string (we need it to be in UTF-8).

	* providers/local/camel-mbox-summary.c (summary_update): Use
	g_strerror when setting an exception string (we need it to be in
	UTF-8).
	(mbox_summary_sync_full): Here too.
	(mbox_summary_sync_quick): Same.
	(mbox_summary_sync): Also here.
	(camel_mbox_summary_sync_mbox): Again here.

	* providers/local/camel-mbox-folder.c (mbox_lock): Use g_strerror
	when setting an exception string (we need it to be in UTF-8).
	(mbox_append_message): Same.
	(mbox_get_message): Here too.

	* providers/local/camel-maildir-summary.c (maildir_summary_load):
	Use g_strerror when setting an exception string (we need it to be
	in UTF-8).
	(maildir_summary_check): Same.

	* providers/local/camel-maildir-store.c (get_folder): Use
	g_strerror when setting an exception string (we need it to be in
	UTF-8).
	(delete_folder): Same.
	(delete_folder): Here too.

	* providers/local/camel-local-summary.c (local_summary_sync): Use
	g_strerror when setting an exception string (we need it to be in
	UTF-8).

	* providers/local/camel-local-store.c (get_folder): Use g_strerror
	when setting an exception string (we need it to be in UTF-8).
	(create_folder): Same.
	(xrename): Here too.
	(rename_folder): And here.
	(delete_folder): Also here.

	* camel-provider.c (camel_provider_init): For debugging printfs,
	we want to use normal strerror (we want locale charset, not
	UTF-8).

	* camel-movemail.c (camel_movemail): Use g_strerror when setting
	an exception string (we need it to be in UTF-8).
	(movemail_external): Same.
	(camel_movemail_copy_file): Here too.
	(camel_movemail_solaris): Also here.

	* camel-mime-utils.c (rfc2047_decode_word): For debugging printfs,
	we want to use normal strerror (we want locale charset, not
	UTF-8).
	(header_encode_param): Same.

	* camel-mime-part-utils.c (convert_buffer): For debugging printfs,
	we want to use normal strerror (we want locale charset, not
	UTF-8).

	* camel-lock-client.c (camel_lock_helper_init): Use g_strerror
	when setting an exception string (we need it to be in UTF-8).

	* camel-data-cache.c (camel_data_cache_remove): Use g_strerror
	when setting an exception string (we need it to be in UTF-8).

	* camel-tcp-stream-raw.c (flaky_tcp_write): For debugging printfs,
	we want to use normal strerror (we want locale charset, not
	UTF-8).
	(flaky_tcp_read): Same.

	* camel-gpg-context.c (gpg_ctx_op_step): For debugging printfs, we
	want to use normal strerror (we want locale charset, not UTF-8).

	* camel-service.c (camel_gethostbyname): Use g_strerror when
	setting an exception string (we need it to be in UTF-8).

	* camel-lock.c (camel_lock_dot): Use g_strerror when setting an
	exception string (we need it to be in UTF-8).
	(camel_lock_fcntl): Same.

svn path=/trunk/; revision=18689
2002-11-11 06:24:56 +00:00
4eaf9e5699 Use g_path_get_basename instead of g_strdup (g_basename (filename)).
2002-11-01  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/local/camel-local-store.c (delete_folder): Use
	g_path_get_basename instead of g_strdup (g_basename (filename)).

svn path=/trunk/; revision=18498
2002-11-02 00:45:29 +00:00
29748a7520 Removed hash-table-utils.[c,h] from the build.
2002-10-31  Jeffrey Stedfast  <fejj@ximian.com>

	* Makefile.am: Removed hash-table-utils.[c,h] from the build.

	* hash-table-utils.[c,h]: Removed.

	* string-util.c: Imported g_strcase[hash,equal] into here so we
	can remove hash-table-utils.[c,h].

	* camel-medium.c: Removed #include "hash-table-utils.h"

	* camel-mime-message.c: Same here.

	* camel-mime-part.c: And here.

	* camel-session.c: Here too.

	* providers/imap/camel-imap-store-summary.c: #include
	string-utils.h instead of hash-table-utils.h

	* camel-charset-map.c: Same.

	* camel-folder-summary.c: Here too.

	* camel-provider.c: Again here.

	* camel-store-summary.c: And again...

svn path=/trunk/; revision=18473
2002-10-31 21:57:29 +00:00
d91b5bb034 ** For bug #31647 and bug #31456.
2002-10-24  Not Zed  <NotZed@Ximian.com>

        ** For bug #31647 and bug #31456.

        * camel-store-summary.c (store_info_string): for STORE_INFO_NAME,
        skip the leading /.

        * providers/imap/camel-imap-store.c
        (parse_list_response_as_folder_info): Remove jeff's last patch,
        and use the store summary to create the name and path of the
        folderinfo so it manages namespace issues.
        (get_folder_info_online): Just pass @top directly to
        build_folder_info always, since namespace is mapped to 1 tree
        level.
        (imap_build_folder_info): Remove jeff's last patch, dont strip
        leading /'s, they shouldn't exist.
        (imap_connect_online): Remove adding the INBOX here, we add it
        later.
        (get_subscribed_folders): Make sure INBOX is always in the list.
        some imap servers dont seem to let you subscribe to it(?), so
        always have it act as subscribed.

        * camel-store.c (camel_folder_info_build): back out the last 2
        patches from Jeff (for #31456) to get the original behaviour.
        (camel_folder_info_build): When creating a fake
        parent, dont strip the namespace from the full_name.  malloc keys
        in hash since we dont have them anymore.
        (free_name): Helper to free names.

        * providers/imap/camel-imap-store-summary.c
        (camel_imap_store_summary_namespace_new): Canonicalise the
        namespace (strip trailing dir_sep), and change the path to remove
        any /'s.
        (camel_imap_store_summary_namespace_find_path):
        (camel_imap_store_summary_namespace_find_full): new, find
        namespace by path/full name.
        (camel_imap_store_summary_full_from_path): Changed to a simple
        wrapper around path_to_full, after checking namespace.
        (camel_imap_store_summary_add_from_full): map the namespace if
        present.
        (camel_imap_store_summary_path_to_full): If namespace exists,
        unmap it.

svn path=/trunk/; revision=18424
2002-10-24 14:01:53 +00:00
08af37f568 Canonicalise the source_uri to not have a path. Fixes bug #32268.
2002-10-18  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-filter-driver.c (camel_filter_driver_filter_folder):
	Canonicalise the source_uri to not have a path. Fixes bug #32268.

2002-10-17  Jeffrey Stedfast  <fejj@ximian.com>

	Possible fix for bug #32270

	* providers/pop3/camel-pop3-store.c (try_sasl): If we get an I/O
	error, we should not be setting the CANT_AUTH exception but should
	instead be setting the SYSTEM exception. Also check for EINTR
	which signifies a USER_CANCEL exception.
	(pop3_try_authenticate): If the auth mechanism isn't supported,
	don't set the CANT_AUTH exception since then we will loop and try
	again with the same data which will just cause an infinite loop.
	(pop3_connect): Simplified a bit.

svn path=/trunk/; revision=18412
2002-10-22 18:17:06 +00:00
aa99a5060a If the response from the IMAP server is "No", don't set the
2002-10-08  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-command.c (imap_read_response): If the
	response from the IMAP server is "No", don't set the
	SERVICE_UNAVAILABLE exception, this makes error reporting in the
	UI for deleting IMAP folders that cannot be deleted inaccurate
	(ie, it reports "Cannot delete in offline mode" which is not the
	problem).

svn path=/trunk/; revision=18356
2002-10-09 17:29:34 +00:00
3b8bf37f68 Fixes bug #31752
2002-10-07  Jeffrey Stedfast  <fejj@ximian.com>

	Fixes bug #31752

	* providers/smtp/camel-smtp-transport.c (connect_to_server): Don't
	forget to send another EHLO command to the server once we toggle
	into STARTTLS mode.
	(smtp_helo): Reset any flags set using the EHLO response and also
	any authtypes.

svn path=/trunk/; revision=18334
2002-10-07 18:13:53 +00:00
566e0fe148 Add missing ;.
svn path=/trunk/; revision=18315
2002-10-03 01:54:52 +00:00
5799cfdcea /home/notzed/gnome/head/evolution/camel
2002-10-02  Not Zed  <NotZed@Ximian.com>

        * providers/imap/camel-imap-folder.c (get_matching): Set *set to
        NULL if we dont get any matches.
        (imap_sync_online): If we get no matches, skip any work, also
        reorder some code to make it easier to skip.  See #31031.

        * providers/imap/camel-imap-store.c
        (imap_check_folder_still_extant): Default to "TRUE", if the list
        command failed, it probably means a server problem, assume the
        worst.  This makes imap_refresh_info not clear the exception and
        crash.  Fixes crash of #31000.

2002-10-01  Not Zed  <NotZed@Ximian.com>

        * providers/imap/camel-imap-folder.c (imap_refresh_info): Make
        sure we pass the exception to imap_folder_selected(), otherwise
        failures can be lost.  See bug #31000.

2002-10-01  Not Zed  <NotZed@Ximian.com>

        * camel-folder.c (thaw): Add an assertion that the frozen count>0.
        (freeze): Same for >= 0.

        * camel-vee-folder.c (camel_vee_folder_remove_folder): Use the
        unmatched freeze_count when thawing folders removed from
        unmatched, rather than the folder's freeze_count.  Might be
        related to #27391.

svn path=/trunk/; revision=18314
2002-10-03 00:15:23 +00:00
7bbdb47dd5 Use strtol when decoding the timezone (since it can be negative) and don't
2002-10-01  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-folder.c (decode_internaldate): Use
	strtol when decoding the timezone (since it can be negative) and
	don't forget to increment inptr to the start of the time (ie,
	don't leave inptr pointing to the year when decoding the
	hour:min:sec).

svn path=/trunk/; revision=18283
2002-10-01 18:04:46 +00:00
6122b68bb1 Fixes bug #31456.
2002-09-30  Jeffrey Stedfast  <fejj@ximian.com>

	Fixes bug #31456.

	* providers/imap/camel-imap-store.c (imap_connect_online): Don't
	LSUB "" "*", instead get both an LSUB containing the subfolders of
	the namespace and an LSUB of INBOX (assuming namespace was
	non-empty). This fix really has nothing to do with bug #31456 but
	is what should have been done in the first place.
	(parse_list_response_as_folder_info): Simplify a tad and strip
	extra leading /'s from fi->path.
	(imap_build_folder_info): Strip extra leading /'s from fi->path.

	* camel-store.c (camel_folder_info_build): Don't strip the
	namespace from the fi->full_name when hashing or creating fake
	parent folder-infos. Fixes a bug I found while trying to reproduce
	bug #31456.
	(camel_folder_info_build_path): Strip off extra leading dir_sep
	chars from the path.

svn path=/trunk/; revision=18273
2002-09-30 22:57:42 +00:00
326d9cdc79 Don't strip the namespace from the fi->full_name when hasing or creating
2002-09-30  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-store.c (camel_folder_info_build): Don't strip the
	namespace from the fi->full_name when hasing or creating fake
	parent folders. Fixes a bug I found while trying to reproduce bug
	#31456.

svn path=/trunk/; revision=18270
2002-09-30 20:45:42 +00:00
1dcff68ce6 Remove debug content_info_dump, could cause a crash, and not really needed
2002-09-30  Not Zed  <NotZed@Ximian.com>

	* providers/imap/camel-imap-folder.c (imap_get_message): Remove
	debug content_info_dump, could cause a crash, and not really
	needed anymore.

	* camel-folder-summary.c (camel_content_info_dump): Check ci->type
	!= NULL before dereferencing it.  Should fix crash #31331.

svn path=/trunk/; revision=18259
2002-09-30 05:06:51 +00:00
7ed66fac42 New function to decode the INTERNALDATE response from an IMAP server so we
2002-09-27  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/imap/camel-imap-folder.c (decode_internaldate): New
	function to decode the INTERNALDATE response from an IMAP server
	so we don't have to use my broken-date-parser routines.

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

	* providers/imap/camel-imap-store.c (connect_to_server):
	NULL-check the streams before unreffing them in the case of a
	failure during ssl negotiations.

	* camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): Check
	SSL_ResetHandshake() for errors. Also force a handshake after
	we've reset the handshake state on the socket.

svn path=/trunk/; revision=18252
2002-09-27 20:20:08 +00:00