# HG changeset patch # User Eugene Zagidullin # Date 1198685839 -10800 # Node ID d217b71e58361556faefed7785258a45e6cde3d7 # Parent ab59718d870427de8cdd98011a5f7df4909262f9 more strict error handling. make use of AUDDBG diff -r ab59718d8704 -r d217b71e5836 src/audacious/skin.c --- a/src/audacious/skin.c Tue Dec 25 17:21:04 2007 -0600 +++ b/src/audacious/skin.c Wed Dec 26 19:17:19 2007 +0300 @@ -22,7 +22,7 @@ * The Audacious team does not consider modular code linking to * Audacious or using our public API to be a derived work. */ - +#define AUD_DEBUG #ifdef HAVE_CONFIG_H # include "config.h" #endif diff -r ab59718d8704 -r d217b71e5836 src/audacious/util.c --- a/src/audacious/util.c Tue Dec 25 17:21:04 2007 -0600 +++ b/src/audacious/util.c Wed Dec 26 19:17:19 2007 +0300 @@ -23,7 +23,7 @@ * Audacious or using our public API to be a derived work. */ -/* #define AUD_DEBUG 1 */ +#define AUD_DEBUG #ifdef HAVE_CONFIG_H # include "config.h" @@ -78,7 +78,7 @@ FindFileContext *context = data; if (strlen(path) > FILENAME_MAX) { - g_warning("Ignoring path: name too long (%s)", path); + AUDDBG("Ignoring path: name too long (%s)\n", path); return TRUE; } @@ -302,8 +302,8 @@ tmpdir = g_build_filename(g_get_tmp_dir(), "audacious.XXXXXXXX", NULL); if (!mkdtemp(tmpdir)) { g_free(tmpdir); - g_message("Unable to load skin: Failed to create temporary " - "directory: %s", g_strerror(errno)); + AUDDBG("Unable to load skin: Failed to create temporary " + "directory: %s\n", g_strerror(errno)); return NULL; } #else @@ -316,14 +316,16 @@ g_free(escaped_filename); if (!cmd) { - g_message("extraction function is NULL!"); + AUDDBG("extraction function is NULL!\n"); g_free(tmpdir); return NULL; } - if(system(cmd) == -1) + AUDDBG("Attempt to execute \"%s\"\n", cmd); + + if(system(cmd) != 0) { - g_message("could not execute cmd %s",cmd); + AUDDBG("could not execute cmd %s\n",cmd); g_free(cmd); return NULL; }