summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-12-07 09:06:17 +0100
committerMarcel Holtmann <marcel@holtmann.org>2009-12-07 09:06:17 +0100
commit617220b9b366637aa0377e20cd0b4929988fedeb (patch)
tree106cc6c8dbfd818155ee5fdd6fa30b6e40560338 /scripts
parent7cfbad4c56b9ecb710c2cba35a6c5d72442b611b (diff)
downloadconnman-617220b9b366637aa0377e20cd0b4929988fedeb.tar.gz
connman-617220b9b366637aa0377e20cd0b4929988fedeb.tar.bz2
connman-617220b9b366637aa0377e20cd0b4929988fedeb.zip
Switch dhclient handling to task infrastructure
Diffstat (limited to 'scripts')
-rw-r--r--scripts/dhclient-script.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/dhclient-script.c b/scripts/dhclient-script.c
index 94543a05..7761822e 100644
--- a/scripts/dhclient-script.c
+++ b/scripts/dhclient-script.c
@@ -29,9 +29,6 @@
#include <dbus/dbus.h>
-#define DHCLIENT_INTF "org.isc.dhclient"
-#define DHCLIENT_PATH "/org/isc/dhclient"
-
extern char **environ;
static void append(DBusMessageIter *dict, const char *pattern)
@@ -63,9 +60,11 @@ int main(int argc, char *argv[])
DBusMessage *msg;
DBusMessageIter iter, dict;
dbus_uint32_t pid;
- char **envp, *busname, *reason, *interface;
+ char **envp, *busname, *busintf, *buspath, *reason, *interface;
busname = getenv("BUSNAME");
+ busintf = getenv("BUSINTF");
+ buspath = getenv("BUSPATH");
pid = atoi(getenv("pid"));
reason = getenv("reason");
@@ -83,8 +82,8 @@ int main(int argc, char *argv[])
return 0;
}
- msg = dbus_message_new_method_call(busname, DHCLIENT_PATH,
- DHCLIENT_INTF, "notify");
+ msg = dbus_message_new_method_call(busname, buspath,
+ busintf, "Notify");
if (msg == NULL) {
dbus_connection_unref(conn);
fprintf(stderr, "Failed to allocate method call\n");