Mercurial > pidgin.yaz
comparison libpurple/dnssrv.c @ 26828:934bc523239f
merge of '2448add898018349b64e4eb5550adb03644790db'
and '8ecad8981a627be745b45a1cd8e5e545f31d1395'
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Tue, 28 Apr 2009 23:03:57 +0000 |
parents | e5c874075b42 |
children | 7b0231e5c818 |
comparison
equal
deleted
inserted
replaced
26825:f1b92f2ea41f | 26828:934bc523239f |
---|---|
289 | 289 |
290 static gboolean | 290 static gboolean |
291 res_main_thread_cb(gpointer data) | 291 res_main_thread_cb(gpointer data) |
292 { | 292 { |
293 PurpleSrvResponse *srvres = NULL; | 293 PurpleSrvResponse *srvres = NULL; |
294 PurpleTxtResponse *txtres = NULL; | |
295 int size = 0; | 294 int size = 0; |
296 PurpleSrvQueryData *query_data = data; | 295 PurpleSrvQueryData *query_data = data; |
297 if(query_data->error_message != NULL) | 296 if(query_data->error_message != NULL) |
298 purple_debug_error("dnssrv", query_data->error_message); | 297 purple_debug_error("dnssrv", query_data->error_message); |
299 else { | 298 else { |
300 if (query_data->type == T_SRV) { | 299 if (query_data->type == DNS_TYPE_SRV) { |
301 PurpleSrvResponse *srvres_tmp = NULL; | 300 PurpleSrvResponse *srvres_tmp = NULL; |
302 GSList *lst = query_data->results; | 301 GSList *lst = query_data->results; |
303 | 302 |
304 size = g_slist_length(lst); | 303 size = g_slist_length(lst); |
305 | 304 |
315 query_data->results = NULL; | 314 query_data->results = NULL; |
316 | 315 |
317 purple_debug_info("dnssrv", "found %d SRV entries\n", size); | 316 purple_debug_info("dnssrv", "found %d SRV entries\n", size); |
318 | 317 |
319 if(query_data->cb.srv) query_data->cb.srv(srvres, size, query_data->extradata); | 318 if(query_data->cb.srv) query_data->cb.srv(srvres, size, query_data->extradata); |
320 } else if (query_data->type == T_TXT) { | 319 } else if (query_data->type == DNS_TYPE_TXT) { |
321 PurpleTxtResponse *txtres_tmp = NULL; | |
322 GSList *lst = query_data->results; | 320 GSList *lst = query_data->results; |
323 | 321 |
324 purple_debug_info("dnssrv", "found %d TXT entries\n", g_slist_length(lst)); | 322 purple_debug_info("dnssrv", "found %d TXT entries\n", g_slist_length(lst)); |
325 | 323 |
326 if (query_data->cb.txt) { | 324 if (query_data->cb.txt) { |
429 PurpleSrvQueryData * | 427 PurpleSrvQueryData * |
430 purple_srv_resolve(const char *protocol, const char *transport, const char *domain, PurpleSrvCallback cb, gpointer extradata) | 428 purple_srv_resolve(const char *protocol, const char *transport, const char *domain, PurpleSrvCallback cb, gpointer extradata) |
431 { | 429 { |
432 char *query; | 430 char *query; |
433 PurpleSrvQueryData *query_data; | 431 PurpleSrvQueryData *query_data; |
432 #ifndef _WIN32 | |
434 PurpleSrvInternalQuery internal_query; | 433 PurpleSrvInternalQuery internal_query; |
435 #ifndef _WIN32 | |
436 int in[2], out[2]; | 434 int in[2], out[2]; |
437 int pid; | 435 int pid; |
438 #else | 436 #else |
439 GError* err = NULL; | 437 GError* err = NULL; |
440 static gboolean initialized = FALSE; | 438 static gboolean initialized = FALSE; |
534 | 532 |
535 PurpleSrvQueryData *purple_txt_resolve(const char *owner, const char *domain, PurpleTxtCallback cb, gpointer extradata) | 533 PurpleSrvQueryData *purple_txt_resolve(const char *owner, const char *domain, PurpleTxtCallback cb, gpointer extradata) |
536 { | 534 { |
537 char *query; | 535 char *query; |
538 PurpleSrvQueryData *query_data; | 536 PurpleSrvQueryData *query_data; |
537 #ifndef _WIN32 | |
539 PurpleSrvInternalQuery internal_query; | 538 PurpleSrvInternalQuery internal_query; |
540 #ifndef _WIN32 | |
541 int in[2], out[2]; | 539 int in[2], out[2]; |
542 int pid; | 540 int pid; |
543 #else | 541 #else |
544 GError* err = NULL; | 542 GError* err = NULL; |
545 static gboolean initialized = FALSE; | 543 static gboolean initialized = FALSE; |