start *IDs from different non-zero

Help detect situations where SID, CID, or IOID are mixed up
This commit is contained in:
Michael Davidsaver
2020-04-07 12:00:37 -07:00
parent cfda7e2260
commit 3b641bed84
3 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -84,7 +84,7 @@ struct Connection : public ConnBase, public std::enable_shared_from_this<Connect
// entries always have matching entry in a Channel::opByIOID
std::map<uint32_t, RequestInfo> opByIOID;
uint32_t nextIOID = 0u;
uint32_t nextIOID = 0x10002000u;
INST_COUNTER(Connection);
@@ -171,7 +171,7 @@ struct Context::Pvt
const Value caMethod;
uint32_t nextCID=0u;
uint32_t nextCID=0x12345678;
evsocket searchTx;
uint16_t searchRxPort;
-1
View File
@@ -32,7 +32,6 @@ ServerConn::ServerConn(ServIface* iface, evutil_socket_t sock, struct sockaddr *
bufferevent_socket_new(iface->server->acceptor_loop.base, sock, BEV_OPT_CLOSE_ON_FREE|BEV_OPT_DEFER_CALLBACKS),
SockAddr(peer, socklen))
,iface(iface)
,nextSID(0)
{
log_debug_printf(connio, "Client %s connects\n", peerName.c_str());
+1 -1
View File
@@ -108,7 +108,7 @@ struct ServerConn : public ConnBase, public std::enable_shared_from_this<ServerC
std::string autoMethod;
Value credentials;
uint32_t nextSID;
uint32_t nextSID=0x07050301;
std::map<uint32_t, std::shared_ptr<ServerChan> > chanBySID;
std::map<uint32_t, std::shared_ptr<ServerOp> > opByIOID;