Fix error propagation from WinSock functions. Fix cleanup of sockets. Allow the handshake to be interrupted.
This commit is contained in:
parent
d6c77b0323
commit
2f83dba24c
7 changed files with 48 additions and 22 deletions
|
|
@ -37,7 +37,10 @@ void LiStopConnection(void) {
|
|||
Limelog("done\n");
|
||||
}
|
||||
if (stage == STAGE_HANDSHAKE) {
|
||||
Limelog("Terminating handshake...");
|
||||
terminateHandshake();
|
||||
stage--;
|
||||
Limelog("done\n");
|
||||
}
|
||||
if (stage == STAGE_PLATFORM_INIT) {
|
||||
Limelog("Cleaning up platform...");
|
||||
|
|
@ -70,12 +73,6 @@ int LiStartConnection(IP_ADDRESS host, PSTREAM_CONFIGURATION streamConfig, PDECO
|
|||
LC_ASSERT(stage == STAGE_HANDSHAKE);
|
||||
Limelog("done\n");
|
||||
|
||||
Limelog("Initializing video stream...");
|
||||
initializeVideoStream(host, streamConfig, drCallbacks);
|
||||
stage++;
|
||||
LC_ASSERT(stage == STAGE_VIDEO_STREAM_INIT);
|
||||
Limelog("done\n");
|
||||
|
||||
Limelog("Initializing control stream...");
|
||||
err = initializeControlStream(host, streamConfig);
|
||||
if (err != 0) {
|
||||
|
|
@ -86,6 +83,12 @@ int LiStartConnection(IP_ADDRESS host, PSTREAM_CONFIGURATION streamConfig, PDECO
|
|||
LC_ASSERT(stage == STAGE_CONTROL_STREAM_INIT);
|
||||
Limelog("done\n");
|
||||
|
||||
Limelog("Initializing video stream...");
|
||||
initializeVideoStream(host, streamConfig, drCallbacks);
|
||||
stage++;
|
||||
LC_ASSERT(stage == STAGE_VIDEO_STREAM_INIT);
|
||||
Limelog("done\n");
|
||||
|
||||
Limelog("Starting control stream...");
|
||||
err = startControlStream();
|
||||
if (err != 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue