summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-02-04 12:14:37 +0100
committerGünther Deschner <gd@samba.org>2014-02-13 11:54:17 +0100
commit196c6e086ac6960540e6f1a8ddabda24cef01f8b (patch)
treec64d4481efb4471cad754ddd1bfb1e9b31401889 /source4/dsdb
parent581ded9a2819f4533a79f5ddcd5f9203c81ea594 (diff)
downloadsamba-196c6e086ac6960540e6f1a8ddabda24cef01f8b.tar.gz
s4:dsdb/repl: make use of dcerpc_binding_get_string_option("host")
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/repl/drepl_partitions.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/source4/dsdb/repl/drepl_partitions.c b/source4/dsdb/repl/drepl_partitions.c
index 815a25996a2..7be069e0dc5 100644
--- a/source4/dsdb/repl/drepl_partitions.c
+++ b/source4/dsdb/repl/drepl_partitions.c
@@ -297,8 +297,15 @@ WERROR dreplsrv_out_connection_attach(struct dreplsrv_service *s,
hostname = rft->other_info->dns_name;
- for (cur = s->connections; cur; cur = cur->next) {
- if (strcmp(cur->binding->host, hostname) == 0) {
+ for (cur = s->connections; cur; cur = cur->next) {
+ const char *host;
+
+ host = dcerpc_binding_get_string_option(cur->binding, "host");
+ if (host == NULL) {
+ continue;
+ }
+
+ if (strcmp(host, hostname) == 0) {
conn = cur;
break;
}
@@ -340,9 +347,9 @@ WERROR dreplsrv_out_connection_attach(struct dreplsrv_service *s,
DLIST_ADD_END(s->connections, conn, struct dreplsrv_out_connection *);
- DEBUG(4,("dreplsrv_out_connection_attach(%s): create\n", conn->binding->host));
+ DEBUG(4,("dreplsrv_out_connection_attach(%s): create\n", hostname));
} else {
- DEBUG(4,("dreplsrv_out_connection_attach(%s): attach\n", conn->binding->host));
+ DEBUG(4,("dreplsrv_out_connection_attach(%s): attach\n", hostname));
}
*_conn = conn;