Remove include to complete 5a17be4e
[claws.git] / src / plugins / libravatar / libravatar_federation.c
index 106fdfbad830c0c5b204bfa19b3f43d71fd4a791..18cc36fd7afadecaa8712f8c62c456f17952309f 100644 (file)
@@ -20,8 +20,8 @@
 #include <stdio.h>
 
 #include "libravatar_federation.h"
-#include "libravatar_prefs.h"
 #include "utils.h"
+#include "gtkutils.h"
 
 #define MISSING "x"
 
@@ -105,20 +105,20 @@ gchar *federated_url_for_address(const gchar *address)
        if (url != NULL) {
                g_free(addr);
                if (!strcmp(url, MISSING)) {
-                       return g_strdup(libravatarprefs.base_url);
+                       return NULL;
                }
                return g_strdup(url);
        }
 
        /* not cached, try secure service first */
-       if (auto_configure_service("avatars-sec", domain, &host, &port)) {
+       if (auto_configure_service_sync("avatars-sec", domain, &host, &port)) {
                if (port != 443) {
                        url = g_strdup_printf("https://%s:%d/avatar", host, port);
                } else {
                        url = g_strdup_printf("https://%s/avatar", host);
                }
        } else { /* try standard one if no secure service available */
-               if (auto_configure_service("avatars", domain, &host, &port)) {
+               if (auto_configure_service_sync("avatars", domain, &host, &port)) {
                        if (port != 80) {
                                url = g_strdup_printf("http://%s:%d/avatar", host, port);
                        } else {