From patchwork Fri Feb 1 17:21:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [13/13] libjunction: Always list the NSDB port attribute in junction XML Date: Fri, 01 Feb 2013 07:21:40 -0000 From: Chuck Lever X-Patchwork-Id: 217540 Message-Id: <20130201172139.63192.71358.stgit@seurat.1015granger.net> To: fedfs-utils-devel@oss.oracle.com Don't depend on the current default behavior of mapping a zero or missing nsdbport value to 389. Signed-off-by: Chuck Lever --- src/libjunction/fedfs.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libjunction/fedfs.c b/src/libjunction/fedfs.c index a06298a..f86ce5c 100644 --- a/src/libjunction/fedfs.c +++ b/src/libjunction/fedfs.c @@ -140,10 +140,10 @@ fedfs_name_xml(const char *pathname, xmlNodePtr fileset, xmlSetProp(new, FEDFS_XML_FSN_UUID_ATTR, (const xmlChar *)fsn_uuid); xmlSetProp(new, FEDFS_XML_FSN_NSDBNAME_ATTR, (const xmlChar *)nsdb_name); - if (nsdb_port != LDAP_PORT) - junction_xml_set_int_attribute(new, - FEDFS_XML_FSN_NSDBPORT_ATTR, - nsdb_port); + if (nsdb_port == 0) + nsdb_port = LDAP_PORT; + junction_xml_set_int_attribute(new, FEDFS_XML_FSN_NSDBPORT_ATTR, + nsdb_port); return FEDFS_OK; }