diff --git a/src/Connection.c b/src/Connection.c index 77a101c..3420b32 100644 --- a/src/Connection.c +++ b/src/Connection.c @@ -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; diff --git a/src/ControlStream.c b/src/ControlStream.c index a30edb4..fef3a5c 100644 --- a/src/ControlStream.c +++ b/src/ControlStream.c @@ -466,7 +466,7 @@ static void controlReceiveThreadFunc(void* context) { return; } - long terminationErrorCode = -1; + int terminationErrorCode = -1; while (!PltIsThreadInterrupted(&controlReceiveThread)) { ENetEvent event; diff --git a/src/FakeCallbacks.c b/src/FakeCallbacks.c index 2f07602..41bcea3 100644 --- a/src/FakeCallbacks.c +++ b/src/FakeCallbacks.c @@ -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) {} diff --git a/src/Limelight.h b/src/Limelight.h index 7c3302b..684d634 100644 --- a/src/Limelight.h +++ b/src/Limelight.h @@ -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, ...);