PqGSSSendConsumed += input.length;
/* 4 network-order bytes of length, then payload */
- netlen = htonl(output.length);
+ netlen = pg_hton32(output.length);
memcpy(PqGSSSendBuffer + PqGSSSendLength, &netlen, sizeof(uint32));
PqGSSSendLength += sizeof(uint32);
}
/* Decode the packet length and check for overlength packet */
- input.length = ntohl(*(uint32 *) PqGSSRecvBuffer);
+ input.length = pg_ntoh32(*(uint32 *) PqGSSRecvBuffer);
if (input.length > PQ_GSS_RECV_BUFFER_SIZE - sizeof(uint32))
ereport(FATAL,
/*
* Get the length for this packet from the length header.
*/
- input.length = ntohl(*(uint32 *) PqGSSRecvBuffer);
+ input.length = pg_ntoh32(*(uint32 *) PqGSSRecvBuffer);
/* Done with the length, reset our buffer */
PqGSSRecvLength = 0;
*/
if (output.length > 0)
{
- uint32 netlen = htonl(output.length);
+ uint32 netlen = pg_hton32(output.length);
if (output.length > PQ_GSS_SEND_BUFFER_SIZE - sizeof(uint32))
ereport(FATAL,
PqGSSSendConsumed += input.length;
/* 4 network-order bytes of length, then payload */
- netlen = htonl(output.length);
+ netlen = pg_hton32(output.length);
memcpy(PqGSSSendBuffer + PqGSSSendLength, &netlen, sizeof(uint32));
PqGSSSendLength += sizeof(uint32);
}
/* Decode the packet length and check for overlength packet */
- input.length = ntohl(*(uint32 *) PqGSSRecvBuffer);
+ input.length = pg_ntoh32(*(uint32 *) PqGSSRecvBuffer);
if (input.length > PQ_GSS_RECV_BUFFER_SIZE - sizeof(uint32))
{
*/
/* Get the length and check for over-length packet */
- input.length = ntohl(*(uint32 *) PqGSSRecvBuffer);
+ input.length = pg_ntoh32(*(uint32 *) PqGSSRecvBuffer);
if (input.length > PQ_GSS_RECV_BUFFER_SIZE - sizeof(uint32))
{
printfPQExpBuffer(&conn->errorMessage,
}
/* Queue the token for writing */
- netlen = htonl(output.length);
+ netlen = pg_hton32(output.length);
memcpy(PqGSSSendBuffer, (char *) &netlen, sizeof(uint32));
PqGSSSendLength += sizeof(uint32);