From 16e401cc681bd194881d5d4a7d6916c44f075300 Mon Sep 17 00:00:00 2001 From: Joshua Colp <jcolp@digium.com> Date: Tue, 3 Jun 2008 14:47:54 +0000 Subject: [PATCH] Merged revisions 119926 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r119926 | file | 2008-06-03 11:46:24 -0300 (Tue, 03 Jun 2008) | 2 lines Treat ECONNREFUSED as an error that will stop further retransmissions. (issue #AST-58, patch from Switchvox) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119927 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 0fcc579d6d..61a981abe5 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2770,11 +2770,12 @@ static int __sip_xmit(struct sip_pvt *p, struct ast_str *data, int len) if (res == -1) { switch (errno) { - case EBADF: /* Bad file descriptor - seems like this is generated when the host exist, but doesn't accept the UDP packet */ - case EHOSTUNREACH: /* Host can't be reached */ - case ENETDOWN: /* Interface down */ - case ENETUNREACH: /* Network failure */ - res = XMIT_ERROR; /* Don't bother with trying to transmit again */ + case EBADF: /* Bad file descriptor - seems like this is generated when the host exist, but doesn't accept the UDP packet */ + case EHOSTUNREACH: /* Host can't be reached */ + case ENETDOWN: /* Inteface down */ + case ENETUNREACH: /* Network failure */ + case ECONNREFUSED: /* ICMP port unreachable */ + res = XMIT_ERROR; /* Don't bother with trying to transmit again */ } } if (res != len) -- GitLab