# HG changeset patch # User Daniel Atallah # Date 1136267782 0 # Node ID 4c178bccdba740ccb8f565a1a5cd4af36a994ba4 # Parent 4a93889c7593aa1d41cb81503aac01fb89f794f3 [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. diff -r 4a93889c7593 -r 4c178bccdba7 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