Use primary router when sending WHOIS packet if client->router is NULL.
authorSkywing <skywing@valhallalegends.com>
Sun, 23 Nov 2008 18:54:12 +0000 (13:54 -0500)
committerSkywing <skywing@valhallalegends.com>
Sun, 23 Nov 2008 19:38:49 +0000 (14:38 -0500)
commit4f370664520f87d3054cad72b9d011a684806632
tree248bcf0056c4f0d6f76e036ec6beef429d6a72a8
parente85b8c3b0b68d9c5e82fa058683fb57595f37bd6
Use primary router when sending WHOIS packet if client->router is NULL.

client may be non-NULL, but client->router may be NULL when we enter
silc_server_query_client in the case of a detached client on a remote
server that has not been fully resolved yet.  In this case, we should
try and send the packet using the primary router.  This fixes a crash
wherein silc_server_query_client would sometimes crash with a NULL
dereference if called on a remote detached client.
apps/silcd/server_query.c