GNOME Bugzilla – Bug 729827
GUPnPService's "action-invoked" signal won't be emitted without an action name
Last modified: 2014-05-10 16:39:23 UTC
According to the documentation: There are two approaches that clients can take to handle these signals. They can either connect a single handler to “action-invoked” or “query-variable” and examine the arguments to decide what action to take. Alternatively, handlers can be targetted at specific actions or variables by using the signal detail when connecting. https://developer.gnome.org/gupnp/unstable/server-tutorial.html This is incorrect. If you just connect with "action-invoked", it will never be called, due to this code: if (g_signal_has_handler_pending (service, signals[ACTION_INVOKED], action_name_quark, TRUE)) { /* Emit signal. Handler parses request and fills in * response. */ g_signal_emit (service, signals[ACTION_INVOKED], action_name_quark, action); } else { /* No handlers attached. */ gupnp_service_action_return_error (action, 401, "Invalid Action"); } This requires that you listen for "action-invoked:YourActionName". Either this check should be removed, or the documentation should be fixed.
Created attachment 276277 [details] [review] doc: Remove reference to general signal handling Signed-off-by: Jens Georg <mail@jensge.org>
Attachment 276277 [details] pushed as fde1264 - doc: Remove reference to general signal handling