diff --git a/src/gidle.c b/src/gidle.c
index d4fd8074351806ea56f7827e43848e1146097589..af7457d85b2850b342b340b02d315e4419f90aca 100644 (file)
--- a/src/gidle.c
+++ b/src/gidle.c
/* ncmpc (Ncurses MPD Client)
- (c) 2004-2009 The Music Player Daemon Project
+ (c) 2004-2010 The Music Player Daemon Project
Project homepage: http://musicpd.org
Redistribution and use in source and binary forms, with or without
#include <glib.h>
#include <assert.h>
#include <string.h>
-#include <sys/select.h>
#include <errno.h>
struct mpd_glib_source {
source->io_events = events;
}
-void
+bool
mpd_glib_enter(struct mpd_glib_source *source)
{
bool success;
assert(!source->destroyed);
if (source->leaving)
- return;
+ return false;
source->idle_events = 0;
success = mpd_async_send_command(source->async, "idle", NULL);
if (!success) {
mpd_glib_invoke_async_error(source);
- return;
+ return false;
}
mpd_glib_add_watch(source);
+ return true;
}
bool