X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fserver.c;fp=apps%2Fsilcd%2Fserver.c;h=eb2c0a95340812b9662662235dbaf7e4c221cfca;hb=c08107c80b816558a1c48ada27eaf23840793157;hp=306cb07f78f34a9fd2b619bb32fbcc5472c68fd6;hpb=e1d9ce9886ca71287f2634784fb766fad31b7744;p=silc.git diff --git a/apps/silcd/server.c b/apps/silcd/server.c index 306cb07f..eb2c0a95 100644 --- a/apps/silcd/server.c +++ b/apps/silcd/server.c @@ -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; }