From fb8333c67483b5f245ab15bfd42907816d27c6fc Mon Sep 17 00:00:00 2001 From: Jorn Baayen Date: Wed, 3 Dec 2008 10:35:02 +0000 Subject: [PATCH] 2008-12-03 Jorn Baayen * tests/test-browser.c (main): * tests/test-publish.c (main): * tools/gssdp-device-sniffer.c (init_upnp): Use g_printerr() and EXIT_{SUCCESS,FAILURE}. git-svn-id: https://svn.o-hand.com/repos/gupnp/trunk/gssdp@1387 d8cb91d7-bff9-0310-92b9-80b65e4482b2 --- ChangeLog | 8 ++++++++ tests/test-browser.c | 8 +++++--- tests/test-publish.c | 8 +++++--- tools/gssdp-device-sniffer.c | 7 +++++-- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f788a1..fabe9bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2008-12-03 Jorn Baayen + * tests/test-browser.c (main): + * tests/test-publish.c (main): + * tools/gssdp-device-sniffer.c (init_upnp): + + Use g_printerr() and EXIT_{SUCCESS,FAILURE}. + +2008-12-03 Jorn Baayen + * libgssdp/gssdp-resource-group.c (message_received_cb): "All SSDP services MUST respond to SEARCH requests over the SSDP diff --git a/tests/test-browser.c b/tests/test-browser.c index adc372a..43ec48a 100644 --- a/tests/test-browser.c +++ b/tests/test-browser.c @@ -20,6 +20,7 @@ */ #include +#include static void resource_available_cb (GSSDPResourceBrowser *resource_browser, @@ -59,11 +60,12 @@ main (int argc, error = NULL; client = gssdp_client_new (NULL, &error); if (error) { - g_critical (error->message); + g_printerr ("Error creating the GSSDP client: %s\n", + error->message); g_error_free (error); - return 1; + return EXIT_FAILURE; } resource_browser = gssdp_resource_browser_new (client, @@ -87,5 +89,5 @@ main (int argc, g_object_unref (resource_browser); g_object_unref (client); - return 0; + return EXIT_SUCCESS; } diff --git a/tests/test-publish.c b/tests/test-publish.c index aebe214..fc3e13f 100644 --- a/tests/test-publish.c +++ b/tests/test-publish.c @@ -20,6 +20,7 @@ */ #include +#include int main (int argc, @@ -35,11 +36,12 @@ main (int argc, error = NULL; client = gssdp_client_new (NULL, &error); if (error) { - g_critical (error->message); + g_printerr ("Error creating the GSSDP client: %s\n", + error->message); g_error_free (error); - return 1; + return EXIT_FAILURE; } resource_group = gssdp_resource_group_new (client); @@ -59,5 +61,5 @@ main (int argc, g_object_unref (resource_group); g_object_unref (client); - return 0; + return EXIT_SUCCESS; } diff --git a/tools/gssdp-device-sniffer.c b/tools/gssdp-device-sniffer.c index 6486297..b22c93b 100644 --- a/tools/gssdp-device-sniffer.c +++ b/tools/gssdp-device-sniffer.c @@ -599,9 +599,12 @@ init_upnp (void) error = NULL; client = gssdp_client_new (NULL, &error); if (error) { - g_critical (error->message); + g_printerr ("Error creating the GSSDP client: %s\n", + error->message); + g_error_free (error); - return 1; + + return FALSE; } resource_browser = gssdp_resource_browser_new (client, -- 2.7.4