| true | 1936 | | pvm_addhosts(names, count, svp) | | | 1937 | | char **names; | | | 1938 | | int count; | | | 1939 | | int *svp; | | | 1940 | | { | | | 1941 | | int sbf, rbf; | | | 1942 | | int cc; | | | 1943 | | int i; | | | 1944 | | int *sv; | | | 1945 | | char *buf; | | | 1946 | | int tmp; | | | 1947 | | TEV_DECLS
| | | 1948 | | | | | 1949 | | if (TEV_EXCLUSIVE) {
| | | 1950 | | if (TEV_DO_TRACE(TEV_ADDHOSTS,TEV_EVENT_ENTRY)) {
| | | 1951 | | TEV_PACK_STRING( TEV_DID_HNL, TEV_DATA_ARRAY,
| | | 1952 | | names, count, 1 ); | | | 1953 | | TEV_FIN;
| | | 1954 | | } | | | 1955 | | } | | | 1956 | | | | | 1957 | | if (count < 1 || count > (TIDHOST >> (ffs(TIDHOST) - 1))) {
| | | 1958 | | cc = PvmBadParam;
| | | 1959 | | | | | 1960 | | } else { | | | 1961 | | if (!(cc = BEATASK)) {
| | | 1962 | | sbf = pvm_setsbuf(pvm_mkbuf(PvmDataFoo));
| | | 1963 | | rbf = pvm_setrbuf(0); | | | 1964 | | pvm_pkint(&count, 1, 1); | | | 1965 | | for (i = 0; i < count; i++) | | | 1966 | | pvm_pkstr(names[i]); | | | 1967 | | | | | 1968 | | if (pvmschedtid) | | | 1969 | | cc = msendrecv(pvmschedtid, SM_ADDHOST, PvmBaseContext);
| | | 1970 | | else | | | 1971 | | cc = msendrecv(TIDPVMD, TM_ADDHOST, SYSCTX_TM);
| | | 1972 | | if (cc > 0) { | | | 1973 | | pvm_upkint(&cc, 1, 1); | | | 1974 | | if (cc >= 0) { | | | 1975 | | if (cc == count) { | | | 1976 | | pvm_upkint(&cc, 1, 1); | | | 1977 | | sv = TALLOC(count, int, "sv1");
| | | 1978 | | cc = 0; | | | 1979 | | for (i = 0; i < count; i++) { | | | 1980 | | pvm_upkint(&sv[i], 1, 1); | | | 1981 | | |
| | 1724 | | | | pvmupkstralloc(ss) | | | 1725 | | | | char **ss; | | | 1726 | | | | { | | | 1727 | | | | int cc; | | | 1728 | | | | int l; | | | 1729 | | | | | | | 1730 | | | | if (!pvmrbuf) | | | 1731 | | | | cc = PvmNoBuf;
| | | 1732 | | | | else { | | | 1733 | | | | if (!(cc = (pvmrbuf->m_codef->dec_int) | | | 1734 | | | | (pvmrbuf, (void*)&l, 1, 1, sizeof(int)))) { | | | 1735 | | | | *ss = TALLOC(l, char, "pustr");
| | | 1736 | | | | if ((cc = (pvmrbuf->m_codef->dec_byte) | | | 1737 | | | | (pvmrbuf, (void*)*ss, l, 1, 1)) < 0) { | | | 1738 | | | | PVM_FREE(*ss);
| | | 1739 | | | | *ss = 0; | | | 1740 | | | | } | | | 1741 | | | | } | | | 1742 | | | | } | | | 1743 | | | | return cc; | | buf is uninitialized | 1744 | | | | } |
|