Esempio n. 1
0
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;
    }
}
Esempio n. 2
0
File: Os.c Progetto: astaykov/ohNet
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;
    }
}