diff --git a/src/app/Common.cpp b/src/app/Common.cpp index 1bd5a80..099460f 100644 --- a/src/app/Common.cpp +++ b/src/app/Common.cpp @@ -291,14 +291,13 @@ namespace Apostol { m_SyncPeriod = StrToIntDef(Data[0].Trim().c_str(), BPS_DEFAULT_SYNC_PERIOD); } } if (uid.Name.Length() >= 35 && uid.Name.SubString(0, 3) == BM_PREFIX) { +#ifdef _DEBUG + ServerList.AddPair(BPS_BM_DEBUG_ADDRESS, BPS_DEBUG_SERVER_URL); +#endif CStringList urlList; if (FindURLInLine(uid.Desc, urlList)) { for (int l = 0; l < urlList.Count(); l++) { -#ifndef _DEBUG ServerList.AddPair(uid.Name, urlList[l]); -#else - ServerList.AddPair(BPS_BM_SERVER_ADDRESS, BPS_SERVER_URL); -#endif } } } else if (name.Find("bitcoin_key") != CString::npos) { diff --git a/src/app/Context.hpp b/src/app/Context.hpp index 856892f..af9cbbb 100644 --- a/src/app/Context.hpp +++ b/src/app/Context.hpp @@ -22,10 +22,13 @@ Author: //---------------------------------------------------------------------------------------------------------------------- #define BPS_DEFAULT_SYNC_PERIOD 30 -#define BPS_SERVER_PORT 4977 -#define BPS_SERVER_URL "http://localhost:4977" +#define BPS_SERVER_PORT 80 +#define BPS_SERVER_URL "https://testnet.bitdeals.org" #define BPS_BM_SERVER_ADDRESS "BM-2cX8y9u9yEi3fdqQfndx9F6NdR5Hv79add" -#define BPS_BM_DEBUG_ADDRESS "BM-2cXtL92m3CavBKx8qsV2LbZtAU3eQxW2rB" + +#define BPS_DEBUG_SERVER_PORT 4977 +#define BPS_DEBUG_SERVER_URL "http://localhost:4977" +#define BPS_BM_DEBUG_ADDRESS "BM-2cX8y9u9yEi3fdqQfndx9F6NdR5Hv79add" //---------------------------------------------------------------------------------------------------------------------- #ifdef __cplusplus diff --git a/src/modules/Workers/WebService/WebService.cpp b/src/modules/Workers/WebService/WebService.cpp index 6da998b..22c6ae3 100644 --- a/src/modules/Workers/WebService/WebService.cpp +++ b/src/modules/Workers/WebService/WebService.cpp @@ -69,7 +69,7 @@ namespace Apostol { if (m_Servers.Count() == 0) { #ifdef _DEBUG - int index = m_Servers.AddPair(BPS_BM_DEBUG_ADDRESS, CContext(BPS_BM_DEBUG_ADDRESS, CLocation(BPS_SERVER_URL))); + const int index = m_Servers.AddPair(BPS_BM_DEBUG_ADDRESS, CContext(BPS_BM_DEBUG_ADDRESS, CLocation(BPS_DEBUG_SERVER_URL))); auto &Keys = m_Servers[index].Value().PGP(); Keys.Add(CKeyContext(CString("PUBLIC"), CString())); Keys.Add(CKeyContext(CString(BPS_BM_DEBUG_ADDRESS), CString())); diff --git a/src/modules/Workers/WebSocket/WebSocket.cpp b/src/modules/Workers/WebSocket/WebSocket.cpp index 9fc6008..1ccad83 100644 --- a/src/modules/Workers/WebSocket/WebSocket.cpp +++ b/src/modules/Workers/WebSocket/WebSocket.cpp @@ -68,19 +68,18 @@ namespace Apostol { if (m_Servers.Count() == 0) { #ifdef _DEBUG - int index = m_Servers.AddPair(BPS_BM_DEBUG_ADDRESS, CClientContext(BPS_BM_DEBUG_ADDRESS, CLocation(BPS_SERVER_URL))); + const int index = m_Servers.AddPair(BPS_BM_DEBUG_ADDRESS, CClientContext(BPS_BM_DEBUG_ADDRESS, CLocation(BPS_DEBUG_SERVER_URL))); auto &Keys = m_Servers[index].Value().PGP(); Keys.Add(CKeyContext(CString("PUBLIC"), CString())); Keys.Add(CKeyContext(CString(BPS_BM_DEBUG_ADDRESS), CString())); -#else - m_Servers.Add(m_DefaultServer); #endif + m_Servers.Add(m_DefaultServer); } } //-------------------------------------------------------------------------------------------------------------- CWebSocketClient *CWebSocketModule::GetWebSocketClient(CClientContext &Context) { - auto pClient = Context.ClientManager().Add(&Context, CLocation(Context.URL().Origin() + "/session/" + Context.Session())); + const auto pClient = Context.ClientManager().Add(&Context, CLocation(Context.URL().Origin() + "/session/" + Context.Session())); pClient->Session() = Context.Session();