[PATCH 1/2] ipconfig: Add function to clear ipaddress information

Jukka Rissanen jukka.rissanen at linux.intel.com
Thu Nov 1 05:16:23 PDT 2012


---
 src/connman.h  | 1 +
 src/ipconfig.c | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/src/connman.h b/src/connman.h
index 2f6746e..65a7788 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -267,6 +267,7 @@ __connman_ipconfig_ref_debug(struct connman_ipconfig *ipconfig,
 void __connman_ipconfig_unref_debug(struct connman_ipconfig *ipconfig,
 			const char *file, int line, const char *caller);
 
+void __connman_ipconfig_clear_address(struct connman_ipconfig *ipconfig);
 void *__connman_ipconfig_get_data(struct connman_ipconfig *ipconfig);
 void __connman_ipconfig_set_data(struct connman_ipconfig *ipconfig, void *data);
 
diff --git a/src/ipconfig.c b/src/ipconfig.c
index 3de30cd..aa7a03d 100644
--- a/src/ipconfig.c
+++ b/src/ipconfig.c
@@ -235,6 +235,14 @@ void connman_ipaddress_clear(struct connman_ipaddress *ipaddress)
 	ipaddress->gateway = NULL;
 }
 
+void __connman_ipconfig_clear_address(struct connman_ipconfig *ipconfig)
+{
+	if (ipconfig == NULL)
+		return;
+
+	connman_ipaddress_clear(ipconfig->address);
+}
+
 void connman_ipaddress_copy(struct connman_ipaddress *ipaddress,
 					struct connman_ipaddress *source)
 {
-- 
1.7.11.4




More information about the connman mailing list