]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
prop289: Rename packaged functions with better name
authorDavid Goulet <dgoulet@torproject.org>
Thu, 7 Mar 2019 16:45:38 +0000 (11:45 -0500)
committerDavid Goulet <dgoulet@torproject.org>
Mon, 29 Apr 2019 16:17:57 +0000 (12:17 -0400)
The circuit and stream level functions that update the package window have
been renamed to have a "_note_" in them to make their purpose more clear.

Part of #26288

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/core/or/relay.c
src/core/or/sendme.c
src/core/or/sendme.h

index 6bf7ac1a7ac75e142ac71075705a012acb2c10cf..fa008120b31a86148e2b7d2d1c8d807e1fcb05f8 100644 (file)
@@ -2092,7 +2092,7 @@ connection_edge_package_raw_inbuf(edge_connection_t *conn, int package_partial,
   }
 
   /* Handle the circuit-level SENDME package window. */
-  if (sendme_circuit_data_packaged(circ, cpath_layer) < 0) {
+  if (sendme_note_circuit_data_packaged(circ, cpath_layer) < 0) {
     /* Package window has gone under 0. Protocol issue. */
     log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
            "Circuit package window is below 0. Closing circuit.");
@@ -2101,7 +2101,7 @@ connection_edge_package_raw_inbuf(edge_connection_t *conn, int package_partial,
   }
 
   /* Handle the stream-level SENDME package window. */
-  if (sendme_stream_data_packaged(conn) < 0) {
+  if (sendme_note_stream_data_packaged(conn) < 0) {
     connection_stop_reading(TO_CONN(conn));
     log_debug(domain,"conn->package_window reached 0.");
     circuit_consider_stop_edge_reading(circ, cpath_layer);
index a333b02b60f38a60cda6b19c1c3f0256ac652a04..16ff5bcb8f72e3c14749853b61b3ddac346c6ceb 100644 (file)
@@ -491,7 +491,7 @@ sendme_stream_data_received(edge_connection_t *conn)
  * layer_hint is NULL, this means we are the Exit end point else we are the
  * Client. Update the package window and return its new value. */
 int
-sendme_circuit_data_packaged(circuit_t *circ, crypt_path_t *layer_hint)
+sendme_note_circuit_data_packaged(circuit_t *circ, crypt_path_t *layer_hint)
 {
   int package_window, domain;
 
@@ -518,7 +518,7 @@ sendme_circuit_data_packaged(circuit_t *circ, crypt_path_t *layer_hint)
 /* Called when a relay DATA cell is packaged for the given edge connection
  * conn. Update the package window and return its new value. */
 int
-sendme_stream_data_packaged(edge_connection_t *conn)
+sendme_note_stream_data_packaged(edge_connection_t *conn)
 {
   tor_assert(conn);
   return --conn->package_window;
index c2e2518da8ea495e21e391bc32de85420c2a5283..2154a29f4a183eff4d911e25e544941de5c66363 100644 (file)
@@ -30,8 +30,9 @@ int sendme_stream_data_received(edge_connection_t *conn);
 int sendme_circuit_data_received(circuit_t *circ, crypt_path_t *layer_hint);
 
 /* Update package window functions. */
-int sendme_circuit_data_packaged(circuit_t *circ, crypt_path_t *layer_hint);
-int sendme_stream_data_packaged(edge_connection_t *conn);
+int sendme_note_circuit_data_packaged(circuit_t *circ,
+                                      crypt_path_t *layer_hint);
+int sendme_note_stream_data_packaged(edge_connection_t *conn);
 
 /* Track cell digest. */
 void sendme_note_cell_digest(circuit_t *circ);