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

Function zap_packet

src/remote/server/server.cpp:7217–7242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7215}
7216
7217static void zap_packet(PACKET* packet, bool new_packet)
7218{
7219/**************************************
7220 *
7221 * z a p _ p a c k e t
7222 *
7223 **************************************
7224 *
7225 * Functional description
7226 * Zero out a packet block.
7227 *
7228 **************************************/
7229
7230 if (new_packet)
7231 memset(packet, 0, sizeof(PACKET));
7232 else
7233 {
7234#ifdef DEBUG_XDR_MEMORY
7235 // Don't trash debug xdr memory allocation table of recycled packets.
7236
7237 memset(&packet->p_operation, 0, sizeof(PACKET) - offsetof(PACKET, p_operation));
7238#else
7239 memset(packet, 0, sizeof(PACKET));
7240#endif
7241 }
7242}
7243
7244
7245

Callers 3

SRVR_mainFunction · 0.70
alloc_requestFunction · 0.70
SRVR_multi_threadFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected