diff options
-rw-r--r-- | sesman/chansrv/pulse/module-xrdp-source.c | 10 | ||||
-rw-r--r-- | sesman/chansrv/sound.c | 2 | ||||
-rw-r--r-- | sesman/session.c | 6 |
3 files changed, 16 insertions, 2 deletions
diff --git a/sesman/chansrv/pulse/module-xrdp-source.c b/sesman/chansrv/pulse/module-xrdp-source.c index 95465c65..1c03b069 100644 --- a/sesman/chansrv/pulse/module-xrdp-source.c +++ b/sesman/chansrv/pulse/module-xrdp-source.c @@ -369,7 +369,15 @@ int pa__init(pa_module *m) { u->source->thread_info.max_rewind = pa_usec_to_bytes(u->block_usec, &u->source->sample_spec); - if (!(u->thread = pa_thread_new("null-source", thread_func, u))) { + #if defined(PA_CHECK_VERSION) + #if PA_CHECK_VERSION(0, 9, 22) + if (!(u->thread = pa_thread_new("xrdp-source", thread_func, u))) { + #else + if (!(u->thread = pa_thread_new(thread_func, u))) { + #endif + #else + if (!(u->thread = pa_thread_new(thread_func, u))) + #endif pa_log("Failed to create thread."); goto fail; } diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c index 08b471a8..efb7ff85 100644 --- a/sesman/chansrv/sound.c +++ b/sesman/chansrv/sound.c @@ -1367,7 +1367,7 @@ read_raw_audio_data(void *arg) } strans->trans_data_in = sttrans_data_in; - g_snprintf(path, 255, CHANSRV_PORT_STR, g_display_num); + g_snprintf(path, 255, CHANSRV_PORT_OUT_STR, g_display_num); if (trans_connect(strans, "", path, 100) != 0) { diff --git a/sesman/session.c b/sesman/session.c index b68ed3f4..6b49a3fb 100644 --- a/sesman/session.c +++ b/sesman/session.c @@ -745,9 +745,15 @@ session_start_fork(int width, int height, int bpp, char *username, temp->item->type = type; temp->item->status = SESMAN_SESSION_STATUS_ACTIVE; + /*THREAD-FIX require chain lock */ + lock_chain_acquire(); + temp->next = g_sessions; g_sessions = temp; g_session_count++; + + /*THREAD-FIX release chain lock */ + lock_chain_release(); } return display; |