Skip to content

Commit

Permalink
Fixed problem of printing non-terminated string when logging in SCTP …
Browse files Browse the repository at this point in the history
…code
  • Loading branch information
lminiero committed Dec 6, 2017
1 parent 66af3d8 commit 7f01386
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static int janus_sctp_incoming_data(struct socket *sock, union sctp_sockstore ad
void janus_sctp_send_data(janus_sctp_association *sctp, char *buf, int len) {
if(sctp == NULL || buf == NULL || len <= 0)
return;
JANUS_LOG(LOG_VERB, "[%"SCNu64"] SCTP data to send (%d bytes) coming from a plugin: %s\n", sctp->handle_id, len, buf);
JANUS_LOG(LOG_VERB, "[%"SCNu64"] SCTP data to send (%d bytes) coming from a plugin: %.*s\n", sctp->handle_id, len, len, buf);
/* FIXME Is there any open channel we can use? */
int i = 0, found = 0;
for(i = 0; i < NUMBER_OF_CHANNELS; i++) {
Expand Down

0 comments on commit 7f01386

Please sign in to comment.