test-nm-client: fix the remaining counter
authorLubomir Rintel <lkundrak@v3.sk>
Thu, 17 Mar 2016 16:12:30 +0000 (17:12 +0100)
committerLubomir Rintel <lkundrak@v3.sk>
Thu, 17 Mar 2016 16:37:06 +0000 (17:37 +0100)
commit84c42aac1b5b59c8c59d9df4a397f45d13abfdbf
treee99f8baf00ace3c87a56f492a80c2e9c49e0a6f6
parent01732b87f6785c634d3a91c1d1e8785b95fca8aa
test-nm-client: fix the remaining counter

We're expecting four callbacks: a client::devices change,
client::active-connections change, client::activate callback,
and a device::active-connection change.

We only hook the second one in the callback to the first one, and
only if client::active-connections is not set already. If it is
(when running slowly in valgrind), we just decrement the counter.

However, as the counter is one less than it should be, it would
underflow and we wait forever* instead.

For the value of forever=20s, given that's the timeout of the
mockup service.
libnm/tests/test-nm-client.c