Lines Matching defs:hrp

679 	struct ftphost *hrp, *lhrp;
690 if ((hrp = malloc(sizeof(struct ftphost))) == NULL)
692 hrp->hostname = hostname;
693 hrp->hostinfo = NULL;
699 if (getaddrinfo(hrp->hostname, NULL, &hints, &res) == 0)
700 hrp->hostinfo = res;
701 hrp->statfile = _PATH_FTPDSTATFILE;
702 hrp->welcome = _PATH_FTPWELCOME;
703 hrp->loginmsg = _PATH_FTPLOGINMESG;
704 hrp->anonuser = "ftp";
705 hrp->next = NULL;
706 thishost = firsthost = lhrp = hrp;
777 for (hrp = firsthost; hrp != NULL; hrp = hrp->next) {
780 for (hi = hrp->hostinfo; hi != NULL;
792 if (hrp == NULL) {
793 if ((hrp = malloc(sizeof(struct ftphost))) == NULL)
795 hrp->hostname = NULL;
798 if (hrp->hostinfo && hrp->hostinfo != res)
799 freeaddrinfo(hrp->hostinfo);
802 hrp->hostinfo = res;
810 switch(hrp->hostinfo->ai_family) {
812 addr = &((struct sockaddr_in *)hrp->hostinfo->ai_addr)->sin_addr;
816 addr = &((struct sockaddr_in6 *)hrp->hostinfo->ai_addr)->sin6_addr;
821 freeaddrinfo(hrp->hostinfo);
823 free(hrp); /*not in chain, can free*/
825 hrp->hostinfo = NULL; /*mark as blank*/
830 hrp->hostinfo->ai_family,
845 if (hrp->hostname &&
846 strcmp(hrp->hostname, vhost) != 0) {
847 free(hrp->hostname);
848 hrp->hostname = NULL;
850 if (hrp->hostname == NULL &&
851 (hrp->hostname = strdup(vhost)) == NULL) {
852 freeaddrinfo(hrp->hostinfo);
853 hrp->hostinfo = NULL; /* mark as blank */
858 hrp->anonuser = anonuser;
859 hrp->statfile = statfile;
860 hrp->welcome = welcome;
861 hrp->loginmsg = loginmsg;
863 hrp->next = NULL;
864 lhrp->next = hrp;
865 lhrp = hrp;
881 struct ftphost *hrp;
898 hrp = thishost = firsthost; /* default */
901 while (hrp != NULL) {
902 for (hi = hrp->hostinfo; hi != NULL; hi = hi->ai_next) {
904 thishost = hrp;
913 thishost = hrp;
918 hrp = hrp->next;