commit e244949

Michael Forney  ·  2013-08-10 20:14:36 +0000 UTC
parent f920a5d
Close data file descriptor upon transfer
1 files changed,  +4, -0
M data.c
M data.c
+4, -0
 1@@ -26,6 +26,7 @@
 2 
 3 #include <stdlib.h>
 4 #include <string.h>
 5+#include <unistd.h>
 6 
 7 struct data
 8 {
 9@@ -53,7 +54,10 @@ static void offer_receive(struct wl_client * client,
10 
11     /* Protect against expired data_offers being used. */
12     if (data)
13+    {
14         wl_data_source_send_send(data->source, mime_type, fd);
15+        close(fd);
16+    }
17 }
18 
19 static void offer_destroy(struct wl_client * client,