mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
Make inbuf and outbuf len check params const
This commit is contained in:
parent
a0368b3759
commit
5c3021be85
@ -250,13 +250,13 @@ CONST_TO_LISTENER_CONN(const connection_t *c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
connection_get_inbuf_len(connection_t *conn)
|
connection_get_inbuf_len(const connection_t *conn)
|
||||||
{
|
{
|
||||||
return conn->inbuf ? buf_datalen(conn->inbuf) : 0;
|
return conn->inbuf ? buf_datalen(conn->inbuf) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
connection_get_outbuf_len(connection_t *conn)
|
connection_get_outbuf_len(const connection_t *conn)
|
||||||
{
|
{
|
||||||
return conn->outbuf ? buf_datalen(conn->outbuf) : 0;
|
return conn->outbuf ? buf_datalen(conn->outbuf) : 0;
|
||||||
}
|
}
|
||||||
|
@ -274,8 +274,8 @@ void connection_buf_add_compress(const char *string, size_t len,
|
|||||||
struct dir_connection_t *conn, int done);
|
struct dir_connection_t *conn, int done);
|
||||||
void connection_buf_add_buf(struct connection_t *conn, struct buf_t *buf);
|
void connection_buf_add_buf(struct connection_t *conn, struct buf_t *buf);
|
||||||
|
|
||||||
size_t connection_get_inbuf_len(struct connection_t *conn);
|
size_t connection_get_inbuf_len(const struct connection_t *conn);
|
||||||
size_t connection_get_outbuf_len(struct connection_t *conn);
|
size_t connection_get_outbuf_len(const struct connection_t *conn);
|
||||||
struct connection_t *connection_get_by_global_id(uint64_t id);
|
struct connection_t *connection_get_by_global_id(uint64_t id);
|
||||||
|
|
||||||
struct connection_t *connection_get_by_type(int type);
|
struct connection_t *connection_get_by_type(int type);
|
||||||
|
Loading…
Reference in New Issue
Block a user