svn commit: samba r21344 - in branches/SAMBA_4_0/services/samba: .

derrell at samba.org derrell at samba.org
Wed Feb 14 16:09:00 GMT 2007


Author: derrell
Date: 2007-02-14 16:08:59 +0000 (Wed, 14 Feb 2007)
New Revision: 21344

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21344

Log:
ensure that the full range of error values is available to applications.  parameter errors are really server errors.
Modified:
   branches/SAMBA_4_0/services/samba/ldb.esp


Changeset:
Modified: branches/SAMBA_4_0/services/samba/ldb.esp
===================================================================
--- branches/SAMBA_4_0/services/samba/ldb.esp	2007-02-14 15:23:12 UTC (rev 21343)
+++ branches/SAMBA_4_0/services/samba/ldb.esp	2007-02-14 16:08:59 UTC (rev 21344)
@@ -285,6 +285,7 @@
 {
     if (params.length < 2 || params.length > 5)
     {
+        error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
         error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
                        "usage: " +
                        "<resource_id> <expr> [<baseDN> [<scope> [<attrs>]]]");
@@ -327,6 +328,7 @@
     }
     else
     {
+        error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
         error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
                        "invalid scope: " + scope);
         return error;
@@ -357,6 +359,7 @@
 {
     if (params.length != 2)
     {
+        error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
         error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
                        "usage: <resource_id> <ldif>");
         return error;
@@ -393,6 +396,7 @@
 {
     if (params.length != 2)
     {
+        error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
         error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
                        "usage: <resource_id> <ldif>");
         return error;
@@ -429,6 +433,7 @@
 {
     if (params.length != 2)
     {
+        error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
         error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
                        "usage: <resource_id> <dn>");
         return error;
@@ -468,6 +473,7 @@
 {
     if (params.length != 3)
     {
+        error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
         error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
                        "usage: <resource_id> <old_dn> <new_dn>");
         return error;
@@ -504,6 +510,7 @@
 {
     if (params.length != 2)
     {
+        error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
         error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
                        "usage: <resource_id> <string_to_be_encoded>");
         return error;
@@ -540,6 +547,7 @@
 {
     if (params.length != 2)
     {
+        error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
         error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
                        "usage: <resource_id> <string_to_be_decoded>");
         return error;
@@ -576,6 +584,7 @@
 {
     if (params.length != 2)
     {
+        error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
         error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
                        "usage: <resource_id> <string_to_be_decoded>");
         return error;
@@ -608,6 +617,7 @@
 {
     if (params.length != 1)
     {
+        error.setOrigin(jsonrpc.Constant.ErrorOrigin.Server);
         error.setError(jsonrpc.Constant.ServerError.ParameterMismatch,
                        "usage: <resource_id>");
         return error;



More information about the samba-cvs mailing list