summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 61891c9)
raw | patch | inline | side by side (parent: 61891c9)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 14 Oct 2008 13:17:09 +0000 (13:17 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 14 Oct 2008 13:17:09 +0000 (13:17 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12689 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/server/events/clMessages.pm | patch | blob | history | |
gosa-si/server/events/opsi_com.pm | patch | blob | history |
index 4442f377b88327727034244ae28b3f4b1dcc10a4..4ff3875be20f96ee8d2fc4888a00b242bb4231bd 100644 (file)
my $source = @{$msg_hash->{'source'}}[0];
my $login = @{$msg_hash->{$header}}[0];
+ # Invoke set_last_system
+ my $res = &set_last_system($msg, $msg_hash, $session_id);
+
my %add_hash = ( table=>$main::login_users_tn,
primkey=> ['client', 'user'],
client=>$source,
index 57eb188ade74c87f6d4c125ddfaee54881f0dfdc..fd6ba5da5a54d5da0e18b5a07ad0def43f562854 100644 (file)
}
# Sanity check of needed parameter
- if ((not exists $msg_hash->{'hostId'}) || (@{$msg_hash->{'hostId'}} != 1)) {
+ if ((not exists $msg_hash->{'hostId'}) || (@{$msg_hash->{'hostId'}} != 1) || (@{$msg_hash->{'hostId'}}[0] eq ref 'HASH')) {
$error++;
&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);
}
- if ((not exists $msg_hash->{'productId'}) || (@{$msg_hash->{'productId'}} != 1)) {
+ if ((not exists $msg_hash->{'productId'}) || (@{$msg_hash->{'productId'}} != 1) || (@{$msg_hash->{'productId'}}[0] eq ref 'HASH')) {
$error++;
&add_content2xml_hash($out_hash, "error_string", "no productId specified or productId tag invalid");
&add_content2xml_hash($out_hash, "error", "productId");
}
if (not $error) {
- # Get hostID
+ # Get hostId
$hostId = @{$msg_hash->{'hostId'}}[0];
&add_content2xml_hash($out_hash, "hostId", $hostId);
}
# Sanity check of needed parameter
- if ((not exists $msg_hash->{'hostId'}) || (@{$msg_hash->{'hostId'}} != 1)) {
+ if ((not exists $msg_hash->{'hostId'}) || (@{$msg_hash->{'hostId'}} != 1) || (@{$msg_hash->{'hostId'}}[0] eq ref 'HASH')) {
$error++;
&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);
}
- if ((not exists $msg_hash->{'productId'}) || (@{$msg_hash->{'productId'}} != 1)) {
+ if ((not exists $msg_hash->{'productId'}) || (@{$msg_hash->{'productId'}} != 1) || (@{$msg_hash->{'productId'}}[0] eq ref 'HASH')) {
$error++;
&add_content2xml_hash($out_hash, "error_string", "no productId specified or productId tag invalid");
&add_content2xml_hash($out_hash, "error", "productId");
# All parameter available
if (not $error) {
- # Get hostID
+ # Get hostId
$hostId = @{$msg_hash->{'hostId'}}[0];
&add_content2xml_hash($out_hash, "hostId", $hostId);
}
# Sanity check of needed parameter
- if ((not exists $msg_hash->{'hostId'}) || (@{$msg_hash->{'hostId'}} != 1)) {
+ if ((not exists $msg_hash->{'hostId'}) || (@{$msg_hash->{'hostId'}} != 1) || (@{$msg_hash->{'hostId'}}[0] eq ref 'HASH')) {
$error++;
&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);
}
- if ((not exists $msg_hash->{'macaddress'}) || (@{$msg_hash->{'macaddress'}} != 1)) {
+ if ((not exists $msg_hash->{'macaddress'}) || (@{$msg_hash->{'macaddress'}} != 1) || (@{$msg_hash->{'macaddress'}}[0] eq ref 'HASH')) {
$error++;
&add_content2xml_hash($out_hash, "error_string", "no macaddress specified or macaddress tag invalid");
&add_content2xml_hash($out_hash, "error", "macaddress");
}
if (not $error) {
- # Get hostID
+ # Get hostId
$hostId = @{$msg_hash->{'hostId'}}[0];
&add_content2xml_hash($out_hash, "hostId", $hostId);
}
# Sanity check of needed parameter
- if ((not exists $msg_hash->{'hostId'}) || (@{$msg_hash->{'hostId'}} != 1)) {
+ if ((not exists $msg_hash->{'hostId'}) || (@{$msg_hash->{'hostId'}} != 1) || (@{$msg_hash->{'hostId'}}[0] eq ref 'HASH')) {
$error++;
&add_content2xml_hash($out_hash, "error_string", "no hostId specified or hostId tag invalid");
&add_content2xml_hash($out_hash, "error", "hostId");
}
if (not $error) {
- # Get hostID
+ # Get hostId
$hostId = @{$msg_hash->{'hostId'}}[0];
&add_content2xml_hash($out_hash, "hostId", $hostId);
my $name= $hostId;
&add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa);
}
- # Get hostID if defined
+ # Get hostId if defined
if ((exists $msg_hash->{'hostId'}) && (@{$msg_hash->{'hostId'}} == 1)) {
$hostId = @{$msg_hash->{'hostId'}}[0];
&add_content2xml_hash($out_hash, "hostId", $hostId);
}
# Sanity check of needed parameter
- if ((not exists $msg_hash->{'productId'}) || (@{$msg_hash->{'productId'}} != 1)) {
+ if ((not exists $msg_hash->{'productId'}) || (@{$msg_hash->{'productId'}} != 1) || (@{$msg_hash->{'productId'}}[0] eq ref 'HASH')) {
&add_content2xml_hash($out_hash, "error_string", "no productId specified or productId tag invalid");
&add_content2xml_hash($out_hash, "error", "productId");
&main::daemon_log("$session_id ERROR: no productId specified or productId tag invalid: $msg", 1);
$productId = @{$msg_hash->{'productId'}}[0];
&add_content2xml_hash($out_hash, "producId", "$productId");
- # Get hostID if defined
+ # Get hostId if defined
if (defined @{$msg_hash->{'hostId'}}[0]){
$hostId = @{$msg_hash->{'hostId'}}[0];
&add_content2xml_hash($out_hash, "hostId", $hostId);
}
# Sanity check of needed parameter
- if ((not exists $msg_hash->{'productId'}) || (@{$msg_hash->{'productId'}} != 1)) {
+ if ((not exists $msg_hash->{'productId'}) || (@{$msg_hash->{'productId'}} != 1) || (@{$msg_hash->{'productId'}}[0] eq ref 'HASH')) {
&add_content2xml_hash($out_hash, "error_string", "no productId specified or productId tag invalid");
&add_content2xml_hash($out_hash, "error", "productId");
&main::daemon_log("$session_id ERROR: no productId specified or productId tag invalid: $msg", 1);
return ( &create_xml_string($out_hash) );
}
}
- if ((exists $msg_hash->{'hostId'}) && (@{$msg_hash->{'hostId'}} != 1)) {
+ if ((exists $msg_hash->{'hostId'}) && (@{$msg_hash->{'hostId'}} != 1) || (@{$msg_hash->{'hostId'}}[0] eq ref 'HASH')) {
&add_content2xml_hash($out_hash, "error_string", "hostId contains no or more than one values");
&add_content2xml_hash($out_hash, "error", "hostId");
&main::daemon_log("$session_id ERROR: hostId contains no or more than one values: $msg", 1);
$productId = @{$msg_hash->{'productId'}}[0];
&add_content2xml_hash($out_hash, "productId", $productId);
- # Get hostID if defined
+ # Get hostId if defined
if (exists $msg_hash->{'hostId'}){
$hostId = @{$msg_hash->{'hostId'}}[0];
&add_content2xml_hash($out_hash, "hostId", $hostId);
}
# Sanity check of needed parameter
- if ((exists $msg_hash->{'hostId'}) && (@{$msg_hash->{'hostId'}} != 1)) {
+ if ((exists $msg_hash->{'hostId'}) && (@{$msg_hash->{'hostId'}} != 1) || (@{$msg_hash->{'hostId'}}[0] eq ref 'HASH')) {
$error++;
&add_content2xml_hash($out_hash, "error_string", "hostId contains no or more than one values");
&add_content2xml_hash($out_hash, "error", "hostId");
if (not $error) {
- # Get hostID
+ # Get hostId
$hostId = @{$msg_hash->{'hostId'}}[0];
&add_content2xml_hash($out_hash, "hostId", "$hostId");
&add_content2xml_hash($out_hash, "xxx", "");
}
# Sanity check of needed parameter
- if ((exists $msg_hash->{'hostId'}) && (@{$msg_hash->{'hostId'}} != 1)) {
+ if ((exists $msg_hash->{'hostId'}) && (@{$msg_hash->{'hostId'}} != 1) || (@{$msg_hash->{'hostId'}}[0] eq ref 'HASH')) {
$error++;
&add_content2xml_hash($out_hash, "error_string", "hostId contains no or more than one values");
&add_content2xml_hash($out_hash, "error", "hostId");
if (not $error) {
- # Get hostID
+ # Get hostId
$hostId = @{$msg_hash->{'hostId'}}[0];
&add_content2xml_hash($out_hash, "hostId", "$hostId");
&add_content2xml_hash($out_hash, "xxx", "");
}
&add_content2xml_hash($out_hash, "xxx", "");
- # Get hostID if defined
+ # Get hostId if defined
if ((exists $msg_hash->{'hostId'}) && (@{$msg_hash->{'hostId'}} == 1)) {
$hostId = @{$msg_hash->{'hostId'}}[0];
&add_content2xml_hash($out_hash, "hostId", $hostId);
}
# Sanity check of needed parameter
- if ((exists $msg_hash->{'hostId'}) && (@{$msg_hash->{'hostId'}} != 1)) {
+ if ((exists $msg_hash->{'hostId'}) && (@{$msg_hash->{'hostId'}} != 1) || (@{$msg_hash->{'hostId'}}[0] eq ref 'HASH')) {
$error++;
&add_content2xml_hash($out_hash, "error_string", "hostId contains no or more than one values");
&add_content2xml_hash($out_hash, "error", "hostId");
if (not $error) {
- # Get hostID
+ # Get hostId
$hostId = @{$msg_hash->{'hostId'}}[0];
&add_content2xml_hash($out_hash, "hostId", "$hostId");
}
# Sanity check of needed parameter
- if ((not exists $msg_hash->{'hostId'}) || (@{$msg_hash->{'hostId'}} != 1)) {
+ if ((not exists $msg_hash->{'hostId'}) || (@{$msg_hash->{'hostId'}} != 1) || (@{$msg_hash->{'hostId'}}[0] eq ref 'HASH')) {
$error++;
&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);
}
- if ((not exists $msg_hash->{'macaddress'}) || (@{$msg_hash->{'macaddress'}} != 1)) {
+ if ((not exists $msg_hash->{'macaddress'}) || (@{$msg_hash->{'macaddress'}} != 1) || (@{$msg_hash->{'macaddress'}}[0] eq ref 'HASH') ) {
$error++;
&add_content2xml_hash($out_hash, "error_string", "no macaddress specified or macaddress tag invalid");
&add_content2xml_hash($out_hash, "error", "macaddress");