projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merged silc_1_0_branch to trunk.
[silc.git]
/
apps
/
silcd
/
route.c
diff --git
a/apps/silcd/route.c
b/apps/silcd/route.c
index eac09e64d42c27a03b350c79178b290170e11247..5488bb315659a5417fbaf692ecbf5ae8b065e807 100644
(file)
--- a/
apps/silcd/route.c
+++ b/
apps/silcd/route.c
@@
-2,9
+2,9
@@
route.c
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
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
@@
-40,7
+40,7
@@
SilcServerRouteTable silc_route_cache[SILC_SERVER_ROUTE_SIZE];
/* Adds new route to the route cache. The argument `index' is the
index value generated by silc_server_route_hash. */
/* Adds new route to the route cache. The argument `index' is the
index value generated by silc_server_route_hash. */
-void silc_server_route_add(
ui
nt32 index, unsigned int dest,
+void silc_server_route_add(
SilcUI
nt32 index, unsigned int dest,
SilcServerEntry router)
{
silc_route_cache[index].dest = dest;
SilcServerEntry router)
{
silc_route_cache[index].dest = dest;
@@
-50,10
+50,10
@@
void silc_server_route_add(uint32 index, unsigned int dest,
/* Checksk whether destination has a specific router. Returns the
router data if found, NULL otherwise. */
/* Checksk whether destination has a specific router. Returns the
router data if found, NULL otherwise. */
-SilcServerEntry silc_server_route_check(
ui
nt32 dest,
-
ui
nt16 port)
+SilcServerEntry silc_server_route_check(
SilcUI
nt32 dest,
+
SilcUI
nt16 port)
{
{
-
ui
nt32 index;
+
SilcUI
nt32 index;
index = silc_server_route_hash(dest, port);
index = silc_server_route_hash(dest, port);
@@
-72,8
+72,8
@@
SilcSocketConnection silc_server_route_get(SilcServer server, void *id,
SilcIdType id_type)
{
if (server->server_type == SILC_ROUTER) {
SilcIdType id_type)
{
if (server->server_type == SILC_ROUTER) {
-
ui
nt32 dest = 0;
-
ui
nt16 port = 0;
+
SilcUI
nt32 dest = 0;
+
SilcUI
nt16 port = 0;
SilcServerEntry router = NULL;
#if 0
SilcServerEntry router = NULL;
#if 0
@@
-97,11
+97,11
@@
SilcSocketConnection silc_server_route_get(SilcServer server, void *id,
#endif
router = silc_server_route_check(dest, port);
#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;
}
}