[glib-networking/mcatanzaro/#20: 4/6] Improve clarity of dispatch function



commit 61222d18dc0dd511c67eadf15d1927d656e53304
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Jan 26 14:34:54 2020 -0600

    Improve clarity of dispatch function
    
    It's more obvious why we need to sync if we write out the return value
    here.

 tls/base/gtlsconnection-base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tls/base/gtlsconnection-base.c b/tls/base/gtlsconnection-base.c
index b0df15e..8101fcc 100644
--- a/tls/base/gtlsconnection-base.c
+++ b/tls/base/gtlsconnection-base.c
@@ -1013,7 +1013,7 @@ tls_source_dispatch (GSource     *source,
   else
     ret = (*pollable_func) (tls_source->base, user_data);
 
-  if (ret)
+  if (ret == G_SOURCE_CONTINUE)
     tls_source_sync (tls_source);
 
   return ret;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]