guacamole-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmuehl...@apache.org
Subject [24/26] incubator-guacamole-server git commit: GUACAMOLE-25: Reset I/O counters upon end-of-stream.
Date Thu, 02 Jun 2016 18:45:31 GMT
GUACAMOLE-25: Reset I/O counters upon end-of-stream.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/0d29694a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/0d29694a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/0d29694a

Branch: refs/heads/master
Commit: 0d29694afc2c7eb1fa8a8fea011bd5a7ec9a99ac
Parents: 0be04ea
Author: Michael Jumper <mjumper@apache.org>
Authored: Wed Jun 1 16:20:38 2016 -0700
Committer: Michael Jumper <mjumper@apache.org>
Committed: Wed Jun 1 16:20:38 2016 -0700

----------------------------------------------------------------------
 src/protocols/rdp/audio_input.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/0d29694a/src/protocols/rdp/audio_input.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/audio_input.c b/src/protocols/rdp/audio_input.c
index eefb231..dc078dc 100644
--- a/src/protocols/rdp/audio_input.c
+++ b/src/protocols/rdp/audio_input.c
@@ -247,9 +247,6 @@ void guac_rdp_audio_buffer_set_stream(guac_rdp_audio_buffer* audio_buffer,
     audio_buffer->in_format.channels = channels;
     audio_buffer->in_format.bps = bps;
 
-    /* Reset input counter */
-    audio_buffer->total_bytes_received = 0;
-
     /* Acknowledge stream creation (if buffer is ready to receive) */
     guac_rdp_audio_buffer_ack(audio_buffer,
             "OK", GUAC_PROTOCOL_STATUS_SUCCESS);
@@ -274,9 +271,6 @@ void guac_rdp_audio_buffer_set_output(guac_rdp_audio_buffer* audio_buffer,
     audio_buffer->out_format.channels = channels;
     audio_buffer->out_format.bps = bps;
 
-    /* Reset output counter */
-    audio_buffer->total_bytes_sent = 0;
-
     pthread_mutex_unlock(&(audio_buffer->lock));
 
 }
@@ -470,6 +464,10 @@ void guac_rdp_audio_buffer_end(guac_rdp_audio_buffer* audio_buffer) {
     audio_buffer->packet_size = 0;
     audio_buffer->flush_handler = NULL;
 
+    /* Reset I/O counters */
+    audio_buffer->total_bytes_sent = 0;
+    audio_buffer->total_bytes_received = 0;
+
     /* Free packet (if any) */
     free(audio_buffer->packet);
     audio_buffer->packet = NULL;


Mime
View raw message