summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongwoo Lee <dwoo08.lee@samsung.com>2022-08-11 15:06:56 +0900
committerDongwoo Lee <dwoo08.lee@samsung.com>2022-08-24 13:04:16 +0900
commite0b729c953149dd57b2acb7dfdb61eef2184e10f (patch)
tree5b2cf25e28531258ca551976c97268abc81e83c7
parente57a3f1f765c3497a97308f83c6cdcc95e9e6946 (diff)
downloadmtp-responder-e0b729c953149dd57b2acb7dfdb61eef2184e10f.tar.gz
mtp-responder-e0b729c953149dd57b2acb7dfdb61eef2184e10f.tar.bz2
mtp-responder-e0b729c953149dd57b2acb7dfdb61eef2184e10f.zip
Continue to initialize in the case of failure
In the case of initialization failure, mtp-responder service is terminated abnormally, and the target cannot handle the mtp requests which needs help of ffs daemon. However, since some mtp requests should be ack-ed, this situation causes halt on a control endpoint. Even worse, halt can affect other functionfs gadgets such as sdbd. To prevent this, this keeps running mtp-responder in the case of initalization failure. Change-Id: I533fe1399682913cc959a683e599158a737a2807 Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
-rw-r--r--src/mtp_init.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mtp_init.c b/src/mtp_init.c
index 040ac21..0690545 100644
--- a/src/mtp_init.c
+++ b/src/mtp_init.c
@@ -162,10 +162,9 @@ void _mtp_init(add_rem_store_t sel)
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;
- }
+ if (FALSE == ret)
+ /* Ignore the case that failed to connect media content */
+ DBG("media_content_connect() Fail");
_util_get_internal_path(inter_path);
if (access(inter_path, F_OK) < 0) {