diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc index 1ec7a4b54..ee2853502 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -1495,9 +1495,10 @@ int RsServer::StartupRetroShare() mGxsIdService, pgpAuxUtils); mGxsMails->setNetworkExchangeService(gxsmails_ns); pqih->addService(gxsmails_ns, true); - +# ifdef TEST_RS_GXS_MAIL TestGxsMailClientService* tgms = new TestGxsMailClientService(*mGxsMails, *mGxsIdService); +# endif // TEST_RS_GXS_MAIL # endif // RS_GXS_MAIL // remove pword from memory @@ -1831,7 +1832,9 @@ int RsServer::StartupRetroShare() # ifdef RS_GXS_MAIL startServiceThread(mGxsMails, "gxs mail"); startServiceThread(gxsmails_ns, "gxs mail ns"); +# ifdef TEST_RS_GXS_MAIL tgms->start("Gxs Mail Test Service"); +# endif // TEST_RS_GXS_MAIL # endif // RS_GXS_MAIL #endif // RS_ENABLE_GXS diff --git a/libretroshare/src/services/p3gxsmails.h b/libretroshare/src/services/p3gxsmails.h index a48ca58d7..6a717c1c5 100644 --- a/libretroshare/src/services/p3gxsmails.h +++ b/libretroshare/src/services/p3gxsmails.h @@ -216,6 +216,8 @@ private: void notifyClientService(const OutgoingRecord& pr); }; +#ifdef TEST_RS_GXS_MAIL + struct TestGxsMailClientService : GxsMailsClient, RsSingleJobThread { TestGxsMailClientService( p3GxsMails& gxsMailService, @@ -280,3 +282,6 @@ private: p3GxsMails& mailService; p3IdService& idService; }; + +#endif // TEST_RS_GXS_MAIL +