diff options
author | David Goulet <dgoulet@torproject.org> | 2021-02-17 09:54:05 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-02-17 09:54:05 -0500 |
commit | 9f61d9238ce81444b988137508436255f275051d (patch) | |
tree | 960a3af1f5557fb1ab872bfe9359e0607affc96c /src/feature/metrics | |
parent | 336c45f1a5b30b31cbb76a2622a6e80d755db2b5 (diff) | |
download | tor-9f61d9238ce81444b988137508436255f275051d.tar.gz tor-9f61d9238ce81444b988137508436255f275051d.zip |
metrics: Handle the connection finished flushing event
Turns out, we forgot to add the METRICS connection type fo the finished
flushing handler.
Fixes #40295
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/metrics')
-rw-r--r-- | src/feature/metrics/metrics.c | 9 | ||||
-rw-r--r-- | src/feature/metrics/metrics.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/feature/metrics/metrics.c b/src/feature/metrics/metrics.c index 7a77ab1104..9a72fe7145 100644 --- a/src/feature/metrics/metrics.c +++ b/src/feature/metrics/metrics.c @@ -258,6 +258,15 @@ metrics_connection_reached_eof(connection_t *conn) return 0; } +/** Called when conn has no more bytes left on its outbuf. Return 0 indicating + * success. */ +int +metrics_connection_finished_flushing(connection_t *conn) +{ + tor_assert(conn); + return 0; +} + /** Initialize the subsystem. */ void metrics_init(void) diff --git a/src/feature/metrics/metrics.h b/src/feature/metrics/metrics.h index 858722de59..e072519d10 100644 --- a/src/feature/metrics/metrics.h +++ b/src/feature/metrics/metrics.h @@ -28,6 +28,7 @@ buf_t *metrics_get_output(const metrics_format_t fmt); /* Connection. */ int metrics_connection_process_inbuf(struct connection_t *conn); int metrics_connection_reached_eof(struct connection_t *conn); +int metrics_connection_finished_flushing(struct connection_t *conn); /* Configuration. */ int metrics_parse_ports(or_options_t *options, smartlist_t *ports, |