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 770318 - various patches for connman-manager
various patches for connman-manager
Status: RESOLVED FIXED
Product: GUPnP
Classification: Other
Component: gupnp
0.20.x
Other Linux
: Normal major
: ---
Assigned To: GUPnP Maintainers
GUPnP Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-08-24 09:08 UTC by Sven Neumann
Modified: 2016-10-15 10:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
connman: delay context creation by 1000 milliseconds (3.43 KB, patch)
2016-08-24 09:09 UTC, Sven Neumann
committed Details | Review
connman-manager: Fix inverse g_strcmp0 checks (2.94 KB, patch)
2016-08-24 09:09 UTC, Sven Neumann
committed Details | Review
connman: fix a potential crash (1.80 KB, patch)
2016-08-24 09:10 UTC, Sven Neumann
committed Details | Review
connman: cancel a pending g_dbus_proxy_new_for_bus() call (2.74 KB, patch)
2016-08-24 09:11 UTC, Sven Neumann
committed Details | Review
connman: make the GetServices call cancellable (2.43 KB, patch)
2016-08-24 09:11 UTC, Sven Neumann
committed Details | Review
connman: fix a race on the DBus interface to connman (6.79 KB, patch)
2016-08-24 09:12 UTC, Sven Neumann
committed Details | Review

Description Sven Neumann 2016-08-24 09:08:11 UTC
We are using libgupnp with connman on the Raumfeld devices and we had to do some changes to get connman-manager working correctly. I am attaching the patches here for review in the hope that you will find them useful.
Comment 1 Sven Neumann 2016-08-24 09:09:28 UTC
Created attachment 334054 [details] [review]
connman: delay context creation by 1000 milliseconds
Comment 2 Sven Neumann 2016-08-24 09:09:55 UTC
Created attachment 334056 [details] [review]
connman-manager: Fix inverse g_strcmp0 checks
Comment 3 Sven Neumann 2016-08-24 09:10:53 UTC
Created attachment 334057 [details] [review]
connman: fix a potential crash
Comment 4 Sven Neumann 2016-08-24 09:11:24 UTC
Created attachment 334058 [details] [review]
connman: cancel a pending g_dbus_proxy_new_for_bus() call
Comment 5 Sven Neumann 2016-08-24 09:11:45 UTC
Created attachment 334059 [details] [review]
connman: make the GetServices call cancellable
Comment 6 Sven Neumann 2016-08-24 09:12:06 UTC
Created attachment 334060 [details] [review]
connman: fix a race on the DBus interface to connman
Comment 7 Jens Georg 2016-08-24 11:06:06 UTC
I don't expect the connman plugin to be that well-exercised, tbh. Thanks for sharing, I will have a look
Comment 8 Jens Georg 2016-08-26 21:47:36 UTC
(In reply to Sven Neumann from comment #1)
> Created attachment 334054 [details] [review] [review]
> connman: delay context creation by 1000 milliseconds

Did you already file an upstream issue for that which we can eventually link to?
Could "online" be a more appropriate state?
Comment 9 Jens Georg 2016-08-26 21:56:39 UTC
Review of attachment 334056 [details] [review]:

You can set the interface, I'm just not sure what its implications are. I think it will just be ignored.
Comment 10 Jens Georg 2016-08-26 21:57:24 UTC
Review of attachment 334057 [details] [review]:

+1
Comment 11 Jens Georg 2016-08-26 22:01:06 UTC
Review of attachment 334058 [details] [review]:

::: libgupnp/gupnp-connman-manager.c
@@ +289,3 @@
+        if (cm_service->cancellable != NULL)  {
+                g_object_unref (cm_service->cancellable);
+                cm_service->cancellable = NULL;

Can't we just unconditonally cancel the cancellable here? Would that cause an issue?

The two ifs look odd.
Comment 12 Jens Georg 2016-08-26 22:01:52 UTC
Review of attachment 334059 [details] [review]:

+1
Comment 13 Jens Georg 2016-08-26 22:05:22 UTC
Review of attachment 334060 [details] [review]:

::: libgupnp/gupnp-connman-manager.c
@@ +218,1 @@
                         g_object_set (G_OBJECT (cm_service->context),

This seems unrelated.

@@ +230,1 @@
                         service_context_delete (cm_service);

Same as above. Unrelated change

@@ +300,2 @@
+        if (cm_service->cancellable != NULL) {
+                g_cancellable_cancel (cm_service->cancellable);

Ah. That's what I was wondering about in patch 4 - can put this change in that patch?
Comment 14 Sven Neumann 2016-08-29 08:32:12 UTC
(In reply to Jens Georg from comment #8)
> (In reply to Sven Neumann from comment #1)
> > Created attachment 334054 [details] [review] [review] [review]
> > connman: delay context creation by 1000 milliseconds
> 
> Did you already file an upstream issue for that which we can eventually link
> to?
> Could "online" be a more appropriate state?

No, we didn't file an upstream issue.

"Online" would work better in most cases, but there are cases where the device has enough connectivity to do UPnP in a local network but it is still not "Online" as being "Online" means that internet services can be reached. So, I don't think that "Online" is appropriate.
Comment 15 Jens Georg 2016-08-29 09:33:11 UTC
Ah, it's that kind of online, pity. I would be feeling better to merge that work-around if we had some kind of connman ticket we could refer to
Comment 16 Jens Georg 2016-10-15 10:13:30 UTC
Attachment 334054 [details] pushed as 48ce642 - connman: delay context creation by 1000 milliseconds
Attachment 334057 [details] pushed as a1ad610 - connman: fix a potential crash
Attachment 334058 [details] pushed as 9385ccf - connman: cancel a pending g_dbus_proxy_new_for_bus() call
Attachment 334059 [details] pushed as 4a7d434 - connman: make the GetServices call cancellable
Attachment 334060 [details] pushed as a8c8de2 - connman: fix a race on the DBus interface to connman