| | 348 | | hoster(mp) | | | 349 | | struct pmsg *mp; | | | 350 | | { | | | 351 | | struct pmsg *mp2; | | | 352 | | int num; | | | 353 | | int i; | | | 354 | | struct hst **hostlist; | | | 355 | | struct hst *hp; | | | 356 | | char *p; | | | 357 | | | | | 358 | | | | | 359 | | | | | 360 | | | | | 361 | | | | | 362 | | upkint(mp, &num); | | | 363 | | if (pvmdebmask & PDMSTARTUP) {
| | | 364 | | pvmlogprintf("hoster() %d to start\n", num); | | | 365 | | } | | | 366 | | if (num > 0) { | | | 367 | | hostlist = TALLOC(num, struct hst *, "hsts");
| | | 368 | | for (i = 0; i < num; i++) { | | | 369 | | hp = TALLOC(1, struct hst, "hst");
| | | 370 | | hostlist[i] = hp; | | | 371 | | hp->h_flag = 0; | | | 372 | | hp->h_result = 0; | | | 373 | | if (upkint(mp, &hp->h_tid) | | | 374 | | || upkstralloc(mp, &hp->h_sopts) | | | 375 | | || upkstralloc(mp, &hp->h_login) | | | 376 | | || upkstralloc(mp, &hp->h_cmd) | | | 377 | | || upkstralloc(mp, &hp->h_wincmd) |
| | 274 | | | | upkstralloc(mp, ss) | | | 275 | | | | struct pmsg *mp; | | | 276 | | | | char **ss; | | | 277 | | | | { | | | 278 | | | | int cc; | | | 279 | | | | int l; | | | 280 | | | | | | | 281 | | | | if (!(cc = (mp->m_codef->dec_int) (mp, (void*)&l, 1, 1, sizeof(int)))) { | | | 282 | | | | if (l <= 0) | | | 283 | | | | cc = PvmNoData;
| | | 284 | | | | else { | | | 285 | | | | *ss = TALLOC(l, char, "ustr");
| | | 286 | | | | if ((cc = (mp->m_codef->dec_byte) (mp, (void*)*ss, l, 1, 1)) < 0) { | | | 287 | | | | PVM_FREE(*ss);
| | | 288 | | | | *ss = 0; | | | 289 | | | | } | | | 290 | | | | } | | | 291 | | | | } | | | 292 | | | | return cc; | | hp->h_vmid <= 4095 | 293 | | | | } |
|