bluetooth: Improve code and log readability

This commit makes the code cleaner, avoiding unnecessary line breaks. It
also changes the debug message elements order, to make it look more
natural ("path, interface, member" instead of "interface, path,
member").
This commit is contained in:
João Paulo Rechi Vita 2013-03-27 10:45:33 -03:00 committed by Arun Raghavan
parent 3ef024831c
commit 3086d01dd7

View file

@ -1606,16 +1606,16 @@ static DBusHandlerResult endpoint_handler(DBusConnection *c, DBusMessage *m, voi
struct pa_bluetooth_discovery *y = userdata;
DBusMessage *r = NULL;
DBusError e;
const char *path;
const char *path, *interface, *member;
pa_assert(y);
pa_log_debug("dbus: interface=%s, path=%s, member=%s\n",
dbus_message_get_interface(m),
dbus_message_get_path(m),
dbus_message_get_member(m));
path = dbus_message_get_path(m);
interface = dbus_message_get_interface(m);
member = dbus_message_get_member(m);
pa_log_debug("dbus: path=%s, interface=%s, member=%s", path, interface, member);
dbus_error_init(&e);
if (!pa_streq(path, A2DP_SOURCE_ENDPOINT) && !pa_streq(path, A2DP_SINK_ENDPOINT) && !pa_streq(path, HFP_AG_ENDPOINT) &&
@ -1626,10 +1626,7 @@ static DBusHandlerResult endpoint_handler(DBusConnection *c, DBusMessage *m, voi
const char *xml = ENDPOINT_INTROSPECT_XML;
pa_assert_se(r = dbus_message_new_method_return(m));
pa_assert_se(dbus_message_append_args(
r,
DBUS_TYPE_STRING, &xml,
DBUS_TYPE_INVALID));
pa_assert_se(dbus_message_append_args(r, DBUS_TYPE_STRING, &xml, DBUS_TYPE_INVALID));
} else if (dbus_message_is_method_call(m, "org.bluez.MediaEndpoint", "SetConfiguration"))
r = endpoint_set_configuration(c, m, userdata);