summaryrefslogtreecommitdiffstats
path: root/server/nss/nsssrv.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2008-11-04 17:34:03 -0500
committerSimo Sorce <idra@samba.org>2008-11-04 17:39:27 -0500
commit750d1443a285048251c8843acd2c763b413869da (patch)
treec1126f6a01728575701d7714abefa463df2e493e /server/nss/nsssrv.c
parent603f59bcb502c48eb577bc6fd3232a6944756983 (diff)
downloadsssd-750d1443a285048251c8843acd2c763b413869da.tar.gz
sssd-750d1443a285048251c8843acd2c763b413869da.tar.xz
sssd-750d1443a285048251c8843acd2c763b413869da.zip
Add the ping funtion to the nss service Make the monitor task ping connecting services Make it possible to configure timeouts and service ping times.
Diffstat (limited to 'server/nss/nsssrv.c')
-rw-r--r--server/nss/nsssrv.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/server/nss/nsssrv.c b/server/nss/nsssrv.c
index 04eead6dd..bd0f761b2 100644
--- a/server/nss/nsssrv.c
+++ b/server/nss/nsssrv.c
@@ -40,9 +40,11 @@
#include "sbus_interfaces.h"
static int provide_identity(DBusMessage *message, void *data, DBusMessage **r);
+static int reply_ping(DBusMessage *message, void *data, DBusMessage **r);
struct sbus_method nss_sbus_methods[] = {
{SERVICE_METHOD_IDENTITY, provide_identity},
+ {SERVICE_METHOD_PING, reply_ping},
{NULL, NULL}
};
@@ -223,6 +225,21 @@ static int provide_identity(DBusMessage *message, void *data, DBusMessage **r)
return EOK;
}
+static int reply_ping(DBusMessage *message, void *data, DBusMessage **r)
+{
+ DBusMessage *reply;
+ dbus_bool_t ret;
+
+ reply = dbus_message_new_method_return(message);
+ ret = dbus_message_append_args(reply, DBUS_TYPE_INVALID);
+ if (!ret) {
+ return EIO;
+ }
+
+ *r = reply;
+ return EOK;
+}
+
static int nss_sbus_init(struct nss_ctx *nctx)
{
struct sbus_method_ctx *cli_sm_ctx;