From: Bharath Acharya Date: Thu, 9 Sep 2010 10:27:27 +0000 (+0530) Subject: Bug #628299 - Crash in g_variant_is_trusted. X-Git-Tag: upstream/3.7.4~2617 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa9d7b6fc5816b4f6360344a1be13d768bc53ff4;p=platform%2Fupstream%2Fevolution-data-server.git Bug #628299 - Crash in g_variant_is_trusted. Initialize the error message. Fixes the crash. Need to fix the right error message from the server later.. --- diff --git a/calendar/backends/groupwise/e-cal-backend-groupwise.c b/calendar/backends/groupwise/e-cal-backend-groupwise.c index 14ab019..0d1b659 100644 --- a/calendar/backends/groupwise/e-cal-backend-groupwise.c +++ b/calendar/backends/groupwise/e-cal-backend-groupwise.c @@ -1021,6 +1021,9 @@ connect_to_server (ECalBackendGroupwise *cbgw, GError **perror) return; } + errors.status = E_GW_CONNECTION_STATUS_OK; + errors.description = NULL; + kind = e_cal_backend_get_kind (E_CAL_BACKEND (cbgw)); parent_user = (gchar *) e_source_get_property (source, "parent_id_name"); @@ -1085,9 +1088,14 @@ connect_to_server (ECalBackendGroupwise *cbgw, GError **perror) if (errors.status == E_GW_CONNECTION_STATUS_INVALID_PASSWORD) { g_propagate_error (perror, EDC_ERROR (AuthenticationFailed)); return; + } else if (errors.status == E_GW_CONNECTION_STATUS_UNKNOWN) { + g_propagate_error (perror,EDC_ERROR (OtherError)); + return; } g_propagate_error (perror, EDC_ERROR_EX (OtherError, _(errors.description))); + if (errors.description) + g_free (errors.description); return; } priv->mode_changed = FALSE; diff --git a/servers/groupwise/e-gw-connection.c b/servers/groupwise/e-gw-connection.c index 8b7d259..a35574a 100644 --- a/servers/groupwise/e-gw-connection.c +++ b/servers/groupwise/e-gw-connection.c @@ -534,6 +534,7 @@ e_gw_connection_new_with_error_handler (const gchar *uri, const gchar *username, response = e_gw_connection_send_message (cnc, msg); if (!response) { + errors->status = E_GW_CONNECTION_STATUS_UNKNOWN; g_object_unref (cnc); g_static_mutex_unlock (&connecting); g_object_unref (msg);