# HG changeset patch # User Daniel Atallah # Date 1136267782 0 # Node ID 4e1d44bad3c430218b60688def313753a02a37fc # Parent d03afaccd41ca793014e59d95ce58906eff14847 [gaim-migrate @ 15034] Using g_thread_exit() instead of simply returning at the bottom of the thread function seems to prevent some weird crashes. Also, display the error message for SRV lookup failures instead of just the error code. committer: Tailor Script diff -r d03afaccd41c -r 4e1d44bad3c4 src/dnssrv.c --- a/src/dnssrv.c Tue Jan 03 05:23:01 2006 +0000 +++ b/src/dnssrv.c Tue Jan 03 05:56:22 2006 +0000 @@ -234,7 +234,9 @@ ds = MyDnsQuery_UTF8(rdata->query, type, DNS_QUERY_STANDARD, NULL, &dr, NULL); if (ds != ERROR_SUCCESS) { - rdata->errmsg = g_strdup_printf("Couldn't look up SRV record. Error = %d\n", (int) ds); + gchar *msg = g_win32_error_message(ds); + rdata->errmsg = g_strdup_printf("Couldn't look up SRV record. %s (%lu).\n", msg, ds); + g_free(msg); } else { PDNS_RECORD dr_tmp; GSList *lst = NULL; @@ -265,7 +267,8 @@ /* back to main thread */ g_idle_add(res_main_thread_cb, rdata); - return 0; + g_thread_exit(NULL); + return NULL; } #endif