aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Daryle Walker <CTMacUser@users.noreply.github.com>2015-12-22 07:54:31 -0500
committerGravatar Daryle Walker <CTMacUser@users.noreply.github.com>2015-12-22 07:54:31 -0500
commitde576131cfb22ef11a2925b9b9422cdc8797fa13 (patch)
tree89b19d1d55aa75a915b251d65cef1343e7025d9b
parent8b5da84e87011f71ce6bab4b23f7dd37eaa4f77d (diff)
Write new retrieve-article-by-message-ID method.
Write variant of the retrieve-article-by-message-ID method that doesn't require the unnecessary parameter for a group. Rewrite the older method to call the new one.
-rw-r--r--src/core/nntp/MCNNTPSession.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/nntp/MCNNTPSession.cpp b/src/core/nntp/MCNNTPSession.cpp
index f6427006..bc86ebbc 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);
@@ -498,6 +493,11 @@ Data * NNTPSession::fetchArticleByMessageID(String * groupName, String * message
return result;
}
+Data * NNTPSession::fetchArticleByMessageID(String * groupName, String * messageID, ErrorCode * pError)
+{
+ return this->fetchArticleByMessageID(messageID, pError);
+}
+
time_t NNTPSession::fetchServerDate(ErrorCode * pError) {
int r;
struct tm time;