Code

update: ownership of installing jobs can be switch among si-server
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 3 Sep 2008 07:39:47 +0000 (07:39 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 3 Sep 2008 07:39:47 +0000 (07:39 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12351 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/server/events/clMessages.pm
gosa-si/tests/client.php

index 4157f21535c65cb6e886acfcc268c67016d89405..fde8b36b43a555b3a70b53f4977a6b1b1cf5aab4 100644 (file)
@@ -380,7 +380,7 @@ sub TASKBEGIN {
                if (keys(%$res) == 1) {
                        &main::daemon_log("$session_id DEBUG: there is already one processing job in queue for host '$macaddress', run an update for this entry", 7);
                        my $sql_statement = "UPDATE $main::job_queue_tn ".
-                "SET result='$header $content', modified='1' ".
+                "SET result='$header $content', modified='1', siserver='localhost' ".
                 "WHERE status='processing' AND macaddress LIKE '$macaddress'";
                        my $err = $main::job_db->update_dbentry($sql_statement);
                        if (not defined  $err) {
@@ -427,7 +427,7 @@ sub TASKBEGIN {
                                }
                        }
 
-
+            # In any case add a new job to job queue
                        &main::daemon_log("$session_id DEBUG: add job to queue for host '$macaddress'", 7); 
                        my $func_dic = {table=>$main::job_queue_tn,
                                        primkey=>['macaddress', 'headertag'],
@@ -441,7 +441,7 @@ sub TASKBEGIN {
                                        macaddress=>$macaddress,
                                        plainname=>$plain_name,
                     modified=>'1',
-                    siserver=>$source,
+                    siserver=>'localhost',
                        };
                        my ($err, $error_str) = $main::job_db->add_dbentry($func_dic);
                        if ($err != 0)  {
index 321cd980e2e2e3214142c8f38ecd736baf31af93..b8659926da12bc071c081012550214e1cb0030cd 100755 (executable)
@@ -74,10 +74,10 @@ for($count = 1; $count <= $zahl; $count++)
     #$data = "<xml> <header>gosa_get_login_usr_for_client</header> <target>GOSA</target> <source>GOSA</source> <client>00:01:6c:9d:b9:fa</client></xml>";
 
     # get_client_for_login_usr
-    #$data = "<xml> <header>gosa_get_client_for_login_usr</header> <target>GOSA</target> <source>GOSA</source> <usr>harald</usr></xml>";
+    $data = "<xml> <header>gosa_get_client_for_login_usr</header> <target>GOSA</target> <source>GOSA</source> <usr>rettenbe</usr></xml>";
 
     # List all si-server providing opsi
-    $data = "<xml> <header>gosa_get_hosts_with_module</header> <source>GOSA</source> <target>10.89.1.31:20081</target> <module_name>opsi_com</module_name> </xml>";
+    #$data = "<xml> <header>gosa_get_hosts_with_module</header> <source>GOSA</source> <target>10.89.1.31:20081</target> <module_name>opsi_com</module_name> </xml>";
 
     ##################
     # recreate fai dbs