From 3a1641a7c7fbef9420fee48ba25b95fc94ef6673 Mon Sep 17 00:00:00 2001 From: Daryle Walker Date: Tue, 29 Dec 2015 00:18:13 -0500 Subject: Remove extraneous group parameter from fetch-article-by-message-ID methods. --- src/core/nntp/MCNNTPSession.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core/nntp/MCNNTPSession.cpp') 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; -- cgit v1.2.3 From b0635b9e8f3ba3b48d1335b95ff32bd1731d74b5 Mon Sep 17 00:00:00 2001 From: Daryle Walker Date: Tue, 29 Dec 2015 15:42:16 -0500 Subject: Follow suggestions from @dinhviethoa. Follow suggestions to remove one unnecessary overload and to mark other as depreciated. (A third suggestion was covered by another commit.) --- src/core/nntp/MCNNTPSession.cpp | 5 ----- src/core/nntp/MCNNTPSession.h | 1 - src/objc/nntp/MCONNTPSession.h | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) (limited to 'src/core/nntp/MCNNTPSession.cpp') diff --git a/src/core/nntp/MCNNTPSession.cpp b/src/core/nntp/MCNNTPSession.cpp index bc86ebbc..933f10f2 100644 --- a/src/core/nntp/MCNNTPSession.cpp +++ b/src/core/nntp/MCNNTPSession.cpp @@ -493,11 +493,6 @@ Data * NNTPSession::fetchArticleByMessageID(String * messageID, ErrorCode * pErr 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; diff --git a/src/core/nntp/MCNNTPSession.h b/src/core/nntp/MCNNTPSession.h index c39cf727..ec0080ed 100644 --- a/src/core/nntp/MCNNTPSession.h +++ b/src/core/nntp/MCNNTPSession.h @@ -54,7 +54,6 @@ namespace mailcore { virtual Data * fetchArticle(String *groupName, unsigned int index, NNTPProgressCallback * callback, ErrorCode * pError); virtual Data * fetchArticleByMessageID(String * messageID, ErrorCode * pError); - virtual Data * fetchArticleByMessageID(String * groupname, String * messageID, ErrorCode * pError); virtual time_t fetchServerDate(ErrorCode * pError); diff --git a/src/objc/nntp/MCONNTPSession.h b/src/objc/nntp/MCONNTPSession.h index 6b540947..ce382577 100644 --- a/src/objc/nntp/MCONNTPSession.h +++ b/src/objc/nntp/MCONNTPSession.h @@ -153,7 +153,7 @@ // messageData is the RFC 822 formatted message data. }]; */ -- (MCONNTPFetchArticleOperation *) fetchArticleOperationWithMessageID:(NSString *)messageID inGroup:(NSString * __nullable)group; +- (MCONNTPFetchArticleOperation *) fetchArticleOperationWithMessageID:(NSString *)messageID inGroup:(NSString * __nullable)group DEPRECATED_ATTRIBUTE; /** Returns an operation that will fetch the server's date and time. -- cgit v1.2.3