From 692d8c36ad47608eb51b29009669c3d5edb8c3e4 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Thu, 28 Feb 2008 14:07:40 +0000 Subject: [PATCH] bugfix: gosa-si-server without creating_packages_list git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9189 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-server | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 6ba6160af..e94868e39 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -61,7 +61,7 @@ my ($arp_activ, $arp_fifo); my ($xml); my ($ldap_uri, $ldap_base, $ldap_admin_dn, $ldap_admin_password); my $sources_list; - +my $max_clients; # variables declared in config file are always set to 'our' our (%cfg_defaults, $log_file, $pid_file, $server_ip, $server_port, $SIPackages_key, @@ -156,6 +156,7 @@ my $arch = "i386"; "ldap-admin-dn" => [\$ldap_admin_dn, ""], "ldap-admin-password" => [\$ldap_admin_password, ""], "gosa-unit-tag" => [\$gosa_unit_tag, ""], + "max-clients" => [\$max_clients, 10], }, "GOsaPackages" => { "ip" => [\$gosa_ip, "0.0.0.0"], @@ -893,8 +894,8 @@ sub send_msg_to_target { sub _start { my ($kernel) = $_[KERNEL]; &trigger_db_loop($kernel); - $kernel->yield('create_fai_server_db', $fai_server_tn ); - $kernel->yield('create_packages_list_db', $sources_list ); + #$kernel->yield('create_fai_server_db', $fai_server_tn ); + #$kernel->yield('create_packages_list_db', $sources_list ); } @@ -1168,7 +1169,7 @@ sub refresh_ldap_handle { sub create_fai_server_db { - my ($table_name) = @_[ARG0]; + my ($table_name) = $_[ARG0]; ##################################################################### # @@ -1188,7 +1189,7 @@ sub create_fai_server_db { sub create_packages_list_db { - my ($sources_file) = @_[ARG0] ; + my ($sources_file) = $_[ARG0] ; my $line; open(CONFIG, "<$sources_file") or do { @@ -1324,7 +1325,19 @@ sub parse_package { # $repo_files{ "${srvdir}${path}/$file" } = \%fileinfo; #} +sub next_task { + my ($heap) = $_[HEAP]; + + if( keys(%{$heap->{task}}) < $max_clients ) { + + } + + #$heap->{task}->{$task->ID} = $task; +} + +sub task_result { +} #==== MAIN = main ============================================================== # parse commandline options @@ -1421,6 +1434,8 @@ daemon_log("start socket for incoming xml messages at port '$server_port' ", 1); POE::Session->create( inline_states => { _start => \&_start, + next_task => \&next_task, + task_result => \&task_result, watch_for_new_jobs => \&watch_for_new_jobs, create_packages_list_db => \&create_packages_list_db, create_fai_server_db => \&create_fai_server_db, -- 2.30.2