]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: connection - Add connection_handshake_received()
authorAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 28 Feb 2024 11:30:35 +0000 (13:30 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 29 Feb 2024 12:28:27 +0000 (14:28 +0200)
src/lib/connection.c
src/lib/connection.h

index f036ab154ac7cba203fa1481f875051b1a2d0735..dbdece643328cb54d6f2a13f8757e14708060e41 100644 (file)
@@ -25,6 +25,11 @@ void connection_set_handshake_ready(struct connection *conn)
                conn->v.handshake_ready(conn);
 }
 
+bool connection_handshake_received(struct connection *conn)
+{
+       return conn->handshake_finished.tv_sec != 0;
+}
+
 static void connection_closed(struct connection *conn,
                              enum connection_disconnect_reason reason)
 {
index 8fbb913ba4a3bc5582755b38dac8c007e58eb8d0..0cdcb13743c86c44647dc1e0aa5643d72b944b8e 100644 (file)
@@ -280,6 +280,9 @@ void connection_streams_changed(struct connection *conn);
    vfunctions return success and will call the handshake_ready() vfunction. */
 void connection_set_handshake_ready(struct connection *conn);
 
+/* Returns TRUE if handshake has been done */
+bool connection_handshake_received(struct connection *conn);
+
 /* Returns -1 = disconnected, 0 = nothing new, 1 = something new.
    If input_full_behavior is ALLOW, may return also -2 = buffer full. */
 int connection_input_read(struct connection *conn);