]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: Support local_host and remote_host in config lookups.
authorTimo Sirainen <tss@iki.fi>
Thu, 29 Oct 2009 01:15:23 +0000 (21:15 -0400)
committerTimo Sirainen <tss@iki.fi>
Thu, 29 Oct 2009 01:15:23 +0000 (21:15 -0400)
--HG--
branch : HEAD

src/lib-master/master-service-settings.c
src/lib-master/master-service-settings.h

index 72b6237c8427748b3be606ef8073944cff4f1327..bacf218f82d2b5e2f65d25cd24b64ed8b0341fa5 100644 (file)
@@ -148,6 +148,10 @@ master_service_read_config(struct master_service *service, const char *path,
                        str_printfa(str, "\trip=%s",
                                    net_ip2addr(&input->remote_ip));
                }
+               if (input->local_host != NULL)
+                       str_printfa(str, "\tlhost=%s", input->local_host);
+               if (input->remote_host != NULL)
+                       str_printfa(str, "\tlhost=%s", input->remote_host);
                str_append_c(str, '\n');
                ret = write_full(fd, str_data(str), str_len(str));
        } T_END;
index 345e7e974d92a52d3fed5543a5dc98b9222c00a6..000ab019799d52761a2a23e609d7b5f8b7c1f191 100644 (file)
@@ -28,6 +28,7 @@ struct master_service_settings_input {
        const char *service;
        const char *username;
        struct ip_addr local_ip, remote_ip;
+       const char *local_host, *remote_host;
 };
 
 extern const struct setting_parser_info master_service_setting_parser_info;