diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/scripting/ejs/ejsrpc.c | 24 | ||||
-rw-r--r-- | source4/scripting/ejs/ejsrpc.h | 10 |
2 files changed, 17 insertions, 17 deletions
diff --git a/source4/scripting/ejs/ejsrpc.c b/source4/scripting/ejs/ejsrpc.c index 242d748b36..4984518c7f 100644 --- a/source4/scripting/ejs/ejsrpc.c +++ b/source4/scripting/ejs/ejsrpc.c @@ -138,9 +138,9 @@ NTSTATUS ejs_pull_uint8(struct ejs_rpc *ejs, } NTSTATUS ejs_push_uint8(struct ejs_rpc *ejs, - struct MprVar *v, const char *name, uint8_t r) + struct MprVar *v, const char *name, const uint8_t *r) { - return mprSetVar(v, name, mprCreateIntegerVar(r)); + return mprSetVar(v, name, mprCreateIntegerVar(*r)); } /* @@ -160,9 +160,9 @@ NTSTATUS ejs_pull_uint16(struct ejs_rpc *ejs, } NTSTATUS ejs_push_uint16(struct ejs_rpc *ejs, - struct MprVar *v, const char *name, uint16_t r) + struct MprVar *v, const char *name, const uint16_t *r) { - return mprSetVar(v, name, mprCreateIntegerVar(r)); + return mprSetVar(v, name, mprCreateIntegerVar(*r)); } /* @@ -181,9 +181,9 @@ NTSTATUS ejs_pull_uint32(struct ejs_rpc *ejs, } NTSTATUS ejs_push_uint32(struct ejs_rpc *ejs, - struct MprVar *v, const char *name, uint32_t r) + struct MprVar *v, const char *name, const uint32_t *r) { - return mprSetVar(v, name, mprCreateIntegerVar(r)); + return mprSetVar(v, name, mprCreateIntegerVar(*r)); } NTSTATUS ejs_pull_hyper(struct ejs_rpc *ejs, @@ -199,9 +199,9 @@ NTSTATUS ejs_pull_hyper(struct ejs_rpc *ejs, } NTSTATUS ejs_push_hyper(struct ejs_rpc *ejs, - struct MprVar *v, const char *name, uint64_t r) + struct MprVar *v, const char *name, const uint64_t *r) { - return mprSetVar(v, name, mprCreateIntegerVar(r)); + return mprSetVar(v, name, mprCreateIntegerVar(*r)); } @@ -223,9 +223,9 @@ NTSTATUS ejs_pull_enum(struct ejs_rpc *ejs, } NTSTATUS ejs_push_enum(struct ejs_rpc *ejs, - struct MprVar *v, const char *name, unsigned r) + struct MprVar *v, const char *name, const unsigned *r) { - return mprSetVar(v, name, mprCreateIntegerVar(r)); + return mprSetVar(v, name, mprCreateIntegerVar(*r)); } @@ -252,7 +252,7 @@ NTSTATUS ejs_pull_array(struct ejs_rpc *ejs, NDR_CHECK(ejs_pull(ejs, v, id, (i*elsize)+data)); talloc_free(id); } - return mprSetVar(v, "length", mprCreateIntegerVar(i)); + return NT_STATUS_OK; } @@ -276,6 +276,6 @@ NTSTATUS ejs_push_array(struct ejs_rpc *ejs, NDR_CHECK(ejs_push(ejs, v, id, (i*elsize)+data)); talloc_free(id); } - return NT_STATUS_OK; + return mprSetVar(v, "length", mprCreateIntegerVar(i)); } diff --git a/source4/scripting/ejs/ejsrpc.h b/source4/scripting/ejs/ejsrpc.h index 8ddd6a394e..1febb90ad6 100644 --- a/source4/scripting/ejs/ejsrpc.h +++ b/source4/scripting/ejs/ejsrpc.h @@ -40,23 +40,23 @@ NTSTATUS ejs_push_struct_start(struct ejs_rpc *ejs, struct MprVar **v, const cha NTSTATUS ejs_pull_uint8(struct ejs_rpc *ejs, struct MprVar *v, const char *name, uint8_t *r); NTSTATUS ejs_push_uint8(struct ejs_rpc *ejs, - struct MprVar *v, const char *name, uint8_t r); + struct MprVar *v, const char *name, const uint8_t *r); NTSTATUS ejs_pull_uint16(struct ejs_rpc *ejs, struct MprVar *v, const char *name, uint16_t *r); NTSTATUS ejs_push_uint16(struct ejs_rpc *ejs, - struct MprVar *v, const char *name, uint16_t r); + struct MprVar *v, const char *name, const uint16_t *r); NTSTATUS ejs_pull_uint32(struct ejs_rpc *ejs, struct MprVar *v, const char *name, uint32_t *r); NTSTATUS ejs_push_uint32(struct ejs_rpc *ejs, - struct MprVar *v, const char *name, uint32_t r); + struct MprVar *v, const char *name, const uint32_t *r); NTSTATUS ejs_pull_hyper(struct ejs_rpc *ejs, struct MprVar *v, const char *name, uint64_t *r); NTSTATUS ejs_push_hyper(struct ejs_rpc *ejs, - struct MprVar *v, const char *name, uint64_t r); + struct MprVar *v, const char *name, const uint64_t *r); NTSTATUS ejs_pull_enum(struct ejs_rpc *ejs, struct MprVar *v, const char *name, unsigned *r); NTSTATUS ejs_push_enum(struct ejs_rpc *ejs, - struct MprVar *v, const char *name, unsigned r); + struct MprVar *v, const char *name, const unsigned *r); NTSTATUS ejs_pull_array(struct ejs_rpc *ejs, struct MprVar *v, const char *name, uint32_t length, size_t elsize, void **r, ejs_pull_t ejs_pull); |