diff src/protocols/simple/srvresolve.c @ 11189:5f79dfde334c

[gaim-migrate @ 13307] added UDP transport for SIP/SIMPLE committer: Tailor Script <tailor@pidgin.im>
author Thomas Butter <tbutter>
date Thu, 04 Aug 2005 09:10:11 +0000
parents e5bbe5070e04
children b073da869a55
line wrap: on
line diff
--- a/src/protocols/simple/srvresolve.c	Thu Aug 04 01:08:01 2005 +0000
+++ b/src/protocols/simple/srvresolve.c	Thu Aug 04 09:10:11 2005 +0000
@@ -27,7 +27,7 @@
 	u_char buf[1024];
 } queryans;
 
-struct getserver_return *getserver(const char *domain) {
+struct getserver_return *getserver(const char *domain, const char *srv) {
 	static struct getserver_return ret;
 	queryans answer;
 	int size;
@@ -40,9 +40,8 @@
 	int bestport = 5060;
 	int bestpri=99999;
 	int type, dlen, pref, weight, port;
-	gchar *query = g_strdup_printf("_sip._tcp.%s",domain);
+	gchar *query = g_strdup_printf("%s.%s",srv,domain);
 
-	gaim_debug_info("simple","searching for %s\r\n",domain);
 	
 	size = res_query( query, C_IN, T_SRV, (u_char*)&answer, sizeof( answer));
 
@@ -51,7 +50,6 @@
 	qdcount = ntohs(answer.hdr.qdcount);
 	ancount = ntohs(answer.hdr.ancount);
 
-        gaim_debug_info("simple","ancount %d\r\n",ancount);
 	
 	cp = (char*)&answer + sizeof(HEADER);
 	end = (char*)&answer + size;