Method
rewind
Source from the content-addressed store, hash-verified
| 713 | } |
| 714 | |
| 715 | void ClumpletReader::rewind() |
| 716 | { |
| 717 | if (! getBuffer()) |
| 718 | { |
| 719 | cur_offset = 0; |
| 720 | spbState = 0; |
| 721 | return; |
| 722 | } |
| 723 | switch (kind) |
| 724 | { |
| 725 | case UnTagged: |
| 726 | case WideUnTagged: |
| 727 | case SpbStart: |
| 728 | case SpbSendItems: |
| 729 | case SpbReceiveItems: |
| 730 | case SpbResponse: |
| 731 | case InfoResponse: |
| 732 | case InfoItems: |
| 733 | cur_offset = 0; |
| 734 | break; |
| 735 | default: |
| 736 | if (kind == SpbAttach && getBufferLength() > 0 && getBuffer()[0] != isc_spb_version1) |
| 737 | cur_offset = 2; |
| 738 | else |
| 739 | cur_offset = 1; |
| 740 | } |
| 741 | spbState = 0; |
| 742 | } |
| 743 | |
| 744 | bool ClumpletReader::find(UCHAR tag) |
| 745 | { |