Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 2005 Pekka Riikonen
+ Copyright (C) 1997 - 2007 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
(*new_id)->ip.data_len = silc_net_is_ip4(ip) ? 4 : 16;
(*new_id)->port = SILC_SWAB_16(port);
- (*new_id)->rnd = silc_rng_get_rn16(rng);
+ (*new_id)->rnd = 0xff;
SILC_LOG_DEBUG(("New ID (%s)", silc_id_render(*new_id, SILC_ID_SERVER)));
}
SILC_LOG_DEBUG(("Creating new Client ID"));
*new_id = silc_calloc(1, sizeof(**new_id));
+ if (!(*new_id))
+ return FALSE;
/* Create hash of the nickname (it's already checked as valid identifier
string). */
SILC_LOG_DEBUG(("Creating new Channel ID"));
*new_id = silc_calloc(1, sizeof(**new_id));
+ if (!(*new_id))
+ return FALSE;
/* Create the ID */
memcpy((*new_id)->ip.data, router_id->ip.data, router_id->ip.data_len);