Closed Bug 355363 Opened 18 years ago Closed 18 years ago

Make a base class for LDAP Message Listener code

Categories

(MailNews Core :: LDAP Integration, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Assigned: standard8)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Currently, in the address book we have a nsAbQueryLDAPMessageListener that is used to handle messages being received from the ldap interface. This includes the code used when binding. To handle modifing LDAP address books we'll need similar code. Therefore I suggest separating the generic parts of the nsAbQueryLDAPMessageListener into a nsAbLDAPListenerBase class ready for use when we start being able to modify address books. I've got a patch in progress for this it still needs some tweaks, but I should be able to post it soon.
Attached patch Patch v1 (obsolete) — Splinter Review
This still needs a bit of work to check for regressions but essentially I think that the base class should look roughly like this for now. This will form the base class, I'm then thinking we'll have a nsAbLDAPDirectoryModify class/file to handle the actual modifications separate to the nsAbLDAPDirectoryQuery and the nsAbLDAPDirectory implementations.
Blocks: 356208
Attached patch Patch v2Splinter Review
This patch has a few more improvements in it so that ldap auth should work correctly in all instances, I've also included the recent changes that we did for dropping pointers at the right times. This should get us what we need to help with implementing writeable ldap directory listeners etc.
Attachment #241864 - Attachment is obsolete: true
Attachment #244880 - Flags: review?(bienvenu)
Comment on attachment 244880 [details] [diff] [review] Patch v2 In general, this looks good. One thing to check is that we haven't introduced any new cycles in the ldap objects structure, such that ldap connections aren't closed when ab windows are closed.
Attachment #244880 - Flags: review?(bienvenu) → review+
(In reply to comment #3) > (From update of attachment 244880 [details] [diff] [review] [edit]) > In general, this looks good. One thing to check is that we haven't introduced > any new cycles in the ldap objects structure, such that ldap connections aren't > closed when ab windows are closed. > I don't believe I've done this, as the base class just separates the code out. I've tested various scenarios and not had any problems yet.
Attachment #244880 - Flags: superreview?(mscott)
Comment on attachment 244880 [details] [diff] [review] Patch v2 should this: + rv = ldapOperation->SimpleBind(NS_ConvertUTF16toUTF8(passwd)); + NS_ENSURE_SUCCESS(rv, rv); + + return rv; just be return ldapOperation->SimpleBind(NS_ConvertUTF16toUTF8(passwd));
Attachment #244880 - Flags: superreview?(mscott) → superreview+
Patch checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Blocks: 361994
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: