summaryrefslogtreecommitdiff
path: root/server/thumb-server-internal.c
diff options
context:
space:
mode:
authorhj kim <backto.kim@samsung.com>2020-04-17 04:08:26 (GMT)
committerGerrit Code Review <gerrit@review>2020-04-17 04:08:26 (GMT)
commitbfb2b810db4a5c35eee884de0d7fe6bdae3ef270 (patch)
tree64265c0f93dcd287c82f2b2656e99ad30a67cbc8 /server/thumb-server-internal.c
parent24233670e8d5fa877de71b0a85a4ef09eeaa9df9 (diff)
parentc96dbf9631632a2b8db77a6972f5c20f8ab14acf (diff)
downloadlibmedia-thumbnail-bfb2b810db4a5c35eee884de0d7fe6bdae3ef270.zip
libmedia-thumbnail-bfb2b810db4a5c35eee884de0d7fe6bdae3ef270.tar.gz
libmedia-thumbnail-bfb2b810db4a5c35eee884de0d7fe6bdae3ef270.tar.bz2
Diffstat (limited to 'server/thumb-server-internal.c')
-rwxr-xr-xserver/thumb-server-internal.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/thumb-server-internal.c b/server/thumb-server-internal.c
index c3e8f9e..bd43605 100755
--- a/server/thumb-server-internal.c
+++ b/server/thumb-server-internal.c
@@ -242,7 +242,7 @@ ERROR:
return G_SOURCE_REMOVE;
}
-gboolean _thumb_server_read_socket(GIOChannel *src, GIOCondition condition, gpointer data)
+gboolean _thumb_server_read_socket(GIOChannel *channel, GIOCondition condition, gpointer data)
{
struct sockaddr_un client_addr;
unsigned int client_addr_len;
@@ -263,7 +263,7 @@ gboolean _thumb_server_read_socket(GIOChannel *src, GIOCondition condition, gpoi
memset((void *)&res_msg, 0, sizeof(res_msg));
memset((void *)&credentials, 0, sizeof(credentials));
- sock = g_io_channel_unix_get_fd(src);
+ sock = g_io_channel_unix_get_fd(channel);
thumb_retvm_if(sock < 0, G_SOURCE_CONTINUE, "sock fd is invalid!");
client_addr_len = sizeof(client_addr);
@@ -287,7 +287,9 @@ gboolean _thumb_server_read_socket(GIOChannel *src, GIOCondition condition, gpoi
} else {
thumb_warn("Shutting down...");
g_main_loop_quit(thumb_server);
- goto ERROR;
+ close(client_sock);
+
+ return G_SOURCE_REMOVE;
}
SAFE_FREE(credentials.smack);