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 697314 - gupnp_context_manager_rescan_control_points needed
gupnp_context_manager_rescan_control_points needed
Status: RESOLVED FIXED
Product: GUPnP
Classification: Other
Component: gupnp
0.20.x
Other Linux
: Normal normal
: ---
Assigned To: GUPnP Maintainers
GUPnP Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-05 08:55 UTC by Mark Ryan
Modified: 2013-04-12 11:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch proposal for this bug (2.79 KB, patch)
2013-04-08 15:56 UTC, Sébastien Bianti
none Details | Review
Version 2 (g_return_if_fail() addition) (2.87 KB, patch)
2013-04-09 07:52 UTC, Sébastien Bianti
committed Details | Review

Description Mark Ryan 2013-04-05 08:55:39 UTC
GSSDP has introduced a new rescan function that allows a rescan to be performed on a control point.  The problem is that this function is difficult for clients of GUPnP to use.  The reason is that although GUPnP clients typically create the control points themselves, they pass ownership of these objects to an instance of GUPnPContextManager who then manages the life time of these objects.  To safely implement the rescan features, clients of the current version of GUPnP need to maintain their own list of control points, which they need to update when new contexts become available and old contexts disappear.  But this is quite a lot of work and it duplicates the work already done by GUPnPContextManager.

So to summarise, implementing rescan would be much easier if there was support for rescan in the GUPnPContextManager.  So the proposal is to add a function called gupnp_context_manager_rescan_control_points.  Clients, would then only have one function to call to rescan all the networks for the control points in which they are interested.

The documentation for this function should make it clear that the method searches for new devices on existing networks and does not search for new networks.
Comment 1 Sébastien Bianti 2013-04-08 15:56:11 UTC
Created attachment 240959 [details] [review]
Patch proposal for this bug
Comment 2 Mark Ryan 2013-04-08 19:21:58 UTC
Review of attachment 240959 [details] [review]:

Hi Sebastien,

Just a quick comment.  The other public GUPnPContextManager functions have a check at the start of the function to make sure manager is not NULL, e.g.,

g_return_if_fail (GUPNP_IS_CONTEXT_MANAGER (manager));

You should probably add this check.
Comment 3 Sébastien Bianti 2013-04-09 07:52:08 UTC
Created attachment 241014 [details] [review]
Version 2 (g_return_if_fail() addition)