static void DestroyInterfaceChangedObserver_Linux(OsContext* aContext) { if (aContext->iInterfaceChangedObserver != NULL) { if (aContext->iInterfaceChangedObserver->iThread != NULL) { OsNetworkInterrupt(aContext->iInterfaceChangedObserver->netHnd, 1); ThreadJoin(aContext->iInterfaceChangedObserver->iThread); OsThreadDestroy(aContext->iInterfaceChangedObserver->iThread); } OsNetworkClose(aContext->iInterfaceChangedObserver->netHnd); free(aContext->iInterfaceChangedObserver); aContext->iInterfaceChangedObserver = NULL; } }
static void DestroyInterfaceChangedObserver_Linux() { if (gInterfaceChangedObserver != NULL) { if (gInterfaceChangedObserver->iThread != NULL) { OsNetworkInterrupt(gInterfaceChangedObserver->netHnd, 1); ThreadJoin(gInterfaceChangedObserver->iThread); OsThreadDestroy(gInterfaceChangedObserver->iThread); } OsNetworkClose(gInterfaceChangedObserver->netHnd); free(gInterfaceChangedObserver); gInterfaceChangedObserver = NULL; } }