add tool for getting property tree from fgfs

by using --httpd in fgfs
This commit is contained in:
ValKmjolnir
2023-11-06 22:18:48 +08:00
parent 2ea9e03522
commit 433743f790
4 changed files with 152 additions and 76 deletions

View File

@@ -184,7 +184,7 @@ var nas_recv(var* args, usize size, gc* ngc) {
var res = ngc->temp = ngc->alloc(vm_hash);
auto& hash = res.hash().elems;
char* buf = new char[static_cast<int>(args[1].num())];
auto recvsize = recv(args[0].num(), buf,args[1].num(), args[2].num());
auto recvsize = recv(args[0].num(), buf, args[1].num(), args[2].num());
hash["size"] = var::num(static_cast<double>(recvsize));
buf[recvsize>=0? recvsize:0] = 0;
hash["str"] = ngc->newstr(buf);