aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/nntp/MCNNTPSession.cpp
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-12-06 22:53:16 -0800
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-12-06 22:54:00 -0800
commit5d4c2897b76a49374dc5e95aaf114db8b88b807d (patch)
tree26f74866c701ea99d50e4d95a66ed47e72fc83ea /src/core/nntp/MCNNTPSession.cpp
parenta97f41bcc5afc356117462b7ead626ff195cd7bc (diff)
Build for Android
Diffstat (limited to 'src/core/nntp/MCNNTPSession.cpp')
-rw-r--r--src/core/nntp/MCNNTPSession.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/nntp/MCNNTPSession.cpp b/src/core/nntp/MCNNTPSession.cpp
index 4f50f46e..44765a3e 100644
--- a/src/core/nntp/MCNNTPSession.cpp
+++ b/src/core/nntp/MCNNTPSession.cpp
@@ -17,6 +17,7 @@
#include "MCMessageHeader.h"
#include "MCConnectionLoggerUtils.h"
#include "MCCertificateUtils.h"
+#include "MCLibetpan.h"
#define NNTP_DEFAULT_PORT 119
#define NNTPS_DEFAULT_PORT 563
@@ -504,21 +505,21 @@ time_t NNTPSession::fetchServerDate(ErrorCode * pError) {
loginIfNeeded(pError);
if (* pError != ErrorNone) {
- return NULL;
+ return (time_t) -1;
}
r = newsnntp_date(mNNTP, &time);
if (r == NEWSNNTP_ERROR_STREAM) {
* pError = ErrorConnection;
- return NULL;
+ return (time_t) -1;
}
else if (r != NEWSNNTP_NO_ERROR) {
* pError = ErrorServerDate;
- return NULL;
+ return (time_t) -1;
}
- result = timegm(&time);
+ result = mkgmtime(&time);
* pError = ErrorNone;
return result;