diff options
author | Minje Ahn <minje.ahn@samsung.com> | 2015-08-10 11:29:14 +0900 |
---|---|---|
committer | Minje ahn <minje.ahn@samsung.com> | 2015-08-12 03:15:03 -0700 |
commit | 7c8a2282af2fbdaeca8d2251980f4fca3afedb37 (patch) | |
tree | 4b17d77b3c23a0a344159b48015751dbcebd8c39 /src | |
parent | 82be84757b2b156b477391816506aa63ab7e0211 (diff) | |
download | libmedia-thumbnail-7c8a2282af2fbdaeca8d2251980f4fca3afedb37.tar.gz libmedia-thumbnail-7c8a2282af2fbdaeca8d2251980f4fca3afedb37.tar.bz2 libmedia-thumbnail-7c8a2282af2fbdaeca8d2251980f4fca3afedb37.zip |
Apply cynarasubmit/tizen/20150813.052424accepted/tizen/wearable/20150813.083645accepted/tizen/tv/20150813.083632accepted/tizen/mobile/20150813.083621
Change-Id: I2e96f30ebf2a71f0af673f19be422c43de6e8703
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src')
-rwxr-xr-x | src/include/ipc/media-thumb-ipc.h | 4 | ||||
-rwxr-xr-x | src/include/util/media-thumb-debug.h | 3 | ||||
-rwxr-xr-x | src/ipc/media-thumb-ipc.c | 59 |
3 files changed, 2 insertions, 64 deletions
diff --git a/src/include/ipc/media-thumb-ipc.h b/src/include/ipc/media-thumb-ipc.h index 7251ed9..5eacf12 100755 --- a/src/include/ipc/media-thumb-ipc.h +++ b/src/include/ipc/media-thumb-ipc.h @@ -65,10 +65,6 @@ int _media_thumb_recv_udp_msg(int sock, int header_size, thumbMsg *msg, struct s int _media_thumb_set_buffer(thumbMsg *req_msg, unsigned char **buf, int *buf_size); -int _media_thumb_set_buffer_for_response(thumbMsg *req_msg, unsigned char **buf, int *buf_size); - -int _media_thumb_set_add_raw_data_buffer(thumbRawAddMsg *req_msg, unsigned char **buf, int *buf_size); - int _media_thumb_request(int msg_type, const char *origin_path, char *thumb_path, diff --git a/src/include/util/media-thumb-debug.h b/src/include/util/media-thumb-debug.h index 3044fc4..cafd9d2 100755 --- a/src/include/util/media-thumb-debug.h +++ b/src/include/util/media-thumb-debug.h @@ -69,8 +69,7 @@ #define ERR_BUF_LENGHT 256 #define thumb_stderror(fmt) do { \ char thumb_stderror_buffer[ERR_BUF_LENGHT] = {0,}; \ - strerror_r(errno, thumb_stderror_buffer, ERR_BUF_LENGHT); \ - LOGE(FONT_COLOR_RED fmt" : standard error [%s]", thumb_stderror_buffer); \ + LOGE(FONT_COLOR_RED fmt" : standard error [%s]", strerror_r(errno, thumb_stderror_buffer, ERR_BUF_LENGHT)); \ } while (0) #ifdef _USE_LOG_FILE_ diff --git a/src/ipc/media-thumb-ipc.c b/src/ipc/media-thumb-ipc.c index 7920fe7..b10a5be 100755 --- a/src/ipc/media-thumb-ipc.c +++ b/src/ipc/media-thumb-ipc.c @@ -322,63 +322,6 @@ _media_thumb_set_buffer(thumbMsg *req_msg, unsigned char **buf, int *buf_size) } int -_media_thumb_set_buffer_for_response(thumbMsg *req_msg, unsigned char **buf, int *buf_size) -{ - if (req_msg == NULL || buf == NULL) { - return MS_MEDIA_ERR_INVALID_PARAMETER; - } - - int org_path_len = 0; - int dst_path_len = 0; - int size = 0; - int header_size = 0; - - header_size = sizeof(thumbMsg) -(MAX_FILEPATH_LEN * 2) - sizeof(unsigned char *); - org_path_len = req_msg->origin_path_size; - dst_path_len = req_msg->dest_path_size; - - thumb_dbg("Basic Size : %d, org_path : %s[%d], dst_path : %s[%d]", header_size, req_msg->org_path, org_path_len, req_msg->dst_path, dst_path_len); - - size = header_size + org_path_len + dst_path_len; - *buf = malloc(size); - if (*buf == NULL) { - *buf_size = 0; - return 0; - } - memcpy(*buf, req_msg, header_size); - memcpy((*buf)+header_size, req_msg->org_path, org_path_len); - memcpy((*buf)+header_size + org_path_len, req_msg->dst_path, dst_path_len); - - *buf_size = size; - - return MS_MEDIA_ERR_NONE; -} - - -int -_media_thumb_set_add_raw_data_buffer(thumbRawAddMsg *req_msg, unsigned char **buf, int *buf_size) -{ - if (req_msg == NULL || buf == NULL) { - return MS_MEDIA_ERR_INVALID_PARAMETER; - } - int thumb_len = 0; - int size = 0; - int header_size = 0; - - header_size = sizeof(thumbRawAddMsg); - thumb_len = req_msg->thumb_size; - - size = header_size + thumb_len; - *buf = malloc(size); - memcpy(*buf, req_msg, header_size); - memcpy((*buf)+header_size, req_msg->thumb_data, thumb_len); - - *buf_size = size; - - return MS_MEDIA_ERR_NONE; -} - -int _media_thumb_request(int msg_type, const char *origin_path, char *thumb_path, int max_length, media_thumb_info *thumb_info, uid_t uid) { int sock = -1; @@ -389,7 +332,7 @@ _media_thumb_request(int msg_type, const char *origin_path, char *thumb_path, in int pid; sock_info.port = MS_THUMB_CREATOR_PORT; - err = ms_ipc_create_client_socket(MS_PROTOCOL_TCP, MS_TIMEOUT_SEC_10, &sock_info); + err = ms_ipc_create_client_socket(MS_PROTOCOL_TCP, MS_TIMEOUT_SEC_10, &sock_info); if (err != MS_MEDIA_ERR_NONE) { thumb_err("ms_ipc_create_client_socket failed"); return err; |