| 743 | } |
| 744 | |
| 745 | void _processCDCSnapshotMessage(CDCReqMsg& msg, const UDPMessage& udpMsg) { |
| 746 | auto err = _shared.sharedDb.snapshot(_basePath +"/snapshot-" + std::to_string(msg.body.getCdcSnapshot().snapshotId)); |
| 747 | CDCRespMsg respMsg; |
| 748 | respMsg.id = msg.id; |
| 749 | if (err == TernError::NO_ERROR) { |
| 750 | respMsg.body.setCdcSnapshot(); |
| 751 | } else { |
| 752 | respMsg.body.setError() = err; |
| 753 | } |
| 754 | _packCDCResponse(udpMsg.socketIx, udpMsg.clientAddr, CDCMessageKind::CDC_SNAPSHOT, respMsg); |
| 755 | } |
| 756 | |
| 757 | #ifdef __clang__ |
| 758 | __attribute__((no_sanitize("integer"))) // might wrap around (it's initialized randomly) |
no test coverage detected