From fcdb3d6c88265f24d7eac79ab3d0b02877b4f2ac Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Tue, 21 Feb 2017 11:43:18 +0100 Subject: [PATCH] RsGenExchange enum for create status --- libretroshare/src/gxs/rsgenexchange.cc | 3 --- libretroshare/src/gxs/rsgenexchange.h | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libretroshare/src/gxs/rsgenexchange.cc b/libretroshare/src/gxs/rsgenexchange.cc index 1b2cb3f8f..323f6632c 100644 --- a/libretroshare/src/gxs/rsgenexchange.cc +++ b/libretroshare/src/gxs/rsgenexchange.cc @@ -83,9 +83,6 @@ RsGenExchange::RsGenExchange(RsGeneralDataService *gds, RsNetworkExchangeService mChecking(false), mLastCheck((int)time(NULL) - (int)(RSRandom::random_u32() % INTEGRITY_CHECK_PERIOD) + 120), // this helps unsynchronising the checks for the different services, with 2 min security to avoid checking right away before statistics come up. mIntegrityCheck(NULL), - CREATE_FAIL(0), - CREATE_SUCCESS(1), - CREATE_FAIL_TRY_LATER(2), SIGN_MAX_WAITING_TIME(60), SIGN_FAIL(0), SIGN_SUCCESS(1), diff --git a/libretroshare/src/gxs/rsgenexchange.h b/libretroshare/src/gxs/rsgenexchange.h index b918789c7..373d9ad30 100644 --- a/libretroshare/src/gxs/rsgenexchange.h +++ b/libretroshare/src/gxs/rsgenexchange.h @@ -878,8 +878,9 @@ private: RsGxsIntegrityCheck* mIntegrityCheck; protected: + enum CreateStatus { CREATE_FAIL, CREATE_SUCCESS, CREATE_FAIL_TRY_LATER }; + const uint8_t SIGN_MAX_WAITING_TIME; // TODO: cleanup this should be an enum! - const uint8_t CREATE_FAIL, CREATE_SUCCESS, CREATE_FAIL_TRY_LATER, SIGN_MAX_WAITING_TIME; const uint8_t SIGN_FAIL, SIGN_SUCCESS, SIGN_FAIL_TRY_LATER; const uint8_t VALIDATE_FAIL, VALIDATE_SUCCESS, VALIDATE_FAIL_TRY_LATER, VALIDATE_MAX_WAITING_TIME;