updates.
[silc.git] / apps / silcd / server_util.c
index 398dc52eafcde1bf34ba0d8b89e34d3fc7030152..d4b035f8e3e0ea5f983f1968a291c5cd0fcacdb6 100644 (file)
@@ -365,13 +365,15 @@ silc_server_update_clients_by_real_server(SilcServer server,
    `from' and which are originated from a server that we have connection
    to, when we've acting as backup router. If it is FALSE the `to' will
    be the new source. This function also removes the clients that are
-   *really* originated from `from'. These are clients that the `from'
-   owns, and not just clients that are behind the `from'. */
+   *really* originated from `from' if `remove_from' is TRUE. These are
+   clients that the `from' owns, and not just clients that are behind
+   the `from'. */
 
 void silc_server_update_clients_by_server(SilcServer server, 
                                          SilcServerEntry from,
                                          SilcServerEntry to,
-                                         bool resolve_real_server)
+                                         bool resolve_real_server,
+                                         bool remove_from)
 {
   SilcIDCacheList list = NULL;
   SilcIDCacheEntry id_cache = NULL;
@@ -457,10 +459,11 @@ void silc_server_update_clients_by_server(SilcServer server,
     silc_idcache_list_free(list);
   }
 
-  /* Now remove the clients that are still marked as orignated from the
-     `from'. These are the clients that really was owned by the `from' and
-     not just exist behind the `from'. */
-  silc_server_remove_clients_by_server(server, from, TRUE);
+  if (remove_from)
+    /* Now remove the clients that are still marked as orignated from the
+       `from'. These are the clients that really was owned by the `from' and
+       not just exist behind the `from'. */
+    silc_server_remove_clients_by_server(server, from, TRUE);
 }
 
 /* Checks whether given channel has global users.  If it does this returns