src/Cedar/Listener.c
// Set the state to dynamic listener

Set the state to dynamic listener
Set the state to dynamic listener
void ApplyDynamicListener(DYNAMIC_LISTENER *d)
{
	if (d == NULL)
	{
		return;
	}
	Lock(d->Lock);
	{
		if (*d->EnablePtr)
		{
			if (d->Listener == NULL)
			{
				WHERE;
				d->Listener = NewListener(d->Cedar, d->Protocol, d->Port);
			}
		}
		else
		{
			if (d->Listener != NULL)
			{
				WHERE;
				StopListener(d->Listener);
				ReleaseListener(d->Listener);
				d->Listener = NULL;
			}
		}
	}
	Unlock(d->Lock);
}
void ApplyDynamicListener ( DYNAMIC_LISTENER * d ) { if ( d == NULL ) { return ; } Lock ( d -> Lock ) ; { if ( * d -> EnablePtr ) { if ( d -> Listener == NULL ) { WHERE ; d -> Listener = NewListener ( d -> Cedar , d -> Protocol , d -> Port ) ; } } else { if ( d -> Listener != NULL ) { WHERE ; StopListener ( d -> Listener ) ; ReleaseListener ( d -> Listener ) ; d -> Listener = NULL ; } } } Unlock ( d -> Lock ) ; }
Set the state to dynamic listener
Set the state to dynamic listener
// Validate arguments
 // Change the state
 // Create a listener
 // Stop the listener
