| $input_44836 >= 288 | 274 | | | | upkstralloc(mp, ss) | | | 275 | | | | struct pmsg *mp; | | | 276 | | | | char **ss; | | | 277 | | | | { | | | 278 | | | | int cc; | | | 279 | | | | int l; | | | 280 | | | | | | $input_44844 >= 288 | 281 | | | | if (!(cc = (mp->m_codef->dec_int) (mp, (void*)&l, 1, 1, sizeof(int)))) { | | $input_44916 >= 288 | 282 | | | | if (l <= 0) | | | 283 | | | | cc = PvmNoData;
| | $input_44924 >= 288 | 284 | | | | else { | | $input_44932 >= 288 | 285 | | | | *ss = TALLOC(l, char, "ustr");
| | $input_44964 >= 288 | 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 | | | | } | | $input_45036 >= 288 | 292 | | | | return cc; | | $input_45052 >= 288 | 293 | | | | } |
| $input_45076 >= 288 | 1977 | | switch (t) { | | | 1978 | | | | | 1979 | | case DM_SLCONF_EP:
| | | 1980 | | if (pvmdebmask & (PDMTASK|PDMSTARTUP)) {
| | | 1981 | | pvmlogprintf("dm_slconf() ep<%s>\n", s); | | | 1982 | | } | | | 1983 | | epaths = colonsep(varsub(s)); | | | 1984 | | PVM_FREE(s);
| | | 1985 | | break; | | | 1986 | | | | | 1987 | | case DM_SLCONF_BP:
| | | 1988 | | if (pvmdebmask & PDMSTARTUP) {
| | | 1989 | | pvmlogprintf("dm_slconf() bp<%s>\n", s); | | | 1990 | | } | | | 1991 | | debugger = varsub(s); | | | 1992 | | PVM_FREE(s);
| | | 1993 | | break; | | | 1994 | | | | | 1995 | | case DM_SLCONF_WD:
| | | 1996 | | if (pvmdebmask & (PDMTASK|PDMSTARTUP)) {
| | | 1997 | | pvmlogprintf("dm_slconf() wd<%s>\n", s); | | | 1998 | | } | | | 1999 | | s2 = varsub(s); | | | 2000 | | if (chdir(s2) == -1) | | | 2001 | | pvmlogperror(s2); | | | 2002 | | PVM_FREE(s);
| | | 2003 | | PVM_FREE(s2);
| | | 2004 | | break; | | | 2005 | | | | | 2006 | | case DM_SLCONF_SCHED:
| | | 2007 | | if (pvmdebmask & (PDMSCHED|PDMSTARTUP)) {
| | | 2008 | | pvmlogprintf("dm_slconf() sched<t%x>\n", pvmschedtid); | | | 2009 | | } | | | 2010 | | pvmschedtid = pvmxtoi(s); | | | 2011 | | break; | | | 2012 | | | | $input_45084 >= 288 | 2013 | | case DM_SLCONF_TRACE: {
| | | 2014 | | Pvmtmask tmask; | | | 2015 | | int ttid, tctx, ttag, otid, octx, otag, tbuf, topt; | | $input_45092 >= 288 | 2016 | | if (pvmdebmask & (PDMTRACE|PDMSTARTUP)) {
| | $input_45108 >= 288 | 2017 | | pvmlogprintf("dm_slconf() tracer<t%x>\n", |
| $input_45148 >= 288 | 368 | | | | | | vpvmlogprintf(fmt, ap) | | | 369 | | | | | | char *fmt; | | | 370 | | | | | | va_list ap; | | | 371 | | | | | | { | | | 372 | | | | | | char vtmp[1024]; | | | 373 | | | | | | char *truncated; | | $input_45156 >= 288 | 374 | | | | | | int cnt = 0; | | | 375 | | | | | | int cc; | | | 376 | | | | | | | | | 377 | | | | | | #ifdef TIMESTAMPLOG | | | 378 | | | | | | time_t now; | | | 379 | | | | | | struct tm *tmp; | | | 380 | | | | | | | | $input_45164 >= 288 | 381 | | | | | | time(&now); | | $input_45180 >= 288 | 382 | | | | | | tmp = localtime(&now); | | | 383 | | | | | | #endif | | | 384 | | | | | | | | | 385 | | | | | | | | | 386 | | | | | | | | | 387 | | | | | | | | | 388 | | | | | | | | | 389 | | | | | | | | $input_45212 >= 288 | 390 | | | | | | cc = vsnprintf(vtmp, sizeof(vtmp), fmt, ap); | | $input_45268 >= 288 | 391 | | | | | | truncated = ( cc >= 0 && cc < sizeof(vtmp) ) | | $input_45284 >= 288 | 392 | | | | | | ? "" : "[...]\n"; | | | 393 | | | | | | | | $input_45300 >= 288 | 394 | | | | | | if (log_how & 1) { | | | 395 | | | | | | if (atnewline) { | | | 396 | | | | | | if (pvmmytid) | | | 397 | | | | | | fprintf(stderr, "[t%x] ", pvmmytid); | | | 398 | | | | | | else | | | 399 | | | | | | fprintf(stderr, "[pvmd pid%d] ", pvmmyupid); | | | 400 | | | | | | | | | 401 | | | | | | #ifdef TIMESTAMPLOG | | | 402 | | | | | | fprintf(stderr, "%02d/%02d %02d:%02d:%02d ", | | | 403 | | | | | | tmp->tm_mon + 1, | | | 404 | | | | | | tmp->tm_mday, | | | | | | | | | ... | | | 406 | | | | | | tmp->tm_min, | | | 407 | | | | | | tmp->tm_sec); | | | 408 | | | | | | #endif | | | 409 | | | | | | } | | | 410 | | | | | | | | | 411 | | | | | | cc = fprintf(stderr, "%s%s", vtmp, truncated); | | | 412 | | | | | | cnt = ( cc >= 0 ) ? cnt + cc : cc; | | | 413 | | | | | | fflush(stderr); | | | 414 | | | | | | } | | | 415 | | | | | | | | $input_45308 >= 288 | 416 | | | | | | if (log_how & 2) { | | | 417 | | | | | | if (log_alrdy < pvmdlogmax) { | | | 418 | | | | | | if (atnewline) { | | | 419 | | | | | | if (pvmmytid) | | | 420 | | | | | | fprintf(log_ff, "[t%x] ", pvmmytid); | | | 421 | | | | | | else | | | 422 | | | | | | fprintf(log_ff, "[pvmd pid%d] ", pvmmyupid); | | | 423 | | | | | | | | | 424 | | | | | | #ifdef TIMESTAMPLOG | | | 425 | | | | | | fprintf(log_ff, "%02d/%02d %02d:%02d:%02d ", | | | 426 | | | | | | tmp->tm_mon + 1, | | | | | | | | | ... | | | 434 | | | | | | | | | 435 | | | | | | cc = fprintf(log_ff, "%s%s", vtmp, truncated); | | | 436 | | | | | | cnt = ( cnt >= 0 ) ? ( ( cc >= 0 ) ? cnt + cc : cc ) : cnt; | | | 437 | | | | | | fflush(log_ff); | | | 438 | | | | | | | | | 439 | | | | | | if ((log_alrdy += cnt) >= pvmdlogmax) | | | 440 | | | | | | (void)write(log_fd, toomuch, strlen(toomuch)); | | | 441 | | | | | | } | | | 442 | | | | | | } | | | 443 | | | | | | | | $input_45316 >= 288 | 444 | | | | | | atnewline = (fmt[strlen(fmt) - 1] == '\n') ? 1 : 0; | | | 445 | | | | | | | | | 446 | | | | | | | | | 447 | | | | | | | | | 448 | | | | | | | | | 449 | | | | | | | | | 450 | | | | | | | | | 451 | | | | | | | | $input_45364 >= 288 | 452 | | | | | | return(cnt); | | $input_45380 >= 288 | 453 | | | | | | } |
| | 2019 | | } | | | 2020 | | if (sscanf(s, "%x %d %d %x %d %d %d %d %s", | | bytes_after($param_11) <= $input_45460 / 8 | 2021 | | &ttid, &tctx, &ttag, &otid, &octx, &otag, | Problem | | bytes_after($param_11) <= $input_45460 / 8 |
| | | 2022 | | &tbuf, &topt, tmask) != 9) { | | | 2023 | | pvmlogprintf("dm_slconf() bogus string<%s>\n", s); | | | 2024 | | } | | | 2025 | | else { | | | 2026 | | pvmtracer.trctid = ttid; | | | 2027 | | pvmtracer.trcctx = tctx; | | | 2028 | | pvmtracer.trctag = ttag; | | | 2029 | | pvmtracer.outtid = otid; | | | 2030 | | pvmtracer.outctx = octx; | | | 2031 | | pvmtracer.outtag = otag; | | | 2032 | | pvmtracer.trcbuf = tbuf; | | | 2033 | | pvmtracer.trcopt = topt; | | | 2034 | | BCOPY(tmask,pvmtracer.tmask,TEV_MASK_LENGTH);
| | | 2035 | | } | | | 2036 | | break; | | | 2037 | | } | | | 2038 | | | | | 2039 | | default: | | | 2040 | | pvmlogprintf("dm_slconf() ? type %d val <%s>\n", t, s); | | | 2041 | | PVM_FREE(s);
| | | 2042 | | break; |
|