Fixes of msg sync optimisation

- msg sync opt now working
 

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs_finale@6913 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2013-11-27 21:54:05 +00:00
parent 3460457771
commit e50f017572
2 changed files with 3 additions and 2 deletions

View File

@ -250,10 +250,10 @@ void RsDataService::initialise(){
KEY_SIGN_SET + " BLOB);"); KEY_SIGN_SET + " BLOB);");
mDb->execSQL("CREATE TRIGGER " + GRP_LAST_POST_UPDATE_TRIGGER + mDb->execSQL("CREATE TRIGGER " + GRP_LAST_POST_UPDATE_TRIGGER +
" UPDATE OF " + KEY_RECV_TS + " ON " + MSG_TABLE_NAME + " INSERT ON " + MSG_TABLE_NAME +
std::string(" BEGIN ") + std::string(" BEGIN ") +
" UPDATE " + GRP_TABLE_NAME + " SET " + KEY_GRP_LAST_POST + "= new." " UPDATE " + GRP_TABLE_NAME + " SET " + KEY_GRP_LAST_POST + "= new."
+ KEY_RECV_TS + " WHERE " + KEY_GRP_ID + "=old." + KEY_GRP_ID + ";" + KEY_RECV_TS + " WHERE " + KEY_GRP_ID + "=new." + KEY_GRP_ID + ";"
+ std::string("END;")); + std::string("END;"));
} }

View File

@ -2303,6 +2303,7 @@ void RsGenExchange::processRecvdMessages()
if(validated_entry != mMsgPendingValidate.end()) mMsgPendingValidate.erase(validated_entry); if(validated_entry != mMsgPendingValidate.end()) mMsgPendingValidate.erase(validated_entry);
computeHash(msg->msg, meta->mHash); computeHash(msg->msg, meta->mHash);
meta->recvTS = time(NULL);
} }
} }
else else