static void closeInterface(void* vendpoint) { struct IFCPeer* toClose = Identity_cast((struct IFCPeer*) vendpoint); struct Context* ic = ifcontrollerForPeer(toClose); int index = Map_OfIFCPeerByExernalIf_indexForHandle(toClose->handle, &ic->peerMap); Assert_true(index >= 0); Map_OfIFCPeerByExernalIf_remove(index, &ic->peerMap); }
static int closeInterface(struct Allocator_OnFreeJob* job) { struct IFCPeer* toClose = Identity_cast((struct IFCPeer*) job->userData); struct Context* ic = ifcontrollerForPeer(toClose); int index = Map_OfIFCPeerByExernalIf_indexForHandle(toClose->handle, &ic->peerMap); Assert_true(index >= 0); Map_OfIFCPeerByExernalIf_remove(index, &ic->peerMap); return 0; }
static int closeInterface(struct Allocator_OnFreeJob* job) { struct IFCPeer* toClose = Identity_cast((struct IFCPeer*) job->userData); struct Context* ic = ifcontrollerForPeer(toClose); // flush the peer from the table... RouterModule_brokenPath(toClose->switchLabel, ic->routerModule); int index = Map_OfIFCPeerByExernalIf_indexForHandle(toClose->handle, &ic->peerMap); Assert_true(index >= 0); Map_OfIFCPeerByExernalIf_remove(index, &ic->peerMap); return 0; }
static int closeInterface(struct Allocator_OnFreeJob* job) { struct InterfaceController_Peer* toClose = Identity_check((struct InterfaceController_Peer*) job->userData); struct InterfaceController_pvt* ic = ifcontrollerForPeer(toClose); // flush the peer from the table... Router_disconnectedPeer(ic->router, toClose->switchLabel); int index = Map_OfIFCPeerByExernalIf_indexForHandle(toClose->handle, &ic->peerMap); Assert_true(index >= 0); Map_OfIFCPeerByExernalIf_remove(index, &ic->peerMap); return 0; }