diff options
author | Minje Ahn <minje.ahn@samsung.com> | 2016-01-04 13:13:53 +0900 |
---|---|---|
committer | Minje Ahn <minje.ahn@samsung.com> | 2016-01-04 13:13:53 +0900 |
commit | 54b9ee13d1b7cd9191536d3b456db5f8efea8a7e (patch) | |
tree | fd0872930cab95d3eb4fb4245a63cbcae487013b | |
parent | 0b93b1b8120f67ff36262e6f2b9a75f7cf1670e3 (diff) | |
download | libmedia-thumbnail-54b9ee13d1b7cd9191536d3b456db5f8efea8a7e.tar.gz libmedia-thumbnail-54b9ee13d1b7cd9191536d3b456db5f8efea8a7e.tar.bz2 libmedia-thumbnail-54b9ee13d1b7cd9191536d3b456db5f8efea8a7e.zip |
fix prevent bug.submit/tizen/20160104.042629accepted/tizen/wearable/20160104.054825accepted/tizen/tv/20160104.054804accepted/tizen/mobile/20160104.054744
Change-Id: Ic1ef8a43d36a6b3bf3aba19bc9737298433130e0
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
-rw-r--r-- | packaging/libmedia-thumbnail.spec | 2 | ||||
-rwxr-xr-x | src/ipc/media-thumb-ipc.c | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/packaging/libmedia-thumbnail.spec b/packaging/libmedia-thumbnail.spec index a435c73..3153e17 100644 --- a/packaging/libmedia-thumbnail.spec +++ b/packaging/libmedia-thumbnail.spec @@ -1,6 +1,6 @@ Name: libmedia-thumbnail Summary: Media thumbnail service library for multimedia applications -Version: 0.1.88 +Version: 0.1.89 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 and public domain diff --git a/src/ipc/media-thumb-ipc.c b/src/ipc/media-thumb-ipc.c index 5d7028f..773eb61 100755 --- a/src/ipc/media-thumb-ipc.c +++ b/src/ipc/media-thumb-ipc.c @@ -770,9 +770,20 @@ int _media_thumb_send_request() thumb_stderror("connect"); g_io_channel_shutdown(channel, TRUE, NULL); g_io_channel_unref(channel); + ms_ipc_delete_client_socket(&sock_info); return MS_MEDIA_ERR_SOCKET_CONN; } + req_manager = (thumbReq *)g_queue_pop_head(g_manage_queue); + + if (req_manager == NULL) { + thumb_err("queue pop fail"); + g_io_channel_shutdown(channel, TRUE, NULL); + g_io_channel_unref(channel); + ms_ipc_delete_client_socket(&sock_info); + return MS_MEDIA_ERR_INVALID_PARAMETER; + } + GSource *source = NULL; source = g_io_create_watch(channel, G_IO_IN); g_source_set_callback(source, (GSourceFunc)_media_thumb_write_socket, req_manager->userData, NULL); @@ -873,10 +884,20 @@ int _media_thumb_raw_data_send_request() thumb_stderror("connect error"); g_io_channel_shutdown(channel, TRUE, NULL); g_io_channel_unref(channel); + ms_ipc_delete_client_socket(&sock_info); return MS_MEDIA_ERR_SOCKET_CONN; } req_manager = (thumbRawReq *)g_queue_pop_head(g_manage_raw_queue); + + if (req_manager == NULL) { + thumb_err("queue pop fail"); + g_io_channel_shutdown(channel, TRUE, NULL); + g_io_channel_unref(channel); + ms_ipc_delete_client_socket(&sock_info); + return MS_MEDIA_ERR_INVALID_PARAMETER; + } + GSource *source = NULL; source = g_io_create_watch(channel, G_IO_IN); g_source_set_callback(source, (GSourceFunc)_media_thumb_raw_data_write_socket, req_manager->userData, NULL); |