Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 246483 | Differences between
and this patch

Collapse All | Expand All

(-)src/or/buffers.c- (-2 / +4 lines)
Lines 957-963 Link Here
957
    return 0;
957
    return 0;
958
  peek_from_buf(hdr, sizeof(hdr), buf);
958
  peek_from_buf(hdr, sizeof(hdr), buf);
959
959
960
  command = *(uint8_t*)(hdr+2);
960
  /* command = *(uint8_t*)(hdr+2); */
961
  command = get_uint8(hdr+2);
961
  if (!(CELL_COMMAND_IS_VAR_LENGTH(command)))
962
  if (!(CELL_COMMAND_IS_VAR_LENGTH(command)))
962
    return 0;
963
    return 0;
963
964
Lines 966-972 Link Here
966
    return 1;
967
    return 1;
967
  result = var_cell_new(length);
968
  result = var_cell_new(length);
968
  result->command = command;
969
  result->command = command;
969
  result->circ_id = ntohs(*(uint16_t*)hdr);
970
  /* result->circ_id = ntohs(*(uint16_t*)hdr); */
971
  result->circ_id = ntohs(get_uint16(hdr));
970
972
971
  buf_remove_from_front(buf, VAR_CELL_HEADER_SIZE);
973
  buf_remove_from_front(buf, VAR_CELL_HEADER_SIZE);
972
  peek_from_buf(result->payload, length, buf);
974
  peek_from_buf(result->payload, length, buf);
(-)src/or/connection_or.c- (+4 lines)
Lines 157-164 Link Here
157
void
157
void
158
var_cell_pack_header(const var_cell_t *cell, char *hdr_out)
158
var_cell_pack_header(const var_cell_t *cell, char *hdr_out)
159
{
159
{
160
	/*
160
  *(uint16_t*)(hdr_out) = htons(cell->circ_id);
161
  *(uint16_t*)(hdr_out) = htons(cell->circ_id);
161
  *(uint8_t*)(hdr_out+2) = cell->command;
162
  *(uint8_t*)(hdr_out+2) = cell->command;
163
  */
164
  set_uint16(hdr_out, htons(cell->circ_id));
165
  set_uint8(hdr_out+2, cell->command);
162
  set_uint16(hdr_out+3, htons(cell->payload_len));
166
  set_uint16(hdr_out+3, htons(cell->payload_len));
163
}
167
}
164
168

Return to bug 246483