MCPcopy Create free account
hub / github.com/MailCore/mailcore2 / fetchServerDate

Method fetchServerDate

src/core/nntp/MCNNTPSession.cpp:520–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

518}
519
520time_t NNTPSession::fetchServerDate(ErrorCode * pError) {
521 int r;
522 struct tm time;
523 time_t result;
524
525 loginIfNeeded(pError);
526 if (* pError != ErrorNone) {
527 return (time_t) -1;
528 }
529
530 r = newsnntp_date(mNNTP, &time);
531
532 if (r == NEWSNNTP_ERROR_STREAM) {
533 * pError = ErrorConnection;
534 return (time_t) -1;
535 }
536 else if (r != NEWSNNTP_NO_ERROR) {
537 * pError = ErrorServerDate;
538 return (time_t) -1;
539 }
540
541 result = mkgmtime(&time);
542 * pError = ErrorNone;
543
544 return result;
545}
546
547IndexSet * NNTPSession::fetchAllArticles(String * groupName, ErrorCode * pError)
548{

Callers 1

mainMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected