thunders patch, mem leak, and ignored return vals

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3350 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
chrisparker126 2010-08-08 12:46:24 +00:00
parent cf75bee791
commit 9ff6849a55
2 changed files with 21 additions and 5 deletions

View file

@ -224,9 +224,6 @@ bool p3Forums::getForumThreadMsgList(std::string fId, std::string pId, std::list
bool p3Forums::getForumMessage(std::string fId, std::string mId, ForumMsgInfo &info)
{
std::list<std::string> msgIds;
std::list<std::string>::iterator it;
RsStackMutex stack(distribMtx); /***** STACK LOCKED MUTEX *****/
RsDistribMsg *msg = locked_getGroupMsg(fId, mId);
@ -265,6 +262,10 @@ bool p3Forums::ForumMessageSend(ForumMsgInfo &info)
std::string mId = createForumMsg(info.forumId, info.parentId,
info.title, info.msg, signIt);
if (mId.empty()) {
return false;
}
setMessageStatus(info.forumId, mId, FORUM_MSG_STATUS_READ);
return true;
@ -326,6 +327,11 @@ std::string p3Forums::createForumMsg(std::string fId, std::string pId,
fmsg->timestamp = time(NULL);
std::string msgId = publishMsg(fmsg, signIt);
if (msgId.empty()) {
delete(fmsg);
}
return msgId;
}