[yast-commit] r60127 - in /branches/SuSE-Code-11-SP1-Branch/ldap-server/src: LdapDatabase.ycp LdapServer.pm agent/SlapdConfigAgent.cc
Author: rhafer Date: Wed Dec 16 16:30:41 2009 New Revision: 60127 URL: http://svn.opensuse.org/viewcvs/yast?rev=60127&view=rev Log: fix updateref handling (bnc#565164) - agent honor "use_provider" setting now - disable update ref widgets upon startup if "use_provider" is set - don't configure an updateref if hostname is empty Modified: branches/SuSE-Code-11-SP1-Branch/ldap-server/src/LdapDatabase.ycp branches/SuSE-Code-11-SP1-Branch/ldap-server/src/LdapServer.pm branches/SuSE-Code-11-SP1-Branch/ldap-server/src/agent/SlapdConfigAgent.cc Modified: branches/SuSE-Code-11-SP1-Branch/ldap-server/src/LdapDatabase.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/ldap-server/src/LdapDatabase.ycp?rev=60127&r1=60126&r2=60127&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/ldap-server/src/LdapDatabase.ycp (original) +++ branches/SuSE-Code-11-SP1-Branch/ldap-server/src/LdapDatabase.ycp Wed Dec 16 16:30:41 2009 @@ -1556,6 +1556,20 @@ if ( UI::QueryWidget( `cb_syncrepl, `Value ) == true ) { UI::ChangeWidget( `f_synccons, `Enabled, true ); + if ( (boolean)UI::QueryWidget( `cb_update_ref, `Value ) == true ) + { + UI::ChangeWidget( `te_updateref_target, `Enabled, true ); + UI::ChangeWidget( `cb_updateref_prot, `Enabled, true ); + UI::ChangeWidget( `if_updateref_port, `Enabled, true ); + UI::ChangeWidget( `te_updateref_target, `Value, "" ); + } + else + { + UI::ChangeWidget( `te_updateref_target, `Enabled, false ); + UI::ChangeWidget( `cb_updateref_prot, `Enabled, false ); + UI::ChangeWidget( `if_updateref_port, `Enabled, false ); + UI::ChangeWidget( `te_updateref_target, `Value, "" ); + } } else { @@ -1742,7 +1756,7 @@ if ( (boolean) UI::QueryWidget( `cb_update_ref, `Value) ) { map<string,any> updateref = $[]; - if ( (string)UI::QueryWidget(`cb_updateref_prot, `Value) != "" ) + if ( (string)UI::QueryWidget(`te_updateref_target, `Value) != "" ) { updateref = add(updateref, "protocol", (string)UI::QueryWidget(`cb_updateref_prot, `Value) ); updateref = add(updateref, "target", (string)UI::QueryWidget(`te_updateref_target, `Value) ); Modified: branches/SuSE-Code-11-SP1-Branch/ldap-server/src/LdapServer.pm URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/ldap-server/src/LdapServer.pm?rev=60127&r1=60126&r2=60127&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/ldap-server/src/LdapServer.pm (original) +++ branches/SuSE-Code-11-SP1-Branch/ldap-server/src/LdapServer.pm Wed Dec 16 16:30:41 2009 @@ -1794,6 +1794,7 @@ "credentials" => $syncpw, "basedn" => "cn=config", "starttls" => YaST::YCP::Boolean(1), + "syncrepl" => { 'use_provider' => YaST::YCP::Boolean(1) } }; SCR->Write(".ldapserver.database.{0}.syncrepl", $syncrepl ); $syncrepl->{'basedn'} = $dbDefaults{'suffix'}; Modified: branches/SuSE-Code-11-SP1-Branch/ldap-server/src/agent/SlapdConfigAgent.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/ldap-server/src/agent/SlapdConfigAgent.cc?rev=60127&r1=60126&r2=60127&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/ldap-server/src/agent/SlapdConfigAgent.cc (original) +++ branches/SuSE-Code-11-SP1-Branch/ldap-server/src/agent/SlapdConfigAgent.cc Wed Dec 16 16:30:41 2009 @@ -1833,11 +1833,23 @@ YCPMap updaterefMap = argMap->value(YCPString("updateref"))->asMap(); if ( updaterefMap.size() > 0 ) { - LDAPUrl updaterefUrl; - updaterefUrl.setScheme( updaterefMap->value(YCPString("protocol"))->asString()->value_cstr() ); - updaterefUrl.setHost( updaterefMap->value(YCPString("target"))->asString()->value_cstr() ); - updaterefUrl.setPort( updaterefMap->value(YCPString("port"))->asInteger()->value() ); - (*i)->setStringValue("olcUpdateRef", updaterefUrl.getURLString() ); + if ( !updaterefMap->value(YCPString("use_provider")).isNull() && + updaterefMap->value(YCPString("use_provider"))->asBoolean()->value() ) + { + (*i)->setStringValue("olcUpdateRef", prvuri.getURLString() ); + } + else + { + LDAPUrl updaterefUrl; + updaterefUrl.setScheme( updaterefMap->value(YCPString("protocol"))->asString()->value_cstr() ); + updaterefUrl.setHost( updaterefMap->value(YCPString("target"))->asString()->value_cstr() ); + updaterefUrl.setPort( updaterefMap->value(YCPString("port"))->asInteger()->value() ); + (*i)->setStringValue("olcUpdateRef", updaterefUrl.getURLString() ); + } + } + else + { + (*i)->setStringValue("olcUpdateRef", "" ); } } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
rhafer@svn.opensuse.org