diff libpurple/dnssrv.c @ 29693:7925bb7f2aa7

propagate from branch 'im.pidgin.pidgin' (head 92e101e3698042e7600729bc09dec9e28f81de8f) to branch 'im.pidgin.cpw.attention_ui' (head 563c35d20efcc234a74567ebb88c059d10ce1e09)
author Marcus Lundblad <ml@update.uu.se>
date Mon, 24 Aug 2009 19:23:56 +0000
parents bbb9e0ea67fe
children 3397fb5f89cf 4e13885b1a6a
line wrap: on
line diff
--- a/libpurple/dnssrv.c	Thu Aug 13 17:42:44 2009 +0000
+++ b/libpurple/dnssrv.c	Mon Aug 24 19:23:56 2009 +0000
@@ -465,9 +465,16 @@
 {
 	PurpleSrvResponse *srvres = NULL;
 	PurpleSrvQueryData *query_data = data;
-	if(query_data->error_message != NULL)
+	if(query_data->error_message != NULL) {
 		purple_debug_error("dnssrv", query_data->error_message);
-	else {
+		if (query_data->type == DNS_TYPE_SRV) {
+			if (query_data->cb.srv)
+				query_data->cb.srv(srvres, 0, query_data->extradata);
+		} else if (query_data->type == DNS_TYPE_TXT) {
+			if (query_data->cb.txt)
+				query_data->cb.txt(NULL, query_data->extradata);
+		}
+	} else {
 		if (query_data->type == DNS_TYPE_SRV) {
 			PurpleSrvResponse *srvres_tmp = NULL;
 			GList *lst = query_data->results;