diff options
author | 2016-01-18 23:41:02 -0500 | |
---|---|---|
committer | 2016-01-18 23:41:02 -0500 | |
commit | 63e1f0471769d8a72edeafbd4e65b9d0c2763e9e (patch) | |
tree | bd602a8610c680548761a8fac3fd48025b3f9df5 /src/core/nntp | |
parent | e1fddae3b6edbbd33a22408f30a36704906cd30f (diff) | |
parent | ab62ae2cdddc2fda8ad667260db22617839b3593 (diff) |
Merge branch 'master' of https://github.com/MailCore/mailcore2
Diffstat (limited to 'src/core/nntp')
-rw-r--r-- | src/core/nntp/MCNNTPGroupInfo.cpp | 2 | ||||
-rw-r--r-- | src/core/nntp/MCNNTPSession.cpp | 7 | ||||
-rw-r--r-- | src/core/nntp/MCNNTPSession.h | 2 |
3 files changed, 4 insertions, 7 deletions
diff --git a/src/core/nntp/MCNNTPGroupInfo.cpp b/src/core/nntp/MCNNTPGroupInfo.cpp index 787967f3..8ebe08bc 100644 --- a/src/core/nntp/MCNNTPGroupInfo.cpp +++ b/src/core/nntp/MCNNTPGroupInfo.cpp @@ -13,10 +13,12 @@ using namespace mailcore; void NNTPGroupInfo::init() { mMessageCount = 0; + mName = NULL; } NNTPGroupInfo::NNTPGroupInfo() { + MC_SAFE_RELEASE(mName); init(); } diff --git a/src/core/nntp/MCNNTPSession.cpp b/src/core/nntp/MCNNTPSession.cpp index f6427006..933f10f2 100644 --- a/src/core/nntp/MCNNTPSession.cpp +++ b/src/core/nntp/MCNNTPSession.cpp @@ -464,7 +464,7 @@ Data * NNTPSession::fetchArticle(String *groupName, unsigned int index, NNTPProg return result; } -Data * NNTPSession::fetchArticleByMessageID(String * groupName, String * messageID, ErrorCode * pError) +Data * NNTPSession::fetchArticleByMessageID(String * messageID, ErrorCode * pError) { int r; char * msgID; @@ -473,11 +473,6 @@ Data * NNTPSession::fetchArticleByMessageID(String * groupName, String * message MCLog("fetch article at message-id %s", messageID->UTF8Characters()); - selectGroup(groupName, pError); - if (* pError != ErrorNone) { - return NULL; - } - msgID = strdup(messageID->UTF8Characters()); r = newsnntp_article_by_message_id(mNNTP, msgID, &content, &content_len); diff --git a/src/core/nntp/MCNNTPSession.h b/src/core/nntp/MCNNTPSession.h index dc2316ff..ec0080ed 100644 --- a/src/core/nntp/MCNNTPSession.h +++ b/src/core/nntp/MCNNTPSession.h @@ -53,7 +53,7 @@ namespace mailcore { virtual IndexSet * fetchAllArticles(String * groupname, ErrorCode * pError); virtual Data * fetchArticle(String *groupName, unsigned int index, NNTPProgressCallback * callback, ErrorCode * pError); - virtual Data * fetchArticleByMessageID(String * groupname, String * messageID, ErrorCode * pError); + virtual Data * fetchArticleByMessageID(String * messageID, ErrorCode * pError); virtual time_t fetchServerDate(ErrorCode * pError); |