Mercurial > dovecot > original-hg > dovecot-1.2
comparison 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 |
comparison
equal
deleted
inserted
replaced
9441:ebb2a91e6df7 | 9442:562af4a76438 |
---|---|
2 #define LOGIN_PROXY_STATE_H | 2 #define LOGIN_PROXY_STATE_H |
3 | 3 |
4 #include <sys/time.h> | 4 #include <sys/time.h> |
5 | 5 |
6 struct login_proxy_record { | 6 struct login_proxy_record { |
7 struct ip_addr ip; | |
8 unsigned int port; | |
9 unsigned int num_waiting_connections; | |
10 | |
7 struct timeval last_failure; | 11 struct timeval last_failure; |
8 struct timeval last_success; | 12 struct timeval last_success; |
9 unsigned int num_waiting_connections; | |
10 }; | 13 }; |
11 | 14 |
12 struct login_proxy_state *login_proxy_state_init(void); | 15 struct login_proxy_state *login_proxy_state_init(void); |
13 void login_proxy_state_deinit(struct login_proxy_state **state); | 16 void login_proxy_state_deinit(struct login_proxy_state **state); |
14 | 17 |
15 struct login_proxy_record * | 18 struct login_proxy_record * |
16 login_proxy_state_get(struct login_proxy_state *state, | 19 login_proxy_state_get(struct login_proxy_state *state, |
17 const struct ip_addr *ip); | 20 const struct ip_addr *ip, unsigned int port); |
18 | 21 |
19 #endif | 22 #endif |