BUG/MINOR: cli/stream: fix "shutdown session" to iterate over all threads

The list of streams was modified in 2.4 to become per-thread with commit
a698eb673 ("MINOR: streams: use one list per stream instead of a global
one"). However the change applied to cli_parse_shutdown_session() is
wrong, as it uses the nullity of the stream pointer to continue on next
threads, but this one is not null once the list_for_each_entry() loop
is finished, it points to the list's head again, so the loop doesn't
check other threads, and no message is printed either to say that the
stream was not found.

Instead we should check if the stream is equal to the requested pointer
since this is the condition to break out of the loop.

Thus must be backported to 2.4. Thanks to Maciej Zdeb for reporting this.

(cherry picked from commit c40c407268190e41d7d0238e3e2b7669147df9f7)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit a0ed39dfa52f0741132b6e7dcfe2c4d79c0c6654)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed