[PATCH] Flush the connection if we have to many marshaled fds
Ander Conselvan de Oliveira
conselvan2 at gmail.com
Fri Mar 9 02:56:04 PST 2012
On 03/09/2012 12:38 PM, Ander Conselvan de Oliveira wrote:
> On 03/09/2012 11:41 AM, Pekka Paalanen wrote:
>> On Fri, 9 Mar 2012 11:18:49 +0200
>> Ander Conselvan de Oliveira<ander.conselvan.de.oliveira at intel.com>
>> wrote:
[...]
>>> @@ -389,6 +393,18 @@ wl_message_size_extra(const struct wl_message
>>> *message)
>>> return extra;
>>> }
>>>
>>> +static void
>>> +wl_connection_put_fd(struct wl_connection *connection, int32_t fd)
>>> +{
>>> + if (connection->n_fds_out + 1> MAX_FDS_OUT) {
>>> + wl_connection_data(connection, WL_CONNECTION_WRITABLE);
>>
>> You are not testing the return value of wl_connection_data(). What are
>> the implications if it fails? Shouldn't the failure be returned back up
>> in the call chain, and be dealt with, like in
>> http://cgit.freedesktop.org/wayland/wayland/commit/?id=b26774da5b907a71aa7c72ee1feb6dcde92b9fcb
>>
>
> True. We should abort the client then. I'm just no sure what to set
> errno to in wl_connection_vmarshal.
Actually wl_connection_data should set the appropriate errno (and it
does, through sendmsg). Fixed this in v2.
Cheers,
Ander
More information about the wayland-devel
mailing list