Skip to content

Commit

Permalink
proto_tls: report error with correct variable
Browse files Browse the repository at this point in the history
Assigning to `len` at this point has no effect, and comparing with the
code not far above, with the same comment, and the code under
`con_release` ending with `return rlen;` it is obvious that the
intention was to assign to `rlen` instead of `len`.
  • Loading branch information
jes committed Dec 5, 2023
1 parent d832370 commit d397608
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/proto_tls/proto_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ static int proto_tls_send(struct socket_info* send_sock,
/* attach the write buffer to it */
if (tcp_async_add_chunk(c, buf, len, 1) < 0) {
LM_ERR("Failed to add the initial write chunk\n");
len = -1; /* report an error - let the caller decide what to do */
rlen = -1; /* report an error - let the caller decide what to do */
}

LM_DBG("Successfully started async SSL connection \n");
Expand Down

0 comments on commit d397608

Please sign in to comment.