summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-11-15 03:05:33 +0000
committerpjd <pjd@FreeBSD.org>2010-11-15 03:05:33 +0000
commit781dd0dfd84b7c786467776fa290aea6faf572f7 (patch)
treea02056faf03fa3cd8a7a3028d960f8deb17d3c85 /sbin
parent9b2e43a4a4c40ace33486ac50f36ecab7966ab5a (diff)
downloadFreeBSD-src-781dd0dfd84b7c786467776fa290aea6faf572f7.zip
FreeBSD-src-781dd0dfd84b7c786467776fa290aea6faf572f7.tar.gz
1. Exit when we cannot create incoming connection.
2. Improve logging to inform which connection can't be created. Submitted by: [1] Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
Diffstat (limited to 'sbin')
-rw-r--r--sbin/hastd/primary.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/hastd/primary.c b/sbin/hastd/primary.c
index baa0dac..cfc2508 100644
--- a/sbin/hastd/primary.c
+++ b/sbin/hastd/primary.c
@@ -511,7 +511,8 @@ init_remote(struct hast_resource *res, struct proto_conn **inp,
/* Prepare outgoing connection with remote node. */
if (proto_client(res->hr_remoteaddr, &out) < 0) {
- primary_exit(EX_TEMPFAIL, "Unable to create connection to %s",
+ primary_exit(EX_TEMPFAIL,
+ "Unable to create outgoing connection to %s",
res->hr_remoteaddr);
}
/* Try to connect, but accept failure. */
@@ -577,7 +578,8 @@ init_remote(struct hast_resource *res, struct proto_conn **inp,
* Setup incoming connection with remote node.
*/
if (proto_client(res->hr_remoteaddr, &in) < 0) {
- pjdlog_errno(LOG_WARNING, "Unable to create connection to %s",
+ primary_exit(EX_TEMPFAIL,
+ "Unable to create incoming connection to %s",
res->hr_remoteaddr);
}
/* Try to connect, but accept failure. */
OpenPOWER on IntegriCloud