[yast-commit] r60065 - /branches/SuSE-Code-11-SP1-Branch/ldap-server/src/agent/SlapdConfigAgent.cc
Author: rhafer Date: Fri Dec 11 13:27:24 2009 New Revision: 60065 URL: http://svn.opensuse.org/viewcvs/yast?rev=60065&view=rev Log: Take care that the syncrepl rid is unique accross the server (bnc#561857) Modified: branches/SuSE-Code-11-SP1-Branch/ldap-server/src/agent/SlapdConfigAgent.cc 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=60065&r1=60064&r2=60065&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 Fri Dec 11 13:27:24 2009 @@ -1734,6 +1734,25 @@ { sr = boost::shared_ptr<OlcSyncRepl>(new OlcSyncRepl()); srl.push_back(sr); + + // find available rid (rid must be unique accross the server) + OlcDatabaseList::const_iterator k; + int largest_rid=0; + for ( k = databases.begin(); k != databases.end() ; k++ ) + { + OlcSyncReplList srl1 = (*k)->getSyncRepl(); + if ( srl1.empty() ) + { + continue; + } + boost::shared_ptr<OlcSyncRepl> sr1; + int currid = (*srl1.begin())->getRid(); + if ( currid > largest_rid ) + { + largest_rid=currid; + } + } + sr->setRid(largest_rid+1); } else { -- 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