Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49800 - in /trunk/ldap-server/src: agent/SlapdConfigAgent.cc lib/slapd-config.cpp lib/slapd-config.h
  • From: rhafer@xxxxxxxxxxxxxxxx
  • Date: Wed, 06 Aug 2008 18:43:38 -0000
  • Message-id: <20080806184338.2A0C42A031@xxxxxxxxxxxxxxxx>
Author: rhafer
Date: Wed Aug 6 20:43:37 2008
New Revision: 49800

URL: http://svn.opensuse.org/viewcvs/yast?rev=49800&view=rev
Log:
Support "hdb" databases as well

Modified:
trunk/ldap-server/src/agent/SlapdConfigAgent.cc
trunk/ldap-server/src/lib/slapd-config.cpp
trunk/ldap-server/src/lib/slapd-config.h

Modified: trunk/ldap-server/src/agent/SlapdConfigAgent.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/agent/SlapdConfigAgent.cc?rev=49800&r1=49799&r2=49800&view=diff
==============================================================================
--- trunk/ldap-server/src/agent/SlapdConfigAgent.cc (original)
+++ trunk/ldap-server/src/agent/SlapdConfigAgent.cc Wed Aug 6 20:43:37 2008
@@ -227,9 +227,9 @@
std::string
dbtype(dbMap->value(YCPString("type"))->asString()->value_cstr());
y2milestone("Database Type: %s", dbtype.c_str());
boost::shared_ptr<OlcDatabase> db;
- if ( dbtype == "bdb" )
+ if ( dbtype == "bdb" || dbtype == "hdb" )
{
- db = boost::shared_ptr<OlcDatabase>(new OlcBdbDatabase() );
+ db = boost::shared_ptr<OlcDatabase>(new OlcBdbDatabase(dbtype)
);
}
else
{
@@ -266,7 +266,7 @@
}
continue;
}
- if ( dbtype == "bdb" )
+ if ( dbtype == "bdb" || dbtype == "hdb" )
{
boost::shared_ptr<OlcBdbDatabase> bdb =
boost::dynamic_pointer_cast<OlcBdbDatabase>(db);
@@ -860,9 +860,9 @@
y2milestone("Database will get Index: %d", dbIndex);
std::string
dbtype(dbMap->value(YCPString("type"))->asString()->value_cstr());
boost::shared_ptr<OlcDatabase> db;
- if ( dbtype == "bdb" )
+ if ( dbtype == "bdb" || dbtype == "hdb" )
{
- db = boost::shared_ptr<OlcDatabase>(new OlcBdbDatabase() );
+ db = boost::shared_ptr<OlcDatabase>(new OlcBdbDatabase( dbtype ) );
}
else
{
@@ -899,7 +899,7 @@
}
continue;
}
- if ( dbtype == "bdb" )
+ if ( dbtype == "bdb" || dbtype == "hdb" )
{
boost::shared_ptr<OlcBdbDatabase> bdb =
boost::dynamic_pointer_cast<OlcBdbDatabase>(db);

Modified: trunk/ldap-server/src/lib/slapd-config.cpp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/lib/slapd-config.cpp?rev=49800&r1=49799&r2=49800&view=diff
==============================================================================
--- trunk/ldap-server/src/lib/slapd-config.cpp (original)
+++ trunk/ldap-server/src/lib/slapd-config.cpp Wed Aug 6 20:43:37 2008
@@ -88,9 +88,16 @@
m_dbEntryChanged.replaceAttribute(LDAPAttribute("olcDatabase",
name.str()));
}

-OlcBdbDatabase::OlcBdbDatabase() : OlcDatabase("bdb")
+OlcBdbDatabase::OlcBdbDatabase( const std::string& type ) : OlcDatabase(type)
{
- m_dbEntryChanged.addAttribute(LDAPAttribute("objectclass",
"olcBdbConfig"));
+ if ( type == "hdb" )
+ {
+ m_dbEntryChanged.addAttribute(LDAPAttribute("objectclass",
"olcHdbConfig"));
+ }
+ else
+ {
+ m_dbEntryChanged.addAttribute(LDAPAttribute("objectclass",
"olcBdbConfig"));
+ }
}

OlcBdbDatabase::OlcBdbDatabase( const LDAPEntry& le) : OlcDatabase(le) { }
@@ -684,7 +691,7 @@
StringList oc = e.getAttributeByName("objectclass")->getValues();
for( StringList::const_iterator i = oc.begin(); i != oc.end(); i++ )
{
- if ( strCaseIgnoreEquals(*i, "olcBdbConfig" ) )
+ if ( strCaseIgnoreEquals(*i, "olcBdbConfig" ) ||
strCaseIgnoreEquals(*i, "olcHdbConfig" ) )
{
return true;
}

Modified: trunk/ldap-server/src/lib/slapd-config.h
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/ldap-server/src/lib/slapd-config.h?rev=49800&r1=49799&r2=49800&view=diff
==============================================================================
--- trunk/ldap-server/src/lib/slapd-config.h (original)
+++ trunk/ldap-server/src/lib/slapd-config.h Wed Aug 6 20:43:37 2008
@@ -147,7 +147,7 @@
class OlcBdbDatabase : public OlcDatabase
{
public:
- OlcBdbDatabase();
+ OlcBdbDatabase( const std::string& type = "hdb");
OlcBdbDatabase( const LDAPEntry& le );
void setDirectory( const std::string &dir);


--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages