mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 00:04:29 +08:00
client/player: Fix printing errors when transport->filename is not set
If transport->filename is not set don't attempt to write to the transport->fd.
This commit is contained in:
parent
025f07ec0d
commit
957c956112
@ -4575,10 +4575,10 @@ static bool transport_recv(struct io *io, void *user_data)
|
||||
|
||||
transport->seq++;
|
||||
|
||||
if (transport->fd >= 0) {
|
||||
if (transport->filename) {
|
||||
len = write(transport->fd, buf, ret);
|
||||
if (len < 0)
|
||||
bt_shell_printf("Unable to write: %s (%d)",
|
||||
bt_shell_printf("Unable to write: %s (%d)\n",
|
||||
strerror(errno), -errno);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user