Example #1
0
static bool verify_checksum(struct fix_message *self, struct buffer *buffer)
{
	uint8_t cksum, actual;

	cksum	= strtol(self->check_sum, NULL, 10);

	actual	= buffer_sum_range(buffer, self->begin_string - 2, self->check_sum - 3);

	return actual == cksum;
}
Example #2
0
static bool verify_checksum(struct fix_message *self, struct buffer *buffer)
{
    u8 cksum, actual;

    cksum	= fix_uatoi(self->check_sum, NULL);

    actual	= buffer_sum_range(self->begin_string - 2, self->check_sum - 3);

    return actual == cksum;
}
Example #3
0
u8 buffer_sum(struct buffer *buf)
{
	return buffer_sum_range(buf->data + buf->start, buf->data + buf->end);
}