23 |
|
|
24 |
|
static char pfile[] = TEMPLATE; /* persist file name */ |
25 |
|
|
26 |
< |
static SUBPROC rtpd[MAXPROC]; /* process descriptors */ |
26 |
> |
static SUBPROC rtpd[MAXPROC]; /* process descriptors */ |
27 |
|
static float *rtbuf = NULL; /* allocated i/o buffer */ |
28 |
< |
static int maxqlen = 0; /* maximum packets per queue */ |
28 |
> |
static int maxqlen; /* maximum packets per queue */ |
29 |
|
|
30 |
|
static PACKET *pqueue[MAXPROC]; /* packet queues */ |
31 |
|
static int pqlen[MAXPROC]; /* packet queue lengths */ |
79 |
|
psiz = open_process(&rtpd[nprocs], rtargv); |
80 |
|
if (psiz <= 0) |
81 |
|
error(SYSTEM, "cannot start rtrace process"); |
82 |
< |
n = psiz/(RPACKSIZ*6*sizeof(float)); |
83 |
< |
if (maxqlen == 0) { |
82 |
> |
n = psiz/(RPACKSIZ*6*sizeof(float)) + 1; |
83 |
> |
if (!maxqlen) { |
84 |
|
if (!(maxqlen = n)) |
85 |
|
error(INTERNAL, |
86 |
|
"bad pipe buffer size assumption"); |