{
unsigned char *public_key;
unsigned char *private_key;
- unsigned int pk_len, prv_len;
+ uint32 pk_len, prv_len;
struct stat st;
if (stat("pubkey.pub", &st) < 0 && stat("privkey.prv", &st) < 0) {
/* Creates connection to a remote router. */
void silc_server_create_connection(SilcServer server,
- char *remote_host, unsigned int port)
+ char *remote_host, uint32 port)
{
SilcServerConnection sconn;
SilcClientEntry client = NULL;
SilcBuffer idp;
SilcClientEntry *clients = NULL;
- unsigned int clients_c = 0;
+ uint32 clients_c = 0;
unsigned char **argv = NULL;
- unsigned int *argv_lens = NULL, *argv_types = NULL, argc = 0;
+ uint32 *argv_lens = NULL, *argv_types = NULL, argc = 0;
int i;
SILC_LOG_DEBUG(("Start"));
if (silc_idcache_list_first(list, &id_cache)) {
while (id_cache) {
client = (SilcClientEntry)id_cache->context;
-
+ if (client->data.registered == FALSE) {
+ if (!silc_idcache_list_next(list, &id_cache))
+ break;
+ else
+ continue;
+ }
+
if (client->router != entry) {
if (server_signoff && client->connection) {
clients = silc_realloc(clients,
if (silc_idcache_list_first(list, &id_cache)) {
while (id_cache) {
client = (SilcClientEntry)id_cache->context;
+ if (client->data.registered == FALSE) {
+ if (!silc_idcache_list_next(list, &id_cache))
+ break;
+ else
+ continue;
+ }
if (client->router != entry) {
if (server_signoff && client->connection) {
void silc_server_create_channel_key(SilcServer server,
SilcChannelEntry channel,
- unsigned int key_len)
+ uint32 key_len)
{
int i;
unsigned char channel_key[32], hash[32];
- unsigned int len;
+ uint32 len;
SILC_LOG_DEBUG(("Generating channel key"));
SilcChannelKeyPayload payload = NULL;
SilcChannelID *id = NULL;
unsigned char *tmp, hash[32];
- unsigned int tmp_len;
+ uint32 tmp_len;
char *cipher;
SILC_LOG_DEBUG(("Start"));
}
static SilcBuffer
-silc_server_announce_encode_join(unsigned int argc, ...)
+silc_server_announce_encode_join(uint32 argc, ...)
{
va_list ap;
SilcIDCacheEntry id_cache;
SilcChannelEntry channel;
unsigned char *cid;
- unsigned short name_len;
+ uint16 name_len;
int len;
SILC_LOG_DEBUG(("Start"));
SilcChannelEntry channel,
SilcBuffer *user_list,
SilcBuffer *mode_list,
- unsigned int *user_count)
+ uint32 *user_count)
{
SilcChannelClientEntry chl;
SilcBuffer client_id_list;
SilcBuffer client_mode_list;
SilcBuffer idp;
- unsigned int list_count = 0;
+ uint32 list_count = 0;
client_id_list = silc_buffer_alloc((SILC_ID_CLIENT_LEN + 4) *
silc_list_count(channel->user_list));
SilcClientID *noadd,
SilcBuffer user_list,
SilcBuffer mode_list,
- unsigned int user_count)
+ uint32 user_count)
{
int i;
whenever server sends notify message to channel. It means two things;
some user has joined or leaved the channel. XXX TODO! */
for (i = 0; i < user_count; i++) {
- unsigned short idp_len;
- unsigned int mode;
+ uint16 idp_len;
+ uint32 mode;
SilcClientID *client_id;
SilcClientEntry client;
SilcSocketConnection silc_server_get_client_route(SilcServer server,
unsigned char *id_data,
- unsigned int id_len,
+ uint32 id_len,
SilcClientID *client_id,
SilcIDListData *idata)
{
SilcChannelEntry channel;
SilcChannelClientEntry chl;
unsigned char *cid;
- unsigned short name_len;
+ uint16 name_len;
int len;
silc_list_start(client->channels);