Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Joe Martin
OpenLDAP
Commits
9f73a972
Commit
9f73a972
authored
Sep 29, 2009
by
Quanah Gibson-Mount
Browse files
Throw an exception when reading an unexpected LDIF record type
parent
3c5d741c
Changes
1
Show whitespace changes
Inline
Side-by-side
contrib/ldapc++/src/LdifReader.cpp
View file @
9f73a972
...
...
@@ -179,11 +179,12 @@ int LdifReader::readNextRecord( bool first )
LDAPEntry
LdifReader
::
getEntryRecord
()
{
std
::
list
<
stringpair
>::
const_iterator
i
=
m_currentRecord
.
begin
();
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
);
i
++
;
LDAPAttribute
curAttr
(
i
->
first
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment