summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2022-06-20 00:02:11 +0200
committerJens Georg <mail@jensge.org>2022-06-22 19:55:48 +0200
commit300ab20af085b992a43775f53e2cdb46c19a547f (patch)
tree0468ff4ff15a4847b2a269960ff4497ac4ae5dd0
parent40b3a09454b43ace8840bf9ca3c89a12f6433044 (diff)
downloadgupnp-300ab20af085b992a43775f53e2cdb46c19a547f.tar.gz
Connman: Pass on address family
This should enable ipv6 for connman-managed contexts Part of #10
-rw-r--r--libgupnp/gupnp-connman-manager.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/libgupnp/gupnp-connman-manager.c b/libgupnp/gupnp-connman-manager.c
index 4dbd02c..5e20bfe 100644
--- a/libgupnp/gupnp-connman-manager.c
+++ b/libgupnp/gupnp-connman-manager.c
@@ -96,8 +96,13 @@ loopback_context_create (gpointer data)
context = g_initable_new (GUPNP_TYPE_CONTEXT,
NULL,
&error,
- "interface", LOOPBACK_IFACE,
- "port", port,
+ "interface",
+ LOOPBACK_IFACE,
+ "port",
+ port,
+ "address-family",
+ gupnp_context_manager_get_socket_family (
+ GUPNP_CONTEXT_MANAGER (manager)),
NULL);
if (error != NULL) {
@@ -118,13 +123,20 @@ service_context_create (CMService *cm_service)
{
GError *error = NULL;
- cm_service->context = g_initable_new (GUPNP_TYPE_CONTEXT,
- NULL,
- &error,
- "interface", cm_service->iface,
- "network", cm_service->name,
- "port", cm_service->port,
- NULL);
+ cm_service->context = g_initable_new (
+ GUPNP_TYPE_CONTEXT,
+ NULL,
+ &error,
+ "interface",
+ cm_service->iface,
+ "network",
+ cm_service->name,
+ "port",
+ cm_service->port,
+ "address-family",
+ gupnp_context_manager_get_socket_family (
+ GUPNP_CONTEXT_MANAGER (cm_service->manager)),
+ NULL);
if (error != NULL) {
g_warning ("Error creating GUPnP context: %s", error->message);