connection: Refactor out closure allocation
authorDerek Foreman <derekf@osg.samsung.com>
Wed, 6 Dec 2017 17:22:18 +0000 (11:22 -0600)
committerDaniel Stone <daniels@collabora.com>
Wed, 27 Dec 2017 13:59:48 +0000 (13:59 +0000)
commite802094c9b6927148d1a7249af9ead49673f22b9
tree13f073ee750e7d720ae3c6c10252b8d3b19d74da
parent383b2d965adf5b70330aa8165b395a85eb33e1df
connection: Refactor out closure allocation

Moves the common/similar bits into one place.

This has a minor functional change - count and message are now initialized
immediately, previously they'd only be set if (de)marshal was successful.

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