SA plugin: better way to make sure Unix sockets are not used in Windows,
[claws.git] / src / plugins / spamassassin / spamassassin.c
index 5df6de1c588b45c5a208344af8ba81d5554896dd..f01bd92b2f8e728940a0677b05548c4ea5bfbe62 100644 (file)
@@ -547,6 +547,11 @@ gint plugin_init(gchar **error)
                *error = g_strdup(_("Failed to get username"));
                return -1;
        }
+#ifdef G_OS_WIN32
+       /* no Unix socket in Windows, and in case our config comes from Unix, switch to TCP */
+       if (config.transport == SPAMASSASSIN_TRANSPORT_UNIX)
+               config.transport = SPAMASSASSIN_TRANSPORT_TCP;
+#endif
        spamassassin_gtk_init();
                
        debug_print("SpamAssassin plugin loaded\n");