diff options
author | speidy <speidy@gmail.com> | 2014-04-28 00:24:20 +0300 |
---|---|---|
committer | speidy <speidy@gmail.com> | 2014-04-28 00:24:20 +0300 |
commit | eda3a2db656b427c3201a686e7f0d0dc68a65f3c (patch) | |
tree | 041c09b6b1a6856b0531908a23dc620c29da44db /sesman | |
parent | 0f3a9184595eba0a26ee63ba3c625a1cf7fa3b18 (diff) | |
download | xrdp-proprietary-eda3a2db656b427c3201a686e7f0d0dc68a65f3c.tar.gz xrdp-proprietary-eda3a2db656b427c3201a686e7f0d0dc68a65f3c.zip |
chansrv: sound: zero out ack flags when sound_send_close called, to
avoid deadloop when chunk is sent and not acked back by the client.
Diffstat (limited to 'sesman')
-rw-r--r-- | sesman/chansrv/sound.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c index eb299ecc..08b471a8 100644 --- a/sesman/chansrv/sound.c +++ b/sesman/chansrv/sound.c @@ -368,6 +368,8 @@ sound_send_wave_data_chunk(char *data, int data_bytes) return 0; } + LOG(20, ("sound_send_wave_data_chunk: g_sent_flag[%d] = %d", + g_cBlockNo + 1, g_sent_flag[(g_cBlockNo + 1) & 0xff])); if (g_sent_flag[(g_cBlockNo + 1) & 0xff] & 1) { LOG(10, ("sound_send_wave_data_chunk: no room")); @@ -469,6 +471,7 @@ sound_send_close(void) /* send any left over data */ sound_send_wave_data_chunk(g_buffer, g_buf_index); g_buf_index = 0; + g_memset(g_sent_flag, 0, sizeof(g_sent_flag)); make_stream(s); init_stream(s, 8182); @@ -696,6 +699,7 @@ sound_init(void) int APP_CC sound_deinit(void) { + LOG(10, ("sound_deinit:")); if (g_audio_l_trans_out != 0) { trans_delete(g_audio_l_trans_out); |