Re: [evolution-patches] debugging for GW messages
- From: Rodrigo Moya <rodrigo ximian com>
- To: JP Rosevear <jpr ximian com>
- Cc: evolution-patches lists ximian com
- Subject: Re: [evolution-patches] debugging for GW messages
- Date: Wed, 17 Mar 2004 21:46:02 +0100
On Wed, 2004-03-17 at 15:09 -0500, JP Rosevear wrote:
> On Wed, 2004-03-17 at 14:42, Rodrigo Moya wrote:
> > This patch makes debugging for GW be enabled based on an environment
> > variable, rather than on compile-time flags, so that people can enable
> > it easily.
>
> Approved.
>
> Should the --enable-debug bits be yanked from configure.in as well?
>
yes, committed the attached patch
cheers
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/ChangeLog,v
retrieving revision 1.107
diff -u -p -r1.107 ChangeLog
--- ChangeLog 15 Mar 2004 17:33:08 -0000 1.107
+++ ChangeLog 17 Mar 2004 20:43:50 -0000
@@ -1,3 +1,7 @@
+2004-03-17 Rodrigo Moya <rodrigo ximian com>
+
+ * configure.in: yank --enable-debug option, not needed anymore.
+
2004-03-15 Rodney Dawes <dobey ximian com>
* configure.in: Add LIBBONOBO_REQUIRED, and AC_SUBST() it
Index: configure.in
===================================================================
RCS file: /cvs/gnome/evolution-data-server/configure.in,v
retrieving revision 1.44
diff -u -p -r1.44 configure.in
--- configure.in 15 Mar 2004 17:33:08 -0000 1.44
+++ configure.in 17 Mar 2004 20:43:50 -0000
@@ -204,21 +204,6 @@ EVO_SET_COMPILE_FLAGS(SOUP, libsoup-2.2
AC_SUBST(SOUP_CFLAGS)
AC_SUBST(SOUP_LIBS)
-dnl --- Debug flags
-
-AC_ARG_ENABLE(debug,
- [ --enable-debug=[no/yes] turn on debugging [default=no]],
- enable_debug=yes,
- enable_debug=no)
-
-if test "x$enable_debug" = "xyes"; then
- DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
-else
- DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
-fi
-
-AC_SUBST(DEBUG_CFLAGS)
-
dnl *******************
dnl Special directories
dnl *******************
Index: servers/groupwise/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/ChangeLog,v
retrieving revision 1.11
diff -u -p -r1.11 ChangeLog
--- servers/groupwise/ChangeLog 15 Mar 2004 03:53:41 -0000 1.11
+++ servers/groupwise/ChangeLog 17 Mar 2004 20:43:50 -0000
@@ -1,4 +1,14 @@
+2004-03-17 Rodrigo Moya <rodrigo ximian com>
+
+ * e-gw-message.c: use an environment variable for debugging.
+ (e_gw_message_new_with_header): setup debugging for message if
+ GROUPWISE_DEBUG environment variable is defined.
+ (e_gw_message_write_footer): ditto.
+
+ * Makefile.am: remove DEBUG_CFLAGS.
+
2004-03-14 Harish K <kharish novell com>
+
* e-gw-connection.[ch] : Make view element an argument to the
get_items call so the addressbook component can use it as well.
Index: servers/groupwise/Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/Makefile.am,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile.am
--- servers/groupwise/Makefile.am 11 Mar 2004 10:23:28 -0000 1.5
+++ servers/groupwise/Makefile.am 17 Mar 2004 20:43:50 -0000
@@ -3,8 +3,7 @@ INCLUDES = \
-I$(top_srcdir) \
-I$(top_builddir) \
$(SOUP_CFLAGS) \
- $(E_DATA_SERVER_CFLAGS) \
- $(DEBUG_CFLAGS)
+ $(E_DATA_SERVER_CFLAGS)
noinst_PROGRAMS = create-account soap-test
Index: servers/groupwise/e-gw-connection.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-connection.c,v
retrieving revision 1.59
diff -u -p -r1.59 e-gw-connection.c
--- servers/groupwise/e-gw-connection.c 15 Mar 2004 03:53:41 -0000 1.59
+++ servers/groupwise/e-gw-connection.c 17 Mar 2004 20:43:50 -0000
@@ -898,6 +898,7 @@ e_gw_connection_get_session_id (EGwConne
const char *
e_gw_connection_get_user_name (EGwConnection *cnc)
{
+ g_return_val_if_fail (cnc != NULL, NULL);
g_return_val_if_fail (E_IS_GW_CONNECTION (cnc), NULL);
return (const char *) cnc->priv->user_name;
@@ -906,6 +907,7 @@ e_gw_connection_get_user_name (EGwConnec
const char*
e_gw_connection_get_user_email (EGwConnection *cnc)
{
+ g_return_val_if_fail (cnc != NULL, NULL);
g_return_val_if_fail (E_IS_GW_CONNECTION (cnc), NULL);
return (const char*) cnc->priv->user_email;
Index: servers/groupwise/e-gw-message.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/groupwise/e-gw-message.c,v
retrieving revision 1.13
diff -u -p -r1.13 e-gw-message.c
--- servers/groupwise/e-gw-message.c 11 Mar 2004 10:23:28 -0000 1.13
+++ servers/groupwise/e-gw-message.c 17 Mar 2004 20:43:51 -0000
@@ -25,8 +25,6 @@
#include <libsoup/soup-uri.h>
#include "e-gw-message.h"
-#ifdef G_ENABLE_DEBUG
-
static void
print_header (gpointer name, gpointer value, gpointer data)
{
@@ -70,8 +68,6 @@ setup_debug (SoupSoapMessage *msg)
soup_message_add_handler (SOUP_MESSAGE (msg), SOUP_HANDLER_POST_BODY, debug_handler, NULL);
}
-#endif
-
SoupSoapMessage *
e_gw_message_new_with_header (const char *uri, const char *session_id, const char *method_name)
{
@@ -88,9 +84,8 @@ e_gw_message_new_with_header (const char
"Evolution/" VERSION);
soup_message_add_header (SOUP_MESSAGE (msg)->request_headers, "SOAPAction", method_name);
-#ifdef G_ENABLE_DEBUG
- setup_debug (msg);
-#endif
+ if (g_getenv ("GROUWISE_DEBUG"))
+ setup_debug (msg);
soup_soap_message_start_envelope (msg);
if (session_id && *session_id) {
@@ -139,11 +134,10 @@ e_gw_message_write_footer (SoupSoapMessa
soup_soap_message_persist (msg);
-#ifdef G_ENABLE_DEBUG
- /* print request's body */
- fputc ('\n', stdout);
- fwrite (SOUP_MESSAGE (msg)->request.body, 1, SOUP_MESSAGE (msg)->request.length, stdout);
- fputc ('\n', stdout);
-#endif
-
+ if (g_getenv ("GROUPWISE_DEBUG")) {
+ /* print request's body */
+ fputc ('\n', stdout);
+ fwrite (SOUP_MESSAGE (msg)->request.body, 1, SOUP_MESSAGE (msg)->request.length, stdout);
+ fputc ('\n', stdout);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]