mtp

Merge lp:~cyphermox/mtp/lp1383819 into lp:mtp

Proposed by Mathieu Trudel-Lapierre on 2014-10-21
Status: Approved
Approved by: Manuel de la Peña on 2014-10-24
Approved revision: 53
Proposed branch: lp:~cyphermox/mtp/lp1383819
Merge into: lp:mtp
Diff against target: 30 lines (+11/-2)
1 file modified
server/UbuntuMtpDatabase.h (+11/-2)
To merge this branch: bzr merge lp:~cyphermox/mtp/lp1383819
Reviewer Review Type Date Requested Status
Manuel de la Peña (community) 2014-10-21 Approve on 2014-10-24
PS Jenkins bot continuous-integration Needs Fixing on 2014-10-21
Review via email: mp+239108@code.launchpad.net

Commit message

Better handle file deletion compounded with inotify events for the same delete operation.

Description of the change

Better handle file deletion compounded with inotify events for the same delete operation.

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:53
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~mathieu-tl/mtp/lp1383819/+merge/239108/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/mtp-ci/25/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mtp-utopic-amd64-ci/10
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mtp-utopic-armhf-ci/10
        deb: http://jenkins.qa.ubuntu.com/job/mtp-utopic-armhf-ci/10/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/mtp-utopic-i386-ci/10

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/mtp-ci/25/rebuild

review: Needs Fixing (continuous-integration)
review: Approve

Unmerged revisions

53. By Mathieu Trudel-Lapierre on 2014-10-21

Better handle file deletion compounded with inotify events for the same
delete operation.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'server/UbuntuMtpDatabase.h'
2--- server/UbuntuMtpDatabase.h 2014-09-08 19:27:06 +0000
3+++ server/UbuntuMtpDatabase.h 2014-10-21 17:25:19 +0000
4@@ -251,7 +251,8 @@
5 {
6 const char* cdata = processed + asio::buffer_cast<const char*>(buf.data());
7 const inotify_event* ievent = reinterpret_cast<const inotify_event*>(cdata);
8- MtpObjectHandle parent;
9+ MtpObjectHandle parent = MTP_PARENT_ROOT;
10+ path p;
11
12 processed += sizeof(inotify_event) + ievent->len;
13
14@@ -262,7 +263,15 @@
15 }
16 }
17
18- path p(db.at(parent).path + "/" + ievent->name);
19+ try {
20+ p = path(db.at(parent).path + "/" + ievent->name);
21+ } catch (...) {
22+ /* If we can't match to a parent here; there is nothing
23+ * more to be done; just ignore and skip to the next
24+ * block of inotify data.
25+ */
26+ continue;
27+ }
28
29 if(ievent->len > 0 && ievent->mask & IN_MODIFY)
30 {

Subscribers

People subscribed via source and target branches