[vlc-devel] fix telnet interface on windows
Hannes Domani
ssbssa at yahoo.de
Thu Jul 16 12:16:37 CEST 2015
Jean-Baptiste Kempf <jb at videolan.org> schrieb am 10:41 Donnerstag, 16.Juli 2015:
> > I've changed the logic of is_flag_set() to a binary-and operation.
> > This is necessary because recently poll() returns POLLRDNORM instead of POLLIN on windows, and the old logic always returns false.
> Seems a bit convoluted, but seems OK.
I agree, it looks a bit better like this:
function is_flag_set(val, flag)
local bit = 65536
while bit > 1 do
val = val % bit
flag = flag % bit
bit = bit / 2
if val >= bit and flag >= bit then return true end
end
return false
end
Regards
Domani Hannes
More information about the vlc-devel
mailing list