[Spice-devel] [PATCH spice-server 03/10] main-dispatcher: Remove main_dispatcher_self_handle_channel_event

Frediano Ziglio fziglio at redhat.com
Wed Mar 20 16:59:41 UTC 2019


> 
> That's a weird function, but seems rather unrelated to the current
> series.
> 

Agreed, was on the "dispatcher" line of change. Maybe the title should be

"main-dispatcher: Inline main_dispatcher_self_handle_channel_event"

(Inline instead of Remove) ?

> Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
> 
> 
> On Wed, 2019-03-20 at 09:59 +0000, Frediano Ziglio wrote:
> > Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> > ---
> >  server/main-dispatcher.c | 13 ++-----------
> >  1 file changed, 2 insertions(+), 11 deletions(-)
> > 
> > diff --git a/server/main-dispatcher.c b/server/main-dispatcher.c
> > index 82b25e6e..0dcfb2d4 100644
> > --- a/server/main-dispatcher.c
> > +++ b/server/main-dispatcher.c
> > @@ -149,22 +149,13 @@ typedef struct
> > MainDispatcherClientDisconnectMessage {
> >  } MainDispatcherClientDisconnectMessage;
> >  
> >  /* channel_event - calls core->channel_event, must be done in main
> > thread */
> > -static void main_dispatcher_self_handle_channel_event(MainDispatcher
> > *self,
> > -                                                      int event,
> > -                                                      SpiceChannelEv
> > entInfo *info)
> > -{
> > -    reds_handle_channel_event(self->priv->reds, event, info);
> > -}
> > -
> >  static void main_dispatcher_handle_channel_event(void *opaque,
> >                                                   void *payload)
> >  {
> >      MainDispatcher *self = opaque;
> >      MainDispatcherChannelEventMessage *channel_event = payload;
> >  
> > -    main_dispatcher_self_handle_channel_event(self,
> > -                                              channel_event->event,
> > -                                              channel_event->info);
> > +    reds_handle_channel_event(self->priv->reds, channel_event-
> > >event, channel_event->info);
> >  }
> >  
> >  void main_dispatcher_channel_event(MainDispatcher *self, int event,
> > SpiceChannelEventInfo *info)
> > @@ -172,7 +163,7 @@ void main_dispatcher_channel_event(MainDispatcher
> > *self, int event, SpiceChannel
> >      MainDispatcherChannelEventMessage msg = {0,};
> >  
> >      if (pthread_self() ==
> > dispatcher_get_thread_id(DISPATCHER(self))) {
> > -        main_dispatcher_self_handle_channel_event(self, event,
> > info);
> > +        reds_handle_channel_event(self->priv->reds, event, info);
> >          return;
> >      }
> >      msg.event = event;
> 
> 


More information about the Spice-devel mailing list