diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-08-05 18:59:21 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-08-05 18:59:21 +0000 |
commit | 0632e854728e8e64552ae08f90852d4a2658539e (patch) | |
tree | 0fab7d52e01da7ab9b81b8409dcf70cceb7d2852 /avahi-core/browse.c | |
parent | d76069e946b4e89c828c96340677e40f583080c9 (diff) |
* add proper error codes and patch everything to make use of it
* parameter validity checkin in all user visible functions of libavahi-core
* two new python tools/examples avahi-resolve-host-name and avahi-resolve-address
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@238 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core/browse.c')
-rw-r--r-- | avahi-core/browse.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/avahi-core/browse.c b/avahi-core/browse.c index 5f4d216..5885cb4 100644 --- a/avahi-core/browse.c +++ b/avahi-core/browse.c @@ -124,7 +124,15 @@ AvahiRecordBrowser *avahi_record_browser_new(AvahiServer *server, AvahiIfIndex i g_assert(key); g_assert(callback); - g_assert(!avahi_key_is_pattern(key)); + if (avahi_key_is_pattern(key)) { + avahi_server_set_errno(server, AVAHI_ERR_IS_PATTERN); + return NULL; + } + + if (!avahi_key_valid(key)) { + avahi_server_set_errno(server, AVAHI_ERR_INVALID_KEY); + return NULL; + } b = g_new(AvahiRecordBrowser, 1); b->dead = FALSE; |