]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm director map/add/remove: Fixed handling IP address as parameter.
authorTimo Sirainen <tss@iki.fi>
Wed, 4 Aug 2010 12:49:54 +0000 (13:49 +0100)
committerTimo Sirainen <tss@iki.fi>
Wed, 4 Aug 2010 12:49:54 +0000 (13:49 +0100)
Only host names were working correctly.

src/doveadm/doveadm-director.c

index ddb948d2fafbe0e69fadb3d885129f8c51d10988..82645c9bf023e535a12bab730fe8fabb394edde7 100644 (file)
@@ -241,7 +241,8 @@ static void director_get_host(const char *host, struct ip_addr **ips_r,
        struct ip_addr ip;
 
        if (net_addr2ip(host, &ip) == 0) {
-               *ips_r = &ip;
+               *ips_r = t_new(struct ip_addr, 1);
+               **ips_r = ip;
                *ips_count_r = 1;
        } else {
                if (net_gethostbyname(host, ips_r, ips_count_r) < 0)