Ticket #3082: mc-startup-timeout.patch

File mc-startup-timeout.patch, 1.2 KB (added by nadvornik, 11 years ago)
  • src/vfs/smbfs/helpers/lib/util.c

    diff -ru mc-4.8.10.orig/src/vfs/smbfs/helpers/lib/util.c mc-4.8.10/src/vfs/smbfs/helpers/lib/util.c
    old new  
    18411841    /* Ensure null termination. */ 
    18421842    hostname[sizeof (hostname) - 1] = '\0'; 
    18431843 
    1844     /* get host info */ 
    1845     if ((hp = Get_Hostbyname (hostname)) == 0) 
    1846     { 
    1847         DEBUG (0, ("Get_Hostbyname: Unknown host %s\n", hostname)); 
    1848         return False; 
     1844    if (ip) { /* query the ip only if it is requested */ 
     1845        /* get host info */ 
     1846        if ((hp = Get_Hostbyname (hostname)) == 0) 
     1847        { 
     1848            DEBUG (0, ("Get_Hostbyname: Unknown host %s\n", hostname)); 
     1849            return False; 
     1850        } 
    18491851    } 
    18501852 
    18511853    if (my_name) 
     
    24742476        return (ret); 
    24752477    } 
    24762478 
     2479#if 0  
     2480    /* IMHO this is useless and only increases the timeout */ 
     2481 
    24772482    /* try with all lowercase */ 
    24782483    strlower (name2); 
    24792484    ret = sys_gethostbyname (name2); 
     
    24912496        free (name2); 
    24922497        return (ret); 
    24932498    } 
     2499#endif 
    24942500 
    24952501    /* nothing works :-( */ 
    24962502    free (name2);