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); |