[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] prop289: Rename packaged functions with better name



commit 217b55319336227f9e397db526cea551dbd796e4
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date:   Thu Mar 7 11:45:38 2019 -0500

    prop289: Rename packaged functions with better name
    
    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@xxxxxxxxxxxxxx>
---
 src/core/or/relay.c  | 4 ++--
 src/core/or/sendme.c | 4 ++--
 src/core/or/sendme.h | 5 +++--
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/core/or/relay.c b/src/core/or/relay.c
index 6bf7ac1a7..fa008120b 100644
--- a/src/core/or/relay.c
+++ b/src/core/or/relay.c
@@ -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);
diff --git a/src/core/or/sendme.c b/src/core/or/sendme.c
index a333b02b6..16ff5bcb8 100644
--- a/src/core/or/sendme.c
+++ b/src/core/or/sendme.c
@@ -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;
diff --git a/src/core/or/sendme.h b/src/core/or/sendme.h
index c2e2518da..2154a29f4 100644
--- a/src/core/or/sendme.h
+++ b/src/core/or/sendme.h
@@ -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);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits