[Pkg-voip-commits] [janus] 110/163: Ignore EINTR for Streaming mountpoints (fixes #1004)
Jonas Smedegaard
dr at jones.dk
Sat Oct 28 01:22:20 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 f24fbae0aab4234020bb9891ca47c20a2ef1d988
Author: Lorenzo Miniero <lminiero at gmail.com>
Date: Tue Sep 12 11:29:44 2017 +0200
Ignore EINTR for Streaming mountpoints (fixes #1004)
---
plugins/janus_streaming.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/plugins/janus_streaming.c b/plugins/janus_streaming.c
index 84f0f80..4fd59eb 100644
--- a/plugins/janus_streaming.c
+++ b/plugins/janus_streaming.c
@@ -655,6 +655,10 @@ int janus_streaming_init(janus_callbacks *callback, const char *config_path) {
janus_config_print(config);
mountpoints = g_hash_table_new_full(g_int64_hash, g_int64_equal, (GDestroyNotify)g_free, NULL);
+
+ /* Threads will expect this to be set */
+ g_atomic_int_set(&initialized, 1);
+
/* Parse configuration to populate the mountpoints */
if(config != NULL) {
/* Any admin key to limit who can "create"? */
@@ -1088,7 +1092,6 @@ int janus_streaming_init(janus_callbacks *callback, const char *config_path) {
messages = g_async_queue_new_full((GDestroyNotify) janus_streaming_message_free);
/* This is the callback we'll need to invoke to contact the gateway */
gateway = callback;
- g_atomic_int_set(&initialized, 1);
GError *error = NULL;
/* Start the sessions watchdog */
@@ -4235,6 +4238,10 @@ static void *janus_streaming_relay_thread(void *data) {
/* Wait for some data */
resfd = poll(fds, num, 1000);
if(resfd < 0) {
+ if(errno == EINTR) {
+ JANUS_LOG(LOG_HUGE, "[%s] Got an EINTR (%s), ignoring...\n", name, strerror(errno));
+ continue;
+ }
JANUS_LOG(LOG_ERR, "[%s] Error polling... %d (%s)\n", name, errno, strerror(errno));
mountpoint->enabled = FALSE;
break;
--
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