From e4384452196453f9b9b7a840f0ce30e25f2606cd Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 24 Aug 2014 11:43:52 -0700 Subject: [PATCH] Fix missing status checks --- limelight-common/AudioStream.c | 3 +++ limelight-common/VideoStream.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/limelight-common/AudioStream.c b/limelight-common/AudioStream.c index 6a61c78..3dedd1f 100644 --- a/limelight-common/AudioStream.c +++ b/limelight-common/AudioStream.c @@ -195,6 +195,9 @@ int startAudioStream(void) { callbacks.init(); rtpSocket = bindUdpSocket(RTP_PORT); + if (rtpSocket == INVALID_SOCKET) { + return LastSocketError(); + } err = PltCreateThread(UdpPingThreadProc, NULL, &udpPingThread); if (err != 0) { diff --git a/limelight-common/VideoStream.c b/limelight-common/VideoStream.c index 788ebda..e414a8f 100644 --- a/limelight-common/VideoStream.c +++ b/limelight-common/VideoStream.c @@ -163,6 +163,9 @@ int startVideoStream(void* rendererContext, int drFlags) { configuration.height, 60, rendererContext, drFlags); rtpSocket = bindUdpSocket(RTP_PORT); + if (rtpSocket == INVALID_SOCKET) { + return LastSocketError(); + } err = PltCreateThread(UdpPingThreadProc, NULL, &udpPingThread); if (err != 0) {