Merge lp://staging/~jamesodhunt/libnih/bug-776532 into lp://staging/libnih

Proposed by James Hunt
Status: Approved
Approved by: Scott James Remnant
Approved revision: 1055
Proposed branch: lp://staging/~jamesodhunt/libnih/bug-776532
Merge into: lp://staging/libnih
Diff against target: 167 lines (+102/-1)
3 files modified
ChangeLog (+10/-0)
nih/file.c (+32/-1)
nih/tests/test_watch.c (+60/-0)
To merge this branch: bzr merge lp://staging/~jamesodhunt/libnih/bug-776532
Reviewer Review Type Date Requested Status
Steve Langasek (community) Disapprove
Scott James Remnant Approve
Review via email: mp+103891@code.staging.launchpad.net

Description of the change

* nih/file.c (nih_dir_walk_filter): New NihFileFilter function passed to
nih_dir_walk_scan() to ensure the nih_watch_new() filter function is
passed the NihWatch data rather than the data passed to the
nih_dir_walk() NihFileVisitor function (LP: #776532).

* nih/tests/test_watch.c (test_new): New test "with filter and data"
to ensure filter is passed correct value.

To post a comment you must log in.
Revision history for this message
Scott James Remnant (scott) :
review: Approve
Revision history for this message
Steve Langasek (vorlon) wrote :

The test suite correctly identifies a bug in this proposed branch. The right fix is for *nih_watch_add* to pass the wrapper *to* nih_dir_walk_scan(); nih_dir_walk_scan() should itself not be wrapping anything or assuming anything about the structure of data, which is what's happening here and causing the test suite failure.

I've got a local fix for this which I'll submit as a separate MP shortly.

review: Disapprove

Unmerged revisions

1055. By James Hunt

* nih/file.c (nih_dir_walk_filter): New NihFileFilter function passed to
nih_dir_walk_scan() to ensure the nih_watch_new() filter function is
passed the NihWatch data rather than the data passed to the
nih_dir_walk() NihFileVisitor function (LP: #776532).

* nih/tests/test_watch.c (test_new): New test "with filter and data"
to ensure filter is passed correct value.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches