Modified dcb_call_foreach so that it doesn't hold spinlock (dcbspin) continuously because it caused deadlock when new slaves were tried to connect with.

Fixed a few smallish things.
This commit is contained in:
VilhoRaatikka
2014-06-13 14:52:04 +03:00
parent dfc9141a38
commit 09d20d1059
3 changed files with 94 additions and 10 deletions

View File

@ -813,7 +813,7 @@ static bool get_dcb(
{
backend_ref = rses->rses_master_ref;
if (BREF_IS_IN_USE((&backend_ref[i])))
if (BREF_IS_IN_USE(backend_ref))
{
*p_dcb = backend_ref->bref_dcb;
succp = true;
@ -2765,7 +2765,6 @@ static int router_handle_state_switch(
case DCB_REASON_NOT_RESPONDING:
if (BREF_IS_WAITING_RESULT(bref))
{
printf("foo");
dcb->func.hangup(dcb);
}
break;