aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/share/perl/grid.cgi
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--share/perl/grid.cgi27
1 files changed, 27 insertions, 0 deletions
diff --git a/share/perl/grid.cgi b/share/perl/grid.cgi
new file mode 100644
index 0000000..cf1550f
--- /dev/null
+++ b/share/perl/grid.cgi
@@ -0,0 +1,27 @@
1#!/usr/bin/perl -w
2
3use strict;
4use Carp;
5use XML::RPC;
6use MyCGI;
7use OpenSim::Utility;
8use OpenSim::GridServer;
9
10my $param = &MyCGI::getParam();
11my $request = $param->{'POSTDATA'};
12#&OpenSim::Utility::Log("grid", "request", $request);
13my $xmlrpc = new XML::RPC();
14my $response = $xmlrpc->receive($request, \&XMLRPCHandler);
15#&OpenSim::Utility::Log("grid", "response", $response);
16&MyCGI::outputXml("utf-8", $response);
17
18sub XMLRPCHandler {
19 my ($methodname, @param) = @_;
20 my $handler_list = &OpenSim::GridServer::getHandlerList();
21 if (!$handler_list->{$methodname}) {
22 Carp::croak("?");
23 } else {
24 my $handler = $handler_list->{$methodname};
25 $handler->(@param);
26 }
27}