summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiyong Min <jiyong.min@samsung.com>2017-12-27 12:05:54 +0900
committerJiyong Min <jiyong.min@samsung.com>2017-12-27 12:37:48 +0900
commitd8d05c818eeb6d88f21f9913b247cef7bdffdf62 (patch)
tree8e242b08b6e6d57e3143715642aa58fcff6d257e
parent9914f5d60b4e74737e374040f5f3355f87071fd9 (diff)
downloadmedia-controller-d8d05c818eeb6d88f21f9913b247cef7bdffdf62.tar.gz
media-controller-d8d05c818eeb6d88f21f9913b247cef7bdffdf62.tar.bz2
media-controller-d8d05c818eeb6d88f21f9913b247cef7bdffdf62.zip
Fix that getting command did not work for permission deniedsubmit/tizen/20171228.044239accepted/tizen/unified/20171229.070218
[Cause] The server process should check the safety of the command. The check-list of the command exist in the list of the client. So it should be checked with the data of the client. [Solution] The '__mc_get_data' search the command with the check-list. The '__mc_get_data' don't care about the pid(client & server). Change-Id: I51d68b215006e92a04586e6d635fdd15999ff3cb Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
-rwxr-xr-xpackaging/capi-media-controller.spec2
-rwxr-xr-xsvc/media_controller_svc.c28
2 files changed, 14 insertions, 16 deletions
diff --git a/packaging/capi-media-controller.spec b/packaging/capi-media-controller.spec
index c14f366..5cbec56 100755
--- a/packaging/capi-media-controller.spec
+++ b/packaging/capi-media-controller.spec
@@ -1,6 +1,6 @@
Name: capi-media-controller
Summary: A media controller library in Tizen Native API
-Version: 0.1.50
+Version: 0.1.51
Release: 1
Group: Multimedia/API
License: Apache-2.0
diff --git a/svc/media_controller_svc.c b/svc/media_controller_svc.c
index 87c8c7f..4786d4c 100755
--- a/svc/media_controller_svc.c
+++ b/svc/media_controller_svc.c
@@ -137,24 +137,22 @@ static void __mc_get_data(gpointer data, gpointer user_data)
mc_list_user_data *_user_data = (mc_list_user_data *)user_data;
mc_comm_msg_s *_message = (mc_comm_msg_s *)_user_data->message;
- if (_data->pid == _message->pid) {
- if (_data->s_data != NULL) {
- unsigned int i = 0;
- unsigned int length_of_list = g_list_length(_data->s_data);
- char *value = NULL;
- for (i = 0; i < length_of_list; i++) {
- value = (char *)g_list_nth_data(_data->s_data, i);
- if ((value != NULL) && (strlen(value) == _message->msg_size)) {
- if (strncmp(value, _message->msg, _message->msg_size) == 0) {
- _data->s_data = g_list_remove(_data->s_data, value);
- MC_SAFE_FREE(value);
- _user_data->result++;
- }
+ if (_data->s_data != NULL) {
+ unsigned int i = 0;
+ unsigned int length_of_list = g_list_length(_data->s_data);
+ char *value = NULL;
+ for (i = 0; i < length_of_list; i++) {
+ value = (char *)g_list_nth_data(_data->s_data, i);
+ if ((value != NULL) && (strlen(value) == _message->msg_size)) {
+ if (strncmp(value, _message->msg, _message->msg_size) == 0) {
+ _data->s_data = g_list_remove(_data->s_data, value);
+ MC_SAFE_FREE(value);
+ _user_data->result++;
}
}
- if (g_list_length(_data->s_data) == 0)
- _data->s_data = NULL;
}
+ if (g_list_length(_data->s_data) == 0)
+ _data->s_data = NULL;
}
}