Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Nov 2010 03:05:33 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r215331 - head/sbin/hastd
Message-ID:  <201011150305.oAF35Xu1002233@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Mon Nov 15 03:05:33 2010
New Revision: 215331
URL: http://svn.freebsd.org/changeset/base/215331

Log:
  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

Modified:
  head/sbin/hastd/primary.c

Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c	Mon Nov 15 02:27:01 2010	(r215330)
+++ head/sbin/hastd/primary.c	Mon Nov 15 03:05:33 2010	(r215331)
@@ -511,7 +511,8 @@ init_remote(struct hast_resource *res, s
 
 	/* 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, s
 	 * 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. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011150305.oAF35Xu1002233>