[Spice-devel] [PATCH 1/6] server/red_worker: add stream_count (for debug purposes)

Alon Levy alevy at redhat.com
Mon Jun 20 04:18:04 PDT 2011


---
 server/red_worker.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index bee86b9..12f7fa5 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -836,6 +836,7 @@ typedef struct RedWorker {
 
     uint32_t shadows_count;
     uint32_t containers_count;
+    uint32_t stream_count;
 
     uint32_t bits_unique;
 
@@ -2113,6 +2114,7 @@ static void red_release_stream(RedWorker *worker, Stream *stream)
             mjpeg_encoder_destroy(stream->mjpeg_encoder);
         }
         red_free_stream(worker, stream);
+        worker->stream_count--;
     }
 }
 
@@ -2437,6 +2439,7 @@ static void red_create_stream(RedWorker *worker, Drawable *drawable)
     if (worker->display_channel) {
         red_display_create_stream(worker->display_channel, stream);
     }
+    worker->stream_count++;
 
     return;
 }
-- 
1.7.5.2



More information about the Spice-devel mailing list