diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-24 23:16:18 +0200 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-24 23:16:18 +0200 | 
| commit | 2945c6ff5d1848f6d8e51a0d804a2d769e6894a7 (patch) | |
| tree | 595788105189dab5270fe2b7dc4e9baffa487aed /lib/events_glib.c | |
| parent | ef14a83adbb9036c0006ad460c5e11882a3d7e13 (diff) | |
| parent | 593971d9ff9f246cec5af5583f29e45fee62edfe (diff) | |
Merge ui-fix (which includes killerbee (i.e. file transfers and libpurple
support)). ui-fix rewrites the complete IRC core, fixing many things that
were broken/hacky/limited so far.
The list is too long to include here, but http://wiki.bitlbee.org/UiFix
has a summary, as does doc/CHANGES and of course the full revision history.
Diffstat (limited to 'lib/events_glib.c')
| -rw-r--r-- | lib/events_glib.c | 17 | 
1 files changed, 12 insertions, 5 deletions
| diff --git a/lib/events_glib.c b/lib/events_glib.c index 3e194e98..d6ac82cc 100644 --- a/lib/events_glib.c +++ b/lib/events_glib.c @@ -48,6 +48,7 @@  typedef struct _GaimIOClosure {  	b_event_handler function;  	gpointer data; +	guint flags;  } GaimIOClosure;  static GMainLoop *loop = NULL; @@ -75,9 +76,9 @@ static gboolean gaim_io_invoke(GIOChannel *source, GIOCondition condition, gpoin  	gboolean st;  	if (condition & GAIM_READ_COND) -		gaim_cond |= GAIM_INPUT_READ; +		gaim_cond |= B_EV_IO_READ;  	if (condition & GAIM_WRITE_COND) -		gaim_cond |= GAIM_INPUT_WRITE; +		gaim_cond |= B_EV_IO_WRITE;  	event_debug( "gaim_io_invoke( %d, %d, 0x%x )\n", g_io_channel_unix_get_fd(source), condition, data ); @@ -86,7 +87,12 @@ static gboolean gaim_io_invoke(GIOChannel *source, GIOCondition condition, gpoin  	if( !st )  		event_debug( "Returned FALSE, cancelling.\n" ); -	return st; +	if (closure->flags & B_EV_FLAG_FORCE_ONCE) +		return FALSE; +	else if (closure->flags & B_EV_FLAG_FORCE_REPEAT) +		return TRUE; +	else +		return st;  }  static void gaim_io_destroy(gpointer data) @@ -104,10 +110,11 @@ gint b_input_add(gint source, b_input_condition condition, b_event_handler funct  	closure->function = function;  	closure->data = data; +	closure->flags = condition; -	if (condition & GAIM_INPUT_READ) +	if (condition & B_EV_IO_READ)  		cond |= GAIM_READ_COND; -	if (condition & GAIM_INPUT_WRITE) +	if (condition & B_EV_IO_WRITE)  		cond |= GAIM_WRITE_COND;  	channel = g_io_channel_unix_new(source); | 
