On 11/05/2012 07:13 PM, Tanu Kaskinen wrote: > On Sun, 2012-11-04 at 23:09 +0100, David Henningsson wrote: >> On 11/04/2012 02:22 PM, Tanu Kaskinen wrote: >>> On Sat, 2012-11-03 at 19:51 +0100, David Henningsson wrote: >>>> Returning NULL seems to be the right thing to do here, even if >>>> gnome-control-center does not handle that very well IIRC. So we might >>>> need an additional patch in g-c-c. >>>> So assuming I commit a patch doing that. If somebody else wants to add >>>> logic to figure out how large the hole is, that could be discussed >>>> separately. >>>> Any objections? >>> >>> It's not clear what you meant by "add logic to figure out how large the >>> hole is". Add to where? pa_stream_peek() or gnome-control-center? >> >> I was referring to your earlier comment "An addition: the client >> probably wants to know how large the hole is.", i e pa_stream_peek. >> >>> To me, reporting the hole length in the "nbytes" parameter of >>> pa_stream_peek() seems like the right thing to do, so I hope your patch >>> will do this. >> >> It does not: I was just suggesting to discuss that separately. > > Ok. Well, I'm suggesting to not make these issues separate, since it's a > small thing to decide and implement, and doing a separate fix would be > "fixing a fix". I don't have an issue with step-by-step improvements. I see this as such (if the second step is to be seen as an improvement). > Does someone have an issue with returning the hole size > in the nbytes argument? Not if you're volunteering to do the work. All I care about is that PA clients can crash for this reason, and I'd like that to stop happening. Note: gnome-control-center needs a corresponding fix either way, as it currently checks the length rather than the NULL pointer, IIRC. -- David Henningsson, Canonical Ltd. https://launchpad.net/~diwic