mtp

Code review comment for lp:~cyphermox/mtp/images

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

105 + timeout=10
106 + # loop 10 times and then exit, if the property service
107 + # isnt up after 80 sec # it is likely not starting at all
108 + while [ ! -e /dev/socket/property_service ]; do
109 + sleep 8
110 + if [ "$timeout" -le 0 ]; then
111 + stop
112 + exit 0
113 + fi
114 + timeout=$(($timeout - 1))
115 + done
116 +
117 + if [ -x /usr/bin/setprop ]; then
118 + /usr/bin/setprop sys.usb.config mtp,adb
119 + fi

You don't need to go over the timeout logic if setprop is not available.

121 + start mtp-server

Why do we need to manually start the mtp-server if the other upstart job is already watching for android_usb-device-changed udev events?

337 + readFiles("/home/phablet");

How hard would it be to not make it hardcoded to phablet? Guess the server would be per user anyway, right?

Rest looks fine, need testing.

review: Needs Information

« Back to merge proposal