summaryrefslogtreecommitdiffstats
path: root/avahi-client/client-test.c
diff options
context:
space:
mode:
authorTrent Lloyd <lathiat@bur.st>2005-08-14 11:50:14 +0000
committerTrent Lloyd <lathiat@bur.st>2005-08-14 11:50:14 +0000
commit77dc1cb05c8e6d23bd9cea37d4b4644cd76f0f82 (patch)
tree743b42076493817410f269be4b7c200be2ed27d8 /avahi-client/client-test.c
parent57d08e039be49ef979c49925521e98a7dbcf09b1 (diff)
* Implement free functions for the various browsers in the C api
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@319 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-client/client-test.c')
-rw-r--r--avahi-client/client-test.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/avahi-client/client-test.c b/avahi-client/client-test.c
index cd30b48..3dab390 100644
--- a/avahi-client/client-test.c
+++ b/avahi-client/client-test.c
@@ -57,6 +57,16 @@ avahi_service_type_browser_callback (AvahiServiceTypeBrowser *b, AvahiIfIndex in
{
printf ("XXX: Callback on %s, interface (%d), protocol (%d), event (%d), type (%s), domain (%s), data (%s)\n", avahi_service_type_browser_path (b), interface, protocol, event, type, domain, (char*)user_data);
}
+
+gboolean
+test_free (gpointer data)
+{
+ printf ("XXX: freeing\n");
+ AvahiServiceBrowser *b = data;
+ avahi_service_browser_free (b);
+ return FALSE;
+}
+
int
main (int argc, char *argv[])
{
@@ -124,6 +134,8 @@ main (int argc, char *argv[])
else
printf ("Sucessfully created service browser, path %s\n", avahi_service_browser_path (sb));
+ g_timeout_add (2000, test_free, sb);
+
g_main_loop_run (loop);
g_free (avahi);