c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen/* Copyright (c) 2009-2018 Dovecot authors, see the included COPYING file */
88187ee880b4829443e0d55ea7d145d9d5880217Timo Sirainenstatic void who_user_ip(const struct who_user *user, struct ip_addr *ip_r)
73b50eecfc31750a312e2f940023f522eb07178cTimo Sirainen const struct ip_addr *ip = array_idx(&user->ips, 0);
88187ee880b4829443e0d55ea7d145d9d5880217Timo Sirainenstatic unsigned int who_user_hash(const struct who_user *user)
d6badc27cd6e8d3398877b6766cb0aaeef3a7800Timo Sirainenstatic int who_user_cmp(const struct who_user *user1,
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen if (strcmp(user1->username, user2->username) != 0)
5ea06115cb60413b62ffb58ffdd62786fec6a316Timo Sirainen if (strcmp(user1->service, user2->service) != 0)
b6612c334604eeb27e1ca2bd804ac66dcbc2eaadTimo Sirainen /* tracking only IP addresses, not usernames */
03739a8eaad2d8b34b9d87dbbe5b13c5d5dfa11aTimo Sirainenwho_user_has_ip(const struct who_user *user, const struct ip_addr *ip)
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainenstatic int who_parse_line(const char *line, struct who_line *line_r)
0dffa25d211be541ee3c953b23566a1a990789dfTimo Sirainen const char *const *args = t_strsplit_tabescaped(line);
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen const char *ident = args[0];
afd0d073a0afd1c8cf6473b4ae76919586eaa1faTimo Sirainen /* ident = service/ip/username (imap, pop3)
return TRUE;
return FALSE;
T_BEGIN {
} T_END;
return FALSE;
if (!ret)
return FALSE;
return TRUE;
} T_END;
return FALSE;
return FALSE;
return TRUE;
} T_END;
if (!separate_connections) {