summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c9a8aeb)
raw | patch | inline | side by side (parent: c9a8aeb)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 10 Jan 2015 12:33:13 +0000 (13:33 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 10 Jan 2015 12:33:13 +0000 (13:33 +0100) |
src/core/store.c | patch | blob | history |
diff --git a/src/core/store.c b/src/core/store.c
index 25691dc36839d6b38f9ea2061fcbf0f23378a4ba..98b3a96d28ee6186518ba1f9bd5a16ef2a84e22f 100644 (file)
--- a/src/core/store.c
+++ b/src/core/store.c
if ((! hostname) || (! name))
return -1;
- if (store && ((! store->type) || (! store->id)))
- return -1;
+
+ if (store) {
+ if ((store->type != NULL) != (store->id != NULL))
+ return -1;
+ else if (! store->type)
+ store = NULL;
+ }
pthread_rwlock_wrlock(&host_lock);
host = lookup_host(hostname, /* canonicalize = */ 1);