http/client: fix dnsc_conf initialization
@@ -848,17 +848,19 @@ void http_req_set_conn_handler(struct http_req *req, http_conn_h *connh)
int http_client_set_config(struct http_cli *cli, struct http_conf *conf)
{
- struct dnsc_conf dconf;
if (!cli || !conf)
return EINVAL;
cli->conf = *conf;
- dconf.query_hash_size = QUERY_HASH_SIZE;
- dconf.tcp_hash_size = TCP_HASH_SIZE;
- dconf.conn_timeout = conf->conn_timeout;
- dconf.idle_timeout = conf->idle_timeout;
- dconf.cache_ttl_max = 1800;
+ struct dnsc_conf dconf = {
+ .query_hash_size = QUERY_HASH_SIZE,
+ .tcp_hash_size = TCP_HASH_SIZE,
+ .conn_timeout = conf->conn_timeout,
+ .idle_timeout = conf->idle_timeout,
+ .cache_ttl_max = 1800,
+ .getaddrinfo = false,
+ };
return dnsc_conf_set(cli->dnsc, &dconf);
}
