[gupnp] Service: Signal action_invoked if vfunc exists



commit c85b5f05d5f7f1b5555bc16950d552e8e2155ec4
Author: Jens Georg <mail jensge org>
Date:   Mon Jan 3 19:51:32 2022 +0100

    Service: Signal action_invoked if vfunc exists
    
    This allows for consumers to implement custom dispatchers inside the
    vfunc (e.g. in GI languages)
    
    Fixes #61

 libgupnp/gupnp-service.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/libgupnp/gupnp-service.c b/libgupnp/gupnp-service.c
index f86f6af..c740f2d 100644
--- a/libgupnp/gupnp-service.c
+++ b/libgupnp/gupnp-service.c
@@ -484,7 +484,8 @@ control_server_handler (SoupServer *server,
                 GQuark action_name_quark;
 
                 action_name_quark = g_quark_from_string (action_name);
-                if (g_signal_has_handler_pending (service,
+                if (GUPNP_SERVICE_GET_CLASS (service)->action_invoked != NULL ||
+                    g_signal_has_handler_pending (service,
                                                   signals[ACTION_INVOKED],
                                                   action_name_quark,
                                                   FALSE)) {


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