mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
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@torproject.org>
This commit is contained in:
parent
2ec25e847e
commit
217b553193
@ -2092,7 +2092,7 @@ connection_edge_package_raw_inbuf(edge_connection_t *conn, int package_partial,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Handle the circuit-level SENDME package window. */
|
/* 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. */
|
/* Package window has gone under 0. Protocol issue. */
|
||||||
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
|
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
|
||||||
"Circuit package window is below 0. Closing circuit.");
|
"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. */
|
/* 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));
|
connection_stop_reading(TO_CONN(conn));
|
||||||
log_debug(domain,"conn->package_window reached 0.");
|
log_debug(domain,"conn->package_window reached 0.");
|
||||||
circuit_consider_stop_edge_reading(circ, cpath_layer);
|
circuit_consider_stop_edge_reading(circ, cpath_layer);
|
||||||
|
@ -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
|
* 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. */
|
* Client. Update the package window and return its new value. */
|
||||||
int
|
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;
|
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
|
/* Called when a relay DATA cell is packaged for the given edge connection
|
||||||
* conn. Update the package window and return its new value. */
|
* conn. Update the package window and return its new value. */
|
||||||
int
|
int
|
||||||
sendme_stream_data_packaged(edge_connection_t *conn)
|
sendme_note_stream_data_packaged(edge_connection_t *conn)
|
||||||
{
|
{
|
||||||
tor_assert(conn);
|
tor_assert(conn);
|
||||||
return --conn->package_window;
|
return --conn->package_window;
|
||||||
|
@ -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);
|
int sendme_circuit_data_received(circuit_t *circ, crypt_path_t *layer_hint);
|
||||||
|
|
||||||
/* Update package window functions. */
|
/* Update package window functions. */
|
||||||
int sendme_circuit_data_packaged(circuit_t *circ, crypt_path_t *layer_hint);
|
int sendme_note_circuit_data_packaged(circuit_t *circ,
|
||||||
int sendme_stream_data_packaged(edge_connection_t *conn);
|
crypt_path_t *layer_hint);
|
||||||
|
int sendme_note_stream_data_packaged(edge_connection_t *conn);
|
||||||
|
|
||||||
/* Track cell digest. */
|
/* Track cell digest. */
|
||||||
void sendme_note_cell_digest(circuit_t *circ);
|
void sendme_note_cell_digest(circuit_t *circ);
|
||||||
|
Loading…
Reference in New Issue
Block a user