[PATCH] Don't store FreeRDP file descriptors

Kristian Høgsberg hoegsberg at gmail.com
Sun May 26 17:11:26 PDT 2013


On Sun, May 26, 2013 at 11:34:00PM +0200, Hardening wrote:
> Weston don't uses the file descriptors from FreeRDP, there's no need
> to store them.

Lookd good, committed.

Kristian

> ---
>  src/compositor-rdp.c | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
> index 514a481..1aa57ba 100644
> --- a/src/compositor-rdp.c
> +++ b/src/compositor-rdp.c
> @@ -93,12 +93,9 @@ struct rdp_output {
>  
>  struct rdp_peer_context {
>  	rdpContext _p;
> -	struct rdp_compositor *rdpCompositor;
>  
> -	/* file descriptors and associated events */
> -	int fds[MAX_FREERDP_FDS];
> +	struct rdp_compositor *rdpCompositor;
>  	struct wl_event_source *events[MAX_FREERDP_FDS];
> -
>  	RFX_CONTEXT *rfx_context;
>  	wStream *encode_stream;
>  	RFX_RECT *rfx_rects;
> @@ -599,7 +596,7 @@ rdp_peer_context_free(freerdp_peer* client, RdpPeerContext* context)
>  
>  	wl_list_remove(&context->item.link);
>  	for(i = 0; i < MAX_FREERDP_FDS; i++) {
> -		if(context->fds[i] != -1)
> +		if (context->events[i])
>  			wl_event_source_remove(context->events[i]);
>  	}
>  
> @@ -946,14 +943,11 @@ rdp_peer_init(freerdp_peer *client, struct rdp_compositor *c)
>  	for(i = 0; i < rcount; i++) {
>  		fd = (int)(long)(rfds[i]);
>  
> -		peerCtx->fds[i] = fd;
>  		peerCtx->events[i] = wl_event_loop_add_fd(loop, fd, WL_EVENT_READABLE,
>  				rdp_client_activity, client);
>  	}
> -	for( ; i < MAX_FREERDP_FDS; i++) {
> -		peerCtx->fds[i] = -1;
> +	for ( ; i < MAX_FREERDP_FDS; i++)
>  		peerCtx->events[i] = 0;
> -	}
>  
>  	wl_list_insert(&c->output->peers, &peerCtx->item.link);
>  	return 0;
> -- 
> 1.8.1.2
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list