From 6d78e78947268b63ce4c38a4f852daa1c4cd24bb Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Tue, 3 Jun 2008 14:46:24 +0000 Subject: [PATCH] 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/branches/1.4@119926 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 b6b5c7930c..6a3619ae7d 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1775,11 +1775,12 @@ static int __sip_xmit(struct sip_pvt *p, char *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: /* Inteface 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) -- 2.47.3