aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2007-11-29 21:55:14 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2007-11-29 21:55:14 +0000
commit9ff5737ec53cca2ba295b58fb74a8b97f496cd19 (patch)
tree4bd8c279eda1fac647cfb1e99abcdea8c3963d5b /lib
parentb6a2373c2c9a98594a87c54a4644f3c0e985e420 (diff)
printf() in daemons considered harmful.
Diffstat (limited to 'lib')
-rw-r--r--lib/events.h4
-rw-r--r--lib/events_libevent.c8
2 files changed, 5 insertions, 7 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()