]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon: fix clang errors
authorGrigorii Demidov <grigorii.demidov@nic.cz>
Mon, 17 Sep 2018 09:11:48 +0000 (11:11 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 12 Oct 2018 15:36:42 +0000 (17:36 +0200)
daemon/io.c
daemon/tls.c
daemon/worker.c

index d6a9df409225f74b80f7d16abd1b6aa4ba2a1135..0615b9452de048a906a6ae267d77ffee348bb881 100644 (file)
@@ -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,
index 4f88edb6140c10926aff1de97871f05e00467833..fa2e894b571477fa90bc95187b8dd8342f75bb12 100644 (file)
@@ -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) {
index 115054072f0ace11600241f927e4bf6dc1e0240e..5cea9e6d082c9a9851dbeb495d0a1675403f8bc8 100644 (file)
@@ -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) {