SCP: Make sure that log and debug file I/O use a large (64K) buffer
This commit is contained in:
parent
5f6636c6d7
commit
11c0251059
2 changed files with 2 additions and 3 deletions
|
@ -1860,6 +1860,7 @@ else {
|
||||||
*pref = NULL;
|
*pref = NULL;
|
||||||
return SCPE_OPENERR;
|
return SCPE_OPENERR;
|
||||||
}
|
}
|
||||||
|
setvbuf (*pf, NULL, _IOFBF, 65536);
|
||||||
(*pref)->file = *pf;
|
(*pref)->file = *pf;
|
||||||
(*pref)->refcount = 1; /* need close */
|
(*pref)->refcount = 1; /* need close */
|
||||||
}
|
}
|
||||||
|
|
|
@ -2598,9 +2598,7 @@ while (*tptr) {
|
||||||
else
|
else
|
||||||
strcpy (lp->txlogname, mp->logfiletmpl);
|
strcpy (lp->txlogname, mp->logfiletmpl);
|
||||||
r = sim_open_logfile (lp->txlogname, TRUE, &lp->txlog, &lp->txlogref);
|
r = sim_open_logfile (lp->txlogname, TRUE, &lp->txlog, &lp->txlogref);
|
||||||
if (r == SCPE_OK)
|
if (r != SCPE_OK) {
|
||||||
setvbuf (lp->txlog, NULL, _IOFBF, 65536);
|
|
||||||
else {
|
|
||||||
free (lp->txlogname);
|
free (lp->txlogname);
|
||||||
lp->txlogname = NULL;
|
lp->txlogname = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue