1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-11-23 02:28:05 +11:00

fixed cached routing over tunnels

This commit is contained in:
Izaya 2018-03-16 17:15:40 +11:00
parent 6395a96663
commit 44efbc259d

View File

@ -88,9 +88,11 @@ function start()
local function sendPacket(packetID,packetType,dest,sender,vport,data)
if rcache[dest] then
dprint("Cached", rcache[dest][1],"send",rcache[dest][2],port,packetID,packetType,dest,sender,vport,data)
if component.type(rcache[dest][1]) == "modem" then
dprint("Cached", rcache[dest][1],"send",rcache[dest][2],port,packetID,packetType,dest,sender,vport,data)
component.invoke(rcache[dest][1],"send",rcache[dest][2],port,packetID,packetType,dest,sender,vport,data)
elseif component.type(rcache[dest][1]) == "tunnel" then
component.invoke(rcache[dest][1],"send",packetID,packetType,dest,sender,vport,data)
end
else
dprint("Not cached", port,packetID,packetType,dest,sender,vport,data)