It was added in the past to prevent confusion with 'udp'.
However, since there is no longer a 'udp' connection in content FW, the function name was modified.
Change-Id: I8eac83773ad79be23418b2a589057ffa64942381
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
int ms_ipc_create_client_socket(int timeout_sec, int *sock_fd);
int ms_ipc_create_server_socket(ms_msg_port_type_e port, int *sock_fd);
-int ms_ipc_send_msg_to_server_tcp(int sockfd, ms_comm_msg_s *send_msg, struct sockaddr_un *serv_addr);
-int ms_ipc_send_msg_to_client_tcp(int sockfd, ms_comm_msg_s *send_msg, struct sockaddr_un *client_addr);
-int ms_ipc_accept_client_tcp(int serv_sock, int* client_sock);
+int ms_ipc_send_msg_to_server(int sockfd, ms_comm_msg_s *send_msg, struct sockaddr_un *serv_addr);
+int ms_ipc_send_msg_to_client(int sockfd, ms_comm_msg_s *send_msg, struct sockaddr_un *client_addr);
+int ms_ipc_accept_client(int serv_sock, int *client_sock);
int ms_ipc_request_recovery(uid_t uid);
-int ms_ipc_request_update_tcp(const char *request_msg, uid_t uid);
+int ms_ipc_request_update_db(const char *request_msg, uid_t uid);
#ifdef __cplusplus
}
return ret;
}
#endif
- ret = ms_ipc_request_update_tcp(query_str, uid);
+ ret = ms_ipc_request_update_db(query_str, uid);
if (ret != MS_MEDIA_ERR_NONE)
- MSAPI_DBG_ERR("ms_ipc_request_update_tcp failed : %d", ret);
+ MSAPI_DBG_ERR("ms_ipc_request_update_db failed : %d", ret);
return ret;
}
return MS_MEDIA_ERR_IPC;
}
-int ms_ipc_send_msg_to_server_tcp(int sockfd, ms_comm_msg_s *send_msg, struct sockaddr_un *serv_addr)
+int ms_ipc_send_msg_to_server(int sockfd, ms_comm_msg_s *send_msg, struct sockaddr_un *serv_addr)
{
int ret = MS_MEDIA_ERR_NONE;
struct sockaddr_un addr = { 0, };
return MS_MEDIA_ERR_NONE;
}
-int ms_ipc_send_msg_to_client_tcp(int sockfd, ms_comm_msg_s *send_msg, struct sockaddr_un *client_addr)
+int ms_ipc_send_msg_to_client(int sockfd, ms_comm_msg_s *send_msg, struct sockaddr_un *client_addr)
{
if (write(sockfd, send_msg, sizeof(*(send_msg))) != sizeof(*(send_msg))) {
MSAPI_DBG_STRERROR("write failed");
return MS_MEDIA_ERR_NONE;
}
-int ms_ipc_accept_client_tcp(int serv_sock, int* client_sock)
+int ms_ipc_accept_client(int serv_sock, int* client_sock)
{
int sockfd = -1;
struct sockaddr_un client_addr;
return ret;
}
-int ms_ipc_request_update_tcp(const char *request_msg, uid_t uid)
+int ms_ipc_request_update_db(const char *request_msg, uid_t uid)
{
int ret = MS_MEDIA_ERR_NONE;
int sockfd = -1;
ret = ms_ipc_create_client_socket(0, &sockfd);
MSAPI_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "ms_ipc_create_client_socket failed[%d]", ret);
- ret = ms_ipc_send_msg_to_server_tcp(sockfd, &send_msg, NULL);
+ ret = ms_ipc_send_msg_to_server(sockfd, &send_msg, NULL);
if (ret != MS_MEDIA_ERR_NONE) {
MSAPI_DBG_ERR("ms_ipc_send_msg_to_server failed : %d", ret);
close(sockfd);
ret = ms_ipc_create_client_socket(0, &sockfd);
MSAPI_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "ms_ipc_create_client_socket failed[%d]", ret);
- ret = ms_ipc_send_msg_to_server_tcp(sockfd, &send_msg, NULL);
+ ret = ms_ipc_send_msg_to_server(sockfd, &send_msg, NULL);
close(sockfd);
- MSAPI_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "ms_ipc_send_msg_to_server_tcp failed[%d]", ret);
+ MSAPI_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "ms_ipc_send_msg_to_server failed[%d]", ret);
return __remove_request(request_path);
}
return ret;
}
- ret = ms_ipc_send_msg_to_server_tcp(sockfd, &send_msg, NULL);
+ ret = ms_ipc_send_msg_to_server(sockfd, &send_msg, NULL);
if (ret != MS_MEDIA_ERR_NONE) {
MSAPI_DBG_ERR("ms_ipc_send_msg_to_server failed : %d", ret);
close(sockfd);
Name: media-server
Summary: A server for media content management
-Version: 0.5.9
+Version: 0.5.10
Release: 0
Group: Multimedia/Service
License: Apache-2.0
/* owner data exists */
/* send result to the owner of request */
- ms_ipc_send_msg_to_client_tcp(data->client_sockfd, &send_msg, NULL);
+ ms_ipc_send_msg_to_client(data->client_sockfd, &send_msg, NULL);
g_array_remove_index(owner_list, 0);
}
}
data = g_array_index(owner_list, ms_req_owner_data*, i);
if (strcmp(data->req_path, recv_msg->msg) == 0) {
MS_DBG_SERR("PARTIAL message:pid %d,path %s", data->pid, data->req_path);
- ms_ipc_send_msg_to_client_tcp(data->client_sockfd, recv_msg, NULL);
+ ms_ipc_send_msg_to_client(data->client_sockfd, recv_msg, NULL);
}
}
} else {
for (i = 0; i < owner_list->len; i++) {
data = g_array_index(owner_list, ms_req_owner_data*, i);
if (data->pid == pid && strcmp(data->req_path, recv_msg->msg) == 0) {
- ms_ipc_send_msg_to_client_tcp(data->client_sockfd, recv_msg, NULL);
+ ms_ipc_send_msg_to_client(data->client_sockfd, recv_msg, NULL);
if (recv_msg->msg_type != MS_MSG_SCANNER_COMPLETE && recv_msg->msg_type != MS_MSG_RECURSIVE_START)
g_array_remove_index(owner_list, i);
MS_DBG_RETVM_IF(sockfd < 0, G_SOURCE_CONTINUE, "sock fd is invalid!");
/* get client socket fd */
- ret = ms_ipc_accept_client_tcp(sockfd, &client_sock);
+ ret = ms_ipc_accept_client(sockfd, &client_sock);
MS_DBG_RETV_IF(ret != MS_MEDIA_ERR_NONE, G_SOURCE_CONTINUE);
memset(&creds, 0, sizeof(creds));
res_msg.result = ret;
- ms_ipc_send_msg_to_client_tcp(client_sock, &res_msg, NULL);
+ ms_ipc_send_msg_to_client(client_sock, &res_msg, NULL);
close(client_sock);
return G_SOURCE_CONTINUE;
MS_DBG_RETVM_IF(sock < 0, G_SOURCE_CONTINUE, "sock fd is invalid!");
/* get client socket fd */
- ret = ms_ipc_accept_client_tcp(sock, &client_sock);
+ ret = ms_ipc_accept_client(sock, &client_sock);
MS_DBG_RETV_IF(ret != MS_MEDIA_ERR_NONE, G_SOURCE_CONTINUE);
memset(&creds, 0, sizeof(creds));