soc.2008.xmpp: 35cdb6d6: * fixing some bugs, finishing support fo...
tfar at soc.pidgin.im
tfar at soc.pidgin.im
Sun Aug 3 14:10:43 EDT 2008
-----------------------------------------------------------------
Revision: 35cdb6d64c4b40a8a00890be3a7a32c87d33ff53
Ancestor: 9cf6d941dfaf222f10ca387fcbaffb5ae64ffc51
Author: tfar at soc.pidgin.im
Date: 2008-08-01T22:37:51
Branch: im.pidgin.soc.2008.xmpp
URL: http://d.pidgin.im/viewmtn/revision/info/35cdb6d64c4b40a8a00890be3a7a32c87d33ff53
Modified files:
libpurple/dnssrv.c
ChangeLog:
* fixing some bugs, finishing support for TXT queries
-------------- next part --------------
============================================================
--- libpurple/dnssrv.c 66f5ce2fd2d38264183207efe5cf5a0102a1b61a
+++ libpurple/dnssrv.c a90ec59807cfb4c03e43c5d0d64f341ef0211e51
@@ -198,7 +198,7 @@ end:
end:
size = g_list_length(ret);
write(out, &(query.type), sizeof(query.type));
- write(out, &size, sizeof(int));
+ write(out, &size, sizeof(size));
while (ret != NULL)
{
if (query.type == T_SRV) write(out, ret->data, sizeof(PurpleSrvResponse));
@@ -223,7 +223,6 @@ resolved(gpointer data, gint source, Pur
int status;
if (read(source, &type, sizeof(type)) == sizeof(type)) {
- purple_debug_info("dnssrv","type: %d\n", type);
if (type == T_SRV) {
PurpleSrvResponse *res;
PurpleSrvResponse *tmp;
@@ -511,6 +510,7 @@ PurpleSrvQueryData *purple_txt_resolve(c
{
char *query;
PurpleSrvQueryData *query_data;
+ PurpleSrvInternalQuery internal_query;
#ifndef _WIN32
int in[2], out[2];
int pid;
@@ -552,7 +552,10 @@ PurpleSrvQueryData *purple_txt_resolve(c
close(out[1]);
close(in[0]);
- if (write(in[1], query, strlen(query)+1) < 0)
+ internal_query.type = T_TXT;
+ strncpy(internal_query.query, query, 255);
+
+ if (write(in[1], &internal_query, sizeof(internal_query)) < 0)
purple_debug_error("dnssrv", "Could not write to TXT resolver\n");
query_data = g_new0(PurpleSrvQueryData, 1);
More information about the Commits
mailing list