From fb21e427be5e88ce05aea5f7addaecebf8995f8a Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 4 Oct 2018 19:14:21 +0200 Subject: [PATCH 1/2] removed saving of GxsTrans configuration in class destructor, causing lock up when quitting RS --- libretroshare/src/gxstrans/p3gxstrans.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libretroshare/src/gxstrans/p3gxstrans.cc b/libretroshare/src/gxstrans/p3gxstrans.cc index c57b24fbc..c58a514bb 100644 --- a/libretroshare/src/gxstrans/p3gxstrans.cc +++ b/libretroshare/src/gxstrans/p3gxstrans.cc @@ -33,7 +33,8 @@ const uint32_t p3GxsTrans::MAX_DELAY_BETWEEN_CLEANUPS = 900; // every 15 mins. C p3GxsTrans::~p3GxsTrans() { - p3Config::saveConfiguration(); + // (cyril) this cannot be called here! There's chances the thread that saves configs will be dead already! + //p3Config::saveConfiguration(); { RS_STACK_MUTEX(mIngoingMutex); From c6d0203557a11d95e0112193af7133c098872e77 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 4 Oct 2018 19:22:49 +0200 Subject: [PATCH 2/2] added debug output to see which config files are loaded/saved --- libretroshare/src/pqi/p3cfgmgr.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libretroshare/src/pqi/p3cfgmgr.cc b/libretroshare/src/pqi/p3cfgmgr.cc index d41a47c80..346e0b99b 100644 --- a/libretroshare/src/pqi/p3cfgmgr.cc +++ b/libretroshare/src/pqi/p3cfgmgr.cc @@ -318,6 +318,7 @@ bool p3Config::loadAttempt(const std::string& cfgFname,const std::string& signFn if(signatureRead != signatureStored) return false; + std::cerr << "(II) Loaded configuration file " << cfgFname << std::endl; return true; } @@ -328,7 +329,6 @@ bool p3Config::saveConfiguration() bool p3Config::saveConfig() { - bool cleanup = true; std::list toSave; saveList(cleanup, toSave); @@ -343,6 +343,7 @@ bool p3Config::saveConfig() std::string cfgFname = Filename(); std::string signFname = Filename() + ".sgn"; + std::cerr << "(II) Saving configuration file " << cfgFname << std::endl; uint32_t bioflags = BIN_FLAGS_HASH_DATA | BIN_FLAGS_WRITEABLE; uint32_t stream_flags = BIN_FLAGS_WRITEABLE;