projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3d0125f
)
give a better looking to silc_server_connect_to_route()
author
Giovanni Giacobbi
<johnny@silcnet.org>
Thu, 28 Mar 2002 09:23:43 +0000
(09:23 +0000)
committer
Giovanni Giacobbi
<johnny@silcnet.org>
Thu, 28 Mar 2002 09:23:43 +0000
(09:23 +0000)
apps/silcd/server.c
patch
|
blob
|
history
diff --git
a/apps/silcd/server.c
b/apps/silcd/server.c
index d7f552866ae93706ba206c5cfa839bb5f9a6ae1f..927040744a2a2a7afcdcb9930b9301f3b529c6f8 100644
(file)
--- a/
apps/silcd/server.c
+++ b/
apps/silcd/server.c
@@
-732,9
+732,16
@@
SILC_TASK_CALLBACK(silc_server_connect_to_router)
SILC_LOG_DEBUG(("We are backup router/normal server"));
}
SILC_LOG_DEBUG(("We are backup router/normal server"));
}
+ if (!server->config->routers) {
+ /* There wasn't a configured router, we will continue but we don't
+ have a connection to outside world. We will be standalone server. */
+ SILC_LOG_DEBUG(("No router(s), server will be standalone"));
+ server->standalone = TRUE;
+ return;
+ }
+
/* Create the connections to all our routes */
/* Create the connections to all our routes */
- ptr = server->config->routers;
- while (ptr) {
+ for (ptr = server->config->routers; ptr; ptr = ptr->next) {
SILC_LOG_DEBUG(("%s connection [%s] %s:%d",
ptr->backup_router ? "Backup router" : "Router",
SILC_LOG_DEBUG(("%s connection [%s] %s:%d",
ptr->backup_router ? "Backup router" : "Router",
@@
-761,18
+768,7
@@
SILC_TASK_CALLBACK(silc_server_connect_to_router)
(void *)sconn, 0, 1, SILC_TASK_TIMEOUT,
SILC_TASK_PRI_NORMAL);
}
(void *)sconn, 0, 1, SILC_TASK_TIMEOUT,
SILC_TASK_PRI_NORMAL);
}
-
- if (!ptr->next)
- return;
-
- ptr = ptr->next;
}
}
-
- SILC_LOG_DEBUG(("No router(s), server will be standalone"));
-
- /* There wasn't a configured router, we will continue but we don't
- have a connection to outside world. We will be standalone server. */
- server->standalone = TRUE;
}
/* Second part of connecting to router(s). Key exchange protocol has been
}
/* Second part of connecting to router(s). Key exchange protocol has been