[Spice-devel,v2,10/19] Reuse reds_core_timer_add

Submitted by Frediano Ziglio on Nov. 25, 2016, 2:52 p.m.

Details

Message ID 6deaaf27251e5f487d4144ba1076942f48e209a9.1480085518.git-series.fziglio@redhat.com
State New
Headers show
Series "Start cleaning objects on destruction" ( rev: 4 3 2 ) in Spice

Not browsing as part of any series.

Commit Message

Frediano Ziglio Nov. 25, 2016, 2:52 p.m.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
 server/main-channel-client.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/server/main-channel-client.c b/server/main-channel-client.c
index 987f260..576b31f 100644
--- a/server/main-channel-client.c
+++ b/server/main-channel-client.c
@@ -174,9 +174,7 @@  static void main_channel_client_constructed(GObject *object)
     RedsState *reds =
         red_channel_get_server(red_channel_client_get_channel(RED_CHANNEL_CLIENT(object)));
 
-    self->priv->ping_timer =
-        reds_get_core_interface(reds)->timer_add(reds_get_core_interface(reds),
-                                                 ping_timer_cb, self);
+    self->priv->ping_timer = reds_core_timer_add(reds, ping_timer_cb, self);
     if (!self->priv->ping_timer) {
         spice_error("ping timer create failed");
     }

Comments

On Fri, 2016-11-25 at 14:52 +0000, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
> ---
>  server/main-channel-client.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/server/main-channel-client.c b/server/main-channel-
> client.c
> index 987f260..576b31f 100644
> --- a/server/main-channel-client.c
> +++ b/server/main-channel-client.c
> @@ -174,9 +174,7 @@ static void
> main_channel_client_constructed(GObject *object)
>      RedsState *reds =
>          red_channel_get_server(red_channel_client_get_channel(RED_C
> HANNEL_CLIENT(object)));
>  
> -    self->priv->ping_timer =
> -        reds_get_core_interface(reds)-
> >timer_add(reds_get_core_interface(reds),
> -                                                 ping_timer_cb,
> self);
> +    self->priv->ping_timer = reds_core_timer_add(reds,
> ping_timer_cb, self);
>      if (!self->priv->ping_timer) {
>          spice_error("ping timer create failed");
>      }