]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/session: use common naming convention in the entire file session-write-queue
authorTomas Krizek <tomas.krizek@nic.cz>
Thu, 13 Aug 2020 14:34:24 +0000 (16:34 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Thu, 13 Aug 2020 14:34:49 +0000 (16:34 +0200)
Rename "s" to "session" to be consistent with all the other
session_*() functions to make it easier to read.

daemon/session.c
daemon/session.h

index d5cb50021e4645a2552d1f2e82dff260334b7439..145b63243bc7cd4bf6af2ed37f37f7666d8a2cc3 100644 (file)
@@ -734,32 +734,32 @@ int session_wirebuf_process(struct session *session, const struct sockaddr *peer
        return ret;
 }
 
-void session_kill_ioreq(struct session *s, struct qr_task *task)
+void session_kill_ioreq(struct session *session, struct qr_task *task)
 {
-       if (!s) {
+       if (!session) {
                return;
        }
-       assert(s->sflags.outgoing && s->handle);
-       if (s->sflags.closing) {
+       assert(session->sflags.outgoing && session->handle);
+       if (session->sflags.closing) {
                return;
        }
-       session_tasklist_del(s, task);
-       if (s->handle->type == UV_UDP) {
-               assert(session_tasklist_is_empty(s));
-               session_close(s);
+       session_tasklist_del(session, task);
+       if (session->handle->type == UV_UDP) {
+               assert(session_tasklist_is_empty(session));
+               session_close(session);
                return;
        }
 }
 
 /** Update timestamp */
-void session_touch(struct session *s)
+void session_touch(struct session *session)
 {
-       s->last_activity = kr_now();
+       session->last_activity = kr_now();
 }
 
-uint64_t session_last_activity(struct session *s)
+uint64_t session_last_activity(struct session *session)
 {
-       return s->last_activity;
+       return session->last_activity;
 }
 
 bool session_write_queue_is_empty(struct session *session)
index b9a622ecd64eadae6233e87f24217ca393203edd..72bba9ca42ffd70a3056998cc4f87c0806e5f401 100644 (file)
@@ -137,12 +137,12 @@ void session_unpoison(struct session *session);
 knot_pkt_t *session_produce_packet(struct session *session, knot_mm_t *mm);
 int session_discard_packet(struct session *session, const knot_pkt_t *pkt);
 
-void session_kill_ioreq(struct session *s, struct qr_task *task);
+void session_kill_ioreq(struct session *session, struct qr_task *task);
 /** Update timestamp */
-void session_touch(struct session *s);
+void session_touch(struct session *session);
 /** Returns either creation time or time of last IO activity if any occurs. */
 /* Used for TCP timeout calculation. */
-uint64_t session_last_activity(struct session *s);
+uint64_t session_last_activity(struct session *session);
 
 /** Check whether the write queue is empty. */
 bool session_write_queue_is_empty(struct session *session);