mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2025-01-08 12:33:40 +08:00
Set GError properly if listen() fails
This commit is contained in:
parent
6272788e30
commit
ff7518eaa5
@ -1126,7 +1126,7 @@ GIOChannel *bt_io_listen(BtIOType type, BtIOConnect connect,
|
||||
sizeof(opts.defer));
|
||||
|
||||
if (listen(sock, 5) < 0) {
|
||||
error("listen: %s (%d)", strerror(errno), errno);
|
||||
ERROR_FAILED(err, "listen", errno);
|
||||
g_io_channel_unref(io);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user