diff --git a/src/viced/callback.c b/src/viced/callback.c index 65e3be2899..90d684d723 100644 --- a/src/viced/callback.c +++ b/src/viced/callback.c @@ -776,6 +776,7 @@ MultiBreakCallBack_r(struct cbstruct cba[], int ncbas, if (!thishost || (thishost->hostFlags & HOSTDELETED)) { continue; } + rx_GetConnection(thishost->callback_rxcon); conns[j++] = thishost->callback_rxcon; #ifdef ADAPT_MTU @@ -832,14 +833,14 @@ MultiBreakCallBack_r(struct cbstruct cba[], int ncbas, } H_LOCK; - h_Lock_r(hp); + h_Lock_r(hp); hp->hostFlags |= VENUSDOWN; /** * We always go into AddCallBack1_r with the host locked */ AddCallBack1_r(hp, afidp->AFSCBFids_val, itot(idx), CB_DELAYED, 1); - h_Unlock_r(hp); + h_Unlock_r(hp); H_UNLOCK; } } @@ -853,8 +854,10 @@ MultiBreakCallBack_r(struct cbstruct cba[], int ncbas, for (i = 0; i < ncbas; i++) { struct host *hp; hp = cba[i].hp; - if (hp && xhost != hp) + if (hp && xhost != hp) { + rx_PutConnection(hp->callback_rxcon); h_Release_r(hp); + } } return;