From 083ba385d70a6fbc0c89ffbc42f66d035a856139 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Mon, 24 Feb 2020 09:47:52 +0000 Subject: fetch: Automatically handle fetches which fail to finish Signed-off-by: Daniel Silverstone --- content/fetch.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'content/fetch.h') diff --git a/content/fetch.h b/content/fetch.h index 9e80b2685..817d5e2f8 100644 --- a/content/fetch.h +++ b/content/fetch.h @@ -39,19 +39,27 @@ struct ssl_cert_info; */ typedef enum { FETCH_PROGRESS, + FETCH_CERTS, FETCH_HEADER, FETCH_DATA, + /* Anything after here is a completed fetch of some kind. */ FETCH_FINISHED, FETCH_TIMEDOUT, FETCH_ERROR, FETCH_REDIRECT, FETCH_NOTMODIFIED, - FETCH_CERTS, FETCH_AUTH, FETCH_CERT_ERR, FETCH_SSL_ERR } fetch_msg_type; +/** Minimum finished message type. + * + * If a fetch does not progress this far, it's an error and the fetch machinery + * will send FETCH_ERROR to the llcache on fetch_free() + */ +#define FETCH_MIN_FINISHED_MSG FETCH_FINISHED + /** * Fetcher message data */ -- cgit v1.2.3