After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 729827 - GUPnPService's "action-invoked" signal won't be emitted without an action name
GUPnPService's "action-invoked" signal won't be emitted without an action name
Status: RESOLVED FIXED
Product: GUPnP
Classification: Other
Component: gupnp
unspecified
Other All
: Normal normal
: ---
Assigned To: GUPnP Maintainers
GUPnP Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-08 18:05 UTC by Brendan Long
Modified: 2014-05-10 16:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
doc: Remove reference to general signal handling (1.66 KB, patch)
2014-05-10 12:05 UTC, Jens Georg
committed Details | Review

Description Brendan Long 2014-05-08 18:05:03 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.
Comment 1 Jens Georg 2014-05-10 12:05:47 UTC
Created attachment 276277 [details] [review]
doc: Remove reference to general signal handling

Signed-off-by: Jens Georg <mail@jensge.org>
Comment 2 Jens Georg 2014-05-10 16:39:18 UTC
Attachment 276277 [details] pushed as fde1264 - doc: Remove reference to general signal handling