Mark fake test clients, don't assert they're real

This commit is contained in:
Ed Kellett 2020-10-31 15:15:25 +00:00
parent d0a8ae2cf2
commit 5409fbc0f7
3 changed files with 6 additions and 2 deletions

View File

@ -438,6 +438,7 @@ struct ListClient
#define LFLAGS_CORK 0x00000004
#define LFLAGS_SCTP 0x00000008
#define LFLAGS_SECURE 0x00000010 /* for marking SSL clients as secure before registration */
#define LFLAGS_FAKE 0x00000020
/* umodes, settable flags */
/* lots of this moved to snomask -- jilles */

View File

@ -82,8 +82,9 @@ parse(struct Client *client_p, char *pbuffer, char *bufend)
struct Message *mptr;
struct MsgBuf msgbuf;
s_assert(MyConnect(client_p));
s_assert(client_p->localClient->F != NULL);
s_assert(MyConnect(client_p) &&
(client_p->localClient->F != NULL ||
client_p->localClient->localflags & LFLAGS_FAKE));
if(IsAnyDead(client_p))
return;

View File

@ -59,6 +59,7 @@ struct Client *make_local_unknown(void)
rb_dlinkAdd(client, &client->lnode, &client->servptr->serv->users);
client->localClient->listener = &fake_listener;
client->preClient->auth.accepted = true;
client->localClient->localflags |= LFLAGS_FAKE;
return client;
}
@ -123,6 +124,7 @@ struct Client *make_remote_server_full(struct Client *uplink, const char *name,
client = make_client(NULL);
client->servptr = uplink;
client->localClient->localflags |= LFLAGS_FAKE;
attach_server_conf(client, find_server_conf(name));