On 23 Sep 2003, at 9:18, Marco Marongiu wrote:
Well you would not. The part of the code in Entry that was causing this problem was code returning an error that there was nothing to update.This seems to be a line that was missed when the memory leak patch was applied. Change line 253 in Net::LDAP::Entry from
$mesg = Net::LDAP::Message->new( {} );
to
$mesg = Net::LDAP::Message->new( $ldap );
should fix it.
Just tried it: Message stopped crying, but no useful action takes place on the directory server: when I call $e->update($ldap) I just see the bind requests on slapd's log, and nothing more :-(
Mh... sorry, maybe it's a language problem but I can't understand... Please, bear with me :-(
This is how things go at the moment:
* I open an authenticated connection to the directory server; I see the BIND request in the logs;
* I retrieve $e from the d.s., see the SEARCH request;
* I disconnect and see the connection closed[1]
* I modify an attribute in $e locally
* I bind again and see the BIND in the logs
* this snippet runs:
$e->changetype('modify') ; $msg = $e->update($ldap) ;
But you have made no changes.
if ($msg->is_error) { ... }
but NOTHING HAPPENS!
Odd is_error should have returned true and $msg->server_error should return "No attributes to update"
Thats why you were seeing the error before. It was the code which is generating this error response that was causing the problem.
Graham.
* I disconnect again and see the connection closed
What's wrong with that? Where an I doing wrong?
Sorry again for bothering you :-\
Ciao Marco
___________________________
[1] it's a CGI script, so the connection is closed and reopened at each iteration
-- Marco Marongiu Email: [EMAIL PROTECTED] System Administrator Phone: +39 070 460 1684 Tiscali S.p.A.