From jflesch at freenetproject.org Mon Oct 1 12:56:17 2007 From: jflesch at freenetproject.org (jflesch at freenetproject.org) Date: Mon, 1 Oct 2007 12:56:17 +0000 (UTC) Subject: [Thaw-dev] r15420 - trunk/apps/Thaw/src/thaw/plugins/miniFrost Message-ID: <20071001125617.7447C479725@freenetproject.org> Author: jflesch Date: 2007-10-01 12:56:17 +0000 (Mon, 01 Oct 2007) New Revision: 15420 Modified: trunk/apps/Thaw/src/thaw/plugins/miniFrost/MiniFrostPanel.java Log: Fix the minifrost default view (should have been the 'gmail-like' view instead of the 'outlook-like' view) Modified: trunk/apps/Thaw/src/thaw/plugins/miniFrost/MiniFrostPanel.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/miniFrost/MiniFrostPanel.java 2007-09-30 11:00:18 UTC (rev 15419) +++ trunk/apps/Thaw/src/thaw/plugins/miniFrost/MiniFrostPanel.java 2007-10-01 12:56:17 UTC (rev 15420) @@ -51,10 +51,10 @@ this.db = db; this.pluginCore = pluginCore; - gmailView = true; + gmailView = (DEFAULT_VIEW == 0); - if (config.getValue("miniFrostView") == null - || "1".equals(config.getValue("miniFrostView"))) + if (config.getValue("miniFrostView") != null + && "1".equals(config.getValue("miniFrostView"))) gmailView = false; /* board tree use some settings provided by the message tree table From jflesch at freenetproject.org Mon Oct 1 12:58:42 2007 From: jflesch at freenetproject.org (jflesch at freenetproject.org) Date: Mon, 1 Oct 2007 12:58:42 +0000 (UTC) Subject: [Thaw-dev] r15421 - trunk/apps/Thaw/src/thaw/plugins/miniFrost Message-ID: <20071001125842.7A9C1479826@freenetproject.org> Author: jflesch Date: 2007-10-01 12:58:42 +0000 (Mon, 01 Oct 2007) New Revision: 15421 Modified: trunk/apps/Thaw/src/thaw/plugins/miniFrost/SubMessagePanel.java Log: Fix the text background in minifrost when using the GTK look'n'feel Modified: trunk/apps/Thaw/src/thaw/plugins/miniFrost/SubMessagePanel.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/miniFrost/SubMessagePanel.java 2007-10-01 12:56:17 UTC (rev 15420) +++ trunk/apps/Thaw/src/thaw/plugins/miniFrost/SubMessagePanel.java 2007-10-01 12:58:42 UTC (rev 15421) @@ -54,7 +54,6 @@ import java.util.regex.Pattern; - public class SubMessagePanel extends JPanel implements ActionListener { private JButton upDownButton; @@ -371,6 +370,7 @@ a.setFont(a.getFont().deriveFont((float)13.5)); a.setEditable(false); + a.setBackground(Color.WHITE); StyledDocument doc = parseText(txt); From jflesch at freenetproject.org Mon Oct 1 13:12:05 2007 From: jflesch at freenetproject.org (jflesch at freenetproject.org) Date: Mon, 1 Oct 2007 13:12:05 +0000 (UTC) Subject: [Thaw-dev] r15422 - trunk/apps/Thaw/src/thaw/plugins/transferLogs Message-ID: <20071001131205.9DD184790AE@freenetproject.org> Author: jflesch Date: 2007-10-01 13:12:05 +0000 (Mon, 01 Oct 2007) New Revision: 15422 Modified: trunk/apps/Thaw/src/thaw/plugins/transferLogs/Transfer.java Log: Fix the transfer log plugin : Mark again successful transfers as successful Modified: trunk/apps/Thaw/src/thaw/plugins/transferLogs/Transfer.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/transferLogs/Transfer.java 2007-10-01 12:58:42 UTC (rev 15421) +++ trunk/apps/Thaw/src/thaw/plugins/transferLogs/Transfer.java 2007-10-01 13:12:05 UTC (rev 15422) @@ -159,7 +159,7 @@ if((query.getStartupTime() != dateStart.getTime()) && (query.getStartupTime() != -1)) mustUpdateDateStart = true; - + if (query.isFinished() && this.dateEnd == null) mustUpdateDateEnd = true; @@ -174,9 +174,9 @@ if (mustUpdateDateStart) { updateDateStart(); } - + if (mustUpdateDateEnd) { - updateDateEnd(); + updateDateEnd(query.isSuccessful()); } if (mustUpdateSize) { @@ -271,22 +271,23 @@ } - private void updateDateEnd() { + private void updateDateEnd(boolean successful) { Logger.info(this, "Updating end date in logs"); try { PreparedStatement st = db.getConnection().prepareStatement("UPDATE transferLogs SET "+ - "dateEnd = ?"+ + "dateEnd = ?, isSuccess = ?"+ "WHERE id = ?"); dateEnd = new Timestamp(query.getCompletionTime()); st.setTimestamp(1, dateEnd); - st.setInt(2, this.id); + st.setBoolean(2, successful); + st.setInt(3, this.id); st.execute(); } catch(SQLException e) { Logger.error(this, "Unable to update dateEnd in transfer logs because : "+e.toString()); } } - + private void updateDateStart() { Logger.info(this, "Updating start date in logs"); @@ -424,7 +425,7 @@ if (query.isFinished()) { o.deleteObserver(this); - updateDateEnd(); + updateDateEnd(query.isSuccessful()); hasChanged = true; } From jflesch at freenetproject.org Mon Oct 1 13:31:06 2007 From: jflesch at freenetproject.org (jflesch at freenetproject.org) Date: Mon, 1 Oct 2007 13:31:06 +0000 (UTC) Subject: [Thaw-dev] r15423 - in trunk/apps/Thaw/src/thaw: core i18n plugins plugins/miniFrost Message-ID: <20071001133106.D75E847A230@freenetproject.org> Author: jflesch Date: 2007-10-01 13:31:06 +0000 (Mon, 01 Oct 2007) New Revision: 15423 Modified: trunk/apps/Thaw/src/thaw/core/ConfigWindow.java trunk/apps/Thaw/src/thaw/core/PluginManager.java trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties trunk/apps/Thaw/src/thaw/i18n/thaw.properties trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties trunk/apps/Thaw/src/thaw/plugins/IndexTreeRebuilder.java trunk/apps/Thaw/src/thaw/plugins/MiniFrost.java trunk/apps/Thaw/src/thaw/plugins/miniFrost/MessageTreeTable.java Log: Continuing the plugin 'IndexTreeRebuilder' Modified: trunk/apps/Thaw/src/thaw/core/ConfigWindow.java =================================================================== --- trunk/apps/Thaw/src/thaw/core/ConfigWindow.java 2007-10-01 13:12:05 UTC (rev 15422) +++ trunk/apps/Thaw/src/thaw/core/ConfigWindow.java 2007-10-01 13:31:06 UTC (rev 15423) @@ -149,6 +149,10 @@ return configWin; } + public PluginConfigPanel getPluginConfigPanel() { + return pluginConfigPanel; + } + /** * Used to update the MDNSPanel */ Modified: trunk/apps/Thaw/src/thaw/core/PluginManager.java =================================================================== --- trunk/apps/Thaw/src/thaw/core/PluginManager.java 2007-10-01 13:12:05 UTC (rev 15422) +++ trunk/apps/Thaw/src/thaw/core/PluginManager.java 2007-10-01 13:31:06 UTC (rev 15423) @@ -137,7 +137,7 @@ if (plugin != null) plugin.stop(); else - Logger.notice(this, "Plugin == null ?!!"); + Logger.error(this, "Plugin == null !?"); } catch(final Exception e) { Logger.error(this, "Unable to stop the plugin "+ "'"+plugin.getClass().getName()+"'"+ Modified: trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties =================================================================== --- trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties 2007-10-01 13:12:05 UTC (rev 15422) +++ trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties 2007-10-01 13:31:06 UTC (rev 15423) @@ -691,3 +691,6 @@ ## Index tree rebuilder thaw.plugin.index.treeRebuilder=R?parateur d'arbre d'indexes +thaw.plugin.index.treeRebuilder.finished=R?paration de l'arbre finie +thaw.plugin.index.treeRebuilder.failed=La r?paration de l'arbre a ?chou? :( + Modified: trunk/apps/Thaw/src/thaw/i18n/thaw.properties =================================================================== --- trunk/apps/Thaw/src/thaw/i18n/thaw.properties 2007-10-01 13:12:05 UTC (rev 15422) +++ trunk/apps/Thaw/src/thaw/i18n/thaw.properties 2007-10-01 13:31:06 UTC (rev 15423) @@ -707,3 +707,5 @@ ## Tree rebuilder thaw.plugin.index.treeRebuilder=Index tree rebuilder +thaw.plugin.index.treeRebuilder.finished=Index tree rebuilding finished +thaw.plugin.index.treeRebuilder.failed=Index tree rebuilding failed ! :( Modified: trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties =================================================================== --- trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties 2007-10-01 13:12:05 UTC (rev 15422) +++ trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties 2007-10-01 13:31:06 UTC (rev 15423) @@ -691,3 +691,6 @@ ## Index tree rebuilder thaw.plugin.index.treeRebuilder=R\u00e9parateur d'arbre d'indexes +thaw.plugin.index.treeRebuilder.finished=R\u00e9paration de l'arbre finie +thaw.plugin.index.treeRebuilder.failed=La r\u00e9paration de l'arbre a \u00e9chou\u00e9 :( + Modified: trunk/apps/Thaw/src/thaw/plugins/IndexTreeRebuilder.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/IndexTreeRebuilder.java 2007-10-01 13:12:05 UTC (rev 15422) +++ trunk/apps/Thaw/src/thaw/plugins/IndexTreeRebuilder.java 2007-10-01 13:31:06 UTC (rev 15423) @@ -3,6 +3,9 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import javax.swing.JOptionPane; + + import thaw.core.Core; import thaw.core.Logger; import thaw.core.Plugin; @@ -10,48 +13,107 @@ import thaw.core.ThawRunnable; import thaw.core.I18n; import thaw.gui.IconBox; +import thaw.gui.WarningWindow; import thaw.plugins.Hsqldb; import java.sql.*; -public class IndexTreeRebuilder implements Plugin, ActionListener { +public class IndexTreeRebuilder implements Plugin { private Core core; private Hsqldb db; public IndexTreeRebuilder() { } - public boolean run(Core core) { - this.core = core; - if(core.getPluginManager().getPlugin("thaw.plugins.Hsqldb") == null) { - Logger.info(this, "Loading Hsqldb plugin"); + private class Rebuilder implements ThawRunnable { + private boolean running; + private Plugin parent; - if(core.getPluginManager().loadPlugin("thaw.plugins.Hsqldb") == null - || !core.getPluginManager().runPlugin("thaw.plugins.Hsqldb")) { - Logger.error(this, "Unable to load thaw.plugins.Hsqldb !"); - return false; + public Rebuilder(Plugin parent) { + running = true; + this.parent = parent; + } + + public void rebuild() throws SQLException { + + /* TODO */ + + } + + public void run() { + + if(core.getPluginManager().getPlugin("thaw.plugins.Hsqldb") == null) { + Logger.info(this, "Loading Hsqldb plugin"); + + if(core.getPluginManager().loadPlugin("thaw.plugins.Hsqldb") == null + || !core.getPluginManager().runPlugin("thaw.plugins.Hsqldb")) { + Logger.error(this, "Unable to load thaw.plugins.Hsqldb !"); + return; + } } + + db = (Hsqldb)core.getPluginManager().getPlugin("thaw.plugins.Hsqldb"); + + if (db == null) { + Logger.error(this, "Can't access the db !"); + } else { + + db.registerChild(parent); + + if (running) + core.getPluginManager().stopPlugin("thaw.plugins.IndexBrowser"); + + if (running) { + try { + rebuild(); + } catch(SQLException e) { + /* wow, getting creepy */ + Logger.error(this, "Index tree rebuild failed : "+e.toString()); + new WarningWindow(core, + I18n.getMessage("thaw.plugin.index.treeRebuilder.failed")); + } + } + + if (running) + core.getPluginManager().runPlugin("thaw.plugins.IndexBrowser"); + + db.unregisterChild(parent); + } + + if (running) + new WarningWindow(core, + I18n.getMessage("thaw.plugin.index.treeRebuilder.finished")); + + core.getPluginManager().stopPlugin("thaw.plugins.IndexTreeRebuilder"); + core.getPluginManager().unloadPlugin("thaw.plugins.IndexTreeRebuilder"); + + core.getConfigWindow().getPluginConfigPanel().refreshList(); } - db = (Hsqldb)core.getPluginManager().getPlugin("thaw.plugins.Hsqldb"); - db.registerChild(this); + public void stop() { + running = false; + } + } + + public boolean run(Core core) { + this.core = core; + + ThawThread th = new ThawThread(new Rebuilder(this), + "Index tree rebuilder", + this); + th.start(); + return true; } public void stop() { - if (db != null) - db.unregisterChild(this); } - public void actionPerformed(ActionEvent e) { - - } - public String getNameForUser() { return I18n.getMessage("thaw.plugin.index.treeRebuilder"); } Modified: trunk/apps/Thaw/src/thaw/plugins/MiniFrost.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/MiniFrost.java 2007-10-01 13:12:05 UTC (rev 15422) +++ trunk/apps/Thaw/src/thaw/plugins/MiniFrost.java 2007-10-01 13:31:06 UTC (rev 15423) @@ -14,7 +14,7 @@ public class MiniFrost implements thaw.core.Plugin { - public final static int DEFAULT_ARCHIVE_AFTER = 15; /* days */ + public final static int DEFAULT_ARCHIVE_AFTER = 7; /* days */ public final static int DEFAULT_DELETE_AFTER = 60; /* days */ private Core core; Modified: trunk/apps/Thaw/src/thaw/plugins/miniFrost/MessageTreeTable.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/miniFrost/MessageTreeTable.java 2007-10-01 13:12:05 UTC (rev 15422) +++ trunk/apps/Thaw/src/thaw/plugins/miniFrost/MessageTreeTable.java 2007-10-01 13:31:06 UTC (rev 15423) @@ -597,7 +597,7 @@ return checkBoxRenderer; } - if (value instanceof MessageNode) { + if (value instanceof MessageNode && seeTree.isSelected()) { return messageNodeTree.getTableCellRendererComponent(table, value, isSelected, From jflesch at freenetproject.org Mon Oct 1 14:02:35 2007 From: jflesch at freenetproject.org (jflesch at freenetproject.org) Date: Mon, 1 Oct 2007 14:02:35 +0000 (UTC) Subject: [Thaw-dev] r15424 - in trunk/apps/Thaw/src/thaw: core plugins Message-ID: <20071001140235.D284247992A@freenetproject.org> Author: jflesch Date: 2007-10-01 14:02:35 +0000 (Mon, 01 Oct 2007) New Revision: 15424 Modified: trunk/apps/Thaw/src/thaw/core/Config.java trunk/apps/Thaw/src/thaw/core/PluginManager.java trunk/apps/Thaw/src/thaw/core/ThawThread.java trunk/apps/Thaw/src/thaw/plugins/IndexTreeRebuilder.java Log: Finish the plugin 'IndexTreeRebuilder' Modified: trunk/apps/Thaw/src/thaw/core/Config.java =================================================================== --- trunk/apps/Thaw/src/thaw/core/Config.java 2007-10-01 13:31:06 UTC (rev 15423) +++ trunk/apps/Thaw/src/thaw/core/Config.java 2007-10-01 14:02:35 UTC (rev 15424) @@ -238,7 +238,7 @@ /** * Save the configuration. - * + * * @return true if success, else false. */ public boolean saveConfig() { Modified: trunk/apps/Thaw/src/thaw/core/PluginManager.java =================================================================== --- trunk/apps/Thaw/src/thaw/core/PluginManager.java 2007-10-01 13:31:06 UTC (rev 15423) +++ trunk/apps/Thaw/src/thaw/core/PluginManager.java 2007-10-01 14:02:35 UTC (rev 15424) @@ -238,6 +238,7 @@ } plugins.remove(className); + core.getConfig().removePlugin(className); } catch(final Exception e) { Logger.error(this, "unloadPlugin('"+className+"'): Exception: "+e); Modified: trunk/apps/Thaw/src/thaw/core/ThawThread.java =================================================================== --- trunk/apps/Thaw/src/thaw/core/ThawThread.java 2007-10-01 13:31:06 UTC (rev 15423) +++ trunk/apps/Thaw/src/thaw/core/ThawThread.java 2007-10-01 14:02:35 UTC (rev 15424) @@ -83,9 +83,12 @@ for (Iterator it = threads.iterator(); it.hasNext();) { ThawThread th = (ThawThread)it.next(); - Logger.info(null, - "'"+th.getName()+"' "+ - "(parent: '"+th.getParent().getClass().getName()+"')"); + + if (th != null) { + Logger.info(null, + "'"+th.getName()+"' "+ + "(parent: '"+th.getParent().getClass().getName()+"')"); + } } } } Modified: trunk/apps/Thaw/src/thaw/plugins/IndexTreeRebuilder.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/IndexTreeRebuilder.java 2007-10-01 13:31:06 UTC (rev 15423) +++ trunk/apps/Thaw/src/thaw/plugins/IndexTreeRebuilder.java 2007-10-01 14:02:35 UTC (rev 15424) @@ -5,6 +5,8 @@ import javax.swing.JOptionPane; +import java.util.Vector; +import java.util.Iterator; import thaw.core.Core; import thaw.core.Logger; @@ -17,6 +19,7 @@ import thaw.plugins.Hsqldb; + import java.sql.*; @@ -37,12 +40,116 @@ this.parent = parent; } + private void rebuildIndex(Vector parents, int indexId) throws SQLException { + + PreparedStatement st = + db.getConnection().prepareStatement("INSERT INTO indexParents "+ + "(indexId, folderId) "+ + "VALUES (?, ?)"); + + for (Iterator it = parents.iterator(); + it.hasNext();) { + st.setInt(1, indexId); + + int parent = ((Integer)it.next()).intValue(); + + if (parent >= 0) + st.setInt(2, parent); + else + st.setNull(2, Types.INTEGER); + + st.execute(); + } + + } + + + /** + * rebuild == rebuild the content of indexParents and folderParents + * @param parents Integer vector (id of the parent folders) + */ + private void rebuild(Vector parents, int folderId) throws SQLException { + + Vector newParentsVector = new Vector(parents); + newParentsVector.add(new Integer(folderId)); + + PreparedStatement st; + + /* rebuild all the indexes in the subfolders */ + + String where = ((folderId >= 0) ? + "WHERE parent = ?" : + "WHERE parent IS NULL"); + + st = db.getConnection().prepareStatement("SELECT id FROM indexFolders "+where); + + if (folderId >= 0) + st.setInt(1, folderId); + + ResultSet set = st.executeQuery(); + + while(set.next()) { + rebuild(newParentsVector, set.getInt("id")); + } + + + /* rebuild all the indexes in this folder */ + + st = db.getConnection().prepareStatement("SELECT id FROM indexes "+where); + + if (folderId >= 0) + st.setInt(1, folderId); + + set = st.executeQuery(); + + while(set.next()) { + rebuildIndex(newParentsVector, set.getInt("id")); + } + + + /* rebuild this folder */ + + st = db.getConnection().prepareStatement("INSERT INTO folderParents "+ + "(folderId, parentId) "+ + "VALUES (?, ?)"); + + for (Iterator it = parents.iterator(); + it.hasNext();) { + if (folderId >= 0) + st.setInt(1, folderId); + else + st.setNull(1, Types.INTEGER); + + int parent = ((Integer)it.next()).intValue(); + + if (parent >= 0) + st.setInt(2, parent); + else + st.setNull(2, Types.INTEGER); + + st.execute(); + } + + } + + /** + * Take the db lock before calling this function ! + */ public void rebuild() throws SQLException { - /* TODO */ + /* quick & dirty, as usual */ + PreparedStatement st = + db.getConnection().prepareStatement("DELETE FROM indexParents"); + st.execute(); + st = db.getConnection().prepareStatement("DELETE FROM folderParents"); + st.execute(); + + rebuild(new Vector(), -1); + } + public void run() { if(core.getPluginManager().getPlugin("thaw.plugins.Hsqldb") == null) { @@ -68,7 +175,9 @@ if (running) { try { - rebuild(); + synchronized(db.dbLock) { + rebuild(); + } } catch(SQLException e) { /* wow, getting creepy */ Logger.error(this, "Index tree rebuild failed : "+e.toString()); @@ -78,15 +187,15 @@ } if (running) + new WarningWindow(core, + I18n.getMessage("thaw.plugin.index.treeRebuilder.finished")); + + if (running) core.getPluginManager().runPlugin("thaw.plugins.IndexBrowser"); db.unregisterChild(parent); } - if (running) - new WarningWindow(core, - I18n.getMessage("thaw.plugin.index.treeRebuilder.finished")); - core.getPluginManager().stopPlugin("thaw.plugins.IndexTreeRebuilder"); core.getPluginManager().unloadPlugin("thaw.plugins.IndexTreeRebuilder"); From jflesch at freenetproject.org Thu Oct 4 12:36:24 2007 From: jflesch at freenetproject.org (jflesch at freenetproject.org) Date: Thu, 4 Oct 2007 12:36:24 +0000 (UTC) Subject: [Thaw-dev] r15429 - trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK Message-ID: <20071004123624.A89B647AE73@freenetproject.org> Author: jflesch Date: 2007-10-04 12:36:24 +0000 (Thu, 04 Oct 2007) New Revision: 15429 Modified: trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoard.java trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKMessageParser.java Log: Improve a little bit the log ouput related to minifrost Modified: trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoard.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoard.java 2007-10-03 13:21:48 UTC (rev 15428) +++ trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoard.java 2007-10-04 12:36:24 UTC (rev 15429) @@ -796,7 +796,7 @@ } - protected static int countNewMessages(Hsqldb db, int boardId, + protected static int countNewMessages(Hsqldb db, int boardId, String boardName, boolean unsigned, boolean archived, int minTrustLevel) { int count = -1; @@ -831,7 +831,8 @@ count = subRes.getInt(1); } catch(SQLException e) { - Logger.error(db, "Can't count the number of new message on the board because : "+e.toString()); + Logger.error(db, "Can't count the number of new message on the board "+ + "'"+boardName+"'because : "+e.toString()); } return count; @@ -857,7 +858,7 @@ this.lastArchivedSetting = archived; this.lastMinTrustLevelSetting = minTrustLevel; - return countNewMessages(factory.getDb(), id, + return countNewMessages(factory.getDb(), id, name, unsigned, archived, minTrustLevel); } Modified: trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKMessageParser.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKMessageParser.java 2007-10-03 13:21:48 UTC (rev 15428) +++ trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKMessageParser.java 2007-10-04 12:36:24 UTC (rev 15429) @@ -269,7 +269,12 @@ st.execute(); + Logger.notice(this, "Last inserted message in the db : "+ + board + " (" + Integer.toString(boardId) + ") - " + + timestampSql.toString() + " - " + + Integer.toString(rev)); + /* we need the id of the message */ st = db.getConnection().prepareStatement("SELECT id FROM frostKSKmessages "+ From jflesch at freenetproject.org Thu Oct 4 23:54:31 2007 From: jflesch at freenetproject.org (jflesch at freenetproject.org) Date: Thu, 4 Oct 2007 23:54:31 +0000 (UTC) Subject: [Thaw-dev] r15430 - trunk/apps/Thaw/src/thaw/fcp Message-ID: <20071004235431.7DC8E391D64@freenetproject.org> Author: jflesch Date: 2007-10-04 23:54:31 +0000 (Thu, 04 Oct 2007) New Revision: 15430 Modified: trunk/apps/Thaw/src/thaw/fcp/FCPClientGet.java Log: Changing the packet size (for disk writing) in FCPClientGet from 1024 to 65536 Modified: trunk/apps/Thaw/src/thaw/fcp/FCPClientGet.java =================================================================== --- trunk/apps/Thaw/src/thaw/fcp/FCPClientGet.java 2007-10-04 12:36:24 UTC (rev 15429) +++ trunk/apps/Thaw/src/thaw/fcp/FCPClientGet.java 2007-10-04 23:54:31 UTC (rev 15430) @@ -23,7 +23,7 @@ private int maxRetries = -1; - private final static int PACKET_SIZE = 1024; + private final static int PACKET_SIZE = 65536; private final static int BLOCK_SIZE = 16384; private FCPQueueManager queueManager; From jflesch at freenetproject.org Fri Oct 5 21:07:24 2007 From: jflesch at freenetproject.org (jflesch at freenetproject.org) Date: Fri, 5 Oct 2007 21:07:24 +0000 (UTC) Subject: [Thaw-dev] r15432 - in trunk/apps/Thaw/src/thaw/plugins: index miniFrost/frostKSK Message-ID: <20071005210724.9758947AEAB@freenetproject.org> Author: jflesch Date: 2007-10-05 21:07:24 +0000 (Fri, 05 Oct 2007) New Revision: 15432 Modified: trunk/apps/Thaw/src/thaw/plugins/index/IndexManagementHelper.java trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoard.java Log: Fix the option 'add specific key' in the index browser Modified: trunk/apps/Thaw/src/thaw/plugins/index/IndexManagementHelper.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/index/IndexManagementHelper.java 2007-10-05 17:08:00 UTC (rev 15431) +++ trunk/apps/Thaw/src/thaw/plugins/index/IndexManagementHelper.java 2007-10-05 21:07:24 UTC (rev 15432) @@ -1460,7 +1460,7 @@ alreadyThere = true; } - if (alreadyThere) { + if (!alreadyThere) { st.setInt(1, nextId); st.setString(2, FreenetURIHelper.getFilenameFromKey(key)); Modified: trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoard.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoard.java 2007-10-05 17:08:00 UTC (rev 15431) +++ trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoard.java 2007-10-05 21:07:24 UTC (rev 15432) @@ -833,6 +833,11 @@ } catch(SQLException e) { Logger.error(db, "Can't count the number of new message on the board "+ "'"+boardName+"'because : "+e.toString()); + + /* usually, this exception come from hsqldb itself (Out of Memory exception) + * so a stack trace may be interresting here + */ + e.printStackTrace(); } return count; From jflesch at freenetproject.org Sun Oct 28 18:33:01 2007 From: jflesch at freenetproject.org (jflesch at freenetproject.org) Date: Sun, 28 Oct 2007 18:33:01 +0000 (UTC) Subject: [Thaw-dev] r15623 - in trunk/apps/Thaw/src/thaw: fcp i18n plugins/index plugins/miniFrost/frostKSK Message-ID: <20071028183301.90D553C0442@freenetproject.org> Author: jflesch Date: 2007-10-28 18:33:01 +0000 (Sun, 28 Oct 2007) New Revision: 15623 Modified: trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties trunk/apps/Thaw/src/thaw/i18n/thaw.properties trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties trunk/apps/Thaw/src/thaw/plugins/index/Index.java trunk/apps/Thaw/src/thaw/plugins/index/IndexConfigTab.java trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoard.java Log: Make the spam protection on the indexes disabled by default (too annoying) Modified: trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java =================================================================== --- trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java 2007-10-28 15:06:26 UTC (rev 15622) +++ trunk/apps/Thaw/src/thaw/fcp/FCPClientPut.java 2007-10-28 18:33:01 UTC (rev 15623) @@ -631,7 +631,7 @@ successful = true; finished = true; running = false; - + startupTime = Long.valueOf(msg.getValue("StartupTime")).longValue(); completionTime = Long.valueOf(msg.getValue("CompletionTime")).longValue(); publicKey = msg.getValue("URI"); Modified: trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties =================================================================== --- trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties 2007-10-28 15:06:26 UTC (rev 15622) +++ trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties 2007-10-28 18:33:01 UTC (rev 15623) @@ -390,7 +390,7 @@ thaw.plugin.index.mustReinsert=Vous devez r?inserer l'index pour que les changements fassent effet -thaw.plugin.index.fetchNegative=Toujours t?l?charger les derni?res versions des indexes ? chaque rafraichissement +thaw.plugin.index.fetchNegative=Toujours t?l?charger les derni?res versions des indexes avant de charger les commentaires thaw.plugin.index.fetchComments=R?cup?rer les commentaires thaw.plugin.index.warningNonNegative=Attention ! T?l?charger les commentaires sans avoir la derni?re version de l'index peut vous faire t?l?charger des spams ! Modified: trunk/apps/Thaw/src/thaw/i18n/thaw.properties =================================================================== --- trunk/apps/Thaw/src/thaw/i18n/thaw.properties 2007-10-28 15:06:26 UTC (rev 15622) +++ trunk/apps/Thaw/src/thaw/i18n/thaw.properties 2007-10-28 18:33:01 UTC (rev 15623) @@ -399,7 +399,7 @@ thaw.plugin.index.comment.failed=Comment sending has failed. Retry ? -thaw.plugin.index.fetchNegative=Always download the latest versions of the indexes at each refresh +thaw.plugin.index.fetchNegative=Always download the latest versions of the indexes before downloading the comments thaw.plugin.index.fetchComments=Fetch the comments thaw.plugin.index.warningNonNegative=Warning ! Downloading comments without having the latest versions of the indexes may result in receiving spams ! Modified: trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties =================================================================== --- trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties 2007-10-28 15:06:26 UTC (rev 15622) +++ trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties 2007-10-28 18:33:01 UTC (rev 15623) @@ -390,7 +390,7 @@ thaw.plugin.index.mustReinsert=Vous devez r\u00e9inserer l'index pour que les changements fassent effet -thaw.plugin.index.fetchNegative=Toujours t\u00e9l\u00e9charger les derni\u00e8res versions des indexes \u00e0 chaque rafraichissement +thaw.plugin.index.fetchNegative=Toujours t\u00e9l\u00e9charger les derni\u00e8res versions des indexes avant de charger les commentaires thaw.plugin.index.fetchComments=R\u00e9cup\u00e9rer les commentaires thaw.plugin.index.warningNonNegative=Attention ! T\u00e9l\u00e9charger les commentaires sans avoir la derni\u00e8re version de l'index peut vous faire t\u00e9l\u00e9charger des spams ! Modified: trunk/apps/Thaw/src/thaw/plugins/index/Index.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/index/Index.java 2007-10-28 15:06:26 UTC (rev 15622) +++ trunk/apps/Thaw/src/thaw/plugins/index/Index.java 2007-10-28 18:33:01 UTC (rev 15623) @@ -798,7 +798,7 @@ private boolean rewriteKey = true; private FCPQueueManager queueManager; private boolean fetchingNegRev = false; - private boolean mustFetchNegRev = true; + private boolean mustFetchNegRev = false; private int specificRev = 0; public int downloadFromFreenet(Observer o, IndexTree tree, FCPQueueManager queueManager, int specificRev) { @@ -807,7 +807,7 @@ rewriteKey = true; fetchingNegRev = false; - mustFetchNegRev = true; + mustFetchNegRev = false; if (config != null && config.getValue("indexFetchNegative") != null) mustFetchNegRev = Boolean.valueOf(config.getValue("indexFetchNegative")).booleanValue(); @@ -1426,7 +1426,7 @@ public void forceFlagsReload() { - Logger.debug(this, "forceReload() => loadData()"); + Logger.verbose(this, "forceReload() => loadData()"); loadData(); } Modified: trunk/apps/Thaw/src/thaw/plugins/index/IndexConfigTab.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/index/IndexConfigTab.java 2007-10-28 15:06:26 UTC (rev 15622) +++ trunk/apps/Thaw/src/thaw/plugins/index/IndexConfigTab.java 2007-10-28 18:33:01 UTC (rev 15623) @@ -123,7 +123,7 @@ int refreshIntervalInt = AutoRefresh.DEFAULT_INTERVAL; int nmbIndexInt = AutoRefresh.DEFAULT_INDEX_NUMBER; boolean loadOnTheFlyBoolean = false; - boolean fetchNegativeBoolean = true; + boolean fetchNegativeBoolean = false; boolean fetchCommentsBoolean = true; try { @@ -196,19 +196,23 @@ } if (e.getSource() == editBlackList) { - indexBrowser.getBlackList().displayPanel(); - configWindow.close(); - return; + indexBrowser.getBlackList().displayPanel(); + configWindow.close(); + return; } if (e.getSource() == fetchComments || e.getSource() == fetchNegative) { + + /* if (!fetchNegative.isSelected() && fetchComments.isSelected()) { new WarningWindow(configWindow.getFrame(), I18n.getMessage("thaw.plugin.index.warningNonNegative")); } - return; + */ + + return; } } Modified: trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoard.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoard.java 2007-10-28 15:06:26 UTC (rev 15622) +++ trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKBoard.java 2007-10-28 18:33:01 UTC (rev 15623) @@ -811,12 +811,12 @@ unsignedStr = " AND frostKSKMessages.sigId IS NOT NULL AND signatures.trustLevel >= ?"; String query = "SELECT count(frostKSKMessages.id) "+ - "FROM frostKSKMessages LEFT JOIN signatures "+ - " ON frostKSKMessages.sigId = signatures.id "+ - "WHERE frostKSKMessages.boardId = ? "+ - "AND frostKSKMessages.read = FALSE"+ - archivedStr+ - unsignedStr; + "FROM frostKSKMessages LEFT JOIN signatures "+ + " ON frostKSKMessages.sigId = signatures.id "+ + "WHERE frostKSKMessages.boardId = ? "+ + "AND frostKSKMessages.read = FALSE"+ + archivedStr+ + unsignedStr; try { PreparedStatement subSt; @@ -833,11 +833,7 @@ } catch(SQLException e) { Logger.error(db, "Can't count the number of new message on the board "+ "'"+boardName+"'because : "+e.toString()); - - /* usually, this exception come from hsqldb itself (Out of Memory exception) - * so a stack trace may be interresting here - */ - e.printStackTrace(); + Logger.error(db, "The query was: "+query); } return count; From jflesch at freenetproject.org Sun Oct 28 18:45:32 2007 From: jflesch at freenetproject.org (jflesch at freenetproject.org) Date: Sun, 28 Oct 2007 18:45:32 +0000 (UTC) Subject: [Thaw-dev] r15625 - trunk/apps/Thaw/src/thaw/plugins/index Message-ID: <20071028184532.CE30F47AAC5@freenetproject.org> Author: jflesch Date: 2007-10-28 18:45:32 +0000 (Sun, 28 Oct 2007) New Revision: 15625 Modified: trunk/apps/Thaw/src/thaw/plugins/index/Comment.java Log: Remove an useless button in the comment tab Modified: trunk/apps/Thaw/src/thaw/plugins/index/Comment.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/index/Comment.java 2007-10-28 18:44:08 UTC (rev 15624) +++ trunk/apps/Thaw/src/thaw/plugins/index/Comment.java 2007-10-28 18:45:32 UTC (rev 15625) @@ -132,7 +132,6 @@ private CommentTab tab; private JComboBox trust; - private JButton changeTrust; private JButton changeBlackListState; @@ -194,14 +193,12 @@ trust = new JComboBox(trustLevels); trust.setSelectedItem(author.getTrustLevelStr()); - changeTrust = new JButton(I18n.getMessage("thaw.common.apply")); - changeTrust.addActionListener(this); + trust.addActionListener(this); JPanel trustPanel = new JPanel(new BorderLayout(5, 5)); if (author.getPrivateKey() == null) { trustPanel.add(trust, BorderLayout.CENTER); - trustPanel.add(changeTrust, BorderLayout.EAST); } JPanel bottomRightPanel = new JPanel(new BorderLayout(5, 5)); @@ -299,7 +296,7 @@ } public void actionPerformed(ActionEvent e) { - if (e.getSource() == changeTrust) { + if (e.getSource() == trust) { if (author == null) return; author.setTrustLevel((String)trust.getSelectedItem()); From jflesch at freenetproject.org Sun Oct 28 18:49:32 2007 From: jflesch at freenetproject.org (jflesch at freenetproject.org) Date: Sun, 28 Oct 2007 18:49:32 +0000 (UTC) Subject: [Thaw-dev] r15626 - trunk/apps/Thaw/src/thaw/plugins/index Message-ID: <20071028184932.8C1E23C0442@freenetproject.org> Author: jflesch Date: 2007-10-28 18:49:32 +0000 (Sun, 28 Oct 2007) New Revision: 15626 Modified: trunk/apps/Thaw/src/thaw/plugins/index/Comment.java Log: Remove the moderate button in the comment tab if the index is publicly writable (to avoid moderation wars) Modified: trunk/apps/Thaw/src/thaw/plugins/index/Comment.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/index/Comment.java 2007-10-28 18:45:32 UTC (rev 15625) +++ trunk/apps/Thaw/src/thaw/plugins/index/Comment.java 2007-10-28 18:49:32 UTC (rev 15626) @@ -143,6 +143,7 @@ blackListed = isBlackListed(); boolean hasPrivateKey = (index.getPrivateKey() != null); + boolean isPrivateKeyPublished = index.publishPrivateKey(); /** * we don't display if it is blacklisted and we don't have the private key @@ -205,7 +206,8 @@ bottomRightPanel.add(trustPanel, BorderLayout.CENTER); - if (hasPrivateKey && (author.getPrivateKey() == null || blackListed) ) { + if ( (hasPrivateKey && (author.getPrivateKey() == null || blackListed) ) + && (!isPrivateKeyPublished) ) { changeBlackListState = new JButton(blackListed ? I18n.getMessage("thaw.plugin.index.comment.unmoderate") : I18n.getMessage("thaw.plugin.index.comment.moderate")); From jflesch at freenetproject.org Mon Oct 29 00:19:53 2007 From: jflesch at freenetproject.org (jflesch at freenetproject.org) Date: Mon, 29 Oct 2007 00:19:53 +0000 (UTC) Subject: [Thaw-dev] r15630 - in trunk/apps/Thaw/src/thaw: core plugins/index plugins/miniFrost/frostKSK Message-ID: <20071029001953.B102D47A2E2@freenetproject.org> Author: jflesch Date: 2007-10-29 00:19:53 +0000 (Mon, 29 Oct 2007) New Revision: 15630 Modified: trunk/apps/Thaw/src/thaw/core/Config.java trunk/apps/Thaw/src/thaw/plugins/index/CommentTab.java trunk/apps/Thaw/src/thaw/plugins/index/DatabaseManager.java trunk/apps/Thaw/src/thaw/plugins/index/IndexManagementHelper.java trunk/apps/Thaw/src/thaw/plugins/index/IndexParser.java trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKDraft.java Log: Argh, I'm stupid : I didn't close most of the file descriptor that I used Modified: trunk/apps/Thaw/src/thaw/core/Config.java =================================================================== --- trunk/apps/Thaw/src/thaw/core/Config.java 2007-10-28 22:12:19 UTC (rev 15629) +++ trunk/apps/Thaw/src/thaw/core/Config.java 2007-10-29 00:19:53 UTC (rev 15630) @@ -334,6 +334,11 @@ return false; } + try { + configOut.getWriter().close(); + } catch(java.io.IOException e) { + Logger.warning(this, "Can't close cleanly the config file"); + } return true; } Modified: trunk/apps/Thaw/src/thaw/plugins/index/CommentTab.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/index/CommentTab.java 2007-10-28 22:12:19 UTC (rev 15629) +++ trunk/apps/Thaw/src/thaw/plugins/index/CommentTab.java 2007-10-29 00:19:53 UTC (rev 15630) @@ -162,9 +162,7 @@ +" '"+index.toString()+"'" +" :"); else - titleLabel.setText(I18n.getMessage("thaw.plugin.index.comment.commentListTitle") - +" (null)" - +" :"); + hideTab(); } for (Iterator it = buttonActions.iterator(); Modified: trunk/apps/Thaw/src/thaw/plugins/index/DatabaseManager.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/index/DatabaseManager.java 2007-10-28 22:12:19 UTC (rev 15629) +++ trunk/apps/Thaw/src/thaw/plugins/index/DatabaseManager.java 2007-10-29 00:19:53 UTC (rev 15630) @@ -502,6 +502,12 @@ return; } + try { + outputStream.close(); + } catch(IOException e) { + Logger.warning(new DatabaseManager(), "Can't close the export file cleanly"); + } + Logger.info(new DatabaseManager(), "Export done"); } @@ -734,6 +740,11 @@ } } + try { + input.close(); + } catch(java.io.IOException e) { + Logger.warning(new DatabaseManager(), "Unable to close cleanly the xml file"); + } indexBrowser.getIndexTree().getRoot().forceReload(); indexBrowser.getIndexTree().refresh(); Modified: trunk/apps/Thaw/src/thaw/plugins/index/IndexManagementHelper.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/index/IndexManagementHelper.java 2007-10-28 22:12:19 UTC (rev 15629) +++ trunk/apps/Thaw/src/thaw/plugins/index/IndexManagementHelper.java 2007-10-29 00:19:53 UTC (rev 15630) @@ -749,9 +749,6 @@ IndexFolder folder = ((IndexFolder)node); - /** - * to avoid the collision due to the vector in the IndexFolder - */ if (folder == null || "".equals(folder.toString())) { return false; } @@ -1000,6 +997,12 @@ } new IndexParser(((Index)getTarget())).generateXML(out); + + try { + out.close(); + } catch(java.io.IOException e) { + Logger.warning(this, "Can't close the export file cleanly"); + } } } Modified: trunk/apps/Thaw/src/thaw/plugins/index/IndexParser.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/index/IndexParser.java 2007-10-28 22:12:19 UTC (rev 15629) +++ trunk/apps/Thaw/src/thaw/plugins/index/IndexParser.java 2007-10-29 00:19:53 UTC (rev 15630) @@ -60,10 +60,14 @@ public boolean generateXML(String path) { try { - generateXML(new FileOutputStream(new File(path))); + FileOutputStream stream = new FileOutputStream(new File(path)); + generateXML(stream); + stream.close(); return true; } catch(java.io.FileNotFoundException e) { Logger.error(this, "File not found exception ?!"); + } catch(java.io.IOException e) { + Logger.error(this, "IOException while generating the index: "+e.toString()); } return false; } @@ -284,9 +288,13 @@ */ public void loadXML(final String filePath, boolean clean) { try { - loadXML(new FileInputStream(filePath), clean); + FileInputStream stream = new FileInputStream(filePath); + loadXML(stream, clean); + stream.close(); } catch(final java.io.FileNotFoundException e) { Logger.error(this, "Unable to load XML: FileNotFoundException ('"+filePath+"') ! : "+e.toString()); + } catch(java.io.IOException e) { + Logger.error(this, "IOException while parsing the index: "+e.toString()); } } Modified: trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKDraft.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKDraft.java 2007-10-28 22:12:19 UTC (rev 15629) +++ trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKDraft.java 2007-10-29 00:19:53 UTC (rev 15630) @@ -5,6 +5,7 @@ import java.util.Date; import java.util.Vector; +import java.util.Iterator; import thaw.fcp.*; import thaw.plugins.signatures.Identity; @@ -14,6 +15,8 @@ import thaw.plugins.miniFrost.interfaces.Attachment; import thaw.core.I18n; +import thaw.core.ThawRunnable; +import thaw.core.ThawThread; public class KSKDraft implements thaw.plugins.miniFrost.interfaces.Draft, Observer { @@ -147,8 +150,54 @@ synchronized(board) { board.addObserver(this); board.refresh(2 /* until yesterday ; just to be sure because of the GMT conversion etc */); + } - KSKMessageParser generator = new KSKMessageParser( ((inReplyTo != null) ? + /* first check */ + update(board, null); + } + + + private class InsertionStarter implements ThawRunnable { + private boolean forceStop; + + public InsertionStarter() { + forceStop = false; + } + + public void run() { + boolean ready = false; + + while(!ready && attachments != null && !forceStop) { + ready = true; + + for (Iterator it = attachments.iterator(); + it.hasNext();) { + KSKAttachment a = (KSKAttachment)it.next(); + if (!a.isReady()) + ready = false; + } + + if (!ready) { + try { + Thread.sleep(500); + } catch(InterruptedException e) { + /* \_o< */ + } + } + } + + if (!forceStop) + startInsertion(); + } + + public void stop() { + forceStop = true; + } + } + + private void startInsertion() { + /* we generate first the XML message */ + KSKMessageParser generator = new KSKMessageParser( ((inReplyTo != null) ? inReplyTo.getMsgId() : null), nick, @@ -165,15 +214,9 @@ idLinePos, idLineLen); - fileToInsert = generator.generateXML(); - } - - /* first check */ - update(board, null); - } - - - private void startInsertion() { + fileToInsert = generator.generateXML(); + + waiting = false; posting = true; notifyPlugin(); @@ -227,7 +270,9 @@ board.deleteObserver(this); revUsed = board.getNextNonDownloadedRev(date, -1); - startInsertion(); + + ThawThread th = new ThawThread(new InsertionStarter(), "Frost message insertion starter"); + th.start(); } } From jflesch at freenetproject.org Mon Oct 29 00:50:08 2007 From: jflesch at freenetproject.org (jflesch at freenetproject.org) Date: Mon, 29 Oct 2007 00:50:08 +0000 (UTC) Subject: [Thaw-dev] r15631 - in trunk/apps/Thaw/src/thaw: core plugins/miniFrost/frostKSK Message-ID: <20071029005009.007DC390481@freenetproject.org> Author: jflesch Date: 2007-10-29 00:50:08 +0000 (Mon, 29 Oct 2007) New Revision: 15631 Modified: trunk/apps/Thaw/src/thaw/core/Config.java trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKDraft.java Log: Fix config writing and fix message posting Modified: trunk/apps/Thaw/src/thaw/core/Config.java =================================================================== --- trunk/apps/Thaw/src/thaw/core/Config.java 2007-10-29 00:19:53 UTC (rev 15630) +++ trunk/apps/Thaw/src/thaw/core/Config.java 2007-10-29 00:50:08 UTC (rev 15631) @@ -334,12 +334,6 @@ return false; } - try { - configOut.getWriter().close(); - } catch(java.io.IOException e) { - Logger.warning(this, "Can't close cleanly the config file"); - } - return true; } Modified: trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKDraft.java =================================================================== --- trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKDraft.java 2007-10-29 00:19:53 UTC (rev 15630) +++ trunk/apps/Thaw/src/thaw/plugins/miniFrost/frostKSK/KSKDraft.java 2007-10-29 00:50:08 UTC (rev 15631) @@ -263,7 +263,7 @@ if (initialInsertion) return; - if (fileToInsert == null || !isBoardUpToDateForToday()) + if (!isBoardUpToDateForToday()) return; initialInsertion = true;