summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-02-06 23:48:35 +0000
committerRoger Dingledine <arma@torproject.org>2003-02-06 23:48:35 +0000
commit0bc8dc1314652e8b5ccaa89a98c1a9922422ae1d (patch)
treecc6ef22f079992904f06f7e7149f8af450e4592c /src/or/connection.c
parentceafe12ed67528ce4dd656f43bccb7c7a9f7317f (diff)
downloadtor-0bc8dc1314652e8b5ccaa89a98c1a9922422ae1d.tar.gz
tor-0bc8dc1314652e8b5ccaa89a98c1a9922422ae1d.zip
fix endian issues for topics -- they might work on bsd now
(they wouldn't have before) alternate code which bypasses the dns farm, so we can compare speed svn:r154
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 7b4ad843b5..fd16c195c5 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -617,7 +617,7 @@ repeat_connection_package_raw_inbuf:
log(LOG_DEBUG,"connection_package_raw_inbuf(): Packaging %d bytes (%d waiting).",cell.length, amount_to_process);
- *(uint32_t *)cell.payload = conn->topic_id;
+ *(uint16_t *)(cell.payload+2) = htons(conn->topic_id);
*cell.payload = TOPIC_COMMAND_DATA;
cell.length += TOPIC_HEADER_SIZE;
cell.command = CELL_DATA;
@@ -673,7 +673,7 @@ int connection_consider_sending_sendme(connection_t *conn, int edge_type) {
return 0;
}
- *(uint32_t *)cell.payload = conn->topic_id;
+ *(uint16_t *)(cell.payload+2) = htons(conn->topic_id);
*cell.payload = TOPIC_COMMAND_SENDME;
cell.length += TOPIC_HEADER_SIZE;
cell.command = CELL_DATA;