summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2006-10-05 12:16:44 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2006-10-05 12:16:44 +0000
commit44d05c9199233910475f1a796c407e660a073d1d (patch)
treef4c67e191e49cf004702f025e44682b2cf159339 /hcid
parenta368dbf05dfaffb69a31f91270fa0c6985295a27 (diff)
renamed send_reply_and_unref to send_message_and_unref
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus-adapter.c100
-rw-r--r--hcid/dbus-common.c2
-rw-r--r--hcid/dbus-error.c40
-rw-r--r--hcid/dbus-manager.c10
-rw-r--r--hcid/dbus-rfcomm.c16
-rw-r--r--hcid/dbus-sdp.c16
-rw-r--r--hcid/dbus-security.c12
-rw-r--r--hcid/dbus-test.c10
-rw-r--r--hcid/dbus.c54
-rw-r--r--hcid/dbus.h2
10 files changed, 131 insertions, 131 deletions
diff --git a/hcid/dbus-adapter.c b/hcid/dbus-adapter.c
index 34eaffc2..c19d5607 100644
--- a/hcid/dbus-adapter.c
+++ b/hcid/dbus-adapter.c
@@ -236,7 +236,7 @@ static DBusHandlerResult handle_dev_get_address_req(DBusConnection *conn, DBusMe
dbus_message_append_args(reply, DBUS_TYPE_STRING, &paddr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_version_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -260,7 +260,7 @@ static DBusHandlerResult handle_dev_get_version_req(DBusConnection *conn, DBusMe
dbus_message_append_args(reply, DBUS_TYPE_STRING, &str_ptr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_revision_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -284,7 +284,7 @@ static DBusHandlerResult handle_dev_get_revision_req(DBusConnection *conn, DBusM
dbus_message_append_args(reply, DBUS_TYPE_STRING, &str_ptr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_manufacturer_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -308,7 +308,7 @@ static DBusHandlerResult handle_dev_get_manufacturer_req(DBusConnection *conn, D
dbus_message_append_args(reply, DBUS_TYPE_STRING, &str_ptr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_company_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -332,7 +332,7 @@ static DBusHandlerResult handle_dev_get_company_req(DBusConnection *conn, DBusMe
dbus_message_append_args(reply, DBUS_TYPE_STRING, &str_ptr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_mode_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -369,7 +369,7 @@ static DBusHandlerResult handle_dev_get_mode_req(DBusConnection *conn, DBusMessa
dbus_message_append_args(reply, DBUS_TYPE_STRING, &scan_mode,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_set_mode_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -466,7 +466,7 @@ done:
if (!reply)
return DBUS_HANDLER_RESULT_NEED_MEMORY;
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_discoverable_to_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -484,7 +484,7 @@ static DBusHandlerResult handle_dev_get_discoverable_to_req(DBusConnection *conn
dbus_message_append_args(reply, DBUS_TYPE_UINT32, &adapter->discoverable_timeout,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_set_discoverable_to_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -526,7 +526,7 @@ static DBusHandlerResult handle_dev_set_discoverable_to_req(DBusConnection *conn
str2ba(adapter->address, &bdaddr);
write_discoverable_timeout(&bdaddr, timeout);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_is_connectable_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -549,7 +549,7 @@ static DBusHandlerResult handle_dev_is_connectable_req(DBusConnection *conn, DBu
dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &connectable,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_is_discoverable_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -572,7 +572,7 @@ static DBusHandlerResult handle_dev_is_discoverable_req(DBusConnection *conn, DB
dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &discoverable,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_is_connected_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -614,7 +614,7 @@ static DBusHandlerResult handle_dev_is_connected_req(DBusConnection *conn, DBusM
dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &connected,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_list_connections_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -651,7 +651,7 @@ static DBusHandlerResult handle_dev_list_connections_req(DBusConnection *conn, D
dbus_message_iter_close_container(&iter, &array_iter);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_major_class_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -690,7 +690,7 @@ static DBusHandlerResult handle_dev_get_major_class_req(DBusConnection *conn, DB
dbus_message_append_args(reply, DBUS_TYPE_STRING, &str_ptr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_list_minor_classes_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -751,7 +751,7 @@ static DBusHandlerResult handle_dev_list_minor_classes_req(DBusConnection *conn,
dbus_message_iter_close_container(&iter, &array_iter);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_minor_class_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -803,7 +803,7 @@ failed:
dbus_message_append_args(reply, DBUS_TYPE_STRING, &str_ptr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_set_minor_class_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -882,13 +882,13 @@ static DBusHandlerResult handle_dev_set_minor_class_req(DBusConnection *conn, DB
signal = dev_signal_factory(adapter->dev_id, "MinorClassChanged",
DBUS_TYPE_STRING, &minor,
DBUS_TYPE_INVALID);
- send_reply_and_unref(conn, signal);
+ send_message_and_unref(conn, signal);
reply = dbus_message_new_method_return(msg);
hci_close_dev(dd);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_service_classes_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -938,7 +938,7 @@ static DBusHandlerResult handle_dev_get_service_classes_req(DBusConnection *conn
hci_close_dev(dd);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_name_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -971,7 +971,7 @@ static DBusHandlerResult handle_dev_get_name_req(DBusConnection *conn, DBusMessa
dbus_message_append_args(reply, DBUS_TYPE_STRING, &str_ptr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_set_name_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -1014,7 +1014,7 @@ static DBusHandlerResult handle_dev_set_name_req(DBusConnection *conn, DBusMessa
if (!reply)
return DBUS_HANDLER_RESULT_NEED_MEMORY;
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_remote_svc_rec(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -1100,7 +1100,7 @@ failed:
dbus_message_append_args(reply, DBUS_TYPE_STRING, &info,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_remote_revision_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -1148,7 +1148,7 @@ static DBusHandlerResult handle_dev_get_remote_revision_req(DBusConnection *conn
dbus_message_append_args(reply, DBUS_TYPE_STRING, &info,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_remote_manufacturer_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -1195,7 +1195,7 @@ static DBusHandlerResult handle_dev_get_remote_manufacturer_req(DBusConnection *
dbus_message_append_args(reply, DBUS_TYPE_STRING, &info,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_remote_company_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -1234,7 +1234,7 @@ static DBusHandlerResult handle_dev_get_remote_company_req(DBusConnection *conn,
free(tmp);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static int get_remote_class(DBusConnection *conn, DBusMessage *msg, void *data, uint32_t *class)
@@ -1292,7 +1292,7 @@ static DBusHandlerResult handle_dev_get_remote_major_class_req(DBusConnection *c
dbus_message_append_args(reply, DBUS_TYPE_STRING, &major_class,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_remote_minor_class_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -1313,7 +1313,7 @@ static DBusHandlerResult handle_dev_get_remote_minor_class_req(DBusConnection *c
dbus_message_append_args(reply, DBUS_TYPE_STRING, &minor_class,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static void append_class_string(const char *class, DBusMessageIter *iter)
@@ -1347,7 +1347,7 @@ static DBusHandlerResult handle_dev_get_remote_service_cls_req(DBusConnection *c
slist_free(service_classes);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_remote_class_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -1365,7 +1365,7 @@ static DBusHandlerResult handle_dev_get_remote_class_req(DBusConnection *conn, D
dbus_message_append_args(reply, DBUS_TYPE_UINT32, &class,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_remote_name_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -1409,7 +1409,7 @@ static DBusHandlerResult handle_dev_get_remote_name_req(DBusConnection *conn, DB
DBUS_TYPE_INVALID);
free(str);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
if (!adapter->up)
@@ -1465,7 +1465,7 @@ static DBusHandlerResult handle_dev_get_remote_alias_req(DBusConnection *conn, D
dbus_message_append_args(reply, DBUS_TYPE_STRING, &str_ptr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_set_remote_alias_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -1508,9 +1508,9 @@ static DBusHandlerResult handle_dev_set_remote_alias_req(DBusConnection *conn, D
DBUS_TYPE_STRING, &addr,
DBUS_TYPE_STRING, &alias,
DBUS_TYPE_INVALID);
- send_reply_and_unref(conn, signal);
+ send_message_and_unref(conn, signal);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_clear_remote_alias_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -1556,10 +1556,10 @@ static DBusHandlerResult handle_dev_clear_remote_alias_req(DBusConnection *conn,
signal = dev_signal_factory(adapter->dev_id, "RemoteAliasCleared",
DBUS_TYPE_STRING, &addr_ptr,
DBUS_TYPE_INVALID);
- send_reply_and_unref(conn, signal);
+ send_message_and_unref(conn, signal);
}
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_last_seen_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -1601,7 +1601,7 @@ static DBusHandlerResult handle_dev_last_seen_req(DBusConnection *conn, DBusMess
free(str);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_last_used_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -1643,7 +1643,7 @@ static DBusHandlerResult handle_dev_last_used_req(DBusConnection *conn, DBusMess
free(str);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_disconnect_remote_device_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -1702,7 +1702,7 @@ static DBusHandlerResult handle_dev_disconnect_remote_device_req(DBusConnection
if (!reply)
return DBUS_HANDLER_RESULT_NEED_MEMORY;
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
@@ -1716,7 +1716,7 @@ static void reply_authentication_failure(struct bonding_request_info *bonding)
reply = new_authentication_return(bonding->rq, status);
if (reply)
- send_reply_and_unref(bonding->conn, reply);
+ send_message_and_unref(bonding->conn, reply);
}
static gboolean create_bonding_conn_complete(GIOChannel *io, GIOCondition cond,
@@ -1975,7 +1975,7 @@ static DBusHandlerResult handle_dev_cancel_bonding_req(DBusConnection *conn, DBu
g_io_channel_close(adapter->bonding->io);
reply = dbus_message_new_method_return(msg);
- send_reply_and_unref(conn, reply);
+ send_message_and_unref(conn, reply);
return DBUS_HANDLER_RESULT_HANDLED;
}
@@ -2053,13 +2053,13 @@ static DBusHandlerResult handle_dev_remove_bonding_req(DBusConnection *conn, DBu
signal = dev_signal_factory(adapter->dev_id, "BondingRemoved",
DBUS_TYPE_STRING, &addr_ptr,
DBUS_TYPE_INVALID);
- send_reply_and_unref(conn, signal);
+ send_message_and_unref(conn, signal);
reply = dbus_message_new_method_return(msg);
hci_close_dev(dd);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_has_bonding_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -2099,7 +2099,7 @@ static DBusHandlerResult handle_dev_has_bonding_req(DBusConnection *conn, DBusMe
dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &result,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static void list_bondings_do_append(char *key, char *value, void *data)
@@ -2132,7 +2132,7 @@ static DBusHandlerResult handle_dev_list_bondings_req(DBusConnection *conn, DBus
dbus_message_iter_close_container(&iter, &array_iter);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_pin_code_length_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -2174,7 +2174,7 @@ static DBusHandlerResult handle_dev_get_pin_code_length_req(DBusConnection *conn
dbus_message_append_args(reply, DBUS_TYPE_BYTE, &length,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_get_encryption_key_size_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -2214,7 +2214,7 @@ static DBusHandlerResult handle_dev_get_encryption_key_size_req(DBusConnection *
dbus_message_append_args(reply, DBUS_TYPE_BYTE, &size,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_start_periodic_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -2283,7 +2283,7 @@ static DBusHandlerResult handle_dev_start_periodic_req(DBusConnection *conn, DBu
name_listener_add(conn, dbus_message_get_sender(msg),
(name_cb_t) periodic_discover_req_exit, adapter);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_stop_periodic_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -2314,7 +2314,7 @@ static DBusHandlerResult handle_dev_stop_periodic_req(DBusConnection *conn, DBus
}
reply = dbus_message_new_method_return(msg);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_is_periodic_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -2330,7 +2330,7 @@ static DBusHandlerResult handle_dev_is_periodic_req(DBusConnection *conn, DBusMe
dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &active,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_discover_devices_req(DBusConnection *conn, DBusMessage *msg, void *data)
@@ -2406,7 +2406,7 @@ static DBusHandlerResult handle_dev_discover_devices_req(DBusConnection *conn, D
name_listener_add(conn, dbus_message_get_sender(msg),
(name_cb_t) discover_devices_req_exit, adapter);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult handle_dev_cancel_discovery_req(DBusConnection *conn, DBusMessage *msg, void *data)
diff --git a/hcid/dbus-common.c b/hcid/dbus-common.c
index e95b9401..b1ece10d 100644
--- a/hcid/dbus-common.c
+++ b/hcid/dbus-common.c
@@ -322,7 +322,7 @@ DBusHandlerResult simple_introspect(DBusConnection *conn, DBusMessage *msg, void
dbus_message_append_args(reply, DBUS_TYPE_STRING, &ptr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
service_handler_func_t find_service_handler(struct service_data *handlers, DBusMessage *msg)
diff --git a/hcid/dbus-error.c b/hcid/dbus-error.c
index ba4e1ebc..c0bda846 100644
--- a/hcid/dbus-error.c
+++ b/hcid/dbus-error.c
@@ -37,19 +37,19 @@ DBusHandlerResult error_failed(DBusConnection *conn, DBusMessage *msg, int err)
{
const char *str = strerror(err);
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".Failed", str));
}
DBusHandlerResult error_not_ready(DBusConnection *conn, DBusMessage *msg)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".NotReady", "Adapter is not ready"));
}
DBusHandlerResult error_invalid_arguments(DBusConnection *conn, DBusMessage *msg)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".InvalidArguments",
"Invalid arguments"));
}
@@ -64,101 +64,101 @@ DBusHandlerResult error_unknown_method(DBusConnection *conn, DBusMessage *msg)
snprintf(error, 128, "Method \"%s\" with signature \"%s\" on interface \"%s\" doesn't exist",
method, signature, interface);
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".UnknownMethod",
error));
}
DBusHandlerResult error_not_authorized(DBusConnection *conn, DBusMessage *msg)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".NotAuthorized",
"Not authorized"));
}
DBusHandlerResult error_out_of_memory(DBusConnection *conn, DBusMessage *msg)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".OutOfMemory",
"Out of memory"));
}
DBusHandlerResult error_no_such_adapter(DBusConnection *conn, DBusMessage *msg)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".NoSuchAdapter",
"No such adapter"));
}
DBusHandlerResult error_not_available(DBusConnection *conn, DBusMessage *msg)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".NotAvailable",
"Not available"));
}
DBusHandlerResult error_not_supported(DBusConnection *conn, DBusMessage *msg)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".NotSupported",
"Not supported"));
}
DBusHandlerResult error_request_deferred(DBusConnection *conn, DBusMessage *msg)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".RequestDeferred",
"Request Deferred"));
}
DBusHandlerResult error_not_connected(DBusConnection *conn, DBusMessage *msg)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".NotConnected",
"Not connected"));
}
DBusHandlerResult error_unsupported_major_class(DBusConnection *conn, DBusMessage *msg)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".UnsupportedMajorClass",
"Unsupported Major Class"));
}
DBusHandlerResult error_connection_attempt_failed(DBusConnection *conn, DBusMessage *msg, int err)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".ConnectionAttemptFailed",
err ? strerror(err) : "Connection attempt failed"));
}
static DBusHandlerResult error_already_exists(DBusConnection *conn, DBusMessage *msg, const char *str)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".AlreadyExists", str));
}
static DBusHandlerResult error_does_not_exist(DBusConnection *conn, DBusMessage *msg, const char *str)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".DoesNotExist", str));
}
static DBusHandlerResult error_in_progress(DBusConnection *conn, DBusMessage *msg, const char *str)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".InProgress", str));
}
static DBusHandlerResult error_canceled(DBusConnection *conn, DBusMessage *msg, const char *str)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".Canceled", str));
}
DBusHandlerResult error_not_in_progress(DBusConnection *conn, DBusMessage *msg, const char *str)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".NotInProgress", str));
}
@@ -189,7 +189,7 @@ DBusHandlerResult error_bonding_not_in_progress(DBusConnection *conn, DBusMessag
DBusHandlerResult error_authentication_canceled(DBusConnection *conn, DBusMessage *msg)
{
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".AuthenticationCanceled",
"Authentication Canceled"));
}
@@ -271,7 +271,7 @@ DBusHandlerResult error_sdp_failed(DBusConnection *conn, DBusMessage *msg, int e
{
const char *str = strsdperror(err);
- return send_reply_and_unref(conn,
+ return send_message_and_unref(conn,
dbus_message_new_error(msg, ERROR_INTERFACE ".Failed", str));
}
diff --git a/hcid/dbus-manager.c b/hcid/dbus-manager.c
index eb2dbf09..6ee7e4d6 100644
--- a/hcid/dbus-manager.c
+++ b/hcid/dbus-manager.c
@@ -56,7 +56,7 @@ static DBusHandlerResult interface_version(DBusConnection *conn,
dbus_message_append_args(reply, DBUS_TYPE_UINT32, &version,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult default_adapter(DBusConnection *conn,
@@ -81,7 +81,7 @@ static DBusHandlerResult default_adapter(DBusConnection *conn,
dbus_message_append_args(reply, DBUS_TYPE_STRING, &path_ptr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult find_adapter(DBusConnection *conn,
@@ -117,7 +117,7 @@ static DBusHandlerResult find_adapter(DBusConnection *conn,
dbus_message_append_args(reply, DBUS_TYPE_STRING, &path_ptr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult list_adapters(DBusConnection *conn,
@@ -186,7 +186,7 @@ static DBusHandlerResult list_adapters(DBusConnection *conn,
close(sk);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult list_services(DBusConnection *conn,
@@ -201,7 +201,7 @@ static DBusHandlerResult list_services(DBusConnection *conn,
if (!reply)
return DBUS_HANDLER_RESULT_NEED_MEMORY;
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static struct service_data methods[] = {
diff --git a/hcid/dbus-rfcomm.c b/hcid/dbus-rfcomm.c
index 97e9836f..8a7cc84c 100644
--- a/hcid/dbus-rfcomm.c
+++ b/hcid/dbus-rfcomm.c
@@ -280,7 +280,7 @@ static void rfcomm_connect_cb_devnode_opened(int fd, struct pending_connect *c,
node->io_id = g_io_add_watch(node->io, G_IO_ERR | G_IO_HUP,
(GIOFunc) rfcomm_disconnect_cb, node);
- send_reply_and_unref(c->conn, reply);
+ send_message_and_unref(c->conn, reply);
connected_nodes = slist_append(connected_nodes, node);
@@ -718,7 +718,7 @@ static DBusHandlerResult rfcomm_cancel_connect_req(DBusConnection *conn,
pending->canceled = 1;
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult rfcomm_connect_by_ch_req(DBusConnection *conn,
@@ -771,7 +771,7 @@ static DBusHandlerResult rfcomm_cancel_connect_by_ch_req(DBusConnection *conn,
pending->canceled = 1;
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult rfcomm_disconnect_req(DBusConnection *conn,
@@ -808,7 +808,7 @@ static DBusHandlerResult rfcomm_disconnect_req(DBusConnection *conn,
connected_nodes = slist_remove(connected_nodes, node);
rfcomm_node_free(node);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static void rfcomm_bind_req_continue(sdp_record_t *rec, void *data, int err)
@@ -858,7 +858,7 @@ static void rfcomm_bind_req_continue(sdp_record_t *rec, void *data, int err)
goto failed;
}
- send_reply_and_unref(cdata->conn, reply);
+ send_message_and_unref(cdata->conn, reply);
rfcomm_continue_data_free(cdata);
@@ -952,7 +952,7 @@ static DBusHandlerResult rfcomm_bind_by_ch_req(DBusConnection *conn,
DBUS_TYPE_INVALID))
goto need_memory;
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
need_memory:
if (reply)
@@ -999,7 +999,7 @@ static DBusHandlerResult rfcomm_release_req(DBusConnection *conn,
bound_nodes = slist_remove(bound_nodes, node);
rfcomm_node_free(node);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult rfcomm_list_bindings_req(DBusConnection *conn,
@@ -1047,7 +1047,7 @@ static DBusHandlerResult rfcomm_list_bindings_req(DBusConnection *conn,
return DBUS_HANDLER_RESULT_NEED_MEMORY;
}
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static struct service_data rfcomm_services[] = {
diff --git a/hcid/dbus-sdp.c b/hcid/dbus-sdp.c
index 70d54347..3cbce9e8 100644
--- a/hcid/dbus-sdp.c
+++ b/hcid/dbus-sdp.c
@@ -599,7 +599,7 @@ static void remote_svc_rec_completed_cb(uint8_t type, uint16_t err, uint8_t *rsp
done:
dbus_message_iter_close_container(&iter, &array_iter);
- send_reply_and_unref(ctxt->conn, reply);
+ send_message_and_unref(ctxt->conn, reply);
failed:
transaction_context_free(ctxt);
}
@@ -671,7 +671,7 @@ static void remote_svc_handles_completed_cb(uint8_t type, uint16_t err, uint8_t
done:
dbus_message_iter_close_container(&iter, &array_iter);
- send_reply_and_unref(ctxt->conn, reply);
+ send_message_and_unref(ctxt->conn, reply);
failed:
transaction_context_free(ctxt);
}
@@ -751,7 +751,7 @@ static void search_completed_cb(uint8_t type, uint16_t err, uint8_t *rsp, size_t
done:
dbus_message_iter_close_container(&iter, &array_iter);
- send_reply_and_unref(ctxt->conn, reply);
+ send_message_and_unref(ctxt->conn, reply);
failed:
transaction_context_free(ctxt);
}
@@ -1149,7 +1149,7 @@ static DBusHandlerResult get_identifiers_by_service(DBusConnection *conn,
dbus_message_iter_close_container(&iter, &array_iter);
if (nrec > 0)
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
/* no record found: request search */
dbus_message_unref(reply);
@@ -1279,7 +1279,7 @@ static DBusHandlerResult get_uuid(DBusConnection *conn,
DBUS_TYPE_STRING, &ptr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult get_name(DBusConnection *conn,
@@ -1326,7 +1326,7 @@ static DBusHandlerResult get_name(DBusConnection *conn,
DBUS_TYPE_STRING, &ptr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult register_rfcomm(DBusConnection *conn,
@@ -1380,7 +1380,7 @@ static DBusHandlerResult register_rfcomm(DBusConnection *conn,
DBUS_TYPE_STRING, &ptr,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult unregister_rfcomm(DBusConnection *conn,
@@ -1456,7 +1456,7 @@ static DBusHandlerResult unregister_rfcomm(DBusConnection *conn,
if (!slist_find(sdp_cache, &psearch, service_provider_cmp))
name_listener_remove(conn, owner, (name_cb_t) owner_exited, adapter);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static struct service_data sdp_services[] = {
diff --git a/hcid/dbus-security.c b/hcid/dbus-security.c
index dc92a8cf..ab4ce205 100644
--- a/hcid/dbus-security.c
+++ b/hcid/dbus-security.c
@@ -257,7 +257,7 @@ static DBusHandlerResult register_agent(DBusConnection *conn,
adapter->passkey_agents = slist_append(adapter->passkey_agents, agent);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult unregister_agent(DBusConnection *conn,
@@ -305,7 +305,7 @@ static DBusHandlerResult unregister_agent(DBusConnection *conn,
if (!reply)
return DBUS_HANDLER_RESULT_NEED_MEMORY;
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult register_default_agent(DBusConnection *conn,
@@ -337,7 +337,7 @@ static DBusHandlerResult register_default_agent(DBusConnection *conn,
info("Default passkey agent (%s, %s) registered",
default_agent->name, default_agent->path);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
need_memory:
if (default_agent) {
@@ -382,7 +382,7 @@ static DBusHandlerResult unregister_default_agent(DBusConnection *conn,
passkey_agent_free(default_agent);
default_agent = NULL;
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static struct service_data sec_services[] = {
@@ -600,7 +600,7 @@ static void send_cancel_request(struct pending_agent_request *req)
dbus_message_set_no_reply(message, TRUE);
- send_reply_and_unref(req->agent->conn, message);
+ send_message_and_unref(req->agent->conn, message);
debug("PasskeyAgent.Request(%s, %s) was canceled", req->path, address);
@@ -625,7 +625,7 @@ static void release_agent(struct passkey_agent *agent)
dbus_message_set_no_reply(message, TRUE);
- send_reply_and_unref(agent->conn, message);
+ send_message_and_unref(agent->conn, message);
if (agent == default_agent)
name_listener_remove(agent->conn, agent->name,
diff --git a/hcid/dbus-test.c b/hcid/dbus-test.c
index fa46dbfb..74ab8abf 100644
--- a/hcid/dbus-test.c
+++ b/hcid/dbus-test.c
@@ -127,7 +127,7 @@ static void send_audit_status(struct audit *audit, const char *name)
dbus_message_append_args(signal, DBUS_TYPE_STRING, &addr_ptr,
DBUS_TYPE_INVALID);
- send_reply_and_unref(audit->conn, signal);
+ send_message_and_unref(audit->conn, signal);
}
static void audit_requestor_exited(const char *name, struct audit *audit)
@@ -470,7 +470,7 @@ static DBusHandlerResult audit_remote_device(DBusConnection *conn,
audits = slist_append(audits, audit);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult cancel_audit_remote_device(DBusConnection *conn,
@@ -529,7 +529,7 @@ static DBusHandlerResult cancel_audit_remote_device(DBusConnection *conn,
if (!reply)
return DBUS_HANDLER_RESULT_NEED_MEMORY;
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult get_l2cap_feature_mask(DBusConnection *conn,
@@ -572,7 +572,7 @@ static DBusHandlerResult get_l2cap_feature_mask(DBusConnection *conn,
dbus_message_append_args(reply, DBUS_TYPE_UINT32, &mask,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static DBusHandlerResult get_l2cap_mtu_size(DBusConnection *conn,
@@ -614,7 +614,7 @@ static DBusHandlerResult get_l2cap_mtu_size(DBusConnection *conn,
dbus_message_append_args(reply, DBUS_TYPE_UINT16, &mtu,
DBUS_TYPE_INVALID);
- return send_reply_and_unref(conn, reply);
+ return send_message_and_unref(conn, reply);
}
static struct service_data methods[] = {
diff --git a/hcid/dbus.c b/hcid/dbus.c
index e840ad64..5cdf6103 100644
--- a/hcid/dbus.c
+++ b/hcid/dbus.c
@@ -395,7 +395,7 @@ static void reply_pending_requests(const char *path, struct adapter *adapter)
/* If there is a pending reply for discovery cancel */
if (adapter->discovery_cancel) {
message = dbus_message_new_method_return(adapter->discovery_cancel);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
dbus_message_unref(adapter->discovery_cancel);
adapter->discovery_cancel = NULL;
}
@@ -405,7 +405,7 @@ static void reply_pending_requests(const char *path, struct adapter *adapter)
* to resolve */
message = dbus_message_new_signal(path, ADAPTER_INTERFACE,
"DiscoveryCompleted");
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
/* Cancel inquiry initiated by D-Bus client */
if (adapter->discovery_requestor)
@@ -417,7 +417,7 @@ static void reply_pending_requests(const char *path, struct adapter *adapter)
* the device */
message = dbus_message_new_signal(path, ADAPTER_INTERFACE,
"PeriodicDiscoveryStopped");
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
/* Stop periodic inquiry initiated by D-Bus client */
if (adapter->pdiscovery_requestor)
@@ -528,7 +528,7 @@ int hcid_dbus_register_device(uint16_t id)
DBUS_TYPE_STRING, &pptr,
DBUS_TYPE_INVALID);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
return 0;
}
@@ -553,7 +553,7 @@ int hcid_dbus_unregister_device(uint16_t id)
DBUS_TYPE_STRING, &pptr,
DBUS_TYPE_INVALID);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
failed:
ret = unregister_dbus_path(path);
@@ -695,7 +695,7 @@ int hcid_dbus_stop_device(uint16_t id)
DBUS_TYPE_STRING, &scan_mode,
DBUS_TYPE_INVALID);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
cancel_passkey_agent_requests(adapter->passkey_agents, path, NULL);
@@ -838,7 +838,7 @@ void hcid_dbus_bonding_process_complete(bdaddr_t *local, bdaddr_t *peer, uint8_t
message = dev_signal_factory(adapter->dev_id, "BondingCreated",
DBUS_TYPE_STRING, &peer_addr,
DBUS_TYPE_INVALID);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
}
}
@@ -853,7 +853,7 @@ void hcid_dbus_bonding_process_complete(bdaddr_t *local, bdaddr_t *peer, uint8_t
} else {
/* reply authentication success or an error */
message = new_authentication_return(adapter->bonding->rq, status);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
}
name_listener_remove(connection, dbus_message_get_sender(adapter->bonding->rq),
@@ -906,7 +906,7 @@ void hcid_dbus_inquiry_start(bdaddr_t *local)
message = dev_signal_factory(adapter->dev_id, "DiscoveryStarted",
DBUS_TYPE_INVALID);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
failed:
bt_free(local_addr);
@@ -987,7 +987,7 @@ int disc_device_req_name(struct adapter *adapter)
break;
}
- send_reply_and_unref(connection, failed_signal);
+ send_message_and_unref(connection, failed_signal);
failed_signal = NULL;
/* if failed, request the next element */
@@ -1023,7 +1023,7 @@ static void send_out_of_range(const char *path, struct slist *l)
DBUS_TYPE_STRING, &peer_addr,
DBUS_TYPE_INVALID);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
l = l->next;
}
}
@@ -1098,7 +1098,7 @@ void hcid_dbus_inquiry_complete(bdaddr_t *local)
if (adapter->disc_active) {
message = dbus_message_new_signal(path, ADAPTER_INTERFACE,
"DiscoveryCompleted");
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
adapter->disc_active = 0;
}
@@ -1117,7 +1117,7 @@ void hcid_dbus_inquiry_complete(bdaddr_t *local)
/* If there is a pending reply for discovery cancel */
if (adapter->discovery_cancel) {
message = dbus_message_new_method_return(adapter->discovery_cancel);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
dbus_message_unref(adapter->discovery_cancel);
adapter->discovery_cancel = NULL;
}
@@ -1163,7 +1163,7 @@ void hcid_dbus_periodic_inquiry_start(bdaddr_t *local, uint8_t status)
message = dbus_message_new_signal(path, ADAPTER_INTERFACE,
"PeriodicDiscoveryStarted");
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
failed:
bt_free(local_addr);
@@ -1222,7 +1222,7 @@ void hcid_dbus_periodic_inquiry_exit(bdaddr_t *local, uint8_t status)
if (adapter->disc_active) {
message = dbus_message_new_signal(path, ADAPTER_INTERFACE,
"DiscoveryCompleted");
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
adapter->disc_active = 0;
}
@@ -1230,7 +1230,7 @@ void hcid_dbus_periodic_inquiry_exit(bdaddr_t *local, uint8_t status)
/* Send discovery completed signal if there isn't name to resolve */
message = dbus_message_new_signal(path, ADAPTER_INTERFACE,
"PeriodicDiscoveryStopped");
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
done:
bt_free(local_addr);
}
@@ -1313,7 +1313,7 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class, i
DBUS_TYPE_INT16, &tmp_rssi,
DBUS_TYPE_INVALID);
- send_reply_and_unref(connection, signal_device);
+ send_message_and_unref(connection, signal_device);
memset(&match, 0, sizeof(struct discovered_dev_info));
bacpy(&match.bdaddr, peer);
@@ -1355,7 +1355,7 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class, i
DBUS_TYPE_STRING, &peer_addr,
DBUS_TYPE_STRING, &name,
DBUS_TYPE_INVALID);
- send_reply_and_unref(connection, signal_name);
+ send_message_and_unref(connection, signal_name);
free(name);
@@ -1405,7 +1405,7 @@ void hcid_dbus_remote_class(bdaddr_t *local, bdaddr_t *peer, uint32_t class)
DBUS_TYPE_UINT32, &tmp_class,
DBUS_TYPE_INVALID);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
failed:
bt_free(local_addr);
@@ -1449,7 +1449,7 @@ void hcid_dbus_remote_name(bdaddr_t *local, bdaddr_t *peer, uint8_t status, char
DBUS_TYPE_STRING, &name,
DBUS_TYPE_INVALID);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
/* remove from remote name request list */
disc_device_remove(&adapter->disc_devices, peer);
@@ -1476,7 +1476,7 @@ void hcid_dbus_remote_name(bdaddr_t *local, bdaddr_t *peer, uint8_t status, char
/* If there is a pending reply for discovery cancel */
if (adapter->discovery_cancel) {
message = dbus_message_new_method_return(adapter->discovery_cancel);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
dbus_message_unref(adapter->discovery_cancel);
adapter->discovery_cancel = NULL;
}
@@ -1489,7 +1489,7 @@ void hcid_dbus_remote_name(bdaddr_t *local, bdaddr_t *peer, uint8_t status, char
if (adapter->disc_active) {
message = dbus_message_new_signal(path,
ADAPTER_INTERFACE, "DiscoveryCompleted");
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
adapter->disc_active = 0;
}
@@ -1545,7 +1545,7 @@ void hcid_dbus_conn_complete(bdaddr_t *local, uint8_t status, uint16_t handle, b
DBUS_TYPE_STRING, &peer_addr,
DBUS_TYPE_INVALID);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
/* add in the active connetions list */
active_conn_append(&adapter->active_conn, peer, handle);
@@ -1617,7 +1617,7 @@ void hcid_dbus_disconn_complete(bdaddr_t *local, uint8_t status, uint16_t handle
error_authentication_canceled(connection, adapter->bonding->rq);
} else {
message = new_authentication_return(adapter->bonding->rq, HCI_AUTHENTICATION_FAILURE);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
}
name_listener_remove(connection, dbus_message_get_sender(adapter->bonding->rq),
@@ -1633,7 +1633,7 @@ void hcid_dbus_disconn_complete(bdaddr_t *local, uint8_t status, uint16_t handle
DBUS_TYPE_STRING, &peer_addr,
DBUS_TYPE_INVALID);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
active_conn_remove(&adapter->active_conn, &handle);
failed:
@@ -2065,7 +2065,7 @@ void hcid_dbus_setname_complete(bdaddr_t *local)
signal = dev_signal_factory(id, "NameChanged",
DBUS_TYPE_STRING, &pname, DBUS_TYPE_INVALID);
- send_reply_and_unref(connection, signal);
+ send_message_and_unref(connection, signal);
failed:
if (dd >= 0)
@@ -2162,7 +2162,7 @@ void hcid_dbus_setscan_enable_complete(bdaddr_t *local)
message = dev_signal_factory(adapter->dev_id, "ModeChanged",
DBUS_TYPE_STRING, &scan_mode,
DBUS_TYPE_INVALID);
- send_reply_and_unref(connection, message);
+ send_message_and_unref(connection, message);
failed:
if (dd >= 0)
diff --git a/hcid/dbus.h b/hcid/dbus.h
index 656c579c..8ae3bdb8 100644
--- a/hcid/dbus.h
+++ b/hcid/dbus.h
@@ -236,7 +236,7 @@ void release_default_agent(void);
void release_passkey_agents(struct adapter *adapter, bdaddr_t *bda);
void cancel_passkey_agent_requests(struct slist *agents, const char *path, bdaddr_t *dba);
-static inline DBusHandlerResult send_reply_and_unref(DBusConnection *conn, DBusMessage *reply)
+static inline DBusHandlerResult send_message_and_unref(DBusConnection *conn, DBusMessage *reply)
{
if (reply) {
dbus_connection_send(conn, reply, NULL);