On Tue, Jun 15, 2010 at 09:34:58AM +0200, Andrew Beekhof wrote:
Looks pretty good.
Do we know the license of the CRC code? That's probably important.
Why not use something like libgcrypt? I'm fairly sure that provides
CRC32.
I think the t_datahandler_payload struct can be streamlined a bit -
there's no real need for both request and response fields.
The convention is to put "t_" at the end btw... ie. uint32_t.
Also to use zero-length arrays for payloads.
Agree.
typedef struct
{
char* request_id;
matahari_message_type_t payload_type;
unsigned long payload_length;
unsigned long payload_crc;
char payload[0];
} matahari_message_t;
I'd also advise adding a MH_ prefix to the members of the
matahari_message_type_t enum.
Also agree.
Ryan