From 5948270b95e9d9fff020eddc15b930af856c1249 Mon Sep 17 00:00:00 2001 From: yrutschle Date: Sun, 28 Mar 2021 11:47:33 +0200 Subject: [PATCH] update API --- sslh-select.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sslh-select.c b/sslh-select.c index 630cca8..36ae30d 100644 --- a/sslh-select.c +++ b/sslh-select.c @@ -108,7 +108,7 @@ static int accept_new_connection(int listen_socket, struct cnx_collection *colle return -1; } - res = collection_add_fd(collection, in_socket); + res = collection_alloc_cnx_from_fd(collection, in_socket); if (res == -1) { close(in_socket); return -1; @@ -339,6 +339,7 @@ static void cnx_read_process(struct connection* cnx, int active_q, struct select default: /* illegal */ log_message(LOG_ERR, "Illegal connection state %d\n", cnx->state); + dump_connection(cnx); exit(1); } } @@ -441,7 +442,6 @@ void main_loop(struct listen_endpoint listen_sockets[], int num_addr_listen) ((cnx->state == ST_PROBING) && (cnx->probe_timeout < time(NULL)))) { if (cfg.verbose) fprintf(stderr, "processing read fd%d slot %d\n", j, i); - cnx_read_process(cnx, j, &fd_info); } }