[Spice-devel] [PATCH xf86-video-qxl 2/2] Spice CCID: Handle server termination.

Jeremy White jwhite at codeweavers.com
Fri Mar 13 09:28:20 PDT 2015


Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
 src/spiceccid/spiceccid.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/spiceccid/spiceccid.c b/src/spiceccid/spiceccid.c
index 80683c0..4b7ea29 100644
--- a/src/spiceccid/spiceccid.c
+++ b/src/spiceccid/spiceccid.c
@@ -289,6 +289,13 @@ static void * lun_thread(void *arg)
         } while (rc > 0 && pos > 0);
     }
 
+    fprintf(stderr, "LUN %d thread exiting: %s\n", ccid->lun,
+            rc == 0 ? "normally" : strerror(errno));
+    close(ccid->fd);
+    ccid->fd = -1;
+    ccid->lun = 0;
+    ccid->atr_len = 0;
+
     return NULL;
 }
 
-- 
1.7.10.4



More information about the Spice-devel mailing list