mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Minor cleanup and bugfix
This commit is contained in:
parent
83431e557d
commit
31433fc5ee
@ -78,6 +78,7 @@ int initializeAudioStream(void) {
|
|||||||
int err = PltCreateThread("AudioPing", UdpPingThreadProc, NULL, &udpPingThread);
|
int err = PltCreateThread("AudioPing", UdpPingThreadProc, NULL, &udpPingThread);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
closeSocket(rtpSocket);
|
closeSocket(rtpSocket);
|
||||||
|
rtpSocket = INVALID_SOCKET;
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -489,7 +489,8 @@ static bool decryptControlMessageToV1(PNVCTL_ENCRYPTED_PACKET_HEADER encPacket,
|
|||||||
goto gcm_cleanup;
|
goto gcm_cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GCM encryption won't ever fill ciphertext here but we have to call it anyway
|
// GCM will never have additional plaintext here, but we need to call it to
|
||||||
|
// ensure that the GCM authentication tag is correct for this data.
|
||||||
if (EVP_DecryptFinal_ex(cipherContext, (unsigned char*)*packet, &len) != 1) {
|
if (EVP_DecryptFinal_ex(cipherContext, (unsigned char*)*packet, &len) != 1) {
|
||||||
goto gcm_cleanup;
|
goto gcm_cleanup;
|
||||||
}
|
}
|
||||||
@ -861,7 +862,6 @@ static void controlReceiveThreadFunc(void* context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// We used to wait for a ENET_EVENT_TYPE_DISCONNECT event, but since
|
// We used to wait for a ENET_EVENT_TYPE_DISCONNECT event, but since
|
||||||
// GFE 3.20.3.63 we don't get one for 10 seconds after we first get
|
// GFE 3.20.3.63 we don't get one for 10 seconds after we first get
|
||||||
// this termination message. The termination message should be reliable
|
// this termination message. The termination message should be reliable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user