Fix bug #3380. Initialize widget before callback handler for 'clicked'
[claws.git] / src / plugins / clamd / clamav_plugin.c
index 87a8fb742764fc92ff70b9fcc5020f9ba2562efc..4194869a91682784966d8745a0de83fc87ceb9dc 100644 (file)
@@ -143,10 +143,9 @@ static gboolean scan_func(GNode *node, gpointer data)
                                }
                        }
                        else {
-                               msg = g_strconcat(_("File: %s. Size (%d) greater than limit (%d)\n"),
-                                       outfile, (int) info.st_size, max);
+                               msg = g_strdup_printf(_("File: %s. Size (%d) greater than limit (%d)\n"), outfile, (int) info.st_size, max);
                                statusbar_print_all("%s", msg);
-                               debug_print(msg);
+                               debug_print("%s", msg);
                                g_free(msg);
                        }
                }
@@ -174,8 +173,8 @@ static gboolean mail_filtering_hook(gpointer source, gpointer data)
        if (message_callback != NULL)
                message_callback(_("ClamAV: scanning message..."));
 
-       debug_print("status: %d\n", result.status);
        g_node_traverse(mimeinfo->node, G_PRE_ORDER, G_TRAVERSE_ALL, -1, scan_func, &result);
+       debug_print("status: %d\n", result.status);
 
        if (result.status == VIRUS) {
                if (config.clamav_recv_infected) {