diff options
author | Danny Kukawka <danny.kukawka@web.de> | 2010-03-09 12:20:34 +0100 |
---|---|---|
committer | Danny Kukawka <danny.kukawka@web.de> | 2010-03-10 10:18:04 +0100 |
commit | 96a4b208757d5bd922571c04f9b2d85bba8ed10f (patch) | |
tree | 9199820f4f1be4b4bee82c50980c15a134365827 | |
parent | 05b243e5aa70ee413f135eb383f0ad379bfceee2 (diff) | |
download | hal-96a4b208757d5bd922571c04f9b2d85bba8ed10f.tar.gz |
event_io(): always use the same exit
Changed event_io() to always use the same exit and cleanup.
-rw-r--r-- | hald/linux/addons/addon-input.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hald/linux/addons/addon-input.c b/hald/linux/addons/addon-input.c index 0c4cbece..37599ec1 100644 --- a/hald/linux/addons/addon-input.c +++ b/hald/linux/addons/addon-input.c @@ -229,7 +229,7 @@ event_io (GIOChannel *channel, GIOCondition condition, gpointer data) if (input_data->offset + read_bytes < sizeof (struct input_event)) { input_data->offset = input_data->offset + read_bytes; HAL_DEBUG (("incomplete read")); - return TRUE; + goto out; } else { input_data->offset = 0; } @@ -303,7 +303,7 @@ event_io (GIOChannel *channel, GIOCondition condition, gpointer data) /* this is a key repeat and should be ignored for the sleep key */ if (input_data->event.code == KEY_SLEEP && input_data->event.value == 2) { HAL_INFO (("key release event for KEY_SLEEP, ignoring")); - return TRUE; + goto out; } libhal_device_emit_condition (ctx, input_data->udi, @@ -314,6 +314,7 @@ event_io (GIOChannel *channel, GIOCondition condition, gpointer data) } } +out: LIBHAL_FREE_DBUS_ERROR (&error); return TRUE; |