From 5bcb1309da45a37ba9902b136b4b64420d1fd8f2 Mon Sep 17 00:00:00 2001 From: Miciah Dashiel Butler Masters Date: Sat, 28 Jan 2006 20:21:09 +0000 Subject: [PATCH] Use enum connection_state Use enum connection_state instead of int in load_uri, proxy_uri, get_proxy_worker, and get_proxy_uri. See commit d18809522ed7242ac9bfaab9a72a0b23b9d46f1c. I hope that satisfies TCC. --- src/network/connection.c | 2 +- src/protocol/proxy.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/network/connection.c b/src/network/connection.c index 2eac88e2a..b28a9630b 100644 --- a/src/network/connection.c +++ b/src/network/connection.c @@ -847,7 +847,7 @@ load_uri(struct uri *uri, struct uri *referrer, struct download *download, struct cache_entry *cached; struct connection *conn; struct uri *proxy_uri, *proxied_uri; - int connection_state = S_OK; + enum connection_state connection_state = S_OK; if (download) { download->conn = NULL; diff --git a/src/protocol/proxy.c b/src/protocol/proxy.c index 987c6d9aa..f52cf2b04 100644 --- a/src/protocol/proxy.c +++ b/src/protocol/proxy.c @@ -16,6 +16,7 @@ #include "config/options.h" #include "main/event.h" #include "network/connection.h" +#include "network/state.h" #include "protocol/protocol.h" #include "protocol/proxy.h" #include "protocol/uri.h" @@ -53,7 +54,8 @@ proxy_probe_no_proxy(unsigned char *url, unsigned char *no_proxy) } static struct uri * -proxy_uri(struct uri *uri, unsigned char *proxy, int *connection_state) +proxy_uri(struct uri *uri, unsigned char *proxy, + enum connection_state *connection_state) { struct string string; @@ -114,7 +116,8 @@ get_protocol_proxy(unsigned char *opt, } static struct uri * -get_proxy_worker(struct uri *uri, unsigned char *proxy, int *connection_state) +get_proxy_worker(struct uri *uri, unsigned char *proxy, + enum connection_state *connection_state) { unsigned char *protocol_proxy = NULL; @@ -180,7 +183,7 @@ get_proxy_worker(struct uri *uri, unsigned char *proxy, int *connection_state) } struct uri * -get_proxy_uri(struct uri *uri, int *connection_state) +get_proxy_uri(struct uri *uri, enum connection_state *connection_state) { if (uri->protocol == PROTOCOL_PROXY) { return get_composed_uri(uri, URI_BASE);