diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wsman.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/wsman.c b/src/wsman.c index dddc69d..0bafea8 100644 --- a/src/wsman.c +++ b/src/wsman.c @@ -478,9 +478,14 @@ static hash_t *wsman_options_get_properties(void) while (properties != NULL && properties[c] != NULL) { char *cc[3]; u_tokenize1(cc, 2, properties[c], '='); - if (!hash_alloc_insert(h, cc[0], cc[1])) { - debug("hash_alloc_insert failed"); - } + if (!hash_lookup(h, cc[0])) { + if (!hash_alloc_insert(h, cc[0], cc[1])) { + debug("hash_alloc_insert failed"); + } + } else { + warn("duplicate not added to hash"); + } + c++; } return h; |