Integer type name change.
[silc.git] / apps / silcd / server_util.c
index 3592df581202c158e9c4b1dce0f4388ef048f929..7e83c5fc1947e8662d67a7441daf4d18f6a5d14f 100644 (file)
@@ -71,6 +71,7 @@ static void silc_server_remove_clients_channels(SilcServer server,
 
     /* Remove client from channel's client list */
     silc_hash_table_del(channel->user_list, chl->client);
+    channel->user_count--;
 
     /* If there is no global users on the channel anymore mark the channel
        as local channel. Do not check if the removed client is local client. */
@@ -103,6 +104,7 @@ static void silc_server_remove_clients_channels(SilcServer server,
        while (silc_hash_table_get(&htl2, NULL, (void *)&chl2)) {
          silc_hash_table_del(chl2->client->channels, channel);
          silc_hash_table_del(channel->user_list, chl2->client);
+         channel->user_count--;
          silc_free(chl2);
        }
        silc_hash_table_list_reset(&htl2);
@@ -142,9 +144,9 @@ bool silc_server_remove_clients_by_server(SilcServer server,
   SilcClientEntry client = NULL;
   SilcBuffer idp;
   SilcClientEntry *clients = NULL;
-  uint32 clients_c = 0;
+  SilcUInt32 clients_c = 0;
   unsigned char **argv = NULL;
-  uint32 *argv_lens = NULL, *argv_types = NULL, argc = 0;
+  SilcUInt32 *argv_lens = NULL, *argv_types = NULL, argc = 0;
   SilcHashTableList htl;
   SilcChannelEntry channel;
   SilcHashTable channels;
@@ -751,7 +753,7 @@ bool silc_server_client_on_channel(SilcClientEntry client,
 
 /* Checks string for bad characters and returns TRUE if they are found. */
 
-bool silc_server_name_bad_chars(const char *name, uint32 name_len)
+bool silc_server_name_bad_chars(const char *name, SilcUInt32 name_len)
 {
   int i;
 
@@ -771,7 +773,7 @@ bool silc_server_name_bad_chars(const char *name, uint32 name_len)
 /* Modifies the `name' if it includes bad characters and returns new
    allocated name that does not include bad characters. */
 
-char *silc_server_name_modify_bad(const char *name, uint32 name_len)
+char *silc_server_name_modify_bad(const char *name, SilcUInt32 name_len)
 {
   int i;
   char *newname = strdup(name);
@@ -791,7 +793,7 @@ char *silc_server_name_modify_bad(const char *name, uint32 name_len)
 /* Find number of sockets by IP address indicated by `ip'. Returns 0 if
    socket connections with the IP address does not exist. */
 
-uint32 silc_server_num_sockets_by_ip(SilcServer server, const char *ip)
+SilcUInt32 silc_server_num_sockets_by_ip(SilcServer server, const char *ip)
 {
   int i, count;