Commit 75aa6af3 authored by Jan Včelák's avatar Jan Včelák 🚀

review, unify non-const qualifier for timeouts

parent 729c178c
......@@ -172,7 +172,7 @@ static int remote_send_chunk(int c, knot_pkt_t *query, const char *d, uint16_t l
rcu_read_lock();
conf_val_t *val = &conf()->cache.srv_tcp_reply_timeout;
const int timeout = conf_int(val) * 1000;
int timeout = conf_int(val) * 1000;
rcu_read_unlock();
ret = net_dns_tcp_send(c, resp->wire, resp->size, timeout);
......
......@@ -277,7 +277,7 @@ static int remote_forward(struct knot_request *request, conf_remote_t *remote)
ret = knot_requestor_enqueue(&re, req);
if (ret == KNOT_EOK) {
conf_val_t *val = &conf()->cache.srv_tcp_reply_timeout;
const int timeout = conf_int(val) * 1000;
int timeout = conf_int(val) * 1000;
ret = knot_requestor_exec(&re, timeout);
} else {
knot_request_free(req, re.mm);
......
......@@ -114,7 +114,7 @@ static int tcp_handle(tcp_context_t *tcp, int fd,
/* Timeout. */
rcu_read_lock();
conf_val_t *val = &conf()->cache.srv_tcp_reply_timeout;
const int timeout = conf_int(val) * 1000;
int timeout = conf_int(val) * 1000;
rcu_read_unlock();
/* Receive data. */
......
......@@ -132,7 +132,7 @@ int cmd_remote(const char *socket, const char *cmd, uint16_t rrt,
/* Default timeout. */
conf_val_t *val = &conf()->cache.srv_tcp_reply_timeout;
const int timeout = conf_int(val) * 1000;
int timeout = conf_int(val) * 1000;
/* Prepare socket address. */
struct sockaddr_storage addr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment