evolution-data-server r9936 - in trunk/calendar: . backends/caldav backends/google
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9936 - in trunk/calendar: . backends/caldav backends/google
- Date: Thu, 15 Jan 2009 15:06:40 +0000 (UTC)
Author: mcrha
Date: Thu Jan 15 15:06:39 2009
New Revision: 9936
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9936&view=rev
Log:
2009-01-15 Milan Crha <mcrha redhat com>
** Part of fix for bug #303738
* backends/caldav/e-cal-backend-caldav.c: (status_code_to_result),
(caldav_server_open_calendar), (caldav_server_get_object),
(caldav_server_put_object), (caldav_server_delete_object):
* backends/google/e-cal-backend-google-utils.c:
(e_cal_backend_google_utils_connect):
Return AuthFailed when need auth, to ask for a password again, or
return AuthRequired to indicate we require authentication.
Modified:
trunk/calendar/ChangeLog
trunk/calendar/backends/caldav/e-cal-backend-caldav.c
trunk/calendar/backends/google/e-cal-backend-google-utils.c
Modified: trunk/calendar/backends/caldav/e-cal-backend-caldav.c
==============================================================================
--- trunk/calendar/backends/caldav/e-cal-backend-caldav.c (original)
+++ trunk/calendar/backends/caldav/e-cal-backend-caldav.c Thu Jan 15 15:06:39 2009
@@ -428,7 +428,7 @@
/* ************************************************************************* */
static ECalBackendSyncStatus
-status_code_to_result (guint status_code)
+status_code_to_result (guint status_code, ECalBackendCalDAVPrivate *priv)
{
ECalBackendSyncStatus result;
@@ -447,7 +447,10 @@
break;
case 401:
- result = GNOME_Evolution_Calendar_AuthenticationRequired;
+ if (priv && priv->need_auth)
+ result = GNOME_Evolution_Calendar_AuthenticationFailed;
+ else
+ result = GNOME_Evolution_Calendar_AuthenticationRequired;
break;
default:
@@ -951,7 +954,7 @@
g_object_unref (message);
- return status_code_to_result (status_code);
+ return status_code_to_result (status_code, priv);
}
/* parse the dav header, we are intreseted in the
@@ -1234,7 +1237,7 @@
send_and_handle_redirection (priv->session, message, NULL);
if (! SOUP_STATUS_IS_SUCCESSFUL (message->status_code)) {
- result = status_code_to_result (message->status_code);
+ result = status_code_to_result (message->status_code, priv);
g_object_unref (message);
g_warning ("Could not fetch object from server\n");
return result;
@@ -1322,7 +1325,7 @@
}
/* FIXME: sepcial case precondition errors ?*/
- result = status_code_to_result (message->status_code);
+ result = status_code_to_result (message->status_code, priv);
if (result == GNOME_Evolution_Calendar_Success) {
hdr = soup_message_headers_get (message->response_headers,
@@ -1369,7 +1372,7 @@
send_and_handle_redirection (priv->session, message, NULL);
- result = status_code_to_result (message->status_code);
+ result = status_code_to_result (message->status_code, priv);
g_object_unref (message);
Modified: trunk/calendar/backends/google/e-cal-backend-google-utils.c
==============================================================================
--- trunk/calendar/backends/google/e-cal-backend-google-utils.c (original)
+++ trunk/calendar/backends/google/e-cal-backend-google-utils.c Thu Jan 15 15:06:39 2009
@@ -305,7 +305,9 @@
if (!feed) {
g_critical ("%s, Authentication Failed \n ", G_STRLOC);
- return GNOME_Evolution_Calendar_AuthenticationFailed;
+ if (username || password)
+ return GNOME_Evolution_Calendar_AuthenticationFailed;
+ return GNOME_Evolution_Calendar_AuthenticationRequired;
}
entries = gdata_feed_get_entries (feed);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]