Fix the creation of the thread.info property.

Update the patterns used to extract hex chars from the string representation of a coroutine.  It seems the string has changed in Lua 5.3 from "0xAB..." to "thread: AB..."; this was before:-

NSE: Starting http-feed M:nil against ...
NSE: http-feed M:nil spawning new thread (thread: 02C63A78).
NSE: Finished http-feed W:nil against ...

this is now:-

NSE: Starting http-feed M:02D6EAF0 against ...
NSE: http-feed M:02D6EAF0 spawning new thread (thread: 02D6E640).
NSE: Finished http-feed W:02D6E640 against ...
This commit is contained in:
jah 2015-02-20 03:07:04 +00:00
parent 6199449632
commit 6146593e11

View file

@ -467,7 +467,7 @@ do
co = co,
env = env,
identifier = tostring(co),
info = format("%s M:%s", self.id, match(tostring(co), "0x(.*)"));
info = format("%s M:%s", self.id, match(tostring(co), "thread: (%x+)"));
parent = nil, -- placeholder
script = self,
type = script_type,
@ -485,7 +485,7 @@ do
args = pack(...),
close_handlers = {},
co = co,
info = format("%s W:%s", self.id, match(tostring(co), "0x(.*)"));
info = format("%s W:%s", self.id, match(tostring(co), "thread: (%x+)"));
parent = self,
worker = true,
};