summaryrefslogtreecommitdiff
path: root/src/ipc/media-thumb-ipc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipc/media-thumb-ipc.c')
-rwxr-xr-xsrc/ipc/media-thumb-ipc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ipc/media-thumb-ipc.c b/src/ipc/media-thumb-ipc.c
index a127b02..ed5ecb7 100755
--- a/src/ipc/media-thumb-ipc.c
+++ b/src/ipc/media-thumb-ipc.c
@@ -81,15 +81,17 @@ int _media_thumb_get_error()
void __media_thumb_pop()
{
int len = 0;
+ int sock = 0;
if (g_manage_queue != NULL) {
thumbReq *req = (thumbReq *)g_queue_pop_head(g_manage_queue);
if (req != NULL) {
GSource *source_id = g_main_context_find_source_by_id(g_main_context_get_thread_default(), req->source_id);
+ sock = g_io_channel_unix_get_fd(req->channel);
g_io_channel_shutdown(req->channel, TRUE, NULL);
g_io_channel_unref(req->channel);
-
+ close(sock);
if (source_id != NULL) {
g_source_destroy(source_id);
} else {
@@ -148,15 +150,17 @@ int __media_thumb_cancel(unsigned int request_id)
void __media_thumb_pop_raw_data()
{
int len = 0;
+ int sock = 0;
if (g_manage_raw_queue != NULL) {
thumbRawReq *req = (thumbRawReq *)g_queue_pop_head(g_manage_raw_queue);
if (req != NULL) {
GSource *source_id = g_main_context_find_source_by_id(g_main_context_get_thread_default(), req->source_id);
+ sock = g_io_channel_unix_get_fd(req->channel);
g_io_channel_shutdown(req->channel, TRUE, NULL);
g_io_channel_unref(req->channel);
-
+ close(sock);
if (source_id != NULL) {
g_source_destroy(source_id);
} else {