diff options
author | Jens Georg <mail@jensge.org> | 2016-09-30 13:43:21 +0200 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2016-10-15 21:08:10 +0200 |
commit | 997e950e592956ade2a6e9028830af358361a4c5 (patch) | |
tree | 156e8feeacfb26ef5d69a1d2f193567763dfa6c3 /examples | |
parent | 228cebc15651f9e6720dcb5271d2a5feaf8efd6e (diff) | |
download | gupnp-997e950e592956ade2a6e9028830af358361a4c5.tar.gz |
Remove deprecated functions
Signed-off-by: Jens Georg <mail@jensge.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/light-client.c | 2 | ||||
-rw-r--r-- | examples/light-server.c | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/examples/light-client.c b/examples/light-client.c index 4ef7108..82ee54c 100644 --- a/examples/light-client.c +++ b/examples/light-client.c @@ -146,7 +146,7 @@ main (int argc, char **argv) } /* Create the UPnP context */ - context = gupnp_context_new (NULL, NULL, 0, &error); + context = gupnp_context_new (NULL, 0, &error); if (error) { g_printerr ("Error creating the GUPnP context: %s\n", error->message); diff --git a/examples/light-server.c b/examples/light-server.c index 3d5f589..66f8566 100644 --- a/examples/light-server.c +++ b/examples/light-server.c @@ -149,7 +149,7 @@ main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv) } /* Create the UPnP context */ - context = gupnp_context_new (NULL, NULL, 0, &error); + context = gupnp_context_new (NULL, 0, &error); if (error) { g_printerr ("Error creating the GUPnP context: %s\n", error->message); @@ -159,7 +159,15 @@ main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv) } /* Create root device */ - dev = gupnp_root_device_new (context, "BinaryLight1.xml", "."); + dev = gupnp_root_device_new (context, "BinaryLight1.xml", ".", &error); + if (error != NULL) { + g_printerr ("Error creating the GUPnP root device: %s\n", + error->message); + + g_error_free (error); + + return EXIT_FAILURE; + } gupnp_root_device_set_available (dev, TRUE); /* Get the switch service from the root device */ @@ -171,6 +179,7 @@ main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv) return EXIT_FAILURE; } + /* Autoconnect the action and state variable handlers. This connects query_target_cb and query_status_cb to the Target and Status state variables query callbacks, and set_target_cb, get_target_cb and |