Change errorCode to int for consistency between 32-bit and 64-bit platforms

Unfortunately this requires updating all client code that uses these callbacks.
This commit is contained in:
Cameron Gutman 2020-02-24 22:55:45 -08:00
parent cfeb0ffd90
commit 2fc278da00
4 changed files with 7 additions and 7 deletions

View File

@ -5,7 +5,7 @@ static int stage = STAGE_NONE;
static ConnListenerConnectionTerminated originalTerminationCallback;
static int alreadyTerminated;
static PLT_THREAD terminationCallbackThread;
static long terminationCallbackErrorCode;
static int terminationCallbackErrorCode;
// Common globals
char* RemoteAddrString;
@ -141,7 +141,7 @@ static void terminationCallbackThreadFunc(void* context)
// calls LiStopConnection() in the callback when the cleanup code
// attempts to join the thread that the termination callback (and LiStopConnection)
// is running on.
static void ClInternalConnectionTerminated(long errorCode)
static void ClInternalConnectionTerminated(int errorCode)
{
int err;

View File

@ -466,7 +466,7 @@ static void controlReceiveThreadFunc(void* context) {
return;
}
long terminationErrorCode = -1;
int terminationErrorCode = -1;
while (!PltIsThreadInterrupted(&controlReceiveThread)) {
ENetEvent event;

View File

@ -30,9 +30,9 @@ AUDIO_RENDERER_CALLBACKS fakeArCallbacks = {
static void fakeClStageStarting(int stage) {}
static void fakeClStageComplete(int stage) {}
static void fakeClStageFailed(int stage, long errorCode) {}
static void fakeClStageFailed(int stage, int errorCode) {}
static void fakeClConnectionStarted(void) {}
static void fakeClConnectionTerminated(long errorCode) {}
static void fakeClConnectionTerminated(int errorCode) {}
static void fakeClLogMessage(const char* format, ...) {}
static void fakeClRumble(unsigned short controllerNumber, unsigned short lowFreqMotor, unsigned short highFreqMotor) {}
static void fakeClConnectionStatusUpdate(int connectionStatus) {}

View File

@ -316,7 +316,7 @@ typedef void(*ConnListenerStageComplete)(int stage);
// ConnListenerConnectionTerminated() will not be invoked because the connection was
// not yet fully established. LiInterruptConnection() and LiStopConnection() may
// result in this callback being invoked, but it is not guaranteed.
typedef void(*ConnListenerStageFailed)(int stage, long errorCode);
typedef void(*ConnListenerStageFailed)(int stage, int errorCode);
// This callback is invoked after the connection is successfully established
typedef void(*ConnListenerConnectionStarted)(void);
@ -327,7 +327,7 @@ typedef void(*ConnListenerConnectionStarted)(void);
// non-zero, it means the termination was probably unexpected (loss of network,
// crash, or similar conditions). This will not be invoked as a result of a call
// to LiStopConnection() or LiInterruptConnection().
typedef void(*ConnListenerConnectionTerminated)(long errorCode);
typedef void(*ConnListenerConnectionTerminated)(int errorCode);
// This callback is invoked to log debug message
typedef void(*ConnListenerLogMessage)(const char* format, ...);