Commit Graph

81 Commits

Author SHA1 Message Date
1c3b066622 ** See bug #42540
2003-05-14  Not Zed  <NotZed@Ximian.com>

        ** See bug #42540

        * camel-service.c (camel_gethostbyname): pre-initialise the error
        return to invalid, so if we cancel, we definetly get a bad result.
        Also, for a valid return against result, not herr.
        (camel_gethostbyaddr): Likewise.

svn path=/trunk/; revision=21187
2003-05-15 01:00:56 +00:00
b610a4c040 Don't use setv when we don't need the stdarg interface.
2003-03-25  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-service.c (camel_gethostbyaddr): Don't use setv when we
	don't need the stdarg interface.
	(camel_gethostbyname): Same.

svn path=/trunk/; revision=20506
2003-03-25 16:44:34 +00:00
5c90cbb6e1 Replace calls to g_string_sprintfa() with g_string_append_printf() since
2002-12-17  Jeffrey Stedfast  <fejj@ximian.com>

	* 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=19153
2002-12-17 21:01:00 +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
72c3088777 fix non-ANSI switch statement.
* camel-mime-parser.c (folder_scan_drop_step): fix non-ANSI switch
        statement.

        * camel-service.c (service_getv): Likewise.

        * providers/imap/camel-imap-store.c (imap_getv): Likewise.

        * providers/pop3/camel-pop3-folder.c (cmd_builduid): Likewise.

svn path=/trunk/; revision=18157
2002-09-22 23:49:06 +00:00
c1ce3633db Only reconnect if we are already connected, if we are in a disconnected
2002-05-15  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-service.c (service_setv): Only reconnect if we are already
	connected, if we are in a disconnected state then no need to
	reconnect.

svn path=/trunk/; revision=16924
2002-05-15 19:07:08 +00:00
8f07d4c6ac Instead of testing for SERVICE_CONNECTED, we need to also handle
2002-05-09  Not Zed  <NotZed@Ximian.com>

        * camel-service.c (camel_service_disconnect): Instead of testing
        for SERVICE_CONNECTED, we need to also handle SERVICE_CONNECTING
        too, as it will often have setup some details before it failed.
        Make it !DISCONNECTED (and !DISCONNECTING for recursive calls,
        which happen).  Fixes #23782, and maybe also #21604 and many other
        random crashes.

svn path=/trunk/; revision=16730
2002-05-09 08:23:20 +00:00
4554c20766 Implemented. (digest_getv): Implemented.
2002-05-08  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-digest-store.c (digest_setv): Implemented.
	(digest_getv): Implemented.

	* camel-disco-store.c (disco_setv): Implemented.
	(disco_getv): Implemented.

	* camel-remote-store.c (remote_store_setv): Implemented.
	(remote_store_getv): Implemented.

	* camel-transport.c (camel_transport_class_init): Implemented.
	(transport_setv): Implemented.
	(transport_getv): Implemented.

	* camel-store.c (store_setv): Implemented.
	(store_getv): Implemented.

	* camel-service.c (service_setv): Implemented.
	(service_getv): Implemented.

svn path=/trunk/; revision=16729
2002-05-08 21:58:37 +00:00
e743216486 Change the order of some code so that we check if the select() failed
2002-05-02  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-pgp-context.c (crypto_exec_with_passwd): Change the order
	of some code so that we check if the select() failed before we
	check for user-cancellation.

	* camel-service.c (camel_gethostbyname): Check for EINTR when
	select()ing.
	(camel_gethostbyaddr): Same.

svn path=/trunk/; revision=16666
2002-05-02 18:19:57 +00:00
fc281a966c Get rid of an unused variable.
2002-04-16  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-filter-driver.c (camel_filter_driver_filter_folder): Get
	rid of an unused variable.

	* providers/smtp/camel-smtp-transport.c (smtp_helo): Use
	camel_gethostbyaddr since gethostbyaddr is not reentrant.

	* camel-http-stream.c (http_connect): Updated after the rename of
	camel_get_host_byname.

	* camel-service.c (camel_gethostbyname): Renamed.
	(camel_gethostbyaddr): New cancellable/reentrant version of
	gethostbyaddr.

svn path=/trunk/; revision=16484
2002-04-17 01:25:28 +00:00
66587d89a3 Keep a name-to-type hash so that we can make sure that the type has not
2001-12-11  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-object.c (camel_type_register): Keep a name-to-type hash
	so that we can make sure that the type has not yet been registered
	(prevents a race condition such as the one in bug #16559).

	* camel-service.c (camel_service_connect): Make sure that the
	connect_op is non-NULL before unregistering/unreffing it.

svn path=/trunk/; revision=15021
2001-12-13 20:38:11 +00:00
08fb7329cb Fixing the license text.
svn path=/trunk/; revision=14212
2001-10-27 16:59:46 +00:00
02dcd0aadf Update the licensing information to require version 2 of the GPL
(instead of version 2 or any later version).

svn path=/trunk/; revision=14190
2001-10-27 00:25:49 +00:00
0
6e1a9c1903 oops, we want get_unread_message_count, not get_message_count!
2001-10-10    <NotZed@Ximian.com>

        * providers/local/camel-maildir-store.c (scan_dir): oops, we want
        get_unread_message_count, not get_message_count!

2001-10-09    <NotZed@Ximian.com>

        * camel-service.c (camel_service_disconnect): Duplicate connect
        code that unregisters a cancel op if we created one.

svn path=/trunk/; revision=13561
2001-10-10 19:48:27 +00:00
ba39d4fff5 Turn off warnings. (get_name): Same.
2001-10-05  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-service.c (camel_service_finalize): Turn off warnings.
	(get_name): Same.

	* camel-sasl.c (sasl_challenge): Turn off warnings.

	* camel-tcp-stream.c (tcp_connect): Turn off warnings.
	(tcp_getsockopt): Same.
	(tcp_setsockopt): Here too.
	(tcp_get_socket): And here.

	* camel-folder.c (folder_sync): Turn off warnings.
	(expunge): Same.
	(append_message): Here too.
	(get_message): And here.
	(search_by_expression): And again here.
	(folder_changed): Here too.

	* camel-store.c (get_folder): Set an exception and turn off
	debugging g_warnings.
	(create_folder): Same.
	(delete_folder): Here too.
	(rename_folder): And here.
	(get_trash): And here.
	(get_folder_info): Same.
	(free_folder_info): And again here.
	(camel_folder_info_build): Here too.
	(folder_subscribed): Same.
	(subscribe_folder): Here too.
	(unsubscribe_folder): And here.

svn path=/trunk/; revision=13458
2001-10-05 19:38:24 +00:00
16d6bd7083 Unregister the operation before unreffing it.
2001-10-04  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-service.c (camel_service_connect): Unregister the
	operation before unreffing it.

svn path=/trunk/; revision=13412
2001-10-04 18:12:22 +00:00
7
dcc2eea680 Dont re-register the connect_op if we got it by calling
2001-09-27    <NotZed@Ximian.com>

	* camel-service.c (camel_service_connect): Dont re-register the
	connect_op if we got it by calling 'operation_registered', which
	returns an already-registered one.
	(camel_service_disconnect): Likewise here.
	This removes all the re-registered warnings.

svn path=/trunk/; revision=13205
2001-09-27 23:24:01 +00:00
5120d7098b Change "gboolean connected" to "CamelServiceConnectionStatus status",
* camel-service.c: Change "gboolean connected" to
	"CamelServiceConnectionStatus status", which can be disconnected,
	connecting, connected, or disconnecting.
	(camel_service_init, camel_service_finalize): create/destroy the
	connect_op_lock. Refer to service->status rather than
	service->connected.
	(camel_service_connect): When connecting, note the current
	operation (and create a new one if there's none registered) and
	mark the connection "connecting" until we succeed or fail.
	(camel_service_disconnect): Likewise in reverse.
	(camel_service_cancel_connect): New function to cancel a
	connection attempt.
	(cancel_connect): Default implementation: Call
	camel_operation_cancel on the connect_op.

	* camel-disco-store.c (disco_connect): Only call
	CamelRemoteStore's connect func if we're online.
	(disco_cancel_connect): Fall back to offline if a connection gets
	cancelled.
	(disco_get_folder_info): Kludge: call connect explicitly before
	deciding whether to do the online or offline version, so if the
	connect fails, we fall back correctly.

	* camel-session.c (camel_session_get_service_connected):
	s/svc->connected/svc->status/

	* camel-remote-store.c (camel_remote_store_finalise):
	Change service->connected check to service->status check.
	(remote_connect): Don't set service->connected here:
	camel_service_connect() itself does that.

	* camel-operation.c (camel_operation_registered): Deal with the
	possibility that there's no registered op.

svn path=/trunk/; revision=13191
2001-09-27 14:39:39 +00:00
1b7cf38b9c Do a clean disconnect.
2001-09-04  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-service.c (camel_service_finalize): Do a clean disconnect.

svn path=/trunk/; revision=12593
2001-09-04 19:51:45 +00:00
81657a54af fixed a compile error
svn path=/trunk/; revision=12219
2001-08-19 17:32:40 +00:00
833bb47399 Added some operation progress reporting. Actual data transfer is 'tricky'
2001-07-23  Not Zed  <NotZed@Ximian.com>

	* providers/smtp/camel-smtp-transport.c (smtp_auth, smtp_helo,
	send_to): Added some operation progress reporting.  Actual data
	transfer is 'tricky' because of the layers used.
	(smtp_auth): Instead of checking exception_is_set, use
	challenge==NULL to test if sasl_challenge_base64 failed.

	* providers/local/camel-mbox-summary.c (mbox_summary_sync): Remove
	peters changes below and put in a better fix.  These functions
	already return -1 on error, just use that, and not worry about
	building our own exception redundantly.

	* camel-service.c (camel_get_host_byname): Turn the progress into
	a transient event.

svn path=/trunk/; revision=11301
2001-07-23 02:35:21 +00:00
9dfc5f64b5 D'oh. s/FALSE/CAMEL_URL_HIDE_PASSWORD/
* camel-service.c (camel_service_get_url): D'oh.
        s/FALSE/CAMEL_URL_HIDE_PASSWORD/

svn path=/trunk/; revision=10505
2001-06-26 17:50:48 +00:00
91cc026904 Update the copyrights, replacing Helix Code with Ximian and
helixcode.com with ximian.com all over the place.

svn path=/trunk/; revision=10440
2001-06-23 08:52:02 +00:00
f9189bfda9 Use e_gethostbyname_r. (camel_service_gethost): Remove unused var.
* camel-service.c (get_host): Use e_gethostbyname_r.
	(camel_service_gethost): Remove unused var.

svn path=/trunk/; revision=9583
2001-04-26 16:48:35 +00:00
f132c28d7f Check if gethostbyname_r take five params
2001-04-11  JP Rosevear  <jpr@ximian.com>

	* configure.in: Check if gethostbyname_r take five params

	* acconfig.h: add GETHOSTBYNAME_R_FIVE_ARGS

2001-04-11  JP Rosevear  <jpr@ximian.com>

	* providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome
	files are included in the top level camel headers and the gtk
	include dir is now versioned and such

	* providers/local/Makefile.am: ditto

	* providers/pop3/Makefile.am: ditto

	* providers/smtp/Makefile.am: ditto

	* providers/sendmail/Makefile.am: ditto

	* camel-service.c: use five arg version of gethostbyname_r if
	appropriate
	(camel_get_host_byname): check if msg->herr is non-zero instead of
	checking if msg->hp is null since we may not always have msg->hp

svn path=/trunk/; revision=9239
2001-04-11 16:10:30 +00:00
55c3dea839 Dont overwrite an exception if we got one already. Added camel_operation
2001-03-30  Not Zed  <NotZed@Ximian.com>

        * camel-service.c (camel_get_host_byname): Dont overwrite an
        exception if we got one already.  Added camel_operation status to
        it, and comment out some debug.

svn path=/trunk/; revision=9034
2001-03-30 01:08:28 +00:00
554de99b22 Not quite finished but checking in for some local frobbing.
2001-03-29  Not Zed  <NotZed@Ximian.com>

        * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host
        name info when done ... blah blah.

        * camel-sasl-kerberos4.c (krb4_challenge): Free host name info
        after we're done with it.

        * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name
        info after we're done with it.

        * camel-remote-store.c (remote_connect): Free the host name info
        from get_host after we're finished with it.

        * camel-service.c (camel_get_host_byname): New function to
        lookup a name, and still be cancellable.
        (camel_free_host): And a function to free the structure
        returned.
        (camel_service_gethost): Call get_host_byname for this.

svn path=/trunk/; revision=9033
2001-03-30 00:31:20 +00:00
fe962a2055 Big header cleanups and nntp compile fix
svn path=/trunk/; revision=9024
2001-03-29 20:31:40 +00:00
bd52985962 change "gboolean show_passwd" to "guint32 flags".
* camel-url.c (camel_url_to_string): change "gboolean show_passwd"
	to "guint32 flags".

	* tests/misc/url.c (main): Update calls to camel_url_to_string

	* providers/imap/camel-imap-store.c (construct): Call
	camel_url_to_string with flags to hide password, authtype, and
	params to create the base_url.
	(etc): Update for the fact that the base_url no longer has the "/"
	at the end.

	* camel-service.c (construct): Update calls to camel_url_to_string
	(pass CAMEL_URL_HIDE_PASSWORD)

svn path=/trunk/; revision=9014
2001-03-29 17:34:00 +00:00
505f6c235b Add the port (if user defined) to the path to fix bug #1996.
2001-03-27  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-service.c (get_path): Add the port (if user defined) to
	the path to fix bug #1996.

	Danw: I'm iffy on the "fix" so I'd like you to comment.

svn path=/trunk/; revision=8986
2001-03-28 02:19:05 +00:00
5d562c3d3d add a "GList *authtypes", so you can get the list of authtypes used by a
* camel-provider.h: (CamelProvider) add a "GList *authtypes", so
	you can get the list of authtypes used by a provider without
	needing to have an actual CamelService object handy. (Will be
	needed by the new config druid.)
	(CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test
	the URL part stuff, since the way it works is too complicated and
	everyone always does it wrong.

	* camel-service.c (camel_service_query_auth_types): Remove the
	@connected arg again: if you don't want to connect, you can just
	get the list of authtypes off the provider.
	(camel_service_free_auth_types): Remove this. All existing
	implementations do authtypes the same way, so just say the caller
	should "g_list_free" the list. (Oh, look, removing this function
	doesn't actually cause the mailer to not build. How 'bout that.)
	(construct, get_path): Use the new URL part macros.

	* camel-remote-store.c (remote_query_auth_types): Update
	(remote_free_auth_types): Nuke
	(camel_remote_store_authtype_list): New function for use by
	subclasses.

	* providers/imap/camel-imap-provider.c:
	* providers/pop3/camel-pop3-provider.c:
	* providers/smtp/camel-smtp-provider.c: Update CamelProvider
	structures.
	(camel_provider_module_init): Put all the SSL parts together so
	there's only 1 #ifdef. Set up the provider authtypes field using
	the SASL, CamelRemoteStore, and standard authtypes, as
	appropriate. Copy that from the normal provider to the SSL
	provider.

	* providers/local/camel-local-provider.c:
	* providers/sendmail/camel-sendmail-provider.c:
	* camel-session.c: Update CamelProvider structures.

	* providers/imap/camel-imap-store.c (query_auth_types):
	* providers/pop3/camel-pop3-store.c (query_auth_types): Update

	* providers/smtp/camel-smtp-store.c (query_auth_types): Update.
	Remove the no_authtype, because that's what "ALLOW_AUTH" rather
	than "NEED_AUTH" means.
	(free_auth_types): Nuke.

svn path=/trunk/; revision=8872
2001-03-21 22:20:29 +00:00
65eb577ecd Rewrite a bunch. Replace the existing folder cache stuff with much simpler
* camel-store.c: Rewrite a bunch. Replace the existing folder
	cache stuff with much simpler code that still handles all the
	existing cases. Now the folder hash table is always created by the
	base class, using hash and compare functions provided by the class
	implementation. (If they are set to NULL, CamelStore won't cache
	folders.) lookup_folder, cache_folder, and uncache_folder are no
	longer class methods, and get_name is gone completely.

	(camel_store_get_inbox): Renamed from
	camel_store_get_default_folder, since that wasn't being used, and
	this is what we actually need.
	(camel_store_get_root_folder): Removed, since it's not needed for
	anything given get_folder_info.

	* camel-remote-store.c:
	* providers/local/camel-local-store.c:
	* providers/local/camel-mbox-store.c:
	* providers/local/camel-mh-store.c:
	* providers/local/camel-maildir-store.c:
	* providers/nntp/camel-nntp-store.c:
	* providers/pop3/camel-pop3-store.c:
	* providers/vee/camel-vee-store.c: Minor updates for CamelStore
	changes

	* providers/imap/camel-imap-store.c (camel_imap_store_class_init):
	Update for CamelStore changes.
	(hash_folder_name, compare_folder_name): treat INBOX
	case-insensitively, otherwise use g_str_hash and g_str_equal.

	* camel-service.c (camel_service_construct): Remove
	camel_service_new and create camel_service_construct (as a class
	method) in its place.

	* camel-session.c (camel_session_get_service): Use
	camel_object_new and camel_service_construct to replace
	camel_service_new.

	* providers/local/camel-local-store.c (construct): Append a '/' to
	the URL path if it doesn't end with one

svn path=/trunk/; revision=8145
2001-02-09 16:43:22 +00:00
ddfc033633 Updated.
2001-02-05  Jeffrey Stedfast  <fejj@ximian.com>

	* providers/smtp/camel-smtp-transport.c (query_auth_types): Updated.

	* providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types):
	Updated.

	* providers/pop3/camel-pop3-store.c (query_auth_types): Updated.

	* providers/imap/camel-imap-store.c (query_auth_types): Updated.

	* camel-service.c (camel_service_query_auth_types): Now takes a
	boolean value to specify whether or not to connect when
	constructing a supported authtype list.

svn path=/trunk/; revision=7979
2001-02-05 19:55:54 +00:00
0d54c48352 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.

svn path=/trunk/; revision=7327
2001-01-09 19:27:27 +00:00
6de256c2a2 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.

svn path=/trunk/; revision=7150
2000-12-24 00:46:20 +00:00
dfee15e65a 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.

svn path=/trunk/; revision=6756
2000-12-01 17:32:42 +00:00
be043c8ce6 Fix the default implementation for CamelService::get_name() so that it
returns a malloced string instead of a static one.  (A static one
breaks the semantics of the method.)

svn path=/trunk/; revision=6483
2000-11-07 18:37:30 +00:00
f2f3ee373b fix bug in previous
svn path=/trunk/; revision=6373
2000-11-03 19:19:53 +00:00
5a4fa8505d Add an "url_flags" field to CamelProvider. Move the CAMEL_SERVICE_URL_*
* camel-provider.h: Add an "url_flags" field to CamelProvider.
	Move the CAMEL_SERVICE_URL_* defines here and remove the SERVICE_
	part of the name.

	* camel-service.h: Remove CAMEL_SERVICE_URL_* flags and
	service->url_flags field.

	* camel-service.c (check_url, get_path): Get URL flags from
	service->provider, update for changed flag names.

	* providers/*/camel-*-provider.c: Add URL flags to provider
	structures.

	* providers/*/camel-*-{store,transport}.c, camel-remote-store.c:
	Remove service->url_flags initialization.

svn path=/trunk/; revision=6370
2000-11-03 18:22:34 +00:00
517db3b21f Add a new argument, clean, that says whether or not to try to disconnect
* camel-service.c (service_disconnect): Add a new argument, clean,
	that says whether or not to try to disconnect cleanly.

	* camel-remote-store.c (remote_send_string, remote_send_stream,
	remote_recv_line): disconnect uncleanly on failure to prevent
	infinite loops when providers would normally send commands from
	disconnect(). Remove some unneeded CamelException goo.

	* providers/smtp/camel-smtp-transport.c (smtp_disconnect):
	* providers/pop3/camel-pop3-store.c (pop3_disconnect):
	* providers/nntp/camel-nntp-store.c (nntp_store_disconnect):
	* providers/imap/camel-imap-store.c (imap_disconnect): Don't send
	QUIT/LOGOUT if !clean.

svn path=/trunk/; revision=6303
2000-10-31 23:44:46 +00:00
360675f54b lots of i18n fixes
svn path=/trunk/; revision=6143
2000-10-24 05:23:27 +00:00
5da3981c90 when using the construct (flags & CAMEL_SERVICE_URL_NEED_*) make sure to
2000-10-16  Chris Toshok  <toshok@helixcode.com>

	* camel-service.c (get_path): when using the construct (flags &
	CAMEL_SERVICE_URL_NEED_*) make sure to do ((flags &
	CAMEL_SERVICE_URL_NEED_*) == CAMEL_SERVICE_URL_NEED_*)
	(check_url): same.

svn path=/trunk/; revision=5951
2000-10-16 23:09:35 +00:00
1fb4f1bfee Make this take a path to a directory that Camel can use for its own
* camel-session.c (camel_session_new): Make this take a path to a
	directory that Camel can use for its own nefarious purposes.
	(camel_session_get_storage_path): New function to return a path
	that a service can use for its own nefarious sub-purposes.

	* camel-service.c (camel_service_get_path): New method (and
	useful default implementation) to get a (relative) pathname
	corresponding to the service.

svn path=/trunk/; revision=5239
2000-09-07 19:59:53 +00:00
2bdcfe5c47 Make CamelServices connect only when told to (old behavior). Make CamelRemoteStore do its stuff in service::connect, not ::post_connect.
svn path=/trunk/; revision=5116
2000-08-30 17:09:42 +00:00
da570c6660 CamelRemoteStore: a new generic store for stores that connect to servers. Prepare for the ability to cancel operations (much better exception handling). Clean up IMAP like nobody's business
svn path=/trunk/; revision=5103
2000-08-29 21:28:46 +00:00
130bb0e571 Automatically connect services when given a valid URL (should hopefully disconnect, too); remove the old movemail folder correctly.
svn path=/trunk/; revision=4965
2000-08-22 20:09:11 +00:00
8cb514d6dd Merge with camel-async.
svn path=/trunk/; revision=4687
2000-08-10 17:30:50 +00:00
98753e92d2 New method, to return an end-user-friendly name corresponding to a
* camel-service.c (camel_service_get_name): New method, to return
	an end-user-friendly name corresponding to a service. (eg, "POP
	service for danw on trna.helixcode.com").

	* providers/imap/camel-imap-store.c,
	providers/mbox/camel-mbox-store.c,
	providers/nntp/camel-nntp-store.c,
	providers/pop3/camel-pop3-store.c,
	providers/sendmail/camel-sendmail-transport.c,
	providers/smtp/camel-smtp-transport.c: Implement.

svn path=/trunk/; revision=3851
2000-07-01 23:07:18 +00:00
a0b7ca18e2 Remove camel_service_connect_with_url. (URLs must be specified when the
* camel-service.c: Remove camel_service_connect_with_url. (URLs
	must be specified when the service is requested from the session,
	so that there can only ever be one service for any URL.)

svn path=/trunk/; revision=3584
2000-06-15 23:05:18 +00:00
631dda8ae0 Init filter_from to NULL, for exception case. (mbox_get_message_by_uid):
2000-05-30  Not Zed  <NotZed@HelixCode.com>

        * providers/mbox/camel-mbox-folder.c (mbox_append_message): Init
        filter_from to NULL, for exception case.
        (mbox_get_message_by_uid): Cast off_t to long int for diagnostics.

        * camel-url.c (camel_url_hash): Hash funciton for using camel
        url's as hash keys.
        (camel_url_equal): equal function for same.

        * camel-session.c (camel_session_finalise): Free cached services.
        (camel_session_init): Init service cache.
        (service_cache_remove): destroy callback to remove a service from
        the cache.

        * camel-store.c (get_folder_internal): Remove the extra ref of the
        folder.  That seems the right behaviour ...?
        (camel_store_get_type): Doh, actually call store init, so the
        cache works.
        (cache_folder): strdup the folder name!  no wonder it never found
        it again.

svn path=/trunk/; revision=3298
2000-05-30 22:35:40 +00:00