Skip to content

Commit 217320a

Browse files
authored
Allow using empty vm_id to indicate the current WasmVM. (#138)
Signed-off-by: Piotr Sikora <[email protected]>
1 parent dd33aa6 commit 217320a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/context.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ WasmResult ContextBase::registerSharedQueue(std::string_view queue_name,
224224

225225
WasmResult ContextBase::lookupSharedQueue(std::string_view vm_id, std::string_view queue_name,
226226
uint32_t *token_ptr) {
227-
uint32_t token = getGlobalSharedQueue().resolveQueue(vm_id, queue_name);
227+
uint32_t token =
228+
getGlobalSharedQueue().resolveQueue(vm_id.empty() ? wasm_->vm_id() : vm_id, queue_name);
228229
if (isFailed() || !token) {
229230
return WasmResult::NotFound;
230231
}

0 commit comments

Comments
 (0)