mtp

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

Proposed by Mathieu Trudel-Lapierre
Status: Approved
Approved by: Manuel de la Peña
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) Approve
PS Jenkins bot continuous-integration Needs Fixing
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.
Revision history for this message
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)
Revision history for this message
Manuel de la Peña (mandel) :
review: Approve

Unmerged revisions

53. By Mathieu Trudel-Lapierre

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
=== modified file 'server/UbuntuMtpDatabase.h'
--- server/UbuntuMtpDatabase.h 2014-09-08 19:27:06 +0000
+++ server/UbuntuMtpDatabase.h 2014-10-21 17:25:19 +0000
@@ -251,7 +251,8 @@
251 {251 {
252 const char* cdata = processed + asio::buffer_cast<const char*>(buf.data());252 const char* cdata = processed + asio::buffer_cast<const char*>(buf.data());
253 const inotify_event* ievent = reinterpret_cast<const inotify_event*>(cdata);253 const inotify_event* ievent = reinterpret_cast<const inotify_event*>(cdata);
254 MtpObjectHandle parent;254 MtpObjectHandle parent = MTP_PARENT_ROOT;
255 path p;
255 256
256 processed += sizeof(inotify_event) + ievent->len;257 processed += sizeof(inotify_event) + ievent->len;
257 258
@@ -262,7 +263,15 @@
262 }263 }
263 }264 }
264265
265 path p(db.at(parent).path + "/" + ievent->name);266 try {
267 p = path(db.at(parent).path + "/" + ievent->name);
268 } catch (...) {
269 /* If we can't match to a parent here; there is nothing
270 * more to be done; just ignore and skip to the next
271 * block of inotify data.
272 */
273 continue;
274 }
266275
267 if(ievent->len > 0 && ievent->mask & IN_MODIFY)276 if(ievent->len > 0 && ievent->mask & IN_MODIFY)
268 {277 {

Subscribers

People subscribed via source and target branches