[evolution-patches] Backend debug code
- From: JP Rosevear <jpr ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] Backend debug code
- Date: Tue, 30 Mar 2004 09:39:09 -0500
Similar to what the addressbook is doing.
-JP
--
JP Rosevear <jpr ximian com>
Ximian, Inc.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/ChangeLog,v
retrieving revision 1.230
diff -u -r1.230 ChangeLog
--- ChangeLog 29 Mar 2004 14:47:25 -0000 1.230
+++ ChangeLog 30 Mar 2004 14:47:48 -0000
@@ -1,3 +1,10 @@
+2004-03-30 JP Rosevear <jpr ximian com>
+
+ * backends/file/e-cal-backend-file.c: allow debugging code to be
+ turned on and off easily
+
+ * backends/http/e-cal-backend-http.c: ditto
+
2004-03-29 Harish K <kharish novell com>
* backends/groupwise/e-cal-backend-utils.c
(start_freebusy_session) : send UTC time to server instead of
Index: backends/file/e-cal-backend-file.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/file/e-cal-backend-file.c,v
retrieving revision 1.26
diff -u -r1.26 e-cal-backend-file.c
--- backends/file/e-cal-backend-file.c 25 Mar 2004 13:30:29 -0000 1.26
+++ backends/file/e-cal-backend-file.c 30 Mar 2004 14:47:48 -0000
@@ -78,6 +78,8 @@
+#define d(x)
+
static void e_cal_backend_file_dispose (GObject *object);
static void e_cal_backend_file_finalize (GObject *object);
@@ -359,7 +361,7 @@
if (!obj_data)
return; /* Everything is fine */
- g_message ("check_dup_uid(): Got object with duplicated UID `%s', changing it...", uid);
+ d(g_message (G_STRLOC ": Got object with duplicated UID `%s', changing it...", uid));
new_uid = e_cal_component_gen_uid ();
e_cal_component_set_uid (comp, new_uid);
@@ -1185,7 +1187,7 @@
cbfile = E_CAL_BACKEND_FILE (backend);
priv = cbfile->priv;
- g_message (G_STRLOC ": Getting object list (%s)", sexp);
+ d(g_message (G_STRLOC ": Getting object list (%s)", sexp));
match_data.search_needed = TRUE;
match_data.query = sexp;
@@ -1218,7 +1220,7 @@
cbfile = E_CAL_BACKEND_FILE (backend);
priv = cbfile->priv;
- g_message (G_STRLOC ": Starting query (%s)", e_data_cal_view_get_text (query));
+ d(g_message (G_STRLOC ": Starting query (%s)", e_data_cal_view_get_text (query)));
/* try to match all currently existing objects */
match_data.search_needed = TRUE;
Index: backends/http/e-cal-backend-http.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/http/e-cal-backend-http.c,v
retrieving revision 1.16
diff -u -r1.16 e-cal-backend-http.c
--- backends/http/e-cal-backend-http.c 25 Mar 2004 18:26:05 -0000 1.16
+++ backends/http/e-cal-backend-http.c 30 Mar 2004 14:47:49 -0000
@@ -67,6 +67,8 @@
+#define d(x)
+
static void e_cal_backend_http_dispose (GObject *object);
static void e_cal_backend_http_finalize (GObject *object);
static gboolean begin_retrieval_cb (ECalBackendHttp *cbhttp);
@@ -200,14 +202,14 @@
priv = cbhttp->priv;
priv->is_loading = FALSE;
- g_message ("Retrieval done.\n");
+ d(g_message ("Retrieval done.\n"));
/* Handle redirection ourselves */
if (SOUP_STATUS_IS_REDIRECTION (msg->status_code)) {
newuri = soup_message_get_header (msg->response_headers,
"Location");
- g_message ("Redirected to %s\n", newuri);
+ d(g_message ("Redirected to %s\n", newuri));
if (newuri) {
g_free (priv->uri);
@@ -267,7 +269,7 @@
/* free memory */
icalcomponent_free (icalcomp);
- g_message ("Retrieval really done.\n");
+ d(g_message ("Retrieval really done.\n"));
}
static gboolean reload_cb (ECalBackendHttp *cbhttp);
@@ -286,7 +288,7 @@
maybe_start_reload_timeout (cbhttp);
- g_message ("Starting retrieval...\n");
+ d(g_message ("Starting retrieval...\n"));
if (priv->is_loading)
return FALSE;
@@ -308,7 +310,7 @@
soup_session_queue_message (priv->soup_session, soup_message,
(SoupMessageCallbackFn) retrieval_done, cbhttp);
- g_message ("Retrieval started.\n");
+ d(g_message ("Retrieval started.\n"));
return FALSE;
}
@@ -322,7 +324,7 @@
if (priv->is_loading)
return TRUE;
- g_message ("Reload!\n");
+ d(g_message ("Reload!\n"));
priv->reload_timeout_id = 0;
begin_retrieval_cb (cbhttp);
@@ -338,7 +340,7 @@
priv = cbhttp->priv;
- g_message ("Setting reload timeout.\n");
+ d(g_message ("Setting reload timeout.\n"));
if (priv->reload_timeout_id)
return;
@@ -606,7 +608,7 @@
cbhttp = E_CAL_BACKEND_HTTP (backend);
priv = cbhttp->priv;
- g_message (G_STRLOC ": Starting query (%s)", e_data_cal_view_get_text (query));
+ d(g_message (G_STRLOC ": Starting query (%s)", e_data_cal_view_get_text (query)));
if (!priv->cache) {
e_data_cal_view_notify_done (query, GNOME_Evolution_Calendar_NoSuchCal);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]