| 5448 | |
| 5449 | |
| 5450 | ISC_STATUS rem_port::put_segment(P_OP op, P_SGMT * segment, PACKET* sendL) |
| 5451 | { |
| 5452 | /************************************** |
| 5453 | * |
| 5454 | * p u t _ s e g m e n t |
| 5455 | * |
| 5456 | ************************************** |
| 5457 | * |
| 5458 | * Functional description |
| 5459 | * Write a single blob segment. |
| 5460 | * |
| 5461 | **************************************/ |
| 5462 | Rbl* blob; |
| 5463 | |
| 5464 | getHandle(blob, segment->p_sgmt_blob); |
| 5465 | |
| 5466 | const UCHAR* p = segment->p_sgmt_segment.cstr_address; |
| 5467 | ULONG length = segment->p_sgmt_segment.cstr_length; |
| 5468 | |
| 5469 | // Do the signal segment version. If it failed, just pass on the bad news. |
| 5470 | |
| 5471 | LocalStatus ls; |
| 5472 | CheckStatusWrapper status_vector(&ls); |
| 5473 | |
| 5474 | if (op == op_put_segment) |
| 5475 | { |
| 5476 | blob->rbl_iface->putSegment(&status_vector, length, p); |
| 5477 | return this->send_response(sendL, 0, 0, &status_vector, false); |
| 5478 | } |
| 5479 | |
| 5480 | // We've got a batch of segments. This is only slightly more complicated |
| 5481 | |
| 5482 | const UCHAR* const end = p + length; |
| 5483 | |
| 5484 | while (p < end) |
| 5485 | { |
| 5486 | length = *p++; |
| 5487 | length += *p++ << 8; |
| 5488 | blob->rbl_iface->putSegment(&status_vector, length, p); |
| 5489 | |
| 5490 | if (status_vector.getState() & IStatus::STATE_ERRORS) |
| 5491 | return this->send_response(sendL, 0, 0, &status_vector, false); |
| 5492 | p += length; |
| 5493 | } |
| 5494 | |
| 5495 | return this->send_response(sendL, 0, 0, &status_vector, false); |
| 5496 | } |
| 5497 | |
| 5498 | |
| 5499 | ISC_STATUS rem_port::put_slice(P_SLC * stuff, PACKET* sendL) |
no test coverage detected