| 782 | } |
| 783 | |
| 784 | USHORT IscBlob::read(thread_db* tdbb, UCHAR* buff, USHORT len) |
| 785 | { |
| 786 | fb_assert(m_handle); |
| 787 | |
| 788 | USHORT result = 0; |
| 789 | FbLocalStatus status; |
| 790 | { |
| 791 | EngineCallbackGuard guard(tdbb, m_iscConnection, FB_FUNCTION); |
| 792 | m_iscProvider.isc_get_segment(&status, &m_handle, &result, len, reinterpret_cast<SCHAR*>(buff)); |
| 793 | } |
| 794 | switch (status->getErrors()[1]) |
| 795 | { |
| 796 | case isc_segstr_eof: |
| 797 | fb_assert(result == 0); |
| 798 | break; |
| 799 | case isc_segment: |
| 800 | case 0: |
| 801 | break; |
| 802 | default: |
| 803 | m_iscConnection.raise(&status, tdbb, "isc_get_segment"); |
| 804 | } |
| 805 | |
| 806 | return result; |
| 807 | } |
| 808 | |
| 809 | void IscBlob::write(thread_db* tdbb, const UCHAR* buff, USHORT len) |
| 810 | { |
no test coverage detected