diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-12-07 09:06:17 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-12-07 09:06:17 +0100 |
commit | 617220b9b366637aa0377e20cd0b4929988fedeb (patch) | |
tree | 106cc6c8dbfd818155ee5fdd6fa30b6e40560338 /scripts | |
parent | 7cfbad4c56b9ecb710c2cba35a6c5d72442b611b (diff) | |
download | connman-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.c | 11 |
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"); |