summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-12-05 21:42:10 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-12-05 21:42:10 +0100
commitf7afbae29f9cb5a933890e12c16771de5bfd642f (patch)
tree10b4da049b5474f3cc9c4faa798fbc2d233d1d3e
parent7bb1bc293ccdb0d8fb95ae8ef25080ab13656769 (diff)
downloadconnman-f7afbae29f9cb5a933890e12c16771de5bfd642f.tar.gz
connman-f7afbae29f9cb5a933890e12c16771de5bfd642f.tar.bz2
connman-f7afbae29f9cb5a933890e12c16771de5bfd642f.zip
Don't store fake or network device elements
-rw-r--r--src/storage.c4
1 files changed, 4 insertions, 0 deletions
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;