svn commit: samba r9492 - in branches/SAMBA_4_0/source/scripting/ejs: .

tridge at samba.org tridge at samba.org
Mon Aug 22 23:33:47 GMT 2005


Author: tridge
Date: 2005-08-22 23:33:47 +0000 (Mon, 22 Aug 2005)
New Revision: 9492

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

Log:
it is more usual to return 'undefined' instead of 'false' on a call failing (unless the
call is returning a boolean anyway).

Unfortunately the new GetOptions syntax loses the ability for the caller to know why the 
command line arguments were bad. Maybe we would be better always returning an object and
having an is_error element?

Modified:
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_options.c


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_options.c
===================================================================
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_options.c	2005-08-22 23:31:18 UTC (rev 9491)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_options.c	2005-08-22 23:33:47 UTC (rev 9492)
@@ -156,7 +156,7 @@
 					      poptStrerror(opt));
 			mprSetVar(options, "ERROR", mprString(err));
 			talloc_free(tmp_ctx);
-			mpr_Return(eid, mprCreateBoolVar(0));
+			mpr_Return(eid, mprCreateUndefinedVar());
 			return 0;
 		}
 		opt -= BASE_OPTNUM;



More information about the samba-cvs mailing list