Verified Commit e6abd28e authored by Grigorii Demidov's avatar Grigorii Demidov Committed by Vladimír Čunát

daemon: fix clang errors

parent 94d9b16e
......@@ -49,17 +49,6 @@ static void check_bufsize(uv_handle_t* handle)
#undef negotiate_bufsize
static uv_stream_t *handle_borrow(uv_loop_t *loop)
{
struct worker_ctx *worker = loop->data;
void *req = worker_iohandle_borrow(worker);
if (!req) {
return NULL;
}
return (uv_stream_t *)req;
}
static void handle_getbuf(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf)
{
/* UDP sessions use worker buffer for wire data,
......
......@@ -458,8 +458,6 @@ ssize_t tls_process_input_data(struct session *s, const uint8_t *buf, ssize_t nr
/* See https://gnutls.org/manual/html_node/Data-transfer-and-termination.html#Data-transfer-and-termination */
ssize_t submitted = 0;
bool is_retrying = false;
uint64_t retrying_start = 0;
uint8_t *wire_buf = session_wirebuf_get_free_start(s);
size_t wire_buf_size = session_wirebuf_get_free_size(s);
while (true) {
......
......@@ -623,36 +623,6 @@ static void qr_task_free(struct qr_task *task)
worker->stats.concurrent -= 1;
}
/*@ Register new qr_task within session. */
static int qr_task_register(struct qr_task *task, struct session *session)
{
assert(session_is_outgoing(session) == false &&
session_get_handle(session)->type == UV_TCP);
int ret = session_tasklist_add(session, task);
if (ret < 0) {
return kr_error(ENOMEM);
}
struct request_ctx *ctx = task->ctx;
assert(ctx && (ctx->source.session == NULL || ctx->source.session == session));
ctx->source.session = session;
/* Soft-limit on parallel queries, there is no "slow down" RCODE
* that we could use to signalize to client, but we can stop reading,
* an in effect shrink TCP window size. To get more precise throttling,
* we would need to copy remainder of the unread buffer and reassemble
* when resuming reading. This is NYI. */
if (session_tasklist_get_len(session) >= task->ctx->worker->tcp_pipeline_max) {
uv_handle_t *handle = session_get_handle(session);
if (handle && !session_is_throttled(session) && !session_is_closing(session)) {
io_stop_read(handle);
session_set_throttled(session, true);
}
}
return 0;
}
static void qr_task_complete(struct qr_task *task)
{
struct request_ctx *ctx = task->ctx;
......@@ -1744,12 +1714,6 @@ static struct session* worker_find_tcp_waiting(struct worker_ctx *worker,
return map_find_tcp_session(&worker->tcp_waiting, addr);
}
/* Return DNS/TCP message size. */
static int get_msg_size(const uint8_t *msg)
{
return wire_read_u16(msg);
}
int worker_end_tcp(struct session *session)
{
if (!session) {
......
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