qulogic/pidgin

Add link local macros in windows terms.
draft win-mdns
2021-01-05, Elliott Sales de Andrade
9b049f9577a1
Parents 792aadc67525
Children f4d6dbbdc4af
Add link local macros in windows terms.
--- a/libpurple/protocols/bonjour/mdns_dnsapi.c Mon Jan 04 00:31:06 2021 -0500
+++ b/libpurple/protocols/bonjour/mdns_dnsapi.c Tue Jan 05 05:51:54 2021 -0500
@@ -155,8 +155,8 @@
/* The DNS Service API requires this to be specified as one entry,
* including the .local suffix. */
- tmp = g_strjoin(".", bonjour_get_jid(data->account),
- LINK_LOCAL_RECORD_NAME "local", NULL);
+ tmp = g_strjoin(".", bonjour_get_jid(data->account), LINK_LOCAL_DOMAIN_NAME,
+ NULL);
service_name = g_utf8_to_utf16(tmp, -1, NULL, NULL, &error);
if (error != NULL) {
purple_debug_error("bonjour",
--- a/libpurple/protocols/bonjour/mdns_types.h Mon Jan 04 00:31:06 2021 -0500
+++ b/libpurple/protocols/bonjour/mdns_types.h Tue Jan 05 05:51:54 2021 -0500
@@ -22,6 +22,11 @@
#include <purple.h>
#define LINK_LOCAL_RECORD_NAME "_presence._tcp."
+#ifdef G_OS_WIN32
+/* The Windows DNS Service API requires the local suffix as well. */
+#define LINK_LOCAL_DOMAIN_NAME "_presence._tcp.local"
+#define LINK_LOCAL_DOMAIN_NAME_W L"_presence._tcp.local"
+#endif
/**
* Data to be used by the dns-sd connection.