1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-12 01:40:27 +00:00

Don't assert() when serching a client for an invalid server token

This is only relevant when a trusted server on a server-server link
sends invalid commands.
This commit is contained in:
Alexander Barton 2010-12-24 12:48:03 +01:00
parent 186b14f332
commit 36d4f6c601

View File

@ -553,17 +553,19 @@ Client_Search( const char *Nick )
} /* Client_Search */
/**
* Get client structure ("introducer") identfied by a server token.
* @return CLIENT structure or NULL if none could be found.
*/
GLOBAL CLIENT *
Client_GetFromToken( CLIENT *Client, int Token )
{
/* Client-Struktur, die den entsprechenden Introducer (=Client)
* und das gegebene Token hat, liefern. Wird keine gefunden,
* so wird NULL geliefert. */
CLIENT *c;
assert( Client != NULL );
assert( Token > 0 );
if (!Token)
return NULL;
c = My_Clients;
while (c) {