diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2008-06-06 09:57:27 +0000 | 
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2008-06-06 09:57:27 +0000 | 
| commit | e64373ef34f318aa60030cde093aa7cd7694c714 (patch) | |
| tree | f522bd4c0c93f086f35322878cbe560313842176 /hcid/adapter.c | |
| parent | ee865eb34c8fd1d1f1e5193230c0bd7129079309 (diff) | |
More direct usage of D-Bus sending function
Diffstat (limited to 'hcid/adapter.c')
| -rw-r--r-- | hcid/adapter.c | 13 | 
1 files changed, 8 insertions, 5 deletions
| diff --git a/hcid/adapter.c b/hcid/adapter.c index 4374cef4..2351b395 100644 --- a/hcid/adapter.c +++ b/hcid/adapter.c @@ -2198,10 +2198,11 @@ gboolean dc_pending_timeout_handler(void *data)  		error_failed_errno(pending_dc->conn, pending_dc->msg, err);  	} else {  		reply = dbus_message_new_method_return(pending_dc->msg); -		if (!reply) +		if (reply) { +			dbus_connection_send(pending_dc->conn, reply, NULL); +			dbus_message_unref(reply); +		} else  			error("Failed to allocate disconnect reply"); -		else -			send_message_and_unref(pending_dc->conn, reply);  	}  	hci_close_dev(dd); @@ -2285,8 +2286,10 @@ static void reply_authentication_failure(struct bonding_request_info *bonding)  			bonding->hci_status : HCI_AUTHENTICATION_FAILURE;  	reply = new_authentication_return(bonding->msg, status); -	if (reply) -		send_message_and_unref(bonding->conn, reply); +	if (reply) { +		dbus_connection_send(bonding->conn, reply, NULL); +		dbus_message_unref(reply); +	}  }  struct device *adapter_find_device(struct adapter *adapter, const char *dest) | 
