Allow fake sleep without AFP 2.2.

On the OS X 10.5 server, FPZzzzz messages seem to work even with a connection negotiated as AFP 2.0, so it's useful to allow this combination. (On Netatalk, the sleep requests are ignored and give an error under AFP 2.0, but they don't kill the connection either.)
This commit is contained in:
Stephen Heumann 2017-04-22 16:01:11 -05:00
parent 350204f78a
commit 3a07b12ee6
2 changed files with 1 additions and 10 deletions

View File

@ -507,15 +507,6 @@ void DoHit(long ctlID, CtlRecHndl ctlHandle)
} else if (menuItem == forceAFP22Item) {
flags ^= fForceAFP22;
CheckMItem((flags & fForceAFP22) ? TRUE : FALSE, forceAFP22Item);
/* Fake sleep is allowed only with AFP 2.2. */
if (flags & fForceAFP22) {
EnableMItem(fakeSleepItem);
} else {
DisableMItem(fakeSleepItem);
CheckMItem(FALSE, fakeSleepItem);
flags &= ~fFakeSleep;
}
} else if (menuItem == fakeSleepItem) {
flags ^= fFakeSleep;
CheckMItem((flags & fFakeSleep) ? TRUE : FALSE, fakeSleepItem);

View File

@ -280,7 +280,7 @@ resource rMenuItem (fakeSleepItem) {
fakeSleepItem, /* menu item ID */
"","",
0,
fDisabled+refIsResource*itemTitleRefShift,
refIsResource*itemTitleRefShift,
fakeSleepItem /* menu item title ref */
};
resource rPString(fakeSleepItem,noCrossBank) { "Fake Sleep to Keep Alive" };