Mercurial > pidgin
comparison src/protocols/rendezvous/mdns_cache.c @ 8842:ad3633f92f91
[gaim-migrate @ 9609]
Just clean up one or four things.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 29 Apr 2004 02:42:31 +0000 |
parents | 01c3db200c8f |
children | e4a27c9aec4c |
comparison
equal
deleted
inserted
replaced
8841:ea2e2119b135 | 8842:ad3633f92f91 |
---|---|
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 * | 23 * |
24 */ | 24 */ |
25 | 25 |
26 #include "internal.h" | 26 #include "internal.h" |
27 #include "debug.h" | |
28 | 27 |
29 #include "mdns.h" | 28 #include "mdns.h" |
30 #include "mdns_cache.h" | 29 #include "mdns_cache.h" |
31 | 30 |
32 GSList *rrs = NULL; | 31 GSList *rrs = NULL; |
57 g_return_if_fail(rr != NULL); | 56 g_return_if_fail(rr != NULL); |
58 g_return_if_fail((rr->type != 0) && (rr->type != RENDEZVOUS_RRTYPE_ALL)); | 57 g_return_if_fail((rr->type != 0) && (rr->type != RENDEZVOUS_RRTYPE_ALL)); |
59 | 58 |
60 mdns_cache_remove(rr->name, rr->type); | 59 mdns_cache_remove(rr->name, rr->type); |
61 | 60 |
62 printf("caching %d\n", rr->type); | |
63 new = mdns_copy_rr(rr); | 61 new = mdns_copy_rr(rr); |
64 rrs = g_slist_prepend(rrs, new); | 62 rrs = g_slist_prepend(rrs, new); |
65 } | 63 } |
66 | 64 |
67 void | 65 void |
92 { | 90 { |
93 GSList *slist; | 91 GSList *slist; |
94 ResourceRecord *cur; | 92 ResourceRecord *cur; |
95 | 93 |
96 g_return_if_fail(q != NULL); | 94 g_return_if_fail(q != NULL); |
97 printf("query for q->type=%d, q->name=%s\n", q->type, q->name); | |
98 | 95 |
99 for (slist = rrs; slist != NULL; slist = slist->next) { | 96 for (slist = rrs; slist != NULL; slist = slist->next) { |
100 cur = slist->data; | 97 cur = slist->data; |
101 if (((q->type == RENDEZVOUS_RRTYPE_ALL) || (q->type == cur->type)) && (!strcmp(q->name, cur->name))) { | 98 if (((q->type == RENDEZVOUS_RRTYPE_ALL) || (q->type == cur->type)) && (!strcmp(q->name, cur->name))) { |
102 printf("responding to cur->type=%d, cur->name=%s\n", cur->type, cur->name); | |
103 mdns_send_rr(fd, cur); | 99 mdns_send_rr(fd, cur); |
104 } | 100 } |
105 } | 101 } |
106 } | 102 } |