X-Git-Url: http://git.buserror.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kernel%2Forb%2Finvoke.cc;h=abfe23792d231e5ed1f49693bee8c47aba4ed502;hb=cbc65abe11c50aed3d5e7be7d1e736d5ced4f4e8;hp=7fffb61ef2fde1bb1b8c00e17abea2aec434bcf5;hpb=b5cbe98949d5b279965d607c9618d404b26d4760;p=polintos%2Fscott%2Fpriv.git diff --git a/kernel/orb/invoke.cc b/kernel/orb/invoke.cc index 7fffb61..abfe237 100644 --- a/kernel/orb/invoke.cc +++ b/kernel/orb/invoke.cc @@ -57,7 +57,7 @@ namespace ORB { { // FIXME: refcounting ObjTableEntry *ote = table.lookup(id); - if (!ote || !ote->hdr.Valid) + if (!ote || ote->hdr.id == invalid_id) return NULL; if (ote->hdr.Pointer) @@ -116,7 +116,7 @@ namespace ORB { size_t len = round_up(spib->segments[i].len, 3); if (len + copied > bufsize || len + copied < copied) - throw_idl(InvalidArgument, 0, countarray("copy_data: bad size")); + throw_idl(InvalidArgument, 0, countarray("copy_data: bad size")); dpib->segments[i].ptr = vaddr; dpib->segments[i].len = len; @@ -161,13 +161,13 @@ namespace ORB { printf("objlist len %u\n", pib.objlist_len); if (pib.objlist_len == 0) - throw_idl(InvalidArgument, 0, countarray("no objects")); + throw_idl(InvalidArgument, 0, countarray("no objects")); // FIXME: declare constants somewhere if (pib.num_segments > 64) - throw_idl(InvalidArgument, 0, countarray("too many segments")); + throw_idl(InvalidArgument, 0, countarray("too many segments")); if (pib.objlist_len > 4096) - throw_idl(InvalidArgument, 0, countarray("too many objects")); + throw_idl(InvalidArgument, 0, countarray("too many objects")); printf("&pib.objlist[0] %p\n", &pib.objlist[0]); @@ -190,8 +190,8 @@ namespace ORB { buflen += sizeof(ParamInfoBlock); buflen += pib.num_segments * sizeof(ParamInfoBlock::Segment); - u8 *args = new(orbmm) u8[buflen]; - u8 *copy = new(orbmm) u8[pib.copy_size]; + u8 *args = new(ORBMM()) u8[buflen]; + u8 *copy = new(ORBMM()) u8[pib.copy_size]; ParamInfoBlock *dpib = reinterpret_cast (args + piboff); dpib->objlist = reinterpret_cast(args + datalen);