Skip to content

Commit d397608

Browse files
committed
proto_tls: report error with correct variable
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`.
1 parent d832370 commit d397608

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/proto_tls/proto_tls.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ static int proto_tls_send(struct socket_info* send_sock,
561561
/* attach the write buffer to it */
562562
if (tcp_async_add_chunk(c, buf, len, 1) < 0) {
563563
LM_ERR("Failed to add the initial write chunk\n");
564-
len = -1; /* report an error - let the caller decide what to do */
564+
rlen = -1; /* report an error - let the caller decide what to do */
565565
}
566566

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

0 commit comments

Comments
 (0)