From: Mailing l. f. C. c. m. <jtc...@li...> - 2007-03-31 12:28:58
|
Update of /cvsroot/jtcfrost/frost-wot/source/frost/storage/database/applayer In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv27241/source/frost/storage/database/applayer Modified Files: MessageDatabaseTable.java Log Message: - fixed bug that showed new messages for a board, but if you click on board there was no new message - download/upload starts smallest items first and continues started items correctly on 0.5 Index: MessageDatabaseTable.java =================================================================== RCS file: /cvsroot/jtcfrost/frost-wot/source/frost/storage/database/applayer/MessageDatabaseTable.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** MessageDatabaseTable.java 23 Mar 2007 09:08:01 -0000 1.36 --- MessageDatabaseTable.java 31 Mar 2007 12:28:16 -0000 1.37 *************** *** 197,201 **** } ! public synchronized void insertMessage(FrostMessageObject mo) throws SQLException { AttachmentList files = mo.getAttachmentsOfType(Attachment.FILE); --- 197,201 ---- } ! public synchronized boolean insertMessage(FrostMessageObject mo) throws SQLException { AttachmentList files = mo.getAttachmentsOfType(Attachment.FILE); *************** *** 260,264 **** if( inserted == 0 ) { logger.log(Level.SEVERE, "message insert returned 0 !!!"); ! return; } --- 260,264 ---- if( inserted == 0 ) { logger.log(Level.SEVERE, "message insert returned 0 !!!"); ! return false; // message not inserted } *************** *** 324,327 **** --- 324,329 ---- conn.commit(); conn.setAutoCommit(true); + + return true; // message inserted } catch(Throwable t) { if( t.getMessage().indexOf("constraint violation") > 0 && t.getMessage().indexOf("MSG_ID_UNIQUE_ONLY") > 0 ) { *************** *** 335,338 **** --- 337,341 ---- AppLayerDatabase.getInstance().givePooledConnection(conn); } + return false; // message not inserted } |