diff options
Diffstat (limited to 'source4/scripting/ejs/smbcalls_cli.c')
-rw-r--r-- | source4/scripting/ejs/smbcalls_cli.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source4/scripting/ejs/smbcalls_cli.c b/source4/scripting/ejs/smbcalls_cli.c index adb55a0184..de31d7a900 100644 --- a/source4/scripting/ejs/smbcalls_cli.c +++ b/source4/scripting/ejs/smbcalls_cli.c @@ -24,6 +24,20 @@ #include "lib/ejs/ejs.h" #include "librpc/gen_ndr/ndr_nbt.h" +static struct MprVar mprTransport(struct smbcli_transport *transport) +{ + struct MprVar res, val; + + res = mprCreateObjVar("transport", MPR_DEFAULT_HASH_SIZE); + + val = mprCreateStringVar(talloc_get_name(transport), 1); + mprCreateProperty(&res, "name", &val); + + /* TODO: Create a C pointer "value" property */ + + return res; +} + /* Connect to a server */ static int ejs_cli_connect(MprVarHandle eid, int argc, char **argv) @@ -77,6 +91,10 @@ static int ejs_cli_connect(MprVarHandle eid, int argc, char **argv) return 0; } + /* Return a socket object */ + + ejsSetReturnValue(eid, mprTransport(transport)); + return 0; } |