// Release the NAT void NiFreeNat(NAT *n) { // Validate arguments if (n == NULL) { return; } // Complete management command //NiFreeAdminAccept(n); // Stop if the virtual host is running Lock(n->lock); { if (n->Virtual != NULL) { StopVirtualHost(n->Virtual); ReleaseVirtual(n->Virtual); n->Virtual = NULL; } } Unlock(n->lock); // Release the settings NiFreeConfig(n); // Delete the object ReleaseCedar(n->Cedar); ReleaseEvent(n->HaltEvent); DeleteLock(n->lock); Free(n); }
// NAT の解放 void NiFreeNat(NAT *n) { // 引数チェック if (n == NULL) { return; } // 管理コマンド終了 //NiFreeAdminAccept(n); // 仮想ホストが動作中の場合は停止 Lock(n->lock); { if (n->Virtual != NULL) { StopVirtualHost(n->Virtual); ReleaseVirtual(n->Virtual); n->Virtual = NULL; } } Unlock(n->lock); // 設定の解放 NiFreeConfig(n); // オブジェクトの削除 ReleaseCedar(n->Cedar); ReleaseEvent(n->HaltEvent); DeleteLock(n->lock); Free(n); }