]> git.notmuchmail.org Git - notmuch/commit
notmuch_query_search_threads: Avoid returning more threads than asked for.
authorCarl Worth <cworth@cworth.org>
Fri, 13 Nov 2009 04:31:22 +0000 (20:31 -0800)
committerCarl Worth <cworth@cworth.org>
Fri, 13 Nov 2009 04:31:22 +0000 (20:31 -0800)
commitbbf4b8e4aec69b5684587b77bd0af743afd61eb1
tree7cc224d9a22a1b9de93c5fcaa978f9d47364dcd4
parente4a7c2b8703280e93b205965d7df1b7dda8a0bf7
notmuch_query_search_threads: Avoid returning more threads than asked for.

I thought it would be safe enough to return a few extra threads,
(since we happened to already get the relevant messages out of the
database). The problem is that then requires the caller to carefully
read the number of threads returned and adjust its next "first" value
accordingly. The interface is much simpler to use if we simply return
exactly what is asked for and no more.
lib/query.cc