route.c
- Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+ Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 2000 Pekka Riikonen
+ Copyright (C) 2000 - 2002 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#endif
router = silc_server_route_check(dest, port);
- if (!router)
- return (SilcSocketConnection)server->id_entry->router->connection;
-
- return (SilcSocketConnection)router->connection;
+ if (router)
+ return (SilcSocketConnection)router->connection;
}
- return (SilcSocketConnection)server->id_entry->router->connection;
+ return (server->id_entry->router)
+ ? (SilcSocketConnection)server->id_entry->router->connection
+ : NULL;
}