Change implementation about read property 65/101765/1 accepted/tizen/common/20161202.233323 accepted/tizen/ivi/20161205.000259 accepted/tizen/mobile/20161205.000231 accepted/tizen/tv/20161205.000245 submit/tizen/20161202.062017
authorJihoon Jung <jh8801.jung@samsung.com>
Fri, 2 Dec 2016 06:12:28 +0000 (15:12 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Fri, 2 Dec 2016 06:14:50 +0000 (22:14 -0800)
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
Change-Id: I10e2914440f6b4004d3eba0ea505f343a3a9f858

src/daemon/mtp_daemon_gdbus_objectinfo.c

index 75631ba..99682ba 100755 (executable)
@@ -23,6 +23,7 @@ static void __objectinfo_get_property_thread_func(gpointer user_data)
 {
        mtp_param *param = (mtp_param *)user_data;
        mtp_error_e result = MTP_ERROR_NONE;
+       LIBMTP_mtpdevice_t *mtp_device = NULL;
        mtp_device_info *device_info = NULL;
        int device_id;
        int object_handle;
@@ -45,8 +46,9 @@ static void __objectinfo_get_property_thread_func(gpointer user_data)
 
        if (device_info != NULL) {
                MTP_LOGI("Get property start - property %d", property);
+               mtp_device = (LIBMTP_mtpdevice_t *)device_info->device;
 
-               object_info = mtp_daemon_db_get_object_info(device_id, object_handle, param->mtp_ctx);
+               object_info = LIBMTP_Get_Object_Info(mtp_device, object_handle);
 
                if (object_info != NULL) {
                        switch (property) {
@@ -124,6 +126,7 @@ static void __objectinfo_get_property_string_thread_func(gpointer user_data)
 {
        mtp_param *param = (mtp_param *)user_data;
        mtp_error_e result = MTP_ERROR_NONE;
+       LIBMTP_mtpdevice_t *mtp_device = NULL;
        mtp_device_info *device_info = NULL;
        int device_id;
        int object_handle;
@@ -146,8 +149,9 @@ static void __objectinfo_get_property_string_thread_func(gpointer user_data)
 
        if (device_info != NULL) {
                MTP_LOGI("Get property start - property %d", property);
+               mtp_device = (LIBMTP_mtpdevice_t *)device_info->device;
 
-               object_info = mtp_daemon_db_get_object_info(device_id, object_handle, param->mtp_ctx);
+               object_info = LIBMTP_Get_Object_Info(mtp_device, object_handle);
 
                if (object_info != NULL) {
                        switch (property) {