3535#include " dasds.hpp"
3636
3737#include < map>
38+ #include < inttypes.h>
3839
3940/* **************************************************************************
4041 * CEspHttpServer Implementation
@@ -2160,13 +2161,13 @@ void CEspHttpServer::resetSessionTimeout(EspAuthRequest& authReq, unsigned sessi
21602161 CDateTime timeoutAtCDT;
21612162 StringBuffer timeoutAtString, nowString;
21622163 timetToIDateTime (&timeoutAtCDT, timeoutAt);
2163- PROGLOG (" Reset %s for (/%s/%s) at <%s><%ld > : expires at <%s><%ld >" , PropSessionTimeoutAt,
2164+ PROGLOG (" Reset %s for (/%s/%s) at <%s><%" PRId64 " > : expires at <%s><%" PRId64 " >" , PropSessionTimeoutAt,
21642165 authReq.serviceName .isEmpty () ? " " : authReq.serviceName .str (), authReq.methodName .isEmpty () ? " " : authReq.methodName .str (),
2165- now.getString (nowString).str (), createTime, timeoutAtCDT.getString (timeoutAtString).str (), timeoutAt);
2166+ now.getString (nowString).str (), ( int64_t ) createTime, timeoutAtCDT.getString (timeoutAtString).str (), ( int64_t ) timeoutAt);
21662167 }
21672168 else
2168- ESPLOG (LogMin, " Reset %s for (/%s/%s) : %ld " , PropSessionTimeoutAt, authReq.serviceName .isEmpty () ? " " : authReq.serviceName .str (),
2169- authReq.methodName .isEmpty () ? " " : authReq.methodName .str (), timeoutAt);
2169+ ESPLOG (LogMin, " Reset %s for (/%s/%s) : %" PRId64 " " , PropSessionTimeoutAt, authReq.serviceName .isEmpty () ? " " : authReq.serviceName .str (),
2170+ authReq.methodName .isEmpty () ? " " : authReq.methodName .str (), ( int64_t ) timeoutAt);
21702171
21712172 if (format == ESPSerializationJSON)
21722173 {
@@ -2388,8 +2389,8 @@ EspAuthState CEspHttpServer::authExistingSession(EspAuthRequest& authReq, unsign
23882389 {
23892390 time_t timeoutAt = createTime + authReq.authBinding ->getServerSessionTimeoutSeconds ();
23902391 sessionTree->setPropInt64 (PropSessionTimeoutAt, timeoutAt);
2391- ESPLOG (LogMin, " Updated %s for (/%s/%s) : %ld " , PropSessionTimeoutAt, authReq.serviceName .isEmpty () ? " " : authReq.serviceName .str (),
2392- authReq.methodName .isEmpty () ? " " : authReq.methodName .str (), timeoutAt);
2392+ ESPLOG (LogMin, " Updated %s for (/%s/%s) : %" PRId64 " " , PropSessionTimeoutAt, authReq.serviceName .isEmpty () ? " " : authReq.serviceName .str (),
2393+ authReq.methodName .isEmpty () ? " " : authReq.methodName .str (), ( int64_t ) timeoutAt);
23932394 }
23942395 // /authReq.ctx->setAuthorized(true);
23952396 VStringBuffer sessionIDStr (" %u" , sessionID);
@@ -2554,11 +2555,12 @@ unsigned CEspHttpServer::createHTTPSession(IEspContext* ctx, EspHttpBinding* aut
25542555 time_t createTime = now.getSimple ();
25552556
25562557 StringBuffer peer, sessionIDStr, sessionTag;
2557- VStringBuffer idStr (" %s_%ld " , m_request->getPeer (peer).str (), createTime);
2558+ VStringBuffer idStr (" %s_%" PRId64 " " , m_request->getPeer (peer).str (), ( int64_t ) createTime);
25582559 unsigned sessionID = hashc ((unsigned char *)idStr.str (), idStr.length (), 0 );
25592560 sessionIDStr.append (sessionID);
25602561
25612562 sessionTag.appendf (" %s%u" , PathSessionSession, sessionID);
2563+ ESPLOG (LogMax, " New sessionID <%u> at <%" PRId64 " > in createHTTPSession()" , sessionID, (int64_t )createTime);
25622564 Owned<IRemoteConnection> conn = getSDSConnection (authBinding->querySessionSDSPath (), RTM_LOCK_WRITE, SESSION_SDS_LOCK_TIMEOUT);
25632565 IPropertyTree* domainSessions = conn->queryRoot ();
25642566 IPropertyTree* sessionTree = domainSessions->queryBranch (sessionTag.str ());
@@ -2569,7 +2571,7 @@ unsigned CEspHttpServer::createHTTPSession(IEspContext* ctx, EspHttpBinding* aut
25692571 sessionTree->setPropInt64 (PropSessionTimeoutAt, createTime + authBinding->getServerSessionTimeoutSeconds ());
25702572 return sessionID;
25712573 }
2572- ESPLOG (LogMax, " New sessionID <%d> at <%ld > in createHTTPSession()" , sessionID, createTime);
2574+ ESPLOG (LogMax, " New sessionID <%d> at <%" PRId64 " > in createHTTPSession()" , sessionID, ( int64_t ) createTime);
25732575
25742576 IPropertyTree* ptree = domainSessions->addPropTree (sessionTag.str ());
25752577 ptree->setProp (PropSessionNetworkAddress, peer.str ());
0 commit comments