From 2ef0cf2494193acf40a280157d9c5d483ce31729 Mon Sep 17 00:00:00 2001 From: rettenbe Date: Fri, 30 May 2008 10:40:33 +0000 Subject: [PATCH] * gosa-si-server-nobus * under construction git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11122 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/debian/gosa-si-server.install | 1 + gosa-si/gosa-si-server-nobus | 7 +++++++ gosa-si/server/events/databases.pm | 2 +- gosa-si/tests/client.php | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gosa-si/debian/gosa-si-server.install b/gosa-si/debian/gosa-si-server.install index 4a6fa4af7..a596eb458 100644 --- a/gosa-si/debian/gosa-si-server.install +++ b/gosa-si/debian/gosa-si-server.install @@ -14,4 +14,5 @@ server/events/databases.pm usr/lib/gosa-si/server/GosaPackages server/events/databases.pm usr/lib/gosa-si/server/ServerPackages server/events/krb5.pm usr/lib/gosa-si/server/GosaPackages server/events/logHandling.pm usr/lib/gosa-si/server/ClientPackages +server/events/logHandling.pm usr/lib/gosa-si/server/ServerPackages server/events/server_server_com.pm usr/lib/gosa-si/server/ServerPackages diff --git a/gosa-si/gosa-si-server-nobus b/gosa-si/gosa-si-server-nobus index 6562c2e80..ebe24c107 100755 --- a/gosa-si/gosa-si-server-nobus +++ b/gosa-si/gosa-si-server-nobus @@ -1114,6 +1114,13 @@ sub msg_to_decrypt { # if message should be processed here -> add message to incoming_db if ($done) { + + # if a job or a gosa message comes from a foreign server, fake module to GosaPackages + # so gosa-si-server knows how to process this kind of messages + if ($header =~ /^gosa_/ || $header =~ /job_/) { + $module = "GosaPackages"; + } + my $res = $incoming_db->add_dbentry( {table=>$incoming_tn, primkey=>[], headertag=>$header, diff --git a/gosa-si/server/events/databases.pm b/gosa-si/server/events/databases.pm index 4745c05ed..bc23786d8 100644 --- a/gosa-si/server/events/databases.pm +++ b/gosa-si/server/events/databases.pm @@ -68,7 +68,7 @@ sub query_db { my $sql_statement= "SELECT $select FROM $table $where $orderby $limit"; my $res_hash = $db->select_dbentry($sql_statement); - my $out_xml = &db_res2si_msg($res_hash, $header, $target, $source); + my $out_xml = &db_res2si_msg($res_hash, $header, $source, $target); #$out_xml =~ s/<\/xml>/$session_id<\/session_id><\/xml>/; my $forward_to_gosa = @{$msg_hash->{'forward_to_gosa'}}[0]; if (defined $forward_to_gosa) { diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index eec4b8864..b9e35f3b3 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -106,8 +106,8 @@ for($count = 1; $count <= $zahl; $count++) #$data = "
gosa_krb5_modify_principal
00:01:6c:9d:b9:fa horst@WIRECARD.SYSGOSA666
"; #$data = "
gosa_query_fai_server
GOSA 10.89.1.131:20081
"; - $data = "
gosa_query_fai_server
GOSA 10.89.1.31:20081
"; #$data = "
gosa_new_ping
00:0c:29:02:e5:4d GOSA
"; + $data = "
job_ping
GOSA 00:0c:29:02:e5:4d 00:0c:29:02:e5:4d29700101000000
"; $sock->write($data); $answer = "nothing"; -- 2.30.2