Update of /cvsroot/gaim/gaim/src/protocols/rendezvous
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16611
Modified Files:
mdns.c mdns_cache.c rendezvous.c
Log Message:
Just clean up one or four things.
Index: mdns.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/rendezvous/mdns.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -p -r1.15 -r1.16
--- mdns.c 28 Apr 2004 04:38:12 -0000 1.15
+++ mdns.c 29 Apr 2004 02:42:30 -0000 1.16
@@ -36,6 +36,14 @@
* One Eyed Willie.
*/
+/*
+ * XXX - Store data for NULL ResourceRecords so that rr->rdata contains
+ * both the length and the data. This length will always be equal to
+ * rr->rdlength... but it fits in more with the rest of the code.
+ * rr->rdata should not need a separate length value to determine
+ * how many bytes it will take.
+ */
+
#include "internal.h"
#include "debug.h"
Index: mdns_cache.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/rendezvous/mdns_cache.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -p -r1.4 -r1.5
--- mdns_cache.c 28 Apr 2004 04:38:12 -0000 1.4
+++ mdns_cache.c 29 Apr 2004 02:42:31 -0000 1.5
@@ -24,7 +24,6 @@
*/
#include "internal.h"
-#include "debug.h"
#include "mdns.h"
#include "mdns_cache.h"
@@ -59,7 +58,6 @@ mdns_cache_add(const ResourceRecord *rr)
mdns_cache_remove(rr->name, rr->type);
- printf("caching %d\n", rr->type);
new = mdns_copy_rr(rr);
rrs = g_slist_prepend(rrs, new);
}
@@ -94,12 +92,10 @@ mdns_cache_respond(int fd, const Questio
ResourceRecord *cur;
g_return_if_fail(q != NULL);
- printf("query for q->type=%d, q->name=%s\n", q->type, q->name);
for (slist = rrs; slist != NULL; slist = slist->next) {
cur = slist->data;
if (((q->type == RENDEZVOUS_RRTYPE_ALL) || (q->type == cur->type)) && (!strcmp(q->name, cur->name))) {
- printf("responding to cur->type=%d, cur->name=%s\n", cur->type, cur->name);
mdns_send_rr(fd, cur);
}
}
Index: rendezvous.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/protocols/rendezvous/rendezvous.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -p -r1.20 -r1.21
--- rendezvous.c 28 Apr 2004 04:38:12 -0000 1.20
+++ rendezvous.c 29 Apr 2004 02:42:31 -0000 1.21
@@ -599,60 +599,7 @@ static void rendezvous_prpl_set_away(Gai
static GaimPlugin *my_protocol = NULL;
-static GaimPluginProtocolInfo prpl_info =
-{
- GAIM_PRPL_API_VERSION,
- OPT_PROTO_NO_PASSWORD | OPT_PROTO_BUDDY_ICON,
- NULL,
- NULL,
- rendezvous_prpl_list_icon,
- rendezvous_prpl_list_emblems,
- rendezvous_prpl_status_text,
- rendezvous_prpl_tooltip_text,
- NULL,
- NULL,
- NULL,
- NULL,
- rendezvous_prpl_login,
- rendezvous_prpl_close,
- rendezvous_prpl_send_im,
- NULL,
- NULL,
- NULL,
- rendezvous_prpl_set_away,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL
-};
+static GaimPluginProtocolInfo prpl_info;
static GaimPluginInfo info =
{
@@ -687,20 +634,31 @@ static void init_plugin(GaimPlugin *plug
GaimAccountOption *option;
char hostname[255];
+ prpl_info.api_version = GAIM_PRPL_API_VERSION;
+ prpl_info.options = OPT_PROTO_NO_PASSWORD | OPT_PROTO_BUDDY_ICON;
+ prpl_info.list_icon = rendezvous_prpl_list_icon;
+ prpl_info.list_emblems = rendezvous_prpl_list_emblems;
+ prpl_info.status_text = rendezvous_prpl_status_text;
+ prpl_info.tooltip_text = rendezvous_prpl_tooltip_text;
+ prpl_info.login = rendezvous_prpl_login;
+ prpl_info.close = rendezvous_prpl_close;
+ prpl_info.send_im = rendezvous_prpl_send_im;
+ prpl_info.set_away = rendezvous_prpl_set_away;
+
if (gethostname(hostname, 255) != 0) {
gaim_debug_warning("rendezvous", "Error %d when getting host name. Using \"localhost.\"\n", errno);
strcpy(hostname, "localhost");
}
/* Try to avoid making this configurable... */
- split = gaim_account_user_split_new(_("Host Name"), hostname, '@');
+ split = gaim_account_user_split_new(_("Host name"), hostname, '@');
prpl_info.user_splits = g_list_append(prpl_info.user_splits, split);
- option = gaim_account_option_string_new(_("First Name"), "first", "Gaim");
+ option = gaim_account_option_string_new(_("First name"), "first", "Gaim");
prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
option);
- option = gaim_account_option_string_new(_("Last Name"), "last", _("User"));
+ option = gaim_account_option_string_new(_("Last name"), "last", _("User"));
prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
option);
|