]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Treat ECONNREFUSED as an error that will stop further retransmissions. (issue #AST...
authorJoshua Colp <jcolp@digium.com>
Tue, 3 Jun 2008 14:46:24 +0000 (14:46 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 3 Jun 2008 14:46:24 +0000 (14:46 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119926 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index b6b5c7930c135ac96dce82df72816436b04d0421..6a3619ae7de3377fb5b95686a34fefc6313343d3 100644 (file)
@@ -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)