diff options
author | CodaFi <devteam.codafi@gmail.com> | 2014-08-13 19:11:10 -0600 |
---|---|---|
committer | CodaFi <devteam.codafi@gmail.com> | 2014-08-13 19:11:10 -0600 |
commit | 5f82321bf14e8836da9d9a9f9caf9f12d021eef8 (patch) | |
tree | 10dad00a41cdb224bde372697827ac746dbf66a4 /src/core/nntp | |
parent | 9fdbf0688e3c8bc9ad94ff8b475ce534749f418d (diff) |
cpp -> cc
Diffstat (limited to 'src/core/nntp')
-rw-r--r-- | src/core/nntp/MCNNTPGroupInfo.cc (renamed from src/core/nntp/MCNNTPGroupInfo.cpp) | 0 | ||||
-rw-r--r-- | src/core/nntp/MCNNTPMessageInfo.cc (renamed from src/core/nntp/MCNNTPMessageInfo.cpp) | 0 | ||||
-rw-r--r-- | src/core/nntp/MCNNTPSession.cc (renamed from src/core/nntp/MCNNTPSession.cpp) | 14 | ||||
-rw-r--r-- | src/core/nntp/MCNNTPSession.h | 4 |
4 files changed, 12 insertions, 6 deletions
diff --git a/src/core/nntp/MCNNTPGroupInfo.cpp b/src/core/nntp/MCNNTPGroupInfo.cc index 0f941348..0f941348 100644 --- a/src/core/nntp/MCNNTPGroupInfo.cpp +++ b/src/core/nntp/MCNNTPGroupInfo.cc diff --git a/src/core/nntp/MCNNTPMessageInfo.cpp b/src/core/nntp/MCNNTPMessageInfo.cc index 474de9b3..474de9b3 100644 --- a/src/core/nntp/MCNNTPMessageInfo.cpp +++ b/src/core/nntp/MCNNTPMessageInfo.cc diff --git a/src/core/nntp/MCNNTPSession.cpp b/src/core/nntp/MCNNTPSession.cc index bad1ebb4..a31abb1d 100644 --- a/src/core/nntp/MCNNTPSession.cpp +++ b/src/core/nntp/MCNNTPSession.cc @@ -401,7 +401,7 @@ Array * NNTPSession::listSubscribedNewsgroups(ErrorCode * pError) return result; } -MessageHeader * NNTPSession::fetchHeader(unsigned int index, ErrorCode * pError) +MessageHeader * NNTPSession::fetchHeader(String *groupName, unsigned int index, ErrorCode * pError) { int r; char * content; @@ -409,8 +409,14 @@ MessageHeader * NNTPSession::fetchHeader(unsigned int index, ErrorCode * pError) MCLog("fetch header at index %u", index); loginIfNeeded(pError); - if (* pError != ErrorNone) + if (* pError != ErrorNone) { + return NULL; + } + + selectGroup(groupName, pError); + if (* pError != ErrorNone) { return NULL; + } r = newsnntp_head(mNNTP, index, &content, &content_len); if (r != NEWSNNTP_NO_ERROR) { @@ -431,9 +437,9 @@ MessageHeader * NNTPSession::fetchHeader(unsigned int index, ErrorCode * pError) return result; } -MessageHeader * NNTPSession::fetchHeader(NNTPMessageInfo * msg, ErrorCode * pError) +MessageHeader * NNTPSession::fetchHeader(String *groupName, NNTPMessageInfo * msg, ErrorCode * pError) { - return fetchHeader(msg->index(), pError); + return fetchHeader(groupName, msg->index(), pError); } Data * NNTPSession::fetchArticle(String *groupName, unsigned int index, NNTPProgressCallback * callback, ErrorCode * pError) diff --git a/src/core/nntp/MCNNTPSession.h b/src/core/nntp/MCNNTPSession.h index 6f8bf73a..d166354c 100644 --- a/src/core/nntp/MCNNTPSession.h +++ b/src/core/nntp/MCNNTPSession.h @@ -48,8 +48,8 @@ namespace mailcore { virtual Array * /* NNTPGroupInfo */ listAllNewsgroups(ErrorCode * pError); virtual Array * listSubscribedNewsgroups(ErrorCode * pError); - virtual MessageHeader * fetchHeader(unsigned int index, ErrorCode * pError); - virtual MessageHeader * fetchHeader(NNTPMessageInfo * msg, ErrorCode * pError); + virtual MessageHeader * fetchHeader(String *groupName, unsigned int index, ErrorCode * pError); + virtual MessageHeader * fetchHeader(String *groupName, NNTPMessageInfo * msg, ErrorCode * pError); virtual Array * /* NNTPMessageInfo */ fetchArticles(String * groupname, ErrorCode * pError); |