winbindd: call reset_cm_connection_on_error() from reconnect_need_retry()
authorRalph Boehme <slow@samba.org>
Mon, 12 Mar 2018 11:20:04 +0000 (12:20 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 20 Apr 2018 09:56:22 +0000 (11:56 +0200)
commit7d9aa1d560f9e061665a67c6fe8fc0fea357ca17
tree5652c0f700d3df30223f8a06637ee23b58443c59
parent4d2968cb1513c54ce5eca7f1ef43fe0e8dd77f41
winbindd: call reset_cm_connection_on_error() from reconnect_need_retry()

This ensures we use the same disconnect logic in the reconnect backend,
which calls reconnect_need_retry(), and in the dual_srv frontend which
calls reset_cm_connection_on_error.

Both reset_cm_connection_on_error() and reconnect_need_retry() are very
similar, both return a bool indicating whether a retry should be
attempted, unfortunately the functions have a different default return,
so I don't dare unifying them, but instead just call one from the other.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13332

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 2837b796af3e491b6bb34bd441758ae214f629ee)
source3/winbindd/winbindd_reconnect.c