Author: rhafer Date: Fri Sep 25 14:59:49 2009 New Revision: 58780 URL: http://svn.opensuse.org/viewcvs/yast?rev=58780&view=rev Log: There is a helper function for splitting of the index prefix from the nameing attribute Modified: trunk/ldap-server/src/lib/slapd-config.cpp 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=58780&r1=58779&r2=58780&view=diff ============================================================================== --- trunk/ldap-server/src/lib/slapd-config.cpp (original) +++ trunk/ldap-server/src/lib/slapd-config.cpp Fri Sep 25 14:59:49 2009 @@ -1281,16 +1281,8 @@ { throw std::runtime_error( "Entry '" + dn + "' does not define any objectclasses or attributetypes." ); } - if ( name[0] == '{' ) - { - std::string::size_type pos = name.find('}'); - std::istringstream indexstr(name.substr(1, pos-1)); - indexstr >> entryIndex; - m_name = name.substr( pos+1, std::string::npos ); - } else { - m_name = name; - entryIndex = 0; - } + + entryIndex = splitIndexFromString( name, m_name ); } OlcSchemaConfig::OlcSchemaConfig(const LDAPEntry &e1, const LDAPEntry &e2) : OlcConfigEntry(e1, e2) { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org