2318 FlagBits flags = NO_FLAGS;
2322 flags |= HUFFMAN_FLAG;
2326 flags |= CHECKSUM_FLAG;
2329 pHeader = (
char*)
malloc(HEADER_SIZE);
2333 printf(
"no memory available while trying to create header!\n");
2337 "No more memory available, unable to continue serving - exiting.",
2343 memcpy(pHeader, &
id, HEADER_SIZE_ID);
2344 memcpy(pHeader + HEADER_OFFSET_ID, &errorCode, HEADER_SIZE_ERROR_CODE);
2345 memcpy(pHeader + HEADER_OFFSET_ERROR_CODE, &flags, HEADER_SIZE_FLAGS);
2346 memcpy(pHeader + HEADER_OFFSET_FLAGS, &checksum, HEADER_SIZE_CHECKSUM);
void createLogMessage(unsigned int type, char *description, char *origin)