Change call location of media connect 30/164430/1 accepted/tizen/4.0/unified/20171220.145757 submit/tizen_4.0/20171219.090434 tizen_4.0.IoT.p2_release
authorJihoon Jung <jh8801.jung@samsung.com>
Tue, 19 Dec 2017 05:32:26 +0000 (14:32 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Tue, 19 Dec 2017 05:34:44 +0000 (14:34 +0900)
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
Change-Id: I628f1d00cedf70966aeac9f0fac614db17a8b0fc

packaging/mtp-responder.spec
src/mtp_event_handler.c
src/mtp_init.c

index 2578e5f..c885722 100755 (executable)
@@ -5,7 +5,7 @@ ExcludeArch: %arm aarch64
 
 Name:       mtp-responder
 Summary:    Media Transfer Protocol daemon (responder)
-Version:    0.0.25
+Version:    0.0.26
 Release:    1
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
index 0dbf921..42d4e93 100755 (executable)
@@ -389,15 +389,11 @@ void _handle_lock_status_notification(keynode_t *key, void *data)
                _device_install_storage(MTP_ADDREM_INTERNAL);
                __send_events_from_device_to_pc(MTP_INTERNAL_STORE_ID,
                                PTP_EVENTCODE_STOREADDED, 0, 0);
-
-               _util_media_content_connect();
        } else if (MTP_PHONE_LOCK_ON == current_val) {
                _device_uninstall_storage(MTP_ADDREM_INTERNAL);
 
                __send_events_from_device_to_pc(MTP_INTERNAL_STORE_ID,
                                PTP_EVENTCODE_STOREREMOVED, 0, 0);
-
-               _util_media_content_disconnect();
        }
 
        return;
index 2f749a1..80a6a88 100755 (executable)
@@ -152,15 +152,8 @@ void _mtp_init(add_rem_store_t sel)
 
        /* Internal Storage */
        if (MTP_PHONE_LOCK_OFF == _util_get_local_lock_status()) {
-               mtp_int32 ret;
                char inter_path[MTP_MAX_PATHNAME_SIZE + 1] = { 0 };
 
-               ret = _util_media_content_connect();
-               if (FALSE == ret) {
-                       ERR("media_content_connect() Fail");
-                       goto MTP_INIT_FAIL;
-               }
-
                _util_get_internal_path(inter_path);
                if (access(inter_path, F_OK) < 0) {
                        if (FALSE == _util_dir_create((const mtp_char *)inter_path, &error)) {
@@ -491,6 +484,12 @@ int main(int argc, char *argv[])
                return MTP_ERROR_GENERAL;
        }
 
+       ret = _util_media_content_connect();
+       if (true != ret) {
+               ERR("media_content_connect() Fail(%d)", ret);
+               return MTP_ERROR_GENERAL;
+       }
+
        ret = _main_init();
        if (MTP_ERROR_NONE != ret) {
                ERR("_main_init() Fail(%d)", ret);