Re: [PATCH 2/3] android/avdtp: Retry send on EAGAIN as well

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Szymon,

On Sat, Jan 25, 2014 at 12:16 AM, Szymon Janc <szymon.janc@xxxxxxxxx> wrote:
> Hi Andrei,
>
> On Friday 24 January 2014 16:56:42 Andrei Emeltchenko wrote:
>> From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>
>>
>> ---
>>  android/avdtp.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/android/avdtp.c b/android/avdtp.c
>> index 5da1206..1055bc1 100644
>> --- a/android/avdtp.c
>> +++ b/android/avdtp.c
>> @@ -444,7 +444,7 @@ static gboolean try_send(int sk, void *data, size_t len)
>>
>>       do {
>>               err = send(sk, data, len, 0);
>> -     } while (err < 0 && errno == EINTR);
>> +     } while (err < 0 && (errno == EINTR || errno == EAGAIN));
>>
>
> This makes try_send() blocking, if this is ok then at least some explanation
> in commit message would be welcome.

And if we want to block we should not set the socket as non-blocking
in first place, Im not even sure this is easy to currently reproduce
any case that would block since the command are quite small we would
have to schedule several in a sequence but normally we can only have
one command outstanding.


-- 
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux