diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-03 14:46:24 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-03 14:46:24 +0000 |
commit | 83d25d8ef0df622bd4c5fb82fead67ec9fd12bb0 (patch) | |
tree | 33943c9096e89c38de8088687ee029feb6bb15cf | |
parent | cba60958cfe6a03513ac23111f27895078a5d2c9 (diff) |
Treat ECONNREFUSED as an error that will stop further retransmissions. (issue #AST-58, patch from Switchvox)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@119926 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b6b5c7930..6a3619ae7 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) |