Closed
Bug 394661
Opened 18 years ago
Closed 18 years ago
Add an XPCOM method to expose Distinguished Name (DN) parsing
Categories
(Directory Graveyard :: LDAP XPCOM SDK, enhancement)
Directory Graveyard
LDAP XPCOM SDK
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jeremy.laine, Assigned: jeremy.laine)
Details
Attachments
(1 file, 1 obsolete file)
|
7.50 KB,
patch
|
standard8
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070723 Iceweasel/2.0.0.6 (Debian-2.0.0.6-1)
Build Identifier:
Currently, there is no method provided for applications to parse the Distinguished Name (DN) of an LDAP entry via XPCOM. To add writable LDAP support to mailnews, a method is needed which takes a DN and returns:
- the Relative DN,
- the Base DN,
- the attributes used to build the Relative DN
Reproducible: Always
| Assignee | ||
Comment 1•18 years ago
|
||
| Assignee | ||
Updated•18 years ago
|
Attachment #279362 -
Flags: superreview?(bienvenu)
Attachment #279362 -
Flags: review?(bugzilla)
Updated•18 years ago
|
Assignee: dmose → jeremy.laine
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•18 years ago
|
||
Comment on attachment 279362 [details] [diff] [review]
Add nsLDAPService::ParseDn() to expose DN parsing via XPCOM
yep, looks good, r=me. Thanks for the patch.
Attachment #279362 -
Flags: review?(bugzilla) → review+
Comment 3•18 years ago
|
||
Comment on attachment 279362 [details] [diff] [review]
Add nsLDAPService::ParseDn() to expose DN parsing via XPCOM
looks good - it might be more readable if the strndup result were put into a temp here:
+ if (!(cArray[index] = nsCRT::strndup(*component, len))) {
+ NS_ERROR("nsLDAPService::ParseDn: out of memory ");
the var name cArray isn't very meaningful - maybe "attrNameArray"?
but I'll leave it up to Mark
Attachment #279362 -
Flags: superreview?(bienvenu) → superreview+
Comment 4•18 years ago
|
||
(In reply to comment #3)
> (From update of attachment 279362 [details] [diff] [review])
> looks good - it might be more readable if the strndup result were put into a
> temp here:
> + if (!(cArray[index] = nsCRT::strndup(*component, len))) {
> + NS_ERROR("nsLDAPService::ParseDn: out of memory ");
> the var name cArray isn't very meaningful - maybe "attrNameArray"?
> but I'll leave it up to Mark
I think yes, it would be more more meaningful with a slightly better name.
| Assignee | ||
Comment 5•18 years ago
|
||
I am attaching an updated version of the patch with these 2 changes:
1/ rename cArray to attrNameArray as requested
2/ use static_cast instead of NS_STATIC_CAST
Attachment #279362 -
Attachment is obsolete: true
Attachment #280330 -
Flags: superreview?(bienvenu)
Attachment #280330 -
Flags: review?(bugzilla)
Updated•18 years ago
|
Attachment #280330 -
Flags: superreview?(bienvenu) → superreview+
Comment 6•18 years ago
|
||
Comment on attachment 280330 [details] [diff] [review]
Add nsLDAPService::ParseDn() to expose DN parsing via XPCOM v2
r=me, thanks.
Attachment #280330 -
Flags: review?(bugzilla) → review+
Comment 7•18 years ago
|
||
Just remembered, we forgot about the uuid (if an interface changes in any way, then its uuid needs to be changed), so I've done that when I checked it in just now:
Checking in directory/xpcom/base/public/nsILDAPService.idl;
/cvsroot/mozilla/directory/xpcom/base/public/nsILDAPService.idl,v <-- nsILDAPService.idl
new revision: 1.6; previous revision: 1.5
done
Checking in directory/xpcom/base/src/nsLDAPService.cpp;
/cvsroot/mozilla/directory/xpcom/base/src/nsLDAPService.cpp,v <-- nsLDAPService.cpp
new revision: 1.28; previous revision: 1.27
done
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•