[farsight2/master] Remove bare test
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:24:46 PST 2008
---
Makefile | 6 +---
test-bare.c | 68 -----------------------------------------------------------
2 files changed, 2 insertions(+), 72 deletions(-)
delete mode 100644 test-bare.c
diff --git a/Makefile b/Makefile
index 0f88254..f4486d5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,15 @@
-all: test-bare test
+all: test
CFLAGS = -g -Wextra -Wall -Wno-unused-parameter -Wno-missing-field-initializers `pkg-config --cflags gupnp-1.0`
LDFLAGS = `pkg-config --libs gupnp-1.0`
-test-bare: test-bare.o
-
fs-upnp-simple-igd.o: fs-upnp-simple-igd-marshal.h fs-upnp-simple-igd.c fs-upnp-simple-igd.h
test: fs-upnp-simple-igd-marshal.o fs-upnp-simple-igd.o test.o
clean:
- rm -f *.o test test-bare *.list
+ rm -f *.o test *.list
SOURCES = fs-upnp-simple-igd.c
srcdir = .
diff --git a/test-bare.c b/test-bare.c
deleted file mode 100644
index becaf54..0000000
--- a/test-bare.c
+++ /dev/null
@@ -1,68 +0,0 @@
-
-#include <libgupnp/gupnp-control-point.h>
-#include <glib.h>
-
-
-static void
-service_proxy_avail (GUPnPControlPoint *control_point,
- GUPnPServiceProxy *proxy,
- gpointer user_data)
-{
- GError *error = NULL;
- gchar *ip = NULL;
-
- g_debug ("Serv type: %s",
- gupnp_service_info_get_service_type (GUPNP_SERVICE_INFO (proxy)));
-
- if (gupnp_service_proxy_send_action (proxy, "GetExternalIPAddress",
- &error,
- NULL,
- "NewExternalIPAddress", G_TYPE_STRING, &ip, NULL))
- {
- g_debug ("Got ip %s", ip);
- }
- else
- {
- g_warning ("got Error: %s", error->message);
- }
- g_clear_error (&error);
-}
-
-int
-main (int argc, char **argv)
-{
- GError *error = NULL;
- GUPnPContext *context;
- GUPnPControlPoint *cp;
- GMainLoop *loop;
-
- g_type_init ();
- g_thread_init (NULL);
-
- loop = g_main_loop_new (NULL, FALSE);
-
- context = gupnp_context_new (NULL, NULL, 0, &error);
- if (error) {
- g_critical (error->message);
- g_error_free (error);
-
- return 1;
- }
-
- cp = gupnp_control_point_new (context, "urn:schemas-upnp-org:service:WANIPConnection:1");
-
-
- g_signal_connect (cp, "service-proxy-available",
- G_CALLBACK (service_proxy_avail), NULL);
-
- gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE);
-
- g_main_loop_run (loop);
-
-
- g_object_unref (cp);
- g_object_unref (context);
- g_object_unref (loop);
-
- return 0;
-}
--
1.5.6.5
More information about the farsight-commits
mailing list