[Spice-devel] [PATCH 06/14] FIXME/HACK: RedPipeItem/VDIPortBuf refcounting hack

Jonathon Jongsma jjongsma at redhat.com
Thu Apr 7 22:11:19 UTC 2016


From: Christophe Fergeau <cfergeau at redhat.com>

related to 7d375e0
workaround a runtime check in red_pipe_item_ref()
---
 server/reds.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/reds.c b/server/reds.c
index 64f7df8..bf39cf7 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -752,7 +752,8 @@ static VDIReadBuf *vdi_port_get_read_buf(RedCharDeviceVDIPort *dev)
     buf = SPICE_CONTAINEROF(item, VDIReadBuf, link.parent.link);
 
     g_warn_if_fail(buf->link.refcount == 0);
-    red_pipe_item_ref(buf);
+    buf->link.refcount = 1;
+    //red_pipe_item_ref(buf);
 
     return buf;
 }
-- 
2.4.11



More information about the Spice-devel mailing list