changeset 10223:7b774a0c3493 HEAD

lib-master: Support local_host and remote_host in config lookups.
author Timo Sirainen <tss@iki.fi>
date Wed, 28 Oct 2009 21:15:23 -0400
parents 168f2e6ef6d6
children 3f1c47797dee
files src/lib-master/master-service-settings.c src/lib-master/master-service-settings.h
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-master/master-service-settings.c	Wed Oct 28 21:05:19 2009 -0400
+++ b/src/lib-master/master-service-settings.c	Wed Oct 28 21:15:23 2009 -0400
@@ -148,6 +148,10 @@
 			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;
--- a/src/lib-master/master-service-settings.h	Wed Oct 28 21:05:19 2009 -0400
+++ b/src/lib-master/master-service-settings.h	Wed Oct 28 21:15:23 2009 -0400
@@ -28,6 +28,7 @@
 	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;