~darkxst/ubuntu/saucy/gdm/lp1212408

« back to all changes in this revision

Viewing changes to daemon/misc.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-12-11 15:34:43 UTC
  • mto: (2.1.2 lenny) (1.4.50)
  • mto: This revision was merged to the branch mainline in revision 86.
  • Revision ID: james.westby@ubuntu.com-20071211153443-w5922mvs37kx0g4q
Tags: upstream-2.20.2
ImportĀ upstreamĀ versionĀ 2.20.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
899
899
        static GList *the_list = NULL;
900
900
        static time_t last_time = 0;
901
901
        char hostbuf[BUFSIZ];
902
 
        struct addrinfo hints;
 
902
        struct addrinfo hints;  
903
903
        struct addrinfo *result;
904
904
        struct addrinfo *res;
905
905
 
920
920
                snprintf (hostbuf, BUFSIZ-1, "localhost");
921
921
        }
922
922
 
923
 
        memset (&hints, 0, sizeof (hints));
 
923
        memset (&hints, 0, sizeof (hints)); 
 
924
 
924
925
        hints.ai_family = AF_INET;
 
926
 
925
927
#ifdef ENABLE_IPV6
926
 
        hints.ai_family |= AF_INET6;
 
928
        hints.ai_family = AF_INET6;
 
929
#endif  
 
930
 
 
931
#ifdef ENABLE_IPV6 
 
932
        if (getaddrinfo (hostbuf, NULL, &hints, &result) != 0) {
 
933
                hints.ai_family = AF_INET;
927
934
#endif
928
935
 
929
936
        if (getaddrinfo (hostbuf, NULL, &hints, &result) != 0) {
932
939
                return NULL;
933
940
        }
934
941
 
 
942
#ifdef ENABLE_IPV6        
 
943
        }
 
944
#endif    
935
945
        for (res = result; res != NULL; res = res->ai_next) {
936
946
                struct sockaddr_storage *sa;
937
947