connection: keep names locked while sending messages
authorDavid Herrmann <dh.herrmann@gmail.com>
Fri, 11 Apr 2014 20:45:51 +0000 (22:45 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Fri, 11 Apr 2014 21:19:31 +0000 (23:19 +0200)
commitf8944cbfeb0c3196b64ad4118010fcdc6817f6cb
treeee150686a96dd4283b62fbb8e6b34b26a2df9e1f
parentc9995d6f23a593556939116c833cf13b99272a34
connection: keep names locked while sending messages

If we send messages and we look up well-known names, we must keep them
locked until we're done. Otherwise, the name might move to another
connection before we queue it on the resolved name.

This fixes the sending path to lock names for the entire function call.
Name-movements already lock the name-registry for the entire move, so we
should be fine now.

We also inline the lookup-helper, as it is only used once and will get
messy if we return kdbus_name_entry objects.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
connection.c
names.c
names.h