Commit 07b01854 authored by pali's avatar pali
Browse files

bluetooth: Remove pa_bluetooth_transport_unlink() function

It was called only from the pa_bluetooth_transport_free() function and therefore it not needed.
parent d2674e0f
......@@ -395,20 +395,15 @@ void pa_bluetooth_transport_put(pa_bluetooth_transport *t) {
pa_bluetooth_transport_set_state(t, PA_BLUETOOTH_TRANSPORT_STATE_IDLE);
}
void pa_bluetooth_transport_unlink(pa_bluetooth_transport *t) {
pa_assert(t);
pa_bluetooth_transport_set_state(t, PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED);
pa_hashmap_remove(t->device->discovery->transports, t->path);
t->device->transports[t->profile] = NULL;
}
void pa_bluetooth_transport_free(pa_bluetooth_transport *t) {
pa_assert(t);
if (t->destroy)
t->destroy(t);
pa_bluetooth_transport_unlink(t);
pa_bluetooth_transport_set_state(t, PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED);
pa_hashmap_remove(t->device->discovery->transports, t->path);
t->device->transports[t->profile] = NULL;
pa_xfree(t->owner);
pa_xfree(t->path);
......
......@@ -154,7 +154,6 @@ pa_bluetooth_transport *pa_bluetooth_transport_new(pa_bluetooth_device *d, const
void pa_bluetooth_transport_set_state(pa_bluetooth_transport *t, pa_bluetooth_transport_state_t state);
pa_bluetooth_transport *pa_bluetooth_transport_get(pa_bluetooth_discovery *y, const char *path);
void pa_bluetooth_transport_put(pa_bluetooth_transport *t);
void pa_bluetooth_transport_unlink(pa_bluetooth_transport *t);
void pa_bluetooth_transport_free(pa_bluetooth_transport *t);
size_t pa_bluetooth_device_find_a2dp_endpoints_for_codec(const pa_bluetooth_device *device, const pa_a2dp_codec *a2dp_codec, bool is_a2dp_sink, const char **endpoints, size_t endpoints_max_count);
......
......@@ -307,7 +307,6 @@ static void rfcomm_io_callback(pa_mainloop_api *io, pa_io_event *e, int fd, pa_i
return;
fail:
pa_bluetooth_transport_unlink(t);
pa_bluetooth_transport_free(t);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment