updates.
[silc.git] / apps / silcd / server.c
index 306cb07f78f34a9fd2b619bb32fbcc5472c68fd6..eb2c0a95340812b9662662235dbaf7e4c221cfca 100644 (file)
@@ -3961,11 +3961,13 @@ void silc_server_save_users_on_channel(SilcServer server,
    could not be found to the client. If the `client_id' is specified then
    it is used and the `id_data' is ignored. */
 
-SilcSocketConnection silc_server_get_client_route(SilcServer server,
-                                                 unsigned char *id_data,
-                                                 SilcUInt32 id_len,
-                                                 SilcClientID *client_id,
-                                                 SilcIDListData *idata)
+SilcSocketConnection
+silc_server_get_client_route(SilcServer server,
+                            unsigned char *id_data,
+                            SilcUInt32 id_len,
+                            SilcClientID *client_id,
+                            SilcIDListData *idata,
+                            SilcClientEntry *client_entry)
 {
   SilcClientID *id;
   SilcClientEntry client;
@@ -3983,6 +3985,9 @@ SilcSocketConnection silc_server_get_client_route(SilcServer server,
     id = silc_id_dup(client_id, SILC_ID_CLIENT);
   }
 
+  if (client_entry)
+    *client_entry = NULL;
+
   /* If the destination belongs to our server we don't have to route
      the packet anywhere but to send it to the local destination. */
   client = silc_idlist_find_client_by_id(server->local_list, id, TRUE, NULL);
@@ -4003,6 +4008,8 @@ SilcSocketConnection silc_server_get_client_route(SilcServer server,
     /* Seems that client really is directly connected to us */
     if (idata)
       *idata = (SilcIDListData)client;
+    if (client_entry)
+      *client_entry = client;
     return client->connection;
   }