| 1300 | } |
| 1301 | |
| 1302 | ExtMsgKillCursors::ExtMsgKillCursors(ExtMsgHeader* header, const uint8_t* body) : header(header) { |
| 1303 | const uint8_t* ptr = body; |
| 1304 | const uint8_t* eom = (const uint8_t*)header + header->messageLength; |
| 1305 | |
| 1306 | // Mongo OP_KILL_CURSORS begins with int32 ZERO, reserved for future use |
| 1307 | ptr += sizeof(int32_t); |
| 1308 | numberOfCursorIDs = *(int32_t*)ptr; |
| 1309 | // Totally unnecessary for this to be in the message given that we know the overall message length... |
| 1310 | ptr += sizeof(int32_t); |
| 1311 | cursorIDs = new int64_t[numberOfCursorIDs]; |
| 1312 | |
| 1313 | memcpy(cursorIDs, ptr, numberOfCursorIDs * sizeof(int64_t)); |
| 1314 | ptr += numberOfCursorIDs * sizeof(int64_t); |
| 1315 | |
| 1316 | ASSERT(ptr == eom); |
| 1317 | } |
| 1318 | |
| 1319 | std::string ExtMsgKillCursors::toString() { |
| 1320 | return format("KILL_CURSORS: "); |
nothing calls this directly
no outgoing calls
no test coverage detected