| $input_29676 > $unknown_6322055 - 62 | 840 | | addhosts(mp, rmp) | Problem | | $input_29676 > $unknown_6322055 - 62 |
|
| | 841 | | struct pmsg *mp; |
| | 842 | | struct pmsg *rmp; |
| | 843 | | { |
| | 844 | | struct hostd *hp, *hp2; |
| | 845 | | struct pmsg *mp2; |
| $input_29708 > $unknown_6322087 - 62 | 846 | | struct waitc *wp = 0; | Problem | | $input_29708 > $unknown_6322087 - 62 |
|
| $input_29740 > $unknown_6322119 - 62 | 847 | | struct waitc_add *wxp = 0; | Problem | | $input_29740 > $unknown_6322119 - 62 |
|
| | 848 | | int i, j; |
| | 849 | | int count; |
| | 850 | | int ngood; |
| | 851 | | int ntid; |
| | 852 | | struct hostent *he; |
| $input_29772 > $unknown_6322151 - 62 | 853 | | int maxhostid = (tidhmask >> ffs(tidhmask) - 1); | Problem | | $input_29772 > $unknown_6322151 - 62 |
|
| | 854 | | int hh; |
| | 855 | | int pid; |
| | 856 | | int *tids; |
| | 857 | | char *winpvmdpath; |
| | 858 | | char *pvmdpath; |
| | 859 | | char *vmid; |
| | 860 | | char *buf; |
| | 861 | | int len; |
| | 862 | | |
| | 863 | | |
| | 864 | | |
| | 865 | | |
| | 866 | | |
| | 867 | | |
| $input_29900 > $unknown_6322273 - 62 | 868 | | if (busyadding) { | Problem | | $input_29900 > $unknown_6322273 - 62 |
|
| | 869 | | |
| | 870 | | |
| | 871 | | |
| | 872 | | pkint(rmp, PvmAlready);
|
| | 873 | | sendmessage(rmp); |
| | 874 | | return 0; |
| | 875 | | } |
| | 876 | | |
| $input_29932 > $unknown_6322301 - 62 | 877 | | busyadding = 1; | Problem | | $input_29932 > $unknown_6322301 - 62 |
|
| | 878 | | |
| | 879 | | |
| | 880 | | |
| $input_29964 > $unknown_6322329 - 62 | 881 | | if (upkint(mp, &count) || count < 1 || count > maxhostid) { | Problem | | $input_29964 > $unknown_6322329 - 62 |
|
| | 882 | | pvmlogerror("addhosts() bad msg format\n"); |
| | 883 | | goto bad; |
| | 884 | | } |
| | 885 | | |
| | 886 | | |
| | 887 | | |
| | 888 | | |
| | 889 | | |
| $input_30188 > $unknown_6322489 - 62 | 890 | | wp = wait_new(WT_HOSTSTART); | Problem | | $input_30188 > $unknown_6322489 - 62 |
|
| $input_30316 > $unknown_6322569 - 62 | 891 | | wp->wa_tid = mp->m_src; | Problem | | $input_30316 > $unknown_6322569 - 62 |
|
| $input_30348 > $unknown_6322591 - 62 | 892 | | wp->wa_dep = mp->m_wid; | Problem | | $input_30348 > $unknown_6322591 - 62 |
|
| $input_30380 > $unknown_6322611 - 62 | 893 | | wxp = TALLOC(1, struct waitc_add, "waix"); | Problem | | $input_30380 > $unknown_6322611 - 62 |
|
| $input_30508 > $unknown_6322691 - 62 | 894 | | wxp->w_num = count; | Problem | | $input_30508 > $unknown_6322691 - 62 |
|
| $input_30540 > $unknown_6322711 - 62 | 895 | | wxp->w_hosts = TALLOC(count, struct hostd *, "waiv"); | Problem | | $input_30540 > $unknown_6322711 - 62 |
|
| $input_30668 > $unknown_6322797 - 62 | 896 | | BZERO((char*)wxp->w_hosts, count * sizeof(struct hostd *)); | Problem | | $input_30668 > $unknown_6322797 - 62 |
|
| $input_30796 > $unknown_6322883 - 62 | 897 | | wp->wa_spec = (void *)wxp; | Problem | | $input_30796 > $unknown_6322883 - 62 |
|
| | 898 | | |
| $input_30828 > $unknown_6322903 - 62 | 899 | | for (i = 0; i < count; i++) { | Problem | | $input_30828 > $unknown_6322903 - 62 |
|
| $input_30924 > $unknown_6322965 - 62 | 900 | | hp = hd_new(0); | Problem | | $input_30924 > $unknown_6322965 - 62 |
|
| $input_31052 > $unknown_6323045 - 62 | 901 | | wxp->w_hosts[i] = hp; | Problem | | $input_31052 > $unknown_6323045 - 62 |
|
| $input_31084 > $unknown_6323065 - 62 | 902 | | if (upkstralloc(mp, &buf)) { | Problem | | $input_31084 > $unknown_6323065 - 62 |
|
| | 903 | | pvmlogerror("addhosts() bad msg format\n"); |
| | 904 | | goto bad; |
| | 905 | | } |
| $input_31244 > $unknown_6323189 - 62 | 906 | | if (parsehost(buf, hp)) { | Problem | | $input_31244 > $unknown_6323189 - 62 |
|
| | 907 | | hp->hd_err = PvmBadParam;
|
| | 908 | | |
| $input_31404 > $unknown_6323291 - 62 | 909 | | } else { | Problem | | $input_31404 > $unknown_6323291 - 62 |
|
| | 910 | | |
| | 911 | | |
| | 912 | | |
| $input_31436 > $unknown_6323309 - 62 | 913 | | if (filehosts && | Problem | | $input_31436 > $unknown_6323309 - 62 |
|
| | 914 | | ((hp2 = nametohost(filehosts, hp->hd_name)) |
| | 915 | | || (hp2 = filehosts->ht_hosts[0]))) |
| | 916 | | applydefaults(hp, hp2); |
| | 917 | | } |
| $input_31468 > $unknown_6323329 - 62 | 918 | | PVM_FREE(buf); | Problem | | $input_31468 > $unknown_6323329 - 62 |
|
| | 919 | | } |
| | 920 | | |
| | 921 | | |
| | 922 | | |
| | 923 | | |
| | 924 | | |
| | 925 | | |
| $input_31596 > $unknown_6323413 - 62 | 926 | | hp = hosts->ht_hosts[hosts->ht_local]; | Problem | | $input_31596 > $unknown_6323413 - 62 |
|
| | 927 | | |
| $input_31628 > $unknown_6323437 - 62 | 928 | | if ( hp->hd_sad.sin_addr.s_addr == htonl(0x7f000001) ) { | Problem | | $input_31628 > $unknown_6323437 - 62 |
|
| | 929 | | |
| | 930 | | |
| | 931 | | |
| | 932 | | |
| $input_31788 > $unknown_6323549 - 62 | 933 | | for (i = 0; i < count; i++) { | Problem | | $input_31788 > $unknown_6323549 - 62 |
|
| $input_31884 > $unknown_6323605 - 62 | 934 | | hp = wxp->w_hosts[i]; | Problem | | $input_31884 > $unknown_6323605 - 62 |
|
| $input_31916 > $unknown_6323625 - 62 | 935 | | if (hp->hd_err) | Problem | | $input_31916 > $unknown_6323625 - 62 |
|
| $input_31948 > $unknown_6323641 - 62 | 936 | | continue; | Problem | | $input_31948 > $unknown_6323641 - 62 |
|
| | 937 | | hp->hd_err = PvmIPLoopback;
|
| | 938 | | } |
| | 939 | | } |
| | 940 | | |
| | 941 | | |
| | 942 | | |
| | 943 | | |
| | 944 | | |
| $input_32044 > $unknown_6323695 - 62 | 945 | | ngood = 0; | Problem | | $input_32044 > $unknown_6323695 - 62 |
|
| $input_32076 > $unknown_6323715 - 62 | 946 | | for (i = 0; i < count; i++) { | Problem | | $input_32076 > $unknown_6323715 - 62 |
|
| $input_32172 > $unknown_6323767 - 62 | 947 | | hp = wxp->w_hosts[i]; | Problem | | $input_32172 > $unknown_6323767 - 62 |
|
| $input_32204 > $unknown_6323785 - 62 | 948 | | if (hp->hd_err) | Problem | | $input_32204 > $unknown_6323785 - 62 |
|
| | 949 | | continue; |
| | 950 | | |
| $input_32236 > $unknown_6323807 - 62 | 951 | | if (he = gethostbyname(hp->hd_aname ? hp->hd_aname : hp->hd_name)) { | Problem | | $input_32236 > $unknown_6323807 - 62 |
|
| | 952 | | BCOPY(he->h_addr_list[0], (char*)&hp->hd_sad.sin_addr,
|
| $input_12 > $unknown_6323931 - 62 | 953 | | sizeof(struct in_addr)); | Problem | | $input_12 > $unknown_6323931 - 62 |
|
| | 954 | | |
| | 955 | | } else { |
| | 956 | | if (pvmdebmask & PDMSTARTUP) {
|
| | 957 | | pvmlogprintf( |
| | 958 | | "start_slaves() can't gethostbyname: %s\n", |
| | 959 | | hp->hd_name); |
| | 960 | | } |
| | 961 | | hp->hd_err = PvmNoHost;
|
| | 962 | | continue; |
| | 963 | | } |
| | 964 | | |
| | 965 | | |
| | 966 | | |
| $input_12 > $unknown_6323999 - 62 | 967 | | if (!(hp->hd_flag & HF_OVERLOAD)) { | Problem | | $input_12 > $unknown_6323999 - 62 |
|
| $input_12 > $unknown_6324017 - 62 | 968 | | for (hh = hosts->ht_last; hh > 0; hh--) | Problem | | $input_12 > $unknown_6324017 - 62 |
|
| $input_12 > $unknown_6324067 - 62 | 969 | | if ((hp2 = hosts->ht_hosts[hh]) | Problem | | $input_12 > $unknown_6324067 - 62 |
|
| | 970 | | && (hp2->hd_sad.sin_addr.s_addr == hp->hd_sad.sin_addr.s_addr)) { |
| | 971 | | hp->hd_err = PvmDupHost;
|
| | 972 | | break; |
| | 973 | | } |
| $input_12 > $unknown_6324141 - 62 | 974 | | if (hp->hd_err) | Problem | | $input_12 > $unknown_6324141 - 62 |
|
| | 975 | | continue; |
| | 976 | | |
| | 977 | | |
| | 978 | | |
| $input_12 > $unknown_6324155 - 62 | 979 | | for (j = i; j-- > 0; ) | Problem | | $input_12 > $unknown_6324155 - 62 |
|
| | 980 | | if (hp->hd_sad.sin_addr.s_addr |
| | 981 | | == wxp->w_hosts[j]->hd_sad.sin_addr.s_addr) { |
| | 982 | | hp->hd_err = PvmDupHost;
|
| | 983 | | break; |
| | 984 | | } |
| $input_12 > $unknown_6324229 - 62 | 985 | | if (hp->hd_err) | Problem | | $input_12 > $unknown_6324229 - 62 |
|
| | 986 | | continue; |
| | 987 | | } |
| | 988 | | |
| $input_12 > $unknown_6324241 - 62 | 989 | | ngood++; | Problem | | $input_12 > $unknown_6324241 - 62 |
|
| | 990 | | } |
| | 991 | | |
| | 992 | | |
| | 993 | | |
| | 994 | | |
| | 995 | | |
| $input_12 > $unknown_6324293 - 62 | 996 | | ntid = ngood; | Problem | | $input_12 > $unknown_6324293 - 62 |
|
| $input_12 > $unknown_6324305 - 62 | 997 | | tids = TALLOC(ngood, int, "xxx"); | Problem | | $input_12 > $unknown_6324305 - 62 |
|
| $input_12 > $unknown_6324353 - 62 | 998 | | hostids_new(&ntid, tids); | Problem | | $input_12 > $unknown_6324353 - 62 |
|
| $input_12 > $unknown_6324389 - 62 | 999 | | if (ntid < ngood) { | Problem | | $input_12 > $unknown_6324389 - 62 |
|
| $input_12 > $unknown_6324401 - 62 | 1000 | | pvmlogerror("addhosts() out of hostids\n"); | Problem | | $input_12 > $unknown_6324401 - 62 |
|
| $input_12 > $unknown_6324425 - 62 | 1001 | | ngood = ntid; | Problem | | $input_12 > $unknown_6324425 - 62 |
|
| | 1002 | | } |
| $input_12 > $unknown_6324437 - 62 | 1003 | | for (j = i = 0; i < count; i++) { | Problem | | $input_12 > $unknown_6324437 - 62 |
|
| $input_12 > $unknown_6324489 - 62 | 1004 | | hp = wxp->w_hosts[i]; | Problem | | $input_12 > $unknown_6324489 - 62 |
|
| $input_12 > $unknown_6324501 - 62 | 1005 | | if (hp->hd_err) | Problem | | $input_12 > $unknown_6324501 - 62 |
|
| $input_12 > $unknown_6324513 - 62 | 1006 | | continue; | Problem | | $input_12 > $unknown_6324513 - 62 |
|
| | 1007 | | if (j < ntid) |
| | 1008 | | hp->hd_hostpart = tids[j++]; |
| | 1009 | | else |
| | 1010 | | hp->hd_err = PvmOutOfRes;
|
| | 1011 | | } |
| $input_12 > $unknown_6324549 - 62 | 1012 | | PVM_FREE(tids); | Problem | | $input_12 > $unknown_6324549 - 62 |
|
| | 1013 | | |
| | 1014 | | |
| | 1015 | | |
| | 1016 | | |
| | 1017 | | |
| | 1018 | | |
| | 1019 | | |
| | 1020 | | |
| | 1021 | | |
| $input_12 > $unknown_6324573 - 62 | 1022 | | wp->wa_mesg = rmp; | Problem | | $input_12 > $unknown_6324573 - 62 |
|
| | 1023 | | |
| | 1024 | | |
| | 1025 | | |
| $input_12 > $unknown_6324585 - 62 | 1026 | | mp2 = mesg_new(0); | Problem | | $input_12 > $unknown_6324585 - 62 |
|
| $input_12 > $unknown_6324633 - 62 | 1027 | | mp2->m_wid = wp->wa_wid; | Problem | | $input_12 > $unknown_6324633 - 62 |
|
| $input_12 > $unknown_6324645 - 62 | 1028 | | pkint(mp2, ngood); | Problem | | $input_12 > $unknown_6324645 - 62 |
|
| $input_12 > $unknown_6324685 - 62 | 1029 | | if (!(pvmdpath = getenv("PVM_DPATH"))) | Problem | | $input_12 > $unknown_6324685 - 62 |
|
| | 1030 | | pvmdpath = PVMDPATH;
|
| strlen(pvmdpath) > $unknown_6324745 - 62 | 1031 | | if (!(winpvmdpath = getenv("PVM_WINDPATH"))) | Problem | | strlen(pvmdpath) > $unknown_6324745 - 62 |
|
| | 1032 | | winpvmdpath = WINPVMDPATH;
|
| strlen(pvmdpath) > $unknown_6324805 - 62 | 1033 | | for (i = 0; i < count; i++) { | Problem | | strlen(pvmdpath) > $unknown_6324805 - 62 |
|
| strlen(pvmdpath) > $unknown_6324841 - 62 | 1034 | | hp = wxp->w_hosts[i]; | Problem | | strlen(pvmdpath) > $unknown_6324841 - 62 |
|
| strlen(pvmdpath) > $unknown_6324853 - 62 | 1035 | | if (hp->hd_err) | Problem | | strlen(pvmdpath) > $unknown_6324853 - 62 |
|
| | 1036 | | continue; |
| strlen(pvmdpath) > $unknown_6324865 - 62 | 1037 | | pkint(mp2, hp->hd_hostpart); | Problem | | strlen(pvmdpath) > $unknown_6324865 - 62 |
|
| strlen(pvmdpath) > $unknown_6324907 - 62 | 1038 | | pkstr(mp2, hp->hd_sopts ? hp->hd_sopts : ""); | Problem | | strlen(pvmdpath) > $unknown_6324907 - 62 |
|
| | 1039 | | |
| strlen(pvmdpath) > $unknown_6324971 - 62 | 1040 | | if (hp->hd_login) { | Problem | | strlen(pvmdpath) > $unknown_6324971 - 62 |
|
| | 1041 | | len = strlen(hp->hd_login) |
| | 1042 | | + strlen((hp->hd_aname ? hp->hd_aname : hp->hd_name)) |
| | 1043 | | + 2; |
| | 1044 | | buf = TALLOC( len, char, "hdl" );
|
| | 1045 | | sprintf(buf, "%s@%s", hp->hd_login, |
| | 1046 | | (hp->hd_aname ? hp->hd_aname : hp->hd_name)); |
| | 1047 | | } |
| strlen(pvmdpath) > $unknown_6324983 - 62 | 1048 | | else | Problem | | strlen(pvmdpath) > $unknown_6324983 - 62 |
|
| | 1049 | | buf = STRALLOC( (hp->hd_aname
|
| strlen(pvmdpath) > $unknown_6324995 - 62 | 1050 | | ? hp->hd_aname : hp->hd_name) ); | Problem | | strlen(pvmdpath) > $unknown_6324995 - 62 |
|
| strlen(pvmdpath) > $unknown_6325197 - 62 | 1051 | | pkstr(mp2, buf); | Problem | | strlen(pvmdpath) > $unknown_6325197 - 62 |
|
| strlen(pvmdpath) > $unknown_6325233 - 62 | 1052 | | PVM_FREE(buf); | Problem | | strlen(pvmdpath) > $unknown_6325233 - 62 |
|
| | 1053 | | |
| | 1054 | | |
| strlen(pvmdpath) > $unknown_6325255 - 62 | 1055 | | len = strlen( (hp->hd_dpath ? hp->hd_dpath : pvmdpath) ) + 1 | Problem | | strlen(pvmdpath) > $unknown_6325255 - 62 |
|
| strlen(pvmdpath) > $unknown_6325315 - 62 | 1056 | | + strlen( (hp->hd_sopts && !strcmp(hp->hd_sopts, "ms") | Problem | | strlen(pvmdpath) > $unknown_6325315 - 62 |
|
| strlen(pvmdpath) > $unknown_6325387 - 62 | 1057 | | ? "-S" : "-s") ) + 1 | Problem | | strlen(pvmdpath) > $unknown_6325387 - 62 |
|
| strlen(pvmdpath) > $unknown_6325469 - 62 | 1058 | | + 2 + 16 + 1 | Problem | | strlen(pvmdpath) > $unknown_6325469 - 62 |
|
| strlen(pvmdpath) > $unknown_6325435 - 62 | 1059 | | + 2 + strlen( hp->hd_name ) + 1 | Problem | | strlen(pvmdpath) > $unknown_6325435 - 62 |
|
| strlen(pvmdpath) > $unknown_6325469 - 62 | 1060 | | + 5 * ( 16 + 1 ); | Problem | | strlen(pvmdpath) > $unknown_6325469 - 62 |
|
| strlen(pvmdpath) > len - 62 | 1061 | | buf = TALLOC( len, char, "hdall" );
|
| | 1062 | | (void)sprintf(buf, "%s %s -d0x%x -n%s %d %s %d", |
| strlen(pvmdpath) > bytes_after(buf) - 43 | 1063 | | (hp->hd_dpath ? hp->hd_dpath : pvmdpath), | Problem | | strlen(pvmdpath) > bytes_after(buf) - 43 |
|
| | 1064 | | (hp->hd_sopts && !strcmp(hp->hd_sopts, "ms") |
| | 1065 | | ? "-S" : "-s"), |
| | 1066 | | pvmdebmask, |
| | 1067 | | hp->hd_name, |
| strlen(pvmdpath) > bytes_after(buf) - 45 | 1068 | | hosts->ht_master, | Problem | | strlen(pvmdpath) > bytes_after(buf) - 45 |
|
| | 1069 | | inadport_hex( |