[Pkg-voip-commits] [janus] 103/163: Fixed race condition when starting WebSockets threads and initialized still 0

Jonas Smedegaard dr at jones.dk
Sat Oct 28 01:22:19 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.2.5-1
in repository janus.

commit 817a7e6588497ef1562041aff9c3ef189e093ef6
Author: Lorenzo Miniero <lminiero at gmail.com>
Date:   Thu Sep 7 15:16:34 2017 +0200

    Fixed race condition when starting WebSockets threads and initialized still 0
---
 transports/janus_websockets.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/transports/janus_websockets.c b/transports/janus_websockets.c
index 3f85475..37924a2 100644
--- a/transports/janus_websockets.c
+++ b/transports/janus_websockets.c
@@ -768,6 +768,8 @@ int janus_websockets_init(janus_transport_callbacks *callback, const char *confi
 	wss_janus_api_enabled = wss || swss;
 	wss_admin_api_enabled = admin_wss || admin_swss;
 
+	g_atomic_int_set(&initialized, 1);
+
 	GError *error = NULL;
 	/* Start the WebSocket service threads */
 	if(wss != NULL) {
@@ -804,7 +806,6 @@ int janus_websockets_init(janus_transport_callbacks *callback, const char *confi
 	}
 
 	/* Done */
-	g_atomic_int_set(&initialized, 1);
 	JANUS_LOG(LOG_INFO, "%s initialized!\n", JANUS_WEBSOCKETS_NAME);
 	return 0;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/janus.git



More information about the Pkg-voip-commits mailing list