Commit 2fb69cba authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add specific error indicator for undefined XMLRPC method.

parent 8c9fa38c
......@@ -426,8 +426,7 @@ sub Start($$)
}
my $method = $call->{'method_name'};
if (!defined($METHODS->{$method})) {
return XMLError(XMLRPC_APPLICATION_ERROR() + 3,
"no such method $method\n");
return XMLError(XMLRPC_NO_SUCH_METHOD(), "no such method $method\n");
}
#
# Debugging overrides. There should be upcalls from the routines,
......
......@@ -52,6 +52,7 @@ use vars qw(@ISA @EXPORT);
GENIRESPONSE_STITCHER_ERROR
GENIRESPONSE_NOSPACE
XMLRPC_PARSE_ERROR XMLRPC_SERVER_ERROR XMLRPC_APPLICATION_ERROR
XMLRPC_NO_SUCH_METHOD
XMLRPC_SYSTEM_ERROR XMLRPC_TRANSPORT_ERROR);
use overload ('""' => 'Stringify');
......@@ -140,6 +141,7 @@ sub GENIRESPONSE_STRING($)
sub XMLRPC_PARSE_ERROR() { -32700; }
sub XMLRPC_SERVER_ERROR() { -32600; }
sub XMLRPC_APPLICATION_ERROR() { -32500; }
sub XMLRPC_NO_SUCH_METHOD() { XMLRPC_APPLICATION_ERROR() + 3; }
sub XMLRPC_SYSTEM_ERROR() { -32400; }
sub XMLRPC_TRANSPORT_ERROR() { -32300; }
......
......@@ -570,7 +570,7 @@ if ($call->{'type'} ne 'call') {
}
my $method = $call->{'method_name'};
if (!defined($GENI_METHODS->{$method})) {
XMLError(XMLRPC_APPLICATION_ERROR() + 3, "no such method $method\n");
XMLError(XMLRPC_NO_SUCH_METHOD(), "no such method $method\n");
}
# Debugging overrides, to avoid email blasting.
# Too much output.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment