From f7afbae29f9cb5a933890e12c16771de5bfd642f Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 5 Dec 2008 21:42:10 +0100 Subject: Don't store fake or network device elements --- src/storage.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/storage.c b/src/storage.c index 15e0cd66..5e390415 100644 --- a/src/storage.c +++ b/src/storage.c @@ -147,6 +147,10 @@ int __connman_element_store(struct connman_element *element) element->type != CONNMAN_ELEMENT_TYPE_NETWORK) return -EINVAL; + if (element->subtype == CONNMAN_ELEMENT_SUBTYPE_FAKE || + element->subtype == CONNMAN_ELEMENT_SUBTYPE_NETWORK) + return -EINVAL; + pathname = g_strdup_printf("%s/elements.conf", STORAGEDIR); if (pathname == NULL) return -ENOMEM; -- cgit v1.2.3