connection: Clear fds we shouldn't close to -1
authorDerek Foreman <derekf@osg.samsung.com>
Wed, 6 Dec 2017 17:22:19 +0000 (11:22 -0600)
committerDaniel Stone <daniels@collabora.com>
Wed, 27 Dec 2017 14:14:04 +0000 (14:14 +0000)
commit52609ddf79a96fee0465006e2c6339a3a5d23a87
treeff49471c2b85b28352d8790da0e320afd45eca31
parente802094c9b6927148d1a7249af9ead49673f22b9
connection: Clear fds we shouldn't close to -1

This initializes all the fd arguments in closures to -1 and clears
them back to -1 when they've been dispatched or serialized.

This means that any valid fd in a closure is currently libwayland's
responsibility to close in the case of an error.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
src/connection.c