Mercurial > pidgin
changeset 17009:0682981f6797
merge of '3d2e55b4d4435fe4e6f083607171c8a4f81dcdb5'
and '9d62409c645636645b3fb2470c56485244c4a364'
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 11 May 2007 00:31:06 +0000 |
parents | 3130a2cfe4e0 (diff) 93980f621c33 (current diff) |
children | e5c494c6eb45 e44a272b27a8 |
files | |
diffstat | 3 files changed, 17 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Thu May 10 23:40:00 2007 +0000 +++ b/configure.ac Fri May 11 00:31:06 2007 +0000 @@ -996,6 +996,10 @@ ]) fi + if test "x$enable_debug" = "xyes"; then + CFLAGS="$CFLAGS -O0" + fi + DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS" CFLAGS="-g $CFLAGS" fi @@ -2000,16 +2004,11 @@ AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], [compile with debugging support])], , enable_debug=no) + if test "x$enable_debug" = "xyes" ; then AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.]) fi -AC_ARG_ENABLE(fatal-asserts, [AC_HELP_STRING([--enable-fatal-asserts], - [make assertions fatal (useful for debugging)])], , enable_fatal_asserts=no) -if test "x$enable_fatal_asserts" = "xyes" ; then - AC_DEFINE(PURPLE_FATAL_ASSERTS, 1, [Define to make assertions fatal (useful for debugging).]) -fi - AC_OUTPUT([Makefile Doxyfile doc/Makefile @@ -2158,7 +2157,6 @@ echo Build with Tk support......... : $enable_tk echo echo Print debugging messages...... : $enable_debug -echo Assertions are fatal.......... : $enable_fatal_asserts echo eval eval echo Pidgin will be installed in $bindir. if test "x$pidginpath" != "x" ; then
--- a/libpurple/dbus-server.c Thu May 10 23:40:00 2007 +0000 +++ b/libpurple/dbus-server.c Fri May 11 00:31:06 2007 +0000 @@ -654,11 +654,12 @@ #define my_arg(type) (ptr != NULL ? * ((type *)ptr) : va_arg(data, type)) -static void +static gboolean purple_dbus_message_append_purple_values(DBusMessageIter *iter, int number, PurpleValue **purple_values, va_list data) { int i; + gboolean error = FALSE; for (i = 0; i < number; i++) { @@ -668,11 +669,12 @@ guint xuint; gboolean xboolean; gpointer ptr = NULL; + gpointer val; if (purple_value_is_outgoing(purple_values[i])) { ptr = my_arg(gpointer); - g_return_if_fail(ptr); + g_return_val_if_fail(ptr, TRUE); } switch (purple_values[i]->type) @@ -705,14 +707,18 @@ case PURPLE_TYPE_POINTER: case PURPLE_TYPE_OBJECT: case PURPLE_TYPE_BOXED: - id = purple_dbus_pointer_to_id(my_arg(gpointer)); + val = my_arg(gpointer); + id = purple_dbus_pointer_to_id(val); + if (id == 0 && val != NULL) + error = TRUE; /* Some error happened. */ dbus_message_iter_append_basic(iter, (sizeof(void *) == 4) ? DBUS_TYPE_UINT32 : DBUS_TYPE_UINT64, &id); break; default: /* no conversion implemented */ - g_return_if_reached(); + g_return_val_if_reached(TRUE); } } + return error; } #undef my_arg @@ -746,7 +752,8 @@ signal = dbus_message_new_signal(DBUS_PATH_PURPLE, DBUS_INTERFACE_PURPLE, newname); dbus_message_iter_init_append(signal, &iter); - purple_dbus_message_append_purple_values(&iter, num_values, values, vargs); + if (purple_dbus_message_append_purple_values(&iter, num_values, values, vargs)) + purple_debug_warning("dbus", "The signal \"%s\" caused some dbus error.\n", name); dbus_connection_send(purple_dbus_connection, signal, NULL);
--- a/pidgin/gtkmain.c Thu May 10 23:40:00 2007 +0000 +++ b/pidgin/gtkmain.c Fri May 11 00:31:06 2007 +0000 @@ -477,11 +477,6 @@ /* This is the first Glib function call. Make sure to initialize GThread bfeore then */ g_thread_init(NULL); -#ifdef PURPLE_FATAL_ASSERTS - /* Make g_return_... functions fatal. */ - g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL); -#endif - #ifdef ENABLE_NLS bindtextdomain(PACKAGE, LOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8");