6.0.0-git
2019-03-23

[#11082] avoiding lots of empty ldap connections
Summary avoiding lots of empty ldap connections
Queue Turba
Queue Version Git master
Type Enhancement
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester dom.lalot (at) gmail (dot) com
Created 2012-03-17 (2562 days ago)
Due
Updated 2012-03-21 (2558 days ago)
Assigned
Resolved 2012-03-21 (2558 days ago)
Milestone 3.0.13
Patch Yes

History
2012-03-21 19:19:59 Git Commit Comment #10 Reply to this comment
Changes have been made in Git (develop):

commit 1b1672cfb7ed2a380c2256f15a10e940b66662e4
Author: Jan Schneider <jan@horde.org>
Date:   Wed Mar 21 16:44:27 2012 +0100

     [jan] Only connect to LDAP driver for read/write requests 
(Dominique Lalot <dom.lalot@gmail.com>, Request #11082).

  turba/docs/CHANGES        |    2 ++
  turba/lib/Driver/Ldap.php |   26 +++++++++++++++++++++++++-
  turba/package.xml         |    2 ++
  3 files changed, 29 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/1b1672cfb7ed2a380c2256f15a10e940b66662e4
2012-03-21 15:45:26 Jan Schneider Comment #9
Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒ 3.0.13
Reply to this comment
Perfect, thanks for your patience!
2012-03-21 15:44:51 Jan Schneider Deleted Original Message
 
2012-03-21 15:44:41 Git Commit Comment #8 Reply to this comment
Changes have been made in Git (master):

commit 1b1672cfb7ed2a380c2256f15a10e940b66662e4
Author: Jan Schneider <jan@horde.org>
Date:   Wed Mar 21 16:44:27 2012 +0100

     [jan] Only connect to LDAP driver for read/write requests 
(Dominique Lalot <dom.lalot@gmail.com>, Request #11082).

  turba/docs/CHANGES        |    2 ++
  turba/lib/Driver/Ldap.php |   26 +++++++++++++++++++++++++-
  turba/package.xml         |    2 ++
  3 files changed, 29 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/1b1672cfb7ed2a380c2256f15a10e940b66662e4
2012-03-21 15:44:40 Jan Schneider Deleted Original Message
 
2012-03-21 10:32:49 dom (dot) lalot (at) gmail (dot) com Comment #7
New Attachment: PatchTurba[1].txt Download
Reply to this comment

[Show Quoted Text - 19 lines]
Hope this is OK now!

2012-03-20 10:56:13 Jan Schneider Comment #6 Reply to this comment
OK. I have no idea to get the very last version of Ldap.php throught 
git. Can I do that with an http access?
https://raw.github.com/horde/horde/master/turba/lib/Driver/Ldap.php

[Show Quoted Text - 13 lines]
2012-03-20 10:49:46 dom (dot) lalot (at) gmail (dot) com Comment #5 Reply to this comment
OK. I have no idea to get the very last version of Ldap.php throught 
git. Can I do that with an http access?
I should have work directly on Ldap.php at first and may be modified 
the original..
Almost there. :)
- Your patch removes a line that doesn't exist in the original file, 
please make sure to make the patch against the last release or Git 
version
- The $this->_ds==null check should be *inside* _connect() to avoid 
redundency, and you need spaces before and after the operator
OK

2012-03-20 08:06:40 Jan Schneider Comment #4 Reply to this comment
Almost there. :)
- Your patch removes a line that doesn't exist in the original file, 
please make sure to make the patch against the last release or Git 
version
- The $this->_ds==null check should be *inside* _connect() to avoid 
redundency, and you need spaces before and after the operator
2012-03-20 07:55:22 dom (dot) lalot (at) gmail (dot) com Comment #3
New Attachment: PatchTurba.txt
Reply to this comment
Looks good, but please update your patch to:
- follow coding standards (indention, whitespace, curly braces)
- make the method protected and call it _connect()
- check if $this->_ds is set *inside* _connect()
Sure, it make sense
OK, I'm not a specialist of PHP, PERL is my language, so I apologize 
for my poor PHP coding.
So my second patch is following
2012-03-19 21:46:35 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Looks good, but please update your patch to:
- follow coding standards (indention, whitespace, curly braces)
- make the method protected and call it _connect()
- check if $this->_ds is set *inside* _connect()
2012-03-17 11:52:51 dom (dot) lalot (at) gmail (dot) com Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 1. Low
Summary ⇒ avoiding lots of empty ldap connections
Queue ⇒ Turba
Milestone ⇒
Patch ⇒ Yes
New Attachment: patchTurba.txt
Reply to this comment
Hello,

The construct method of the ldap driver is doing a connect/bind. Most 
of the time there is no search and there is an unbind after.
I propose to add an init method which is called if _ds==null in order 
to use just connects when searching or writing information.

Dom

Saved Queries