summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiyong Min <jiyong.min@samsung.com>2017-08-29 12:34:12 +0900
committerJiyong Min <jiyong.min@samsung.com>2017-08-29 12:38:10 +0900
commitd275ba74236d1122da126f0000bd04ccb63a2d55 (patch)
tree529d326ca8f983430046361e2c535aad32c50f08
parent939269e3dfb7e9dbdf747830009533a7ac2970db (diff)
downloadmedia-controller-d275ba74236d1122da126f0000bd04ccb63a2d55.tar.gz
media-controller-d275ba74236d1122da126f0000bd04ccb63a2d55.tar.bz2
media-controller-d275ba74236d1122da126f0000bd04ccb63a2d55.zip
Modify to do chmod() before listening server socket & remove unused user-service filesubmit/tizen/20170829.044633accepted/tizen/unified/20170829.140409
(Rarely application can not access socket because of no permission) Change-Id: I0e8fb10f5dfd0c1b68e723db9a5a6c3ff4d884de Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
-rwxr-xr-xpackaging/capi-media-controller.spec3
-rwxr-xr-xpackaging/media-controller-user.service12
-rwxr-xr-xsvc/media_controller_socket.c8
3 files changed, 5 insertions, 18 deletions
diff --git a/packaging/capi-media-controller.spec b/packaging/capi-media-controller.spec
index 9e2f590..912c4c2 100755
--- a/packaging/capi-media-controller.spec
+++ b/packaging/capi-media-controller.spec
@@ -1,13 +1,12 @@
Name: capi-media-controller
Summary: A media controller library in Tizen Native API
-Version: 0.1.45
+Version: 0.1.46
Release: 1
Group: Multimedia/API
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Source1: mediacontroller.service
Source2: mediacontroller.socket
-Source3: media-controller-user.service
Source5: 500.media-controller.upgrade.sh
BuildRequires: cmake
BuildRequires: pkgconfig(capi-base-common)
diff --git a/packaging/media-controller-user.service b/packaging/media-controller-user.service
deleted file mode 100755
index a7b5e1a..0000000
--- a/packaging/media-controller-user.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Media controller user
-
-[Service]
-Type=idle
-CPUAccounting=true
-CPUQuota=5%
-ExecStartPre=/usr/bin/sleep 5
-ExecStart=/usr/bin/sh -c "/usr/bin/media-controller_create_db.sh"
-
-[Install]
-WantedBy=default.target
diff --git a/svc/media_controller_socket.c b/svc/media_controller_socket.c
index 155f493..75152b6 100755
--- a/svc/media_controller_socket.c
+++ b/svc/media_controller_socket.c
@@ -83,6 +83,10 @@ int mc_ipc_create_server_socket(mc_msg_port_type_e port, int *sock_fd)
return MEDIA_CONTROLLER_ERROR_INVALID_OPERATION;
}
+ /*change permission of sock file*/
+ if (chmod(MC_IPC_PATH, 0666) < 0)
+ mc_stderror("chmod failed");
+
mc_debug("bind success");
/* Listening */
@@ -94,10 +98,6 @@ int mc_ipc_create_server_socket(mc_msg_port_type_e port, int *sock_fd)
mc_debug("Listening...");
- /*change permission of sock file*/
- if (chmod(MC_IPC_PATH, 0666) < 0)
- mc_stderror("chmod failed");
-
*sock_fd = sock;
return MEDIA_CONTROLLER_ERROR_NONE;