---
src/connman.h | 1 +
src/storage.c | 22 ++++++++++++++++++++++
2 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/src/connman.h b/src/connman.h
index 85055b1..5b8a65d 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -157,6 +157,7 @@ void __connman_storage_delete_config(const char *ident);
GKeyFile *__connman_storage_open_service(const char *ident);
void __connman_storage_save_service(GKeyFile *keyfile, const char *ident);
+void __connman_storage_remove_service(const char *ident);
GKeyFile *__connman_storage_load_provider(const char *identifier);
void __connman_storage_save_provider(GKeyFile *keyfile, const char
*identifier);
diff --git a/src/storage.c b/src/storage.c
index 51404c8..e074ecd 100644
--- a/src/storage.c
+++ b/src/storage.c
@@ -186,6 +186,28 @@ GKeyFile *__connman_storage_open_service(const char
*service_id)
return keyfile;
}
+void __connman_storage_remove_service(const char *ident)
+{
+ gchar *pathname;
+
+ pathname = g_strdup_printf("%s/%s/%s", STORAGEDIR, ident, SETTINGS);
+ if(pathname == NULL)
+ return;
+
+ storage_delete(pathname);
+
+ g_free(pathname);
+
+ pathname = g_strdup_printf("%s/%s", STORAGEDIR, ident);
+ if(pathname == NULL)
+ return;
+
+ if (rmdir(pathname) < 0)
+ connman_error("Failed to remove directory %s", pathname);
+
+ g_free(pathname);
+}
+
gchar **connman_storage_get_services()
{
struct dirent *d;
--
1.7.8
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman