qulogic/pidgin

Re-arrange some bits.
draft win-mdns
2021-01-07, Elliott Sales de Andrade
fe9f684ebd26
Parents a7d8e214eaf9
Children 41eb2d0c4c9a
Re-arrange some bits.
--- a/libpurple/protocols/bonjour/mdns_dnsapi.c Thu Jan 07 05:51:07 2021 -0500
+++ b/libpurple/protocols/bonjour/mdns_dnsapi.c Thu Jan 07 05:51:55 2021 -0500
@@ -56,6 +56,20 @@
g_free(data);
}
+static gchar *
+_mdns_str_to_utf8(DNS_CHARSET charset, gpointer data)
+{
+ if (charset == DnsCharSetUtf8) {
+ return g_strdup((const gchar *)data);
+ } else if (charset == DnsCharSetUnicode) {
+ return g_utf16_to_utf8((const gunichar2 *)data, -1, NULL, NULL, NULL);
+ } else if (charset == DnsCharSetAnsi) {
+ return g_locale_to_utf8((const gchar *)data, -1, NULL, NULL, NULL);
+ } else {
+ return g_strdup("unknown");
+ }
+}
+
/*
* dnsapi_mdns_publish callbacks
*/
@@ -101,20 +115,6 @@
}
static gchar *
-_mdns_str_to_utf8(DNS_CHARSET charset, gpointer data)
-{
- if (charset == DnsCharSetUtf8) {
- return g_strdup((const gchar *)data);
- } else if (charset == DnsCharSetUnicode) {
- return g_utf16_to_utf8((const gunichar2 *)data, -1, NULL, NULL, NULL);
- } else if (charset == DnsCharSetAnsi) {
- return g_locale_to_utf8((const gchar *)data, -1, NULL, NULL, NULL);
- } else {
- return g_strdup("unknown");
- }
-}
-
-static gchar *
_mdns_namehost_to_service_name(DNS_CHARSET charset, gpointer data)
{
gchar *name = _mdns_str_to_utf8(charset, data);