hotplug: add BUTTON to environment vars for timeout action
authorGünther Kelleter <guenther.kelleter@devolo.de>
Tue, 1 Sep 2015 14:01:25 +0000 (16:01 +0200)
committerJohn Crispin <blogic@openwrt.org>
Tue, 15 Sep 2015 05:10:25 +0000 (07:10 +0200)
as done in pressed and released actions

Signed-off-by: Günther Kelleter <guenther.kelleter@devolo.de>
plug/hotplug.c

index 0c97e4dce4efecbc6a6b9d34cfd22b34fb308436..b5ebd07467b1376a5434a080c9c25f59249d2562 100644 (file)
@@ -399,6 +399,7 @@ static void handle_button_timeout(struct uloop_timeout *t)
 
        b = container_of(t, struct button_timeout, timeout);
        blob_buf_init(&button_buf, 0);
+       blobmsg_add_string(&button_buf, "BUTTON", b->name);
        blobmsg_add_string(&button_buf, "ACTION", "timeout");
        snprintf(seen, sizeof(seen), "%d", b->seen);
        blobmsg_add_string(&button_buf, "SEEN", seen);