Code

eliminate 'undefined value...' log message while gosa-si and gosa have a different...
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 29 Jun 2009 12:31:56 +0000 (12:31 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 29 Jun 2009 12:31:56 +0000 (12:31 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13818 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/gosa-si-server
gosa-si/tests/client.php

index 46d9fbbf2de00aa8c2fbabc8340bc42f2efa505d..1d59cd75ef7a83776f0ee1e0e48e4aed731be3cf 100755 (executable)
@@ -1140,7 +1140,15 @@ sub msg_to_decrypt {
        }
        # msg is from a gosa-si-client
        if(( !$msg ) || ( !$msg_hash ) || ( !$module )){
-               ($msg, $msg_hash, $module) = &input_from_known_client($next_msg, $msg_source, $session_id);
+               if (not defined $msg_source) 
+               {
+                       # Only needed, to be compatible with older gosa-si-server versions
+                       ($msg, $msg_hash, $module) = &input_from_known_client($next_msg, $heap->{'remote_ip'}, $session_id);
+               }
+               else
+               {
+                       ($msg, $msg_hash, $module) = &input_from_known_client($next_msg, $msg_source, $session_id);
+               }
        }
        # an error occurred
        if(( !$msg ) || ( !$msg_hash ) || ( !$module )){
index 9b9bdcfe2dc5028174b4ca413ad84d3308c4f6c1..a1134eeafce3f20911a0ea91449c70e7daafbfc3 100755 (executable)
@@ -18,8 +18,8 @@ for($count = 1; $count <= $zahl; $count++)
 
        ##############################
        # periodical jobs
-       $data = "<xml><header>job_trigger_action_reboot</header><source>GOSA</source><target>00:0c:29:4c:4b:0c</target><macaddress>00:0c:29:4c:4b:0c</macaddress><timestamp>20090622000000</timestamp><periodic>minutes</periodic></xml>"; 
-       $data = "<xml><header>job_trigger_action_reboot</header><source>GOSA</source><target>00:0c:29:4c:4b:0c</target><timestamp>20090626135000</timestamp><macaddress>00:0c:29:4c:4b:0c</macaddress><periodic>minutes</periodic><minutes>5</minutes></xml>";
+       $data = "<xml><header>job_trigger_action_reboot</header><source>GOSA</source><target>00:0c:29:4c:4b:0c</target><macaddress>00:0c:29:4c:4b:0c</macaddress><timestamp>20090629000000</timestamp><periodic>weeks</periodic><weeks>2</weeks></xml>"; 
+       #$data = "<xml><header>job_trigger_action_reboot</header><source>GOSA</source><target>00:0c:29:4c:4b:0c</target><timestamp>20090626135000</timestamp><macaddress>00:0c:29:4c:4b:0c</macaddress><periodic>minutes</periodic><minutes>5</minutes></xml>";
     /* Prepare a hunge bunch of data to be send */
     # jobdb add
     #$data = "<xml> <header>gosa_network_completition</header> <source>GOSA</source><target>GOSA</target><hostname>ws-muc-2</hostname></xml>";