Code

* maximal number of ldap handles can be defined by config file now
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Apr 2009 08:33:53 +0000 (08:33 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Apr 2009 08:33:53 +0000 (08:33 +0000)
* number of precreated ldap handles can be defined by config file now

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13577 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/gosa-si-server

index ddff0298dacf45b000eb80c58526e4c9e2334cb9..a115ef3246580125bcb32a72ca2f13b4d67f0c17 100755 (executable)
@@ -104,7 +104,7 @@ our $no_arp;
 our $verbose;
 our $forground;
 our $cfg_file;
-our ($ldap_uri, $ldap_base, $ldap_admin_dn, $ldap_admin_password, $ldap_server_dn, $ldap_version);
+our ($ldap_uri, $ldap_base, $ldap_admin_dn, $ldap_admin_password, $ldap_server_dn, $ldap_version, $max_ldap_handle, $precreate_ldap_handle);
 our ($mysql_username, $mysql_password, $mysql_database, $mysql_host);
 our $known_modules;
 our $root_uid;
@@ -250,6 +250,8 @@ our $logged_in_user_date_of_expiry = 600;
     "ldap-admin-dn"         => [\$ldap_admin_dn, ""],
     "ldap-admin-password"   => [\$ldap_admin_password, ""],
        "ldap-version"                  => [\$ldap_version, 3],
+       "max-ldap-handle"               => [\$max_ldap_handle, 10],
+       "precreate-ldap-handle" => [\$precreate_ldap_handle, 5],
     "gosa-unit-tag"         => [\$gosa_unit_tag, ""],
     "max-clients"           => [\$max_clients, 10],
     "wol-password"          => [\$wake_on_lan_passwd, ""],
@@ -3279,10 +3281,10 @@ daemon_log($server_status_hash->{$server_status}.": $server_revision", 1);
 $ldap_factory =  ResourcePool::Factory::Net::LDAP->new($ldap_uri, version => $ldap_version);
 $ldap_factory->bind($ldap_admin_dn, password=>$ldap_admin_password);
 $ldap_pool = ResourcePool->new($ldap_factory,
-               Max         => 10,
+               Max         => $max_ldap_handle,
                #MaxTry      => 1,
                #SleepOnFail    => [0, 0, 1, 1],
-               PreCreate       => 5,
+               PreCreate       => $precreate_ldap_handle,
 );