[glib-networking/mcatanzaro/#20: 5/8] Improve clarity of dispatch function




commit e21323cd6b7cfb7859df1bd89209e6e0522cc0ea
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 d77cdf5..eee70cb 100644
--- a/tls/base/gtlsconnection-base.c
+++ b/tls/base/gtlsconnection-base.c
@@ -1019,7 +1019,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]