From: Stefan Metzmacher Date: Tue, 4 Feb 2014 11:14:37 +0000 (+0100) Subject: s4:dsdb/repl: make use of dcerpc_binding_get_string_option("host") X-Git-Tag: tdb-1.2.13~393 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=196c6e086ac6960540e6f1a8ddabda24cef01f8b;p=thirdparty%2Fsamba.git s4:dsdb/repl: make use of dcerpc_binding_get_string_option("host") Signed-off-by: Stefan Metzmacher Reviewed-by: Guenther Deschner --- 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;