From 1f05f5ce988e60f38ff4e8bafff7640beae940d1 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Wed, 20 Aug 2008 06:57:25 +0000 Subject: [PATCH] bugfix: get_netboot_products message without hostId tag allowed git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12249 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/server/events/opsi_com.pm | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/gosa-si/server/events/opsi_com.pm b/gosa-si/server/events/opsi_com.pm index e3394f3a3..870e54927 100644 --- a/gosa-si/server/events/opsi_com.pm +++ b/gosa-si/server/events/opsi_com.pm @@ -411,17 +411,11 @@ sub opsi_get_netboot_products { &add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa); } - # Sanity check of needed parameter - if ((not exists $msg_hash->{'hostId'}) || (@{$msg_hash->{'hostId'}} != 1)) { - &add_content2xml_hash($out_hash, "error_string", "no hostId specified or hostId tag invalid"); - &add_content2xml_hash($out_hash, "error", "hostId"); - &main::daemon_log("$session_id ERROR: no hostId specified or hostId tag invalid: $msg", 1); - return &create_xml_string($out_hash); - } - # Get hostID if defined - $hostId = @{$msg_hash->{'hostId'}}[0]; - &add_content2xml_hash($out_hash, "hostId", $hostId); + if ((exists $msg_hash->{'hostId'}) && (@{$msg_hash->{'hostId'}} == 1)) { + $hostId = @{$msg_hash->{'hostId'}}[0]; + &add_content2xml_hash($out_hash, "hostId", $hostId); + } &add_content2xml_hash($out_hash, "xxx", ""); $xml_msg= &create_xml_string($out_hash); -- 2.30.2