AFPBridge/aspinterface.h
Stephen Heumann 3f40a3190d Modify FPRead requests so they don’t return more data than will fit in the reply buffer.
This issue arises because ASP requests and replies are limited to a “quantum size” of 4624 bytes even if the amount requested is larger, and the AppleShare FST relies on this behavior in sizing its buffers. DSI does not have this limitation, so it was returning more data than would fit in the buffer.

Also improve error checking, so an error is reported in cases where the buffer is too small.
2017-04-03 16:36:50 -05:00

24 lines
570 B
C

#ifndef ASPINTERFACE_H
#define ASPINTERFACE_H
#include "session.h"
/* async flag values */
#define AT_SYNC 0
#define AT_ASYNC 0x80
#define aspBusyErr 0x07FF /* temp result code for async call in process */
#define SESSION_NUM_START 0xF8
#define MAX_SESSIONS (256 - SESSION_NUM_START)
extern Session sessionTbl[MAX_SESSIONS];
void DispatchASPCommand(SPCommandRec *commandRec);
void CompleteASPCommand(Session *sess, Word result);
void FinishASPCommand(Session *sess);
void FlagFatalError(Session *sess, Word errorCode);
void PollAllSessions(void);
#endif