summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-19 06:07:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:41 -0500
commit6615b40601fbb0d7c697d721907057d01995eb5a (patch)
treea992ac8a3337f08e545560267fc281dad4fe3686
parentb48422173005c83034b474db47f956476e862bba (diff)
downloadsamba-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)
-rw-r--r--source4/scripting/ejs/ejsrpc.c22
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);
}