summaryrefslogtreecommitdiffstats
path: root/server/sbus
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-08-10 16:58:31 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-08-11 12:29:36 -0400
commit06a3b13134e29b75971970aa45ba14576a4f6ced (patch)
tree32c82e27f6020dad8134d80d09d22d6d94cbd5b1 /server/sbus
parent38268cfc515e1f136cabfbcc9a620a2d9c929cda (diff)
downloadsssd-06a3b13134e29b75971970aa45ba14576a4f6ced.tar.gz
sssd-06a3b13134e29b75971970aa45ba14576a4f6ced.tar.xz
sssd-06a3b13134e29b75971970aa45ba14576a4f6ced.zip
Change services identification mechanism
Let services identify themselves voiluntarily as the first operation instead of polling from the monitor. Also consolidate some common functions and make them available as monitor helpers.
Diffstat (limited to 'server/sbus')
-rw-r--r--server/sbus/sssd_dbus_connection.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/sbus/sssd_dbus_connection.c b/server/sbus/sssd_dbus_connection.c
index ab414da05..396a1f27f 100644
--- a/server/sbus/sssd_dbus_connection.c
+++ b/server/sbus/sssd_dbus_connection.c
@@ -111,7 +111,8 @@ static void sbus_conn_wakeup_main(void *data)
struct tevent_timer *te;
conn = talloc_get_type(data, struct sbus_connection);
- gettimeofday(&tv, NULL);
+
+ tv = tevent_timeval_current();
/* D-BUS calls this function when it is time to do a dispatch */
te = tevent_add_timer(conn->ev, conn, tv, sbus_dispatch, conn);
@@ -147,13 +148,13 @@ int sbus_init_connection(TALLOC_CTX *ctx,
conn->dbus.conn = dbus_conn;
conn->connection_type = connection_type;
- ret = sbus_conn_set_fns(conn);
+ ret = sbus_conn_add_interface(conn, intf);
if (ret != EOK) {
talloc_free(conn);
return ret;
}
- ret = sbus_conn_add_interface(conn, intf);
+ ret = sbus_conn_set_fns(conn);
if (ret != EOK) {
talloc_free(conn);
return ret;