prototype implemementation of an sqlite configuration backend

This commit is contained in:
Martin Willi
2007-09-18 07:12:21 +00:00
parent c93a608747
commit 8f561d4409
11 changed files with 473 additions and 86 deletions
+9 -2
View File
@@ -1058,8 +1058,15 @@ identification_t *identification_create_from_string(char *string)
if (inet_pton(AF_INET, string, &address) <= 0)
{
free(this);
return NULL;
/* not IPv4, mostly FQDN */
this->type = ID_FQDN;
this->encoded.ptr = strdup(string);
this->encoded.len = strlen(string);
this->public.matches = (bool (*)
(identification_t*,identification_t*,int*))matches_string;
this->public.equals = (bool (*)
(identification_t*,identification_t*))equals_strcasecmp;
return &(this->public);
}
this->encoded = chunk_clone(chunk);
this->type = ID_IPV4_ADDR;