aboutsummaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-08-08 15:54:15 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-05 13:57:51 -0400
commit6ec50597231c8d72fbf796eee88e02dd9a4d0b78 (patch)
tree24001fe0eb99beb6cbaa0c2768f1df1fd4595949 /src/or/relay.c
parentd61da9e61fa0ea15789464c7c3754a9af30fcbb4 (diff)
downloadtor-6ec50597231c8d72fbf796eee88e02dd9a4d0b78.tar.gz
tor-6ec50597231c8d72fbf796eee88e02dd9a4d0b78.zip
Refactor buffer APIs to put a buf_t first.
By convention, a function that frobs a foo_t should be called foo_frob, and it should have a foo_t * as its first argument. But for many of the buf_t functions, the buf_t was the final argument, which is silly.
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index 15ab730a87..e362348bb9 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -2038,7 +2038,7 @@ connection_edge_package_raw_inbuf(edge_connection_t *conn, int package_partial,
/* XXXX We could be more efficient here by sometimes packing
* previously-sent optimistic data in the same cell with data
* from the inbuf. */
- buf_get_bytes(payload, length, entry_conn->sending_optimistic_data);
+ buf_get_bytes(entry_conn->sending_optimistic_data, payload, length);
if (!buf_datalen(entry_conn->sending_optimistic_data)) {
buf_free(entry_conn->sending_optimistic_data);
entry_conn->sending_optimistic_data = NULL;
@@ -2056,7 +2056,7 @@ connection_edge_package_raw_inbuf(edge_connection_t *conn, int package_partial,
retry */
if (!entry_conn->pending_optimistic_data)
entry_conn->pending_optimistic_data = buf_new();
- buf_add(payload, length, entry_conn->pending_optimistic_data);
+ buf_add(entry_conn->pending_optimistic_data, payload, length);
}
if (connection_edge_send_command(conn, RELAY_COMMAND_DATA,