From 5339f4ffe049b43e81458dc07e94b7b8a2fd0df6 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Mon, 8 May 2017 10:10:45 +1000 Subject: [PATCH] OETF#7 compatibility. Should complete #7. --- modules/library/net.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/library/net.lua b/modules/library/net.lua index ef1b109..527ce77 100644 --- a/modules/library/net.lua +++ b/modules/library/net.lua @@ -1,7 +1,7 @@ -tM,nP,nID = {}, 4096, "a" +tM,nP,nID,nVL = {}, 4096, computer.address(), 1 for a,t in component.list("modem") do table.insert(tM,component.proxy(a)) - component.proxy(a).open(nP) + component.proxy(a).open(nVL) end function ns(id,po,msg) h("sendmsg",id,po,msg) @@ -11,11 +11,11 @@ s("network daemon",function () if ev[1] == "sendmsg" then local eT = ev for k,v in ipairs(tM) do - v.broadcast(nP,eT[2],nID,eT[3],eT[4]) + v.broadcast(nVL,nP,eT[2],nID,eT[3],eT[4]) end elseif ev[1] == "modem_message" then - if ev[6] == nID then - h("net_msg",ev[7],ev[8],ev[9]) + if ev[7] == nID then + h("net_msg",ev[8],ev[9],ev[10]) end end C.yield()