Mercurial > dovecot > core-2.2
changeset 22642:36e4e7fc0b1b
director: Add director_host.ip_str
This avoids having to use net_ip2addr() all the time to convert it into a
string.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Sat, 04 Nov 2017 01:51:25 +0200 |
parents | 7163028a9f90 |
children | 6e235143e177 |
files | src/director/director-host.c src/director/director-host.h |
diffstat | 2 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/director/director-host.c Sat Nov 04 01:49:29 2017 +0200 +++ b/src/director/director-host.c Sat Nov 04 01:51:25 2017 +0200 @@ -34,6 +34,7 @@ host->dir = dir; host->refcount = 1; host->ip = *ip; + host->ip_str = i_strdup(net_ip2addr(&host->ip)); host->port = port; host->name = i_strdup_printf("%s:%u", net_ip2addr(ip), port); @@ -79,6 +80,7 @@ } } i_free(host->name); + i_free(host->ip_str); i_free(host); }