summaryrefslogtreecommitdiff
path: root/server/thumb-server.c
diff options
context:
space:
mode:
authorhj kim <backto.kim@samsung.com>2015-06-04 21:09:04 -0700
committerhj kim <backto.kim@samsung.com>2015-06-04 21:09:04 -0700
commit999b9402a56d7c9738d6d632eff2f90004bbfbaf (patch)
tree31416fd3ece796751014dab252673fc71b278240 /server/thumb-server.c
parentc896230ef091a244204b17bc9ab0ffa974ce2031 (diff)
downloadlibmedia-thumbnail-accepted/tizen/wearable/20150606.054548.tar.gz
libmedia-thumbnail-accepted/tizen/wearable/20150606.054548.tar.bz2
libmedia-thumbnail-accepted/tizen/wearable/20150606.054548.zip
This reverts commit c896230ef091a244204b17bc9ab0ffa974ce2031. Change-Id: I94ec0a56f7c3d84ad76645b91310494b96d41932
Diffstat (limited to 'server/thumb-server.c')
-rwxr-xr-xserver/thumb-server.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/thumb-server.c b/server/thumb-server.c
index 4248f24..ca5fd48 100755
--- a/server/thumb-server.c
+++ b/server/thumb-server.c
@@ -24,6 +24,7 @@
#include "media-thumb-ipc.h"
#include "media-thumb-util.h"
#include "thumb-server-internal.h"
+
#include <pthread.h>
#include <heynoti.h>
#include <vconf.h>
@@ -91,12 +92,12 @@ int main()
/* Create and bind new UDP socket */
if (!_thumb_server_prepare_socket(&sockfd)) {
- thumb_err("Failed to create socket");
+ thumb_err("Failed to create socket\n");
return -1;
}
g_thumb_server_mainloop = g_main_loop_new(context, FALSE);
-
+
/* Create new channel to watch udp socket */
channel = g_io_channel_unix_new(sockfd);
source = g_io_create_watch(channel, G_IO_IN);
@@ -116,13 +117,15 @@ int main()
g_source_set_callback(sig_handler_src, (GSourceFunc)_media_thumb_signal_handler, NULL, NULL);
g_source_attach(sig_handler_src, context);
*/
+
thumb_dbg("************************************");
thumb_dbg("*** Thumbnail server is running ***");
thumb_dbg("************************************");
g_main_loop_run(g_thumb_server_mainloop);
-
+
thumb_dbg("Thumbnail server is shutting down...");
+
g_io_channel_shutdown(channel, FALSE, NULL);
g_io_channel_unref(channel);
_thumb_daemon_finish_jobs();