diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-19 06:07:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:29:41 -0500 |
commit | 6615b40601fbb0d7c697d721907057d01995eb5a (patch) | |
tree | a992ac8a3337f08e545560267fc281dad4fe3686 /source4/scripting | |
parent | b48422173005c83034b474db47f956476e862bba (diff) | |
download | samba-6615b40601fbb0d7c697d721907057d01995eb5a.tar.gz samba-6615b40601fbb0d7c697d721907057d01995eb5a.tar.bz2 samba-6615b40601fbb0d7c697d721907057d01995eb5a.zip |
r8581: fixed handling of 64 bit integers in rpc calls from ejs
(This used to be commit 2ae6a338466bf287ea2180d5ad7313ba116b88ca)
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/ejs/ejsrpc.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/source4/scripting/ejs/ejsrpc.c b/source4/scripting/ejs/ejsrpc.c index 08bc4a94ba..5e81e21e4f 100644 --- a/source4/scripting/ejs/ejsrpc.c +++ b/source4/scripting/ejs/ejsrpc.c @@ -136,56 +136,50 @@ NTSTATUS ejs_pull_hyper(struct ejs_rpc *ejs, struct MprVar *v, const char *name, uint64_t *r) { NDR_CHECK(mprGetVar(&v, name)); - *r = mprVarToInteger(v); + *r = mprVarToNumber(v); return NT_STATUS_OK; } NTSTATUS ejs_push_hyper(struct ejs_rpc *ejs, struct MprVar *v, const char *name, const uint64_t *r) { - return mprSetVar(v, name, mprCreateIntegerVar(*r)); + return mprSetVar(v, name, mprCreateNumberVar(*r)); } NTSTATUS ejs_pull_dlong(struct ejs_rpc *ejs, struct MprVar *v, const char *name, uint64_t *r) { - NDR_CHECK(mprGetVar(&v, name)); - *r = mprVarToInteger(v); - return NT_STATUS_OK; + return ejs_pull_hyper(ejs, v, name, r); } NTSTATUS ejs_push_dlong(struct ejs_rpc *ejs, struct MprVar *v, const char *name, const uint64_t *r) { - return mprSetVar(v, name, mprCreateIntegerVar(*r)); + return ejs_push_hyper(ejs, v, name, r); } NTSTATUS ejs_pull_udlong(struct ejs_rpc *ejs, struct MprVar *v, const char *name, uint64_t *r) { - NDR_CHECK(mprGetVar(&v, name)); - *r = mprVarToInteger(v); - return NT_STATUS_OK; + return ejs_pull_hyper(ejs, v, name, r); } NTSTATUS ejs_push_udlong(struct ejs_rpc *ejs, struct MprVar *v, const char *name, const uint64_t *r) { - return mprSetVar(v, name, mprCreateIntegerVar(*r)); + return ejs_push_hyper(ejs, v, name, r); } NTSTATUS ejs_pull_NTTIME(struct ejs_rpc *ejs, struct MprVar *v, const char *name, uint64_t *r) { - NDR_CHECK(mprGetVar(&v, name)); - *r = mprVarToInteger(v); - return NT_STATUS_OK; + return ejs_pull_hyper(ejs, v, name, r); } NTSTATUS ejs_push_NTTIME(struct ejs_rpc *ejs, struct MprVar *v, const char *name, const uint64_t *r) { - return mprSetVar(v, name, mprCreateIntegerVar(*r)); + return ejs_push_hyper(ejs, v, name, r); } |