Commit 9f73a972 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

Throw an exception when reading an unexpected LDIF record type

parent 3c5d741c
...@@ -179,11 +179,12 @@ int LdifReader::readNextRecord( bool first ) ...@@ -179,11 +179,12 @@ int LdifReader::readNextRecord( bool first )
LDAPEntry LdifReader::getEntryRecord() LDAPEntry LdifReader::getEntryRecord()
{ {
std::list<stringpair>::const_iterator i = m_currentRecord.begin();
if ( m_curRecType != LDAPMsg::SEARCH_ENTRY ) if ( m_curRecType != LDAPMsg::SEARCH_ENTRY )
{ {
// Error throw( std::runtime_error( "The LDIF record: '" + i->second +
"' is not a valid LDAP Entry" ));
} }
std::list<stringpair>::const_iterator i = m_currentRecord.begin();
LDAPEntry resEntry(i->second); LDAPEntry resEntry(i->second);
i++; i++;
LDAPAttribute curAttr(i->first); LDAPAttribute curAttr(i->first);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment