MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / MERGE_database_info

Function MERGE_database_info

src/remote/merge.cpp:45–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43
44
45USHORT MERGE_database_info(const UCHAR* const in,
46 UCHAR* out,
47 USHORT buf_length,
48 USHORT impl,
49 USHORT class_,
50 USHORT base_level,
51 const UCHAR* version,
52 const UCHAR* id,
53 USHORT protocol)
54{
55/**************************************
56 *
57 * M E R G E _ d a t a b a s e _ i n f o
58 *
59 **************************************
60 *
61 * Functional description
62 * Merge server / remote interface / Y-valve information into
63 * database block. Return the actual length of the packet.
64 * See also jrd/utl.cpp for decoding of this block.
65 *
66 **************************************/
67 SSHORT l;
68 const UCHAR* p;
69
70 UCHAR* start = out;
71 const UCHAR* const end = out + buf_length;
72
73 UCHAR mergeLevel = 0;
74 ClumpletReader input(ClumpletReader::InfoResponse, in, buf_length);
75 while (!input.isEof())
76 {
77 bool flStop = true;
78 switch(input.getClumpTag())
79 {
80 case isc_info_implementation:
81 mergeLevel = input.getBytes()[0];
82 break;
83
84 case isc_info_end:
85 case isc_info_truncated:
86 break;
87
88 default:
89 flStop = false;
90 break;
91 }
92
93 if (flStop)
94 break;
95 input.moveNext();
96 }
97
98 for (input.rewind(); !input.isEof(); input.moveNext())
99 {
100 *out++ = input.getClumpTag();
101 switch (input.getClumpTag())
102 {

Callers 2

getInfoMethod · 0.85
infoMethod · 0.85

Calls 9

PUT_WORDFunction · 0.85
merge_setupFunction · 0.85
getClumpTagMethod · 0.80
stuffMethod · 0.80
getClumpLengthMethod · 0.80
isEofMethod · 0.45
getBytesMethod · 0.45
moveNextMethod · 0.45
rewindMethod · 0.45

Tested by

no test coverage detected