2006-03-01 [colin] 2.0.0cvs97
[claws.git] / src / plugins / spamassassin / spamassassin.c
index b8f87401d8b8c055ee2807285df0c29631ba8d22..e4c5f1772ba82fcaf24b9b28010a04ad83ac791f 100644 (file)
@@ -263,7 +263,6 @@ gchar* spamassassin_create_tmp_spamc_wrapper(gboolean spam)
 {
        gchar *contents;
        gchar *fname = get_tmp_file();
-       GError *err;
 
        if (fname != NULL) {
                contents = g_strdup_printf(
@@ -271,10 +270,7 @@ gchar* spamassassin_create_tmp_spamc_wrapper(gboolean spam)
                                                config.hostname, config.port, 
                                                config.username, config.timeout,
                                                config.max_size * 1024, spam?"spam":"ham");
-               if (!g_file_set_contents(fname, contents,
-                                                       strlen(contents), &err)) {
-                       g_warning(err->message);
-                       g_error_free(err);
+               if (str_write_to_file(contents, fname) < 0) {
                        g_free(fname);
                        fname = NULL;
                }