Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Icecast-Server
Commits
648947fe
Commit
648947fe
authored
Jul 26, 2018
by
Philipp Schafft
🦁
Browse files
Cleanup: Provided connection_send_bytes() to avoid direct access to con->send()
parent
3f76299e
Changes
3
Show whitespace changes
Inline
Side-by-side
src/client.c
View file @
648947fe
...
...
@@ -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
=
c
lient
->
con
->
send
(
client
->
con
,
buf
,
len
);
int
ret
=
c
onnection_send_bytes
(
client
->
con
,
buf
,
len
);
if
(
client
->
con
->
error
)
ICECAST_LOG_DEBUG
(
"Client connection died"
);
...
...
src/connection.c
View file @
648947fe
...
...
@@ -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
;
...
...
src/connection.h
View file @
648947fe
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment