diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2007-11-29 21:55:14 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2007-11-29 21:55:14 +0000 |
commit | 9ff5737ec53cca2ba295b58fb74a8b97f496cd19 (patch) | |
tree | 4bd8c279eda1fac647cfb1e99abcdea8c3963d5b | |
parent | b6a2373c2c9a98594a87c54a4644f3c0e985e420 (diff) |
printf() in daemons considered harmful.
-rw-r--r-- | lib/events.h | 4 | ||||
-rw-r--r-- | lib/events_libevent.c | 8 | ||||
-rw-r--r-- | protocols/oscar/msgcookie.c | 15 |
3 files changed, 5 insertions, 22 deletions
diff --git a/lib/events.h b/lib/events.h index 0588547f..4baea7b6 100644 --- a/lib/events.h +++ b/lib/events.h @@ -44,7 +44,7 @@ #include <glib.h> #include <gmodule.h> -/* The conditions you can pass to gaim_input_add()/that will be passed to +/* The conditions you can pass to b_input_add()/that will be passed to the given callback function. */ typedef enum { GAIM_INPUT_READ = 1 << 1, @@ -57,7 +57,7 @@ typedef gboolean (*b_event_handler)(gpointer data, gint fd, b_input_condition co #define GAIM_WRITE_COND (G_IO_OUT | G_IO_HUP | G_IO_ERR | G_IO_NVAL) #define GAIM_ERR_COND (G_IO_HUP | G_IO_ERR | G_IO_NVAL) -// #define event_debug( x... ) printf( x ) +/* #define event_debug( x... ) printf( x ) */ #define event_debug( x... ) /* Call this once when the program starts. It'll initialize the event handler diff --git a/lib/events_libevent.c b/lib/events_libevent.c index d02ad6a6..d3403152 100644 --- a/lib/events_libevent.c +++ b/lib/events_libevent.c @@ -31,13 +31,11 @@ #include <string.h> #include <unistd.h> #include <sys/types.h> -#include "proxy.h" - #include <sys/time.h> #include <event.h> +#include "proxy.h" static void b_main_restart(); - static guint id_next = 1; static GHashTable *id_hash; static int quitting = 0; @@ -92,7 +90,7 @@ void b_main_run() old_leh = NULL; } - printf( "New event loop.\n" ); + event_debug( "New event loop.\n" ); } } @@ -103,7 +101,7 @@ static void b_main_restart() memset( &tv, 0, sizeof( struct timeval ) ); event_base_loopexit( leh, &tv ); - printf( "b_main_restart()\n" ); + event_debug( "b_main_restart()\n" ); } void b_main_quit() diff --git a/protocols/oscar/msgcookie.c b/protocols/oscar/msgcookie.c index d3c91a94..efeb8cbf 100644 --- a/protocols/oscar/msgcookie.c +++ b/protocols/oscar/msgcookie.c @@ -130,21 +130,6 @@ aim_msgcookie_t *aim_checkcookie(aim_session_t *sess, const guint8 *cookie, int return NULL; } -#if 0 /* debugging feature */ -int aim_dumpcookie(aim_msgcookie_t *cookie) -{ - - if (!cookie) - return -EINVAL; - - printf("\tCookie at %p: %d/%s with %p, next %p\n", - cookie, cookie->type, cookie->cookie, - cookie->data, cookie->next); - - return 0; -} -#endif - /** * aim_cookie_free - free an aim_msgcookie_t struct * @sess: session to remove the cookie from |