diff --git a/src/bitdht/bdconnection.cc b/src/bitdht/bdconnection.cc index 1a79bd2..a301395 100644 --- a/src/bitdht/bdconnection.cc +++ b/src/bitdht/bdconnection.cc @@ -34,6 +34,8 @@ #include "util/bdnet.h" #include "util/bdrandom.h" +#include + /* * #define DEBUG_PROXY_CONNECTION 1 * #define DEBUG_NODE_CONNECTION 1 @@ -3375,6 +3377,11 @@ std::string decodeConnectionErrorType(uint32_t errcode) switch(errtype) { default: + { + std::ostringstream out; + out << "(" << errtype << ")"; + namedtype += out.str(); + } break; case BITDHT_CONNECT_ERROR_GENERIC: namedtype = "GENERIC"; @@ -3427,6 +3434,11 @@ std::string decodeConnectionErrorSource(uint32_t errcode) switch(errsrc) { default: + { + std::ostringstream out; + out << "(" << errsrc << ")"; + namedtype += out.str(); + } break; case BITDHT_CONNECT_ERROR_SOURCE_START: namedtype = "START"; diff --git a/src/bitdht/bdconnection.h b/src/bitdht/bdconnection.h index d8df776..989e09e 100644 --- a/src/bitdht/bdconnection.h +++ b/src/bitdht/bdconnection.h @@ -153,8 +153,8 @@ class bdProxyId { public: - bdProxyId(const bdId &in_id, uint32_t in_srctype, uint32_t errcode) - :id(in_id), srcType(in_srctype) { return; } + bdProxyId(const bdId &in_id, uint32_t in_srctype, uint32_t in_errcode) + :id(in_id), srcType(in_srctype), errcode(in_errcode) { return; } bdProxyId() :srcType(BD_PI_SRC_UNKNOWN) { return; } diff --git a/src/util/bdthreads.cc b/src/util/bdthreads.cc index 2d70e7f..b52d152d 100644 --- a/src/util/bdthreads.cc +++ b/src/util/bdthreads.cc @@ -32,7 +32,7 @@ * #define DEBUG_THREADS 1 *******/ -#define DEBUG_THREADS 1 +//#define DEBUG_THREADS 1 #ifdef DEBUG_THREADS #include