diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2004-02-17 18:04:03 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2004-02-17 18:04:03 +0000 |
commit | f17bb94f47090f3397b60b5e264aa9f18dbf203d (patch) | |
tree | cd475c5e55def20433d0ac0e83a0410e0606da91 /hcid/glib-ectomy.c | |
parent | 5903cfe8fdfa5df4a0ce737219385d16da85e279 (diff) |
Add D-Bus support for PIN request
Diffstat (limited to 'hcid/glib-ectomy.c')
-rw-r--r-- | hcid/glib-ectomy.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/hcid/glib-ectomy.c b/hcid/glib-ectomy.c index 5b56855e..8489cd73 100644 --- a/hcid/glib-ectomy.c +++ b/hcid/glib-ectomy.c @@ -1,5 +1,3 @@ -#include "glib-ectomy.h" - #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -8,7 +6,7 @@ #include <fcntl.h> #include <limits.h> -// static void remove_watch(int fd); +#include "glib-ectomy.h" GIOError g_io_channel_read (GIOChannel *channel, gchar *buf, @@ -84,6 +82,21 @@ struct watch { static struct watch watch_head = { .id = 0, .next = 0 }; +void g_io_remove_watch (guint id) +{ + struct watch *w, *p; + + for (p = &watch_head, w = watch_head.next; w; w = w->next) + { + if (w->id == id) + { + p->next = w->next; + free (w); + return; + } + } +} + guint g_io_add_watch (GIOChannel *channel, GIOCondition condition, GIOFunc func, |