Skip to content

Commit

Permalink
Fix state overwrite
Browse files Browse the repository at this point in the history
In very rare circumstances, the signal from the bluez comes before
the message sending function (acquire A2DP transport) returns. In
this function we ware setting transport state. However, the state
might have been already updated by the mentioned bluez signal.
  • Loading branch information
arkq committed Dec 7, 2016
1 parent 2dffa9c commit d91ec18
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,6 @@ int transport_acquire_bt_a2dp(struct ba_transport *t) {
fd_list = g_dbus_message_get_unix_fd_list(rep);
t->bt_fd = g_unix_fd_list_get(fd_list, 0, &err);
t->release = transport_release_bt_a2dp;
t->state = TRANSPORT_PENDING;

debug("New transport: %d (MTU: R:%zu W:%zu)", t->bt_fd, t->mtu_read, t->mtu_write);

Expand Down

0 comments on commit d91ec18

Please sign in to comment.