uint32 id_len;
int ret;
char *hostname, *nickname;
+ int nickfail = 0;
SILC_LOG_DEBUG(("Creating new client"));
}
/* Create Client ID */
- silc_id_create_client_id(server->id, server->rng, server->md5hash,
- nickname, &client_id);
+ while (!silc_id_create_client_id(server, server->id, server->rng,
+ server->md5hash, nickname, &client_id)) {
+ nickfail++;
+ snprintf(&nickname[strlen(nickname) - 1], 1, "%d", nickfail);
+ }
/* Update client entry */
idata->registered = TRUE;
id, router, NULL);
if (!entry) {
SILC_LOG_ERROR(("Could not add new client to the ID Cache"));
+
+ /* Inform the sender that the ID is not usable */
+ silc_server_send_notify_signoff(server, sock, FALSE, id, NULL);
goto out;
}
entry->nickname = NULL;