diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-08-26 23:30:10 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-08-31 15:03:00 -0400 |
commit | 83763b67a8e7fa6533a6389cace47ec83ef32d0b (patch) | |
tree | 4b686051cce6841916fd455e40c9a490b97b3898 /server/sbus/sssd_dbus_private.h | |
parent | 8d235172e656dd126aa03132acfba6c66f4ce03e (diff) | |
download | sssd-83763b67a8e7fa6533a6389cace47ec83ef32d0b.tar.gz sssd-83763b67a8e7fa6533a6389cace47ec83ef32d0b.tar.bz2 sssd-83763b67a8e7fa6533a6389cace47ec83ef32d0b.zip |
Correctly handle DbusWatch behavior.
It seems like DBUS always adds 2 watches for the same fd.
One is for reading and the other is for writing.
DBUS then keeps disabling one and enabling the other, depending on whether
it is interested in reading or writing from/to the file descriptor.
Diffstat (limited to 'server/sbus/sssd_dbus_private.h')
-rw-r--r-- | server/sbus/sssd_dbus_private.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/server/sbus/sssd_dbus_private.h b/server/sbus/sssd_dbus_private.h index 79cae230..1f6578c2 100644 --- a/server/sbus/sssd_dbus_private.h +++ b/server/sbus/sssd_dbus_private.h @@ -11,6 +11,7 @@ enum dbus_conn_type { }; struct sbus_interface_p; +struct sbus_watch_ctx; struct sbus_connection { struct tevent_context *ev; @@ -39,14 +40,23 @@ struct sbus_connection { struct sbus_interface *server_intf; sbus_server_conn_init_fn srv_init_fn; void *srv_init_data; + + /* watches list */ + struct sbus_watch_ctx *watch_list; }; /* =Watches=============================================================== */ struct sbus_watch_ctx { - DBusWatch *dbus_watch; + struct sbus_watch_ctx *prev, *next; + struct sbus_connection *conn; + struct tevent_fd *fde; + int fd; + + DBusWatch *dbus_read_watch; + DBusWatch *dbus_write_watch; }; dbus_bool_t sbus_add_watch(DBusWatch *watch, void *data); |