typedef uint32 ProtocolVersion; /* FE/BE protocol version number */
-typedef ProtocolVersion MsgType;
/*
typedef struct CancelRequestPacket
{
/* Note that each field is stored in network byte order! */
- MsgType cancelRequestCode; /* code to identify a cancel request */
+ ProtocolVersion cancelRequestCode; /* code to identify a cancel request */
uint32 backendPID; /* PID of client's backend */
uint8 cancelAuthCode[FLEXIBLE_ARRAY_MEMBER]; /* secret key to
* authorize cancel */
}
req = (CancelRequestPacket *) &cancel->cancel_req;
- req->cancelRequestCode = (MsgType) pg_hton32(CANCEL_REQUEST_CODE);
+ req->cancelRequestCode = pg_hton32(CANCEL_REQUEST_CODE);
req->backendPID = pg_hton32(conn->be_pid);
memcpy(req->cancelAuthCode, conn->be_cancel_key, conn->be_cancel_key_len);
/* include the length field itself in the length */
/* Send the message body. */
memset(&req, 0, offsetof(CancelRequestPacket, cancelAuthCode));
- req.cancelRequestCode = (MsgType) pg_hton32(CANCEL_REQUEST_CODE);
+ req.cancelRequestCode = pg_hton32(CANCEL_REQUEST_CODE);
req.backendPID = pg_hton32(cancelConn->be_pid);
if (pqPutnchar(&req, offsetof(CancelRequestPacket, cancelAuthCode), cancelConn))
return STATUS_ERROR;