/* backend code for Samba4 management Copyright Andrew Tridgell 2005 Released under the GNU GPL v2 or later */ /* return a list of current sessions */ function smbsrv_sessions() { var irpc = irpc_init(); status = irpc.connect("smb_server"); if (status.is_ok != true) { return undefined; } var io = irpcObj(); io.input.level = irpc.SMBSRV_INFO_SESSIONS; status = irpc.smbsrv_information(io); if (status.is_ok != true) { return undefined; } /* gather the results into a single array */ var i, count=0, ret = new Array(0); for (i=0;i