--- a/libpurple/Makefile.mingw Fri Apr 12 02:03:13 2013 -0400
+++ b/libpurple/Makefile.mingw Sat Apr 13 12:24:43 2013 -0400
@@ -119,6 +119,7 @@
--- a/libpurple/dnssrv.c Fri Apr 12 02:03:13 2013 -0400
+++ b/libpurple/dnssrv.c Sat Apr 13 12:24:43 2013 -0400
@@ -61,13 +61,6 @@
-static DNS_STATUS (WINAPI *MyDnsQuery_UTF8) (
- PCSTR lpstrName, WORD wType, DWORD fOptions,
- PIP4_ARRAY aipServers, PDNS_RECORD* ppQueryResultsSet,
- PVOID* pReserved) = NULL;
-static void (WINAPI *MyDnsRecordListFree) (PDNS_RECORD pRecordList,
- DNS_FREE_TYPE FreeType) = NULL;
struct _PurpleSrvTxtQueryData {
@@ -646,7 +639,7 @@
PurpleSrvTxtQueryData *query_data = data;
- ds = MyDnsQuery_UTF8(query_data->query, type, DNS_QUERY_STANDARD, NULL, &dr, NULL);
+ ds = DnsQuery_UTF8(query_data->query, type, DNS_QUERY_STANDARD, NULL, &dr, NULL); if (ds != ERROR_SUCCESS) {
gchar *msg = g_win32_error_message(ds);
if (type == DNS_TYPE_SRV) {
@@ -679,7 +672,7 @@
lst = g_list_prepend(lst, srvres);
- MyDnsRecordListFree(dr, DnsFreeRecordList);
+ DnsRecordListFree(dr, DnsFreeRecordList); query_data->results = purple_srv_sort(lst);
} else if (type == DNS_TYPE_TXT) {
@@ -707,7 +700,7 @@
lst = g_list_append(lst, txtres);
- MyDnsRecordListFree(dr, DnsFreeRecordList);
+ DnsRecordListFree(dr, DnsFreeRecordList); query_data->results = lst;
@@ -739,7 +732,6 @@
- static gboolean initialized = FALSE;
if (!protocol || !*protocol || !transport || !*transport || !domain || !*domain) {
@@ -834,21 +826,10 @@
- MyDnsQuery_UTF8 = (void*) wpurple_find_and_loadproc("dnsapi.dll", "DnsQuery_UTF8");
- MyDnsRecordListFree = (void*) wpurple_find_and_loadproc(
- "dnsapi.dll", "DnsRecordListFree");
- if (!MyDnsQuery_UTF8 || !MyDnsRecordListFree)
- query_data->error_message = g_strdup("System missing DNS API (Requires W2K+)\n");
- query_data->resolver = g_thread_create(res_thread, query_data, FALSE, &err);
- if (query_data->resolver == NULL) {
- query_data->error_message = g_strdup_printf("SRV thread create failure: %s\n", (err && err->message) ? err->message : "");
+ query_data->resolver = g_thread_create(res_thread, query_data, FALSE, &err); + if (query_data->resolver == NULL) { + query_data->error_message = g_strdup_printf("SRV thread create failure: %s\n", (err && err->message) ? err->message : ""); /* The query isn't going to happen, so finish the SRV lookup now.
@@ -875,7 +856,6 @@
- static gboolean initialized = FALSE;
proxy_type = purple_proxy_info_get_type(
@@ -965,21 +945,10 @@
- MyDnsQuery_UTF8 = (void*) wpurple_find_and_loadproc("dnsapi.dll", "DnsQuery_UTF8");
- MyDnsRecordListFree = (void*) wpurple_find_and_loadproc(
- "dnsapi.dll", "DnsRecordListFree");
- if (!MyDnsQuery_UTF8 || !MyDnsRecordListFree)
- query_data->error_message = g_strdup("System missing DNS API (Requires W2K+)\n");
- query_data->resolver = g_thread_create(res_thread, query_data, FALSE, &err);
- if (query_data->resolver == NULL) {
- query_data->error_message = g_strdup_printf("TXT thread create failure: %s\n", (err && err->message) ? err->message : "");
+ query_data->resolver = g_thread_create(res_thread, query_data, FALSE, &err); + if (query_data->resolver == NULL) { + query_data->error_message = g_strdup_printf("TXT thread create failure: %s\n", (err && err->message) ? err->message : ""); /* The query isn't going to happen, so finish the TXT lookup now.
--- a/libpurple/protocols/mxit/markup.c Fri Apr 12 02:03:13 2013 -0400
+++ b/libpurple/protocols/mxit/markup.c Sat Apr 13 12:24:43 2013 -0400
@@ -134,27 +134,26 @@
void mxit_add_html_link( struct RXMsgData* mx, const char* replydata, gboolean isStructured, const char* displaytext )
* The link content is encoded as follows:
* MXIT_LINK_KEY | ACCOUNT_USER | ACCOUNT_PROTO | REPLY_TO | REPLY_FORMAT | REPLY_DATA
- len = g_snprintf( retstr, sizeof( retstr ), "%s|%s|%s|%s|%i|%s",
+ link = g_strdup_printf( "%s|%s|%s|%s|%i|%s", purple_account_get_username( mx->session->acc ),
purple_account_get_protocol_id( mx->session->acc ),
- retstr64 = purple_base64_encode( (const unsigned char*) retstr, len );
- g_snprintf( link, sizeof( link ), "%s%s", MXIT_LINK_PREFIX, retstr64 );
+ link64 = purple_base64_encode( (const unsigned char*) link, strlen( link ) ); - g_string_append_printf( mx->msg, "<a href=\"%s\">%s</a>", link, displaytext );
+ g_string_append_printf( mx->msg, "<a href=\"%s%s\">%s</a>", MXIT_LINK_PREFIX, link64, displaytext ); g_string_append_printf( mx->msg, "<b>%s</b>", replydata );
--- a/libpurple/prpl.h Fri Apr 12 02:03:13 2013 -0400
+++ b/libpurple/prpl.h Sat Apr 13 12:24:43 2013 -0400
@@ -434,14 +434,13 @@
* the account is not connected, return -ENOTCONN. If the
* PRPL is unable to send the message for another reason, return
* some other negative value. You can use one of the valid
- * errno values, or just big something. If the message should
- * not be echoed to the conversation window, return 0.
+ * errno values, or just big something. * @param id The id of the chat to send the message to.
* @param message The message to send to the chat.
* @param flags A bitwise OR of #PurpleMessageFlags representing
- * @return A positive number or 0 in case of succes,
+ * @return A positive number or 0 in case of success, * a negative error number in case of failure.
int (*chat_send)(PurpleConnection *, int id, const char *message, PurpleMessageFlags flags);