mirror of https://github.com/getdnsapi/getdns.git
One more string2bindata case...
This commit is contained in:
parent
cbc8b1e303
commit
cbb668379f
|
@ -631,7 +631,6 @@ set_os_defaults(struct getdns_context *context)
|
||||||
char line[1024], domain[1024];
|
char line[1024], domain[1024];
|
||||||
char *parse, *token, prev_ch;
|
char *parse, *token, prev_ch;
|
||||||
size_t upstreams_limit = 10, length;
|
size_t upstreams_limit = 10, length;
|
||||||
struct getdns_bindata bindata;
|
|
||||||
struct addrinfo hints;
|
struct addrinfo hints;
|
||||||
struct addrinfo *result;
|
struct addrinfo *result;
|
||||||
getdns_upstream *upstream;
|
getdns_upstream *upstream;
|
||||||
|
@ -689,12 +688,7 @@ set_os_defaults(struct getdns_context *context)
|
||||||
prev_ch = *token;
|
prev_ch = *token;
|
||||||
*token = 0;
|
*token = 0;
|
||||||
|
|
||||||
bindata.data = (uint8_t *)parse;
|
_getdns_list_append_string(context->suffix, parse);
|
||||||
bindata.size = strlen(parse) + 1;
|
|
||||||
(void) getdns_list_get_length(
|
|
||||||
context->suffix, &length);
|
|
||||||
(void) getdns_list_set_bindata(
|
|
||||||
context->suffix, length, &bindata);
|
|
||||||
|
|
||||||
*token = prev_ch;
|
*token = prev_ch;
|
||||||
parse = token;
|
parse = token;
|
||||||
|
@ -731,11 +725,8 @@ set_os_defaults(struct getdns_context *context)
|
||||||
fclose(in);
|
fclose(in);
|
||||||
|
|
||||||
(void) getdns_list_get_length(context->suffix, &length);
|
(void) getdns_list_get_length(context->suffix, &length);
|
||||||
if (length == 0 && *domain != 0) {
|
if (length == 0 && *domain != 0)
|
||||||
bindata.data = (uint8_t *)domain;
|
_getdns_list_append_string(context->suffix, domain);
|
||||||
bindata.size = strlen(domain) + 1;
|
|
||||||
(void) getdns_list_set_bindata(context->suffix, 0, &bindata);
|
|
||||||
}
|
|
||||||
return GETDNS_RETURN_GOOD;
|
return GETDNS_RETURN_GOOD;
|
||||||
} /* set_os_defaults */
|
} /* set_os_defaults */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue