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

Function REMOTE_free_packet

src/remote/remote.cpp:312–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310
311
312void REMOTE_free_packet( rem_port* port, PACKET * packet, bool partial)
313{
314/**************************************
315 *
316 * R E M O T E _ f r e e _ p a c k e t
317 *
318 **************************************
319 *
320 * Functional description
321 * Zero out a full packet block (partial == false) or
322 * part of packet used in last operation (partial == true)
323 **************************************/
324 RemoteXdr xdr;
325 USHORT n;
326
327 if (packet)
328 {
329 xdr.create(reinterpret_cast<char*>(packet), sizeof(PACKET), XDR_FREE);
330 xdr.x_public = port;
331 xdr.x_local = (port->port_type == rem_port::XNET);
332
333 if (partial) {
334 xdr_protocol(&xdr, packet);
335 }
336 else
337 {
338 for (n = (USHORT) op_connect; n < (USHORT) op_max; n++)
339 {
340 packet->p_operation = (P_OP) n;
341 xdr_protocol(&xdr, packet);
342 }
343 }
344#ifdef DEBUG_XDR_MEMORY
345 // All packet memory allocations should now be voided.
346 // note: this code will may work properly if partial == true
347
348 for (n = 0; n < P_MALLOC_SIZE; n++)
349 fb_assert(packet->p_malloc[n].p_operation == op_void);
350#endif
351 packet->p_operation = op_void;
352 }
353}
354
355
356void REMOTE_get_timeout_params(rem_port* port, ClumpletReader* pb)

Callers 9

INET_analyzeFunction · 0.85
tryKeyTypeMethod · 0.85
finalizeFunction · 0.85
event_threadFunction · 0.85
authReceiveResponseFunction · 0.85
receive_packet_noqueueFunction · 0.85
SRVR_multi_threadFunction · 0.85
disconnectMethod · 0.85

Calls 2

xdr_protocolFunction · 0.85
createMethod · 0.45

Tested by

no test coverage detected