gboolean ok = FALSE;
service = CAMEL_SERVICE (is->store);
- settings = camel_service_get_settings (service);
priv = CAMEL_IMAPX_SERVER_GET_PRIVATE (is);
/* If priv->context is not NULL here, it basically means that
g_return_val_if_fail (priv->context == NULL, FALSE);
priv->context = g_new0 (CamelIMAPXServerUntaggedContext, 1);
+ settings = camel_service_ref_settings (service);
+
priv->context->lsub = FALSE;
priv->context->fetch_order = camel_imapx_settings_get_fetch_order (
CAMEL_IMAPX_SETTINGS (settings));
+ g_object_unref (settings);
+
e(is->tagprefix, "got untagged response\n");
priv->context->id = 0;
priv->context->tok = camel_imapx_stream_token (is->stream,
service = CAMEL_SERVICE (is->store);
password = camel_service_get_password (service);
provider = camel_service_get_provider (service);
- settings = camel_service_get_settings (service);
+
+ settings = camel_service_ref_settings (service);
network_settings = CAMEL_NETWORK_SETTINGS (settings);
host = camel_network_settings_dup_host (network_settings);
port = camel_network_settings_get_port (network_settings);
user = camel_network_settings_dup_user (network_settings);
+ g_object_unref (settings);
+
/* Put full details in the environment, in case the connection
* program needs them */
camel_url_set_protocol (&url, provider->protocol);
#endif
service = CAMEL_SERVICE (is->store);
- settings = camel_service_get_settings (service);
+
+ settings = camel_service_ref_settings (service);
network_settings = CAMEL_NETWORK_SETTINGS (settings);
host = camel_network_settings_dup_host (network_settings);
if (use_shell_command)
shell_command = camel_imapx_settings_dup_shell_command (
CAMEL_IMAPX_SETTINGS (settings));
+#endif
+ g_object_unref (settings);
+
+#ifndef G_OS_WIN32
if (shell_command != NULL) {
gboolean success;
CAMEL_AUTHENTICATION_REJECTED);
service = CAMEL_SERVICE (is->store);
- settings = camel_service_get_settings (service);
+
+ settings = camel_service_ref_settings (service);
network_settings = CAMEL_NETWORK_SETTINGS (settings);
host = camel_network_settings_dup_host (network_settings);
user = camel_network_settings_dup_user (network_settings);
+ g_object_unref (settings);
+
if (mechanism != NULL) {
if (!g_hash_table_lookup (is->cinfo->auth_types, mechanism)) {
g_set_error (
service = CAMEL_SERVICE (is->store);
session = camel_service_get_session (service);
- settings = camel_service_get_settings (service);
+
+ settings = camel_service_ref_settings (service);
mechanism = camel_network_settings_dup_auth_mechanism (
CAMEL_NETWORK_SETTINGS (settings));
use_qresync = camel_imapx_settings_get_use_qresync (
CAMEL_IMAPX_SETTINGS (settings));
+ g_object_unref (settings);
+
if (!imapx_connect_to_server (is, cancellable, error))
goto exception;
isum = (CamelIMAPXSummary *) job->folder->summary;
service = CAMEL_SERVICE (is->store);
- settings = camel_service_get_settings (service);
+
+ settings = camel_service_ref_settings (service);
batch_count = camel_imapx_settings_get_batch_fetch_count (
CAMEL_IMAPX_SETTINGS (settings));
mobile_mode = camel_imapx_settings_get_mobile_mode (
CAMEL_IMAPX_SETTINGS (settings));
+ g_object_unref (settings);
+
i = data->index;
//printf("%s: Mobile mode: %d Fetch Count %d\n", camel_folder_get_display_name (job->folder), mobile_mode, batch_count);
data->scan_changes = FALSE;
service = CAMEL_SERVICE (is->store);
- settings = camel_service_get_settings (service);
+
+ settings = camel_service_ref_settings (service);
uidset_size = camel_imapx_settings_get_batch_fetch_count (
CAMEL_IMAPX_SETTINGS (settings));
mobile_mode = camel_imapx_settings_get_mobile_mode (
CAMEL_IMAPX_SETTINGS (settings));
+ g_object_unref (settings);
+
if (camel_imapx_command_set_error_if_failed (ic, error)) {
g_prefix_error (
error, "%s: ",
gchar *uid = NULL;
service = CAMEL_SERVICE (is->store);
- settings = camel_service_get_settings (service);
+
+ settings = camel_service_ref_settings (service);
+
mobile_mode = camel_imapx_settings_get_mobile_mode (
CAMEL_IMAPX_SETTINGS (settings));
+ g_object_unref (settings);
+
if (mobile_mode)
uid = imapx_get_uid_from_index (job->folder->summary, 0);
g_return_if_fail (data != NULL);
service = CAMEL_SERVICE (is->store);
- settings = camel_service_get_settings (service);
+
+ settings = camel_service_ref_settings (service);
fetch_order = camel_imapx_settings_get_fetch_order (
CAMEL_IMAPX_SETTINGS (settings));
uidset_size = camel_imapx_settings_get_batch_fetch_count (
CAMEL_IMAPX_SETTINGS (settings));
+ g_object_unref (settings);
+
total = camel_folder_summary_count (folder->summary);
diff = ifolder->exists_on_server - total;
g_return_if_fail (data != NULL);
service = CAMEL_SERVICE (is->store);
- settings = camel_service_get_settings (service);
+
+ settings = camel_service_ref_settings (service);
fetch_order = camel_imapx_settings_get_fetch_order (
CAMEL_IMAPX_SETTINGS (settings));
uidset_size = camel_imapx_settings_get_batch_fetch_count (
CAMEL_IMAPX_SETTINGS (settings));
+ g_object_unref (settings);
+
if (ftype == CAMEL_FETCH_NEW_MESSAGES ||
(ftype == CAMEL_FETCH_OLD_MESSAGES && total <=0 )) {
gboolean mobile_mode;
service = CAMEL_SERVICE (is->store);
- settings = camel_service_get_settings (service);
+
+ settings = camel_service_ref_settings (service);
+
mobile_mode = camel_imapx_settings_get_mobile_mode (
CAMEL_IMAPX_SETTINGS (settings));
+ g_object_unref (settings);
+
full_name = camel_folder_get_full_name (folder);
/* Sync changes first, else unread count will not
g_return_val_if_fail (data != NULL, FALSE);
service = CAMEL_SERVICE (is->store);
- settings = camel_service_get_settings (service);
+
+ settings = camel_service_ref_settings (service);
+
mobile_mode = camel_imapx_settings_get_mobile_mode (
CAMEL_IMAPX_SETTINGS (settings));
+ g_object_unref (settings);
+
job->commands--;
full_name = camel_folder_get_full_name (job->folder);