mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Cleanup: Provided connection_send_bytes() to avoid direct access to con->send()
This commit is contained in:
parent
3f76299e3e
commit
648947fe44
@ -627,7 +627,7 @@ admin_format_t client_get_admin_format_by_content_negotiation(client_t *client)
|
||||
/* helper function for sending the data to a client */
|
||||
int client_send_bytes(client_t *client, const void *buf, unsigned len)
|
||||
{
|
||||
int ret = client->con->send(client->con, buf, len);
|
||||
int ret = connection_send_bytes(client->con, buf, len);
|
||||
|
||||
if (client->con->error)
|
||||
ICECAST_LOG_DEBUG("Client connection died");
|
||||
|
@ -297,6 +297,11 @@ void connection_uses_tls(connection_t *con)
|
||||
#endif
|
||||
}
|
||||
|
||||
ssize_t connection_send_bytes(connection_t *con, const void *buf, size_t len)
|
||||
{
|
||||
return con->send(con, buf, len);
|
||||
}
|
||||
|
||||
ssize_t connection_read_bytes(connection_t *con, void *buf, size_t len)
|
||||
{
|
||||
ssize_t done = 0;
|
||||
|
@ -60,6 +60,7 @@ int connection_complete_source(source_t *source, int response);
|
||||
void connection_queue(connection_t *con);
|
||||
void connection_uses_tls(connection_t *con);
|
||||
|
||||
ssize_t connection_send_bytes(connection_t *con, const void *buf, size_t len);
|
||||
ssize_t connection_read_bytes(connection_t *con, void *buf, size_t len);
|
||||
int connection_read_put_back(connection_t *con, const void *buf, size_t len);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user