sink, source: unify stream "attached" flag checking
authorTanu Kaskinen <tanuk@iki.fi>
Wed, 7 Dec 2016 23:59:02 +0000 (01:59 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Mon, 19 Dec 2016 23:34:32 +0000 (01:34 +0200)
commit539eb5c24418e3e473656da2f8ea5727754da037
treeeaae32417438e17bc1e34f788042b4e43336bfe7
parent74ff1153425c927e6dfd198cbf1e0d6edfbfa873
sink, source: unify stream "attached" flag checking

The "attached" flag is only used for asserting that the stream is in the
expected state when attaching or detaching.

Sometimes the flag was checked and updated before calling the attach or
detach callback, and sometimes after. I think it makes more sense to
always check it before calling the callback.
src/pulsecore/sink.c
src/pulsecore/source.c