|
21 | 21 | static const char* MODULE_PREFIX = "ProtExchg"; |
22 | 22 |
|
23 | 23 | // Warn |
24 | | -// #define WARN_ON_SLOW_PROC_ENDPOINT_MESSAGE |
| 24 | +#define WARN_ON_SLOW_PROC_ENDPOINT_MESSAGE |
25 | 25 | #define WARN_ON_FILE_UPLOAD_FAILED |
| 26 | +#define WARN_ON_FILE_STREAM_SESSION_NOT_FOUND |
26 | 27 | // #define WARN_ON_FILE_STREAM_BLOCK_LENGTH_ZERO |
27 | 28 |
|
28 | 29 | // Debug |
@@ -83,8 +84,9 @@ void ProtocolExchange::service() |
83 | 84 | if (!pSession->isActive()) |
84 | 85 | { |
85 | 86 | #ifdef DEBUG_FILE_STREAM_SESSIONS |
86 | | - LOG_I(MODULE_PREFIX, "service session inactive name %s channel %d streamID %d", |
87 | | - pSession->getFileStreamName().c_str(), pSession->getChannelID(), pSession->getStreamID()); |
| 87 | + LOG_I(MODULE_PREFIX, "service session inactive name %s channel %d streamID %d pSession %p", |
| 88 | + pSession->getFileStreamName().c_str(), pSession->getChannelID(), |
| 89 | + pSession->getStreamID(), pSession); |
88 | 90 | #endif |
89 | 91 | // Tidy up inactive session |
90 | 92 | _sessions.remove(pSession); |
@@ -452,10 +454,19 @@ UtilsRetCode::RetCode ProtocolExchange::processRICRESTCmdFrame(RICRESTMsg& ricRE |
452 | 454 | } |
453 | 455 |
|
454 | 456 | // Check session is found |
455 | | - if (!pSession && respondToMismatchedSession) |
| 457 | + if (!pSession) |
456 | 458 | { |
457 | | - // Failure |
458 | | - Raft::setJsonBoolResult(ricRESTReqMsg.getReq().c_str(), respMsg, true); |
| 459 | + if (respondToMismatchedSession) |
| 460 | + { |
| 461 | + // Failure |
| 462 | + Raft::setJsonBoolResult(ricRESTReqMsg.getReq().c_str(), respMsg, true); |
| 463 | + } |
| 464 | + |
| 465 | + // Debug |
| 466 | +#ifdef WARN_ON_FILE_STREAM_SESSION_NOT_FOUND |
| 467 | + LOG_W(MODULE_PREFIX, "processRICRESTCmdFrame session not found msgType %s streamName %s streamID %d", |
| 468 | + FileStreamBase::getFileStreamMsgTypeStr(fileStreamMsgType), fileStreamName.c_str(), streamID); |
| 469 | +#endif |
459 | 470 | return UtilsRetCode::SESSION_NOT_FOUND; |
460 | 471 | } |
461 | 472 |
|
@@ -638,8 +649,8 @@ FileStreamSession* ProtocolExchange::getFileStreamExistingSession(const char* fi |
638 | 649 | return nullptr; |
639 | 650 | } |
640 | 651 | #ifdef DEBUG_FILE_STREAM_SESSIONS |
641 | | - LOG_I(MODULE_PREFIX, "getFileStreamExistingSession OK name %s channelID %d streamID %d", |
642 | | - fileStreamName, channelID, streamID); |
| 652 | + LOG_I(MODULE_PREFIX, "getFileStreamExistingSession OK name %s channelID %d streamID %d pSession %p", |
| 653 | + fileStreamName, channelID, streamID, pSession); |
643 | 654 | #endif |
644 | 655 | return pSession; |
645 | 656 | } |
|
0 commit comments