Changeset 690

Show
Ignore:
Timestamp:
20/08/08 10:50:40 (4 months ago)
Author:
smoku
Message:

Detecting unrecoverable stream errors on establishing an outgoing s2s connection. Refs #244

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/s2s/out.c

    r629 r690  
    13581358            log_write(out->s2s->log, LOG_NOTICE, "[%d] [%s, port=%d] error: %s (%s)", out->fd->fd, out->ip, out->port, sxe->generic, sxe->specific); 
    13591359 
    1360             if (!out->online) { 
     1360            /* mark as bad if we did not manage to connect or there is unrecoverable stream error */ 
     1361            if (!out->online || 
     1362                    (sxe->code == SX_ERR_STREAM && 
     1363                        (strstr(sxe->specific, "host-gone") ||        /* it's not there now */ 
     1364                         strstr(sxe->specific, "host-unknown") ||     /* they do not service the host */ 
     1365                         strstr(sxe->specific, "not-authorized") ||   /* they do not want us there */ 
     1366                         strstr(sxe->specific, "see-other-host") ||   /* we do not support redirections yet */ 
     1367                         strstr(sxe->specific, "system-shutdown") ||  /* they are going down */ 
     1368                         strstr(sxe->specific, "unsupported-version") /* they do not support our stream version */ 
     1369                        ))) 
     1370            { 
    13611371                dnsres_t bad; 
    13621372                char *ipport;