From e25011a1e063ae90517d7345e4f8be869a5c76bd Mon Sep 17 00:00:00 2001
From: Jakob Olsson <jakobols@kth.se>
Date: Fri, 8 Jun 2018 11:19:56 +0200
Subject: [PATCH] update dongle.c in accordance to wrapper

---
 dongle.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dongle.c b/dongle.c
index b4bbf50..6ffeceb 100644
--- a/dongle.c
+++ b/dongle.c
@@ -18,7 +18,7 @@
 
 struct ubus_context *global_ctx;
 int debug;
-char *global_ip_addr;
+struct device *global_dev;
 
 struct uloop_timeout timeout = { .cb = devices_status };
 static struct option long_options[] = {
@@ -118,7 +118,7 @@ int add_device(struct device *new_dev)
 			if (rv)
 				goto fail;
 
-			global_ip_addr = dev->ip;
+			global_dev= dev;
 
 		} else if (dev->ubus_obj && !dev->ip) {
 			unpublish_ubus_object(global_ctx, dev->ubus_obj);
@@ -144,7 +144,7 @@ int add_device(struct device *new_dev)
 		if (rv)
 			goto fail;
 
-		global_ip_addr = new_dev->ip;
+		global_dev = new_dev;
 	}
 
 	return 0;
-- 
GitLab