[Spice-devel,08/11] server/red_worker: enable periodic network monitoring in the display channel

Submitted by Yonit Halperin on April 8, 2012, 3:43 p.m.

Details

Message ID 1333899800-1341-8-git-send-email-yhalperi@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Yonit Halperin April 8, 2012, 3:43 p.m.
Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
---
 server/red_worker.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/server/red_worker.c b/server/red_worker.c
index eec4beb..f876c15 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -9719,6 +9719,7 @@  static CommonChannelClient *common_channel_client_create(int size,
                                                          CommonChannel *common,
                                                          RedClient *client,
                                                          RedsStream *stream,
+                                                         int monitor_network,
                                                          uint32_t *common_caps,
                                                          int num_common_caps,
                                                          uint32_t *caps,
@@ -9726,7 +9727,7 @@  static CommonChannelClient *common_channel_client_create(int size,
 {
     MainChannelClient *mcc = red_client_get_main(client);
     RedChannelClient *rcc =
-        red_channel_client_create(size, &common->base, client, stream, FALSE,
+        red_channel_client_create(size, &common->base, client, stream, monitor_network,
                                   num_common_caps, common_caps, num_caps, caps);
     CommonChannelClient *common_cc = (CommonChannelClient*)rcc;
     common_cc->worker = common->worker;
@@ -9748,6 +9749,7 @@  DisplayChannelClient *display_channel_client_create(CommonChannel *common,
     DisplayChannelClient *dcc =
         (DisplayChannelClient*)common_channel_client_create(
             sizeof(DisplayChannelClient), common, client, stream,
+            TRUE,
             common_caps, num_common_caps,
             caps, num_caps);
 
@@ -9767,6 +9769,7 @@  CursorChannelClient *cursor_channel_create_rcc(CommonChannel *common,
     CursorChannelClient *ccc =
         (CursorChannelClient*)common_channel_client_create(
             sizeof(CursorChannelClient), common, client, stream,
+            FALSE,
             common_caps,
             num_common_caps,
             caps,

Comments

Maybe RedChannelClient could have a "monitor_network" member which channels
would directly set when they are created? This would avoid adding yet
another argument to these create functions.
No strong feeling either way, it's just some food for thoughts :)

Christophe

On Sun, Apr 08, 2012 at 06:43:17PM +0300, Yonit Halperin wrote:
> 
> Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
> ---
>  server/red_worker.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/server/red_worker.c b/server/red_worker.c
> index eec4beb..f876c15 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -9719,6 +9719,7 @@ static CommonChannelClient *common_channel_client_create(int size,
>                                                           CommonChannel *common,
>                                                           RedClient *client,
>                                                           RedsStream *stream,
> +                                                         int monitor_network,
>                                                           uint32_t *common_caps,
>                                                           int num_common_caps,
>                                                           uint32_t *caps,
> @@ -9726,7 +9727,7 @@ static CommonChannelClient *common_channel_client_create(int size,
>  {
>      MainChannelClient *mcc = red_client_get_main(client);
>      RedChannelClient *rcc =
> -        red_channel_client_create(size, &common->base, client, stream, FALSE,
> +        red_channel_client_create(size, &common->base, client, stream, monitor_network,
>                                    num_common_caps, common_caps, num_caps, caps);
>      CommonChannelClient *common_cc = (CommonChannelClient*)rcc;
>      common_cc->worker = common->worker;
> @@ -9748,6 +9749,7 @@ DisplayChannelClient *display_channel_client_create(CommonChannel *common,
>      DisplayChannelClient *dcc =
>          (DisplayChannelClient*)common_channel_client_create(
>              sizeof(DisplayChannelClient), common, client, stream,
> +            TRUE,
>              common_caps, num_common_caps,
>              caps, num_caps);
>  
> @@ -9767,6 +9769,7 @@ CursorChannelClient *cursor_channel_create_rcc(CommonChannel *common,
>      CursorChannelClient *ccc =
>          (CursorChannelClient*)common_channel_client_create(
>              sizeof(CursorChannelClient), common, client, stream,
> +            FALSE,
>              common_caps,
>              num_common_caps,
>              caps,
> -- 
> 1.7.7.6
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel