diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-05-03 23:23:51 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-05-03 23:23:51 +0000 |
commit | 96c58e8ba51d67d1d90660ba8ff4f597c03688fe (patch) | |
tree | 6afa48c2f95543fbb2a8cf87248599c3e36e5c2d /rr.c | |
parent | b8c78f5c0da93d92aa28d3ef3757e78d03141f41 (diff) |
* decrease verbosity of debug messages
* fix probe tie break
* fix lexicographical compare function for records
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@38 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'rr.c')
-rw-r--r-- | rr.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -456,6 +456,14 @@ gint flx_record_lexicographical_compare(flxRecord *a, flxRecord *b) { g_assert(a); g_assert(b); +/* gchar *t; */ + +/* g_message("comparing [%s]", t = flx_record_to_string(a)); */ +/* g_free(t); */ + +/* g_message("and [%s]", t = flx_record_to_string(b)); */ +/* g_free(t); */ + if (a->key->class < b->key->class) return -1; else if (a->key->class > b->key->class) @@ -474,9 +482,9 @@ gint flx_record_lexicographical_compare(flxRecord *a, flxRecord *b) { case FLX_DNS_TYPE_SRV: { gint r; - if ((r = uint16_cmp(a->data.srv.priority, b->data.srv.priority)) != 0 || - (r = uint16_cmp(a->data.srv.weight, b->data.srv.weight)) != 0 || - (r = uint16_cmp(a->data.srv.port, b->data.srv.port)) != 0) + if ((r = uint16_cmp(a->data.srv.priority, b->data.srv.priority)) == 0 && + (r = uint16_cmp(a->data.srv.weight, b->data.srv.weight)) == 0 && + (r = uint16_cmp(a->data.srv.port, b->data.srv.port)) == 0) r = lexicographical_domain_cmp(a->data.srv.name, b->data.srv.name); return r; |