This commit is contained in:
Cloud Wu
2015-06-01 10:57:30 +08:00
parent 7f578be649
commit 7fb109dbb0
2 changed files with 2 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ return function(skynet, source, filename , ...)
if proto then
for k,v in pairs(proto) do
local name, dispatch = v.name, v.dispatch
if name and dispatch then
if name and dispatch and not p[name] then
local pp = {}
p[name] = pp
getupvaluetable(pp, dispatch, unique)

View File

@@ -171,7 +171,7 @@ end
local function adjust_address(address)
if address:sub(1,1) ~= ":" then
address = tonumber("0x" .. address) | (skynet.harbor(skynet.self()) << 24)
address = assert(tonumber("0x" .. address), "Need an address") | (skynet.harbor(skynet.self()) << 24)
end
return address
end