mirror of
https://github.com/pissnet/pissircd.git
synced 2025-07-27 05:22:24 +01:00
Some really minor SASL tweaks
This commit is contained in:
parent
61610fe763
commit
e88b6477bd
1 changed files with 3 additions and 2 deletions
|
@ -123,9 +123,10 @@ decode_puid(char *puid)
|
|||
static const char *
|
||||
encode_puid(aClient *client)
|
||||
{
|
||||
static char buf[BUFSIZE];
|
||||
static char buf[HOSTLEN + 20];
|
||||
|
||||
if (!client->sasl_cookie)
|
||||
/* create a cookie if necessary (and in case getrandom16 returns 0, then run again) */
|
||||
while (!client->sasl_cookie)
|
||||
client->sasl_cookie = getrandom16();
|
||||
|
||||
snprintf(buf, sizeof buf, "%s!%d.%d", me.name, client->slot, client->sasl_cookie);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue