src/Cedar/Listener.c
// Get the session from the session key

Get the session from the session key
Get the session from the session key
SESSION *GetSessionFromUDPEntry(CEDAR *cedar, UINT key32)
{
	UDP_ENTRY *e, t;
	SESSION *s;
	if (cedar == NULL)
	{
		return NULL;
	}
	t.SessionKey32 = key32;
	LockList(cedar->UDPEntryList);
	{
		e = Search(cedar->UDPEntryList, &t);
		if (e == NULL)
		{
			UnlockList(cedar->UDPEntryList);
			return NULL;
		}
		s = e->Session;
		AddRef(s->ref);
	}
	UnlockList(cedar->UDPEntryList);
	return s;
}
SESSION * GetSessionFromUDPEntry ( CEDAR * cedar , UINT key32 ) { UDP_ENTRY * e , t ; SESSION * s ; if ( cedar == NULL ) { return NULL ; } t . SessionKey32 = key32 ; LockList ( cedar -> UDPEntryList ) ; { e = Search ( cedar -> UDPEntryList , & t ) ; if ( e == NULL ) { UnlockList ( cedar -> UDPEntryList ) ; return NULL ; } s = e -> Session ; AddRef ( s -> ref ) ; } UnlockList ( cedar -> UDPEntryList ) ; return s ; }
Get the session from the session key
Get the session from the session key
// Validate arguments
