From b4727bde29b57db2033fc0a9603f18c992cf3c4b Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Sun, 26 Feb 2017 13:06:38 +0100 Subject: [PATCH] Gxs Mail disabling is not supported ATM Fix some compiler warning Make travis-ci qmake parser happy with { --- libretroshare/src/libretroshare.pro | 3 +-- libretroshare/src/services/p3msgservice.cc | 16 ++++++++++++---- retroshare.pri | 10 +++++----- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro index d94d7005b..dbbe6414b 100644 --- a/libretroshare/src/libretroshare.pro +++ b/libretroshare/src/libretroshare.pro @@ -852,8 +852,7 @@ gxsphotoshare { serialiser/rsphotoitems.cc \ } -rs_gxs_mail -{ +rs_gxs_mail { HEADERS += serialiser/rsgxsmailitems.h services/p3gxsmails.h SOURCES += serialiser/rsgxsmailitems.cc services/p3gxsmails.cpp } diff --git a/libretroshare/src/services/p3msgservice.cc b/libretroshare/src/services/p3msgservice.cc index 4bb0eabcf..de310db3b 100644 --- a/libretroshare/src/services/p3msgservice.cc +++ b/libretroshare/src/services/p3msgservice.cc @@ -85,10 +85,11 @@ static const uint32_t RS_MSG_DISTANT_MESSAGE_HASH_KEEP_TIME = 2*30*86400 ; // ke p3MsgService::p3MsgService( p3ServiceControl *sc, p3IdService *id_serv, p3GxsMails& gxsMS ) - : p3Service(), p3Config(), mIdService(id_serv), mServiceCtrl(sc), - mMsgMtx("p3MsgService"), mMsgUniqueId(0), gxsMailService(gxsMS), - gxsOngoingMutex("p3MsgService Gxs Outgoing Mutex"), - recentlyReceivedMutex("p3MsgService recently received hash mutex") + : p3Service(), p3Config(), + gxsOngoingMutex("p3MsgService Gxs Outgoing Mutex"), mIdService(id_serv), + mServiceCtrl(sc), mMsgMtx("p3MsgService"), mMsgUniqueId(0), + recentlyReceivedMutex("p3MsgService recently received hash mutex"), + gxsMailService(gxsMS) { /* this serialiser is used for services. It's not the same than the one * returned by setupSerialiser(). We need both!! */ @@ -2030,8 +2031,13 @@ bool p3MsgService::receiveGxsMail( const RsGxsMailItem& originalMessage, handleIncomingItem(msg_item); } else + { std::cerr << "p3MsgService::receiveGxsMail(...) Item could not be " << "deserialised. Format error??" << std::endl; + return false; + } + + return true; } bool p3MsgService::notifySendMailStatus( const RsGxsMailItem& originalMessage, @@ -2131,6 +2137,8 @@ bool p3MsgService::notifySendMailStatus( const RsGxsMailItem& originalMessage, return true; } } + + return true; } void p3MsgService::receiveGRouterData( const RsGxsId &destination_key, diff --git a/retroshare.pri b/retroshare.pri index a794cb29d..52d81d9a1 100644 --- a/retroshare.pri +++ b/retroshare.pri @@ -60,10 +60,10 @@ rs_nodeprecatedwarning:CONFIG -= no_rs_nodeprecatedwarning CONFIG *= no_rs_nocppwarning rs_nocppwarning:CONFIG -= no_rs_nocppwarning -# To enable GXS mail append the following assignation to qmake command line -# "CONFIG+=rs_gxs_mail" -CONFIG *= no_rs_gxs_mail -rs_gxs_mail:CONFIG -= no_rs_gxs_mail +# To disable GXS mail append the following assignation to qmake command line +# "CONFIG+=no_rs_gxs_mail" +CONFIG *= rs_gxs_mail +#no_rs_gxs_mail:CONFIG -= rs_gxs_mail ## Disabing not supported ATM unix { @@ -179,7 +179,7 @@ rs_nodeprecatedwarning { rs_nocppwarning { QMAKE_CXXFLAGS += -Wno-cpp DEFINES *= RS_NO_WARN_CPP - warning("QMAKE: You have disable cpp warnings.") + warning("QMAKE: You have disable C preprocessor warnings.") } rs_gxs_mail:DEFINES *= RS_GXS_MAIL