bug 859.
- Made Tor a little less aggressive about deleting expired certificates.
Partial fix for bug 854.
+ - Stop doing unaligned memory access that generated bus errors on
+ sparc64. Fix for bug 862.
o Minor features (controller):
- Return circuit purposes in response to GETINFO circuit-status. Fixes
return 0;
peek_from_buf(hdr, sizeof(hdr), buf);
- command = *(uint8_t*)(hdr+2);
+ command = get_uint8(hdr+2);
if (!(CELL_COMMAND_IS_VAR_LENGTH(command)))
return 0;
return 1;
result = var_cell_new(length);
result->command = command;
- result->circ_id = ntohs(*(uint16_t*)hdr);
+ result->circ_id = ntohs(get_uint16(hdr));
buf_remove_from_front(buf, VAR_CELL_HEADER_SIZE);
peek_from_buf(result->payload, length, buf);
void
var_cell_pack_header(const var_cell_t *cell, char *hdr_out)
{
- *(uint16_t*)(hdr_out) = htons(cell->circ_id);
- *(uint8_t*)(hdr_out+2) = cell->command;
+ set_uint16(hdr_out, htons(cell->circ_id));
+ set_uint8(hdr_out+2, cell->command);
set_uint16(hdr_out+3, htons(cell->payload_len));
}