aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/share/perl/user.cgi
diff options
context:
space:
mode:
authorAdam Frisby2008-03-25 16:29:54 +0000
committerAdam Frisby2008-03-25 16:29:54 +0000
commit8c05b81d6860d8e0da4098cc6f59f630d7c53037 (patch)
tree3325e09660ee8ad5a12cc19c8da6c4bd8bff5c21 /share/perl/user.cgi
parent* On Ray casting. Now returning the face normal of the collision face. (diff)
downloadopensim-SC_OLD-8c05b81d6860d8e0da4098cc6f59f630d7c53037.zip
opensim-SC_OLD-8c05b81d6860d8e0da4098cc6f59f630d7c53037.tar.gz
opensim-SC_OLD-8c05b81d6860d8e0da4098cc6f59f630d7c53037.tar.bz2
opensim-SC_OLD-8c05b81d6860d8e0da4098cc6f59f630d7c53037.tar.xz
* Committing Lulurun's Cgi/Perl implementation of the UGAI servers.
* I love you long time.
Diffstat (limited to 'share/perl/user.cgi')
-rw-r--r--share/perl/user.cgi28
1 files changed, 28 insertions, 0 deletions
diff --git a/share/perl/user.cgi b/share/perl/user.cgi
new file mode 100644
index 0000000..3fa63aa
--- /dev/null
+++ b/share/perl/user.cgi
@@ -0,0 +1,28 @@
1#!/usr/bin/perl -w
2
3use strict;
4use Carp;
5use XML::RPC;
6use MyCGI;
7use OpenSim::Utility;
8use OpenSim::UserServer;
9
10my $param = &MyCGI::getParam();
11my $request = $param->{'POSTDATA'};
12&OpenSim::Utility::Log("user", "request", $request);
13my $xmlrpc = new XML::RPC();
14my $response = $xmlrpc->receive($request, \&XMLRPCHandler);
15&OpenSim::Utility::Log("user", "response", $response);
16&MyCGI::outputXml("utf-8", $response);
17
18sub XMLRPCHandler {
19 my ($methodname, @param) = @_;
20 my $handler_list = &OpenSim::UserServer::getHandlerList();
21 if (!$handler_list->{$methodname}) {
22 Carp::croak("?");
23 } else {
24 my $handler = $handler_list->{$methodname};
25 $handler->(@param);
26 }
27}
28