diff src/login-common/login-proxy-state.h @ 9442:562af4a76438 HEAD

imap/pop3 proxy: Track "destination down" state separately for IP+ports, not just IPs. In some systems different ports could get redirected to different servers.
author Timo Sirainen <tss@iki.fi>
date Fri, 16 Oct 2009 15:19:54 -0400
parents 93e2b0519e65
children
line wrap: on
line diff
--- a/src/login-common/login-proxy-state.h	Fri Oct 16 13:16:07 2009 -0400
+++ b/src/login-common/login-proxy-state.h	Fri Oct 16 15:19:54 2009 -0400
@@ -4,9 +4,12 @@
 #include <sys/time.h>
 
 struct login_proxy_record {
+	struct ip_addr ip;
+	unsigned int port;
+	unsigned int num_waiting_connections;
+
 	struct timeval last_failure;
 	struct timeval last_success;
-	unsigned int num_waiting_connections;
 };
 
 struct login_proxy_state *login_proxy_state_init(void);
@@ -14,6 +17,6 @@
 
 struct login_proxy_record *
 login_proxy_state_get(struct login_proxy_state *state,
-		      const struct ip_addr *ip);
+		      const struct ip_addr *ip, unsigned int port);
 
 #endif