[Asterisk-code-review] chan_sip: in case of tcp/tls, be less annoying about tx errors. (asterisk[13])
Jaco Kroon
asteriskteam at digium.com
Wed Dec 4 08:39:20 CST 2019
Jaco Kroon has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/13366 )
Change subject: chan_sip: in case of tcp/tls, be less annoying about tx errors.
......................................................................
chan_sip: in case of tcp/tls, be less annoying about tx errors.
chan_sip.c:3782 __sip_xmit: sip_xmit of 0x7f1478069230 (len 600) to
213.150.203.60:1492 returned -2: Interrupted system call
returned -2 implies this wasn't actually an OS error, so errno makes no
sense either. Internal error was already logged higher up, and -2
generally means that either there isn't a valid connection available, or
the pipe notification failed, and that is already correctly logged.
Change-Id: I46eb82924beeff9dfd86fa6c7eb87d2651b950f2
---
M channels/chan_sip.c
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/66/13366/1
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ea78d23..5ed3722 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3758,6 +3758,8 @@
res = ast_sendto(p->socket.fd, ast_str_buffer(data), ast_str_strlen(data), 0, dst);
} else if (p->socket.tcptls_session) {
res = sip_tcptls_write(p->socket.tcptls_session, ast_str_buffer(data), ast_str_strlen(data));
+ if (res < -1)
+ return res;
} else if (p->socket.ws_session) {
if (!(res = ast_websocket_write_string(p->socket.ws_session, ast_str_buffer(data)))) {
/* The WebSocket API just returns 0 on success and -1 on failure, while this code expects the payload length to be returned */
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13366
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I46eb82924beeff9dfd86fa6c7eb87d2651b950f2
Gerrit-Change-Number: 13366
Gerrit-PatchSet: 1
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191204/dd64620e/attachment.html>
More information about the asterisk-code-review
mailing list