All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pete Zaitcev <zaitcev@redhat.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: Re: [Patch 1/1] CLD: Introduce the "New CLD" API
Date: Mon, 8 Feb 2010 18:46:49 -0700	[thread overview]
Message-ID: <20100208184649.51374774@redhat.com> (raw)
In-Reply-To: <4B700478.3020305@garzik.org>

On Mon, 08 Feb 2010 07:32:56 -0500
Jeff Garzik <jeff@garzik.org> wrote:

> - log param in cldc-dns should not be made conditional as an 
> undocumented side effect of ncld

I pulled, and it appears that you merged a code that crashes at the
first error message. We need something like this:

diff --git a/lib/cldc.c b/lib/cldc.c
index 7c30064..beb1e22 100644
--- a/lib/cldc.c
+++ b/lib/cldc.c
@@ -98,6 +98,15 @@ static void cldc_errlog(int prio, const char *fmt, ...)
 	va_end(ap);
 }
 
+static void ncld_nolog(int prio, const char *fmt, ...)
+{
+	;
+}
+
+static struct hail_log ncld_log = {
+	.func	= ncld_nolog
+};
+
 static int ack_seqid(struct cldc_session *sess, uint64_t seqid_le)
 {
 	XDR xdrs;
@@ -1297,7 +1306,7 @@ static int ncld_getsrv(char **hostp, unsigned short *portp)
 		return errno;
 	hostb[hostsz-1] = 0;
 
-	if (cldc_getaddr(&host_list, hostb, NULL))
+	if (cldc_getaddr(&host_list, hostb, &ncld_log))
 		return 1001;
 
 	/*
@@ -1490,7 +1499,7 @@ static struct cldc_ops ncld_ops = {
 	.timer_ctl	= ncld_p_timer_ctl,
 	.pkt_send	= ncld_p_pkt_send,
 	.event		= ncld_p_event,
-	.errlog		= NULL,
+	.errlog		= ncld_nolog,
 };
 
 static int ncld_new_sess(struct cldc_call_opts *copts, enum cle_err_codes errc)

Stubbing of ncld_ops is not related to the crash, but just for
consistency.

-- Pete

  parent reply	other threads:[~2010-02-09  1:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-07 19:15 [Patch 1/1] CLD: Introduce the "New CLD" API Pete Zaitcev
2010-02-07 22:26 ` Jeff Garzik
2010-02-08 12:32 ` Jeff Garzik
2010-02-09  0:30   ` Pete Zaitcev
2010-02-09  6:25     ` Jeff Garzik
2010-02-09  1:46   ` Pete Zaitcev [this message]
2010-02-09  2:06     ` Jeff Garzik
2010-02-09  2:17       ` Pete Zaitcev
2010-02-09  4:55         ` Jeff Garzik
2010-02-09  5:35           ` Pete Zaitcev
2010-02-09  6:03             ` Jeff Garzik
2010-02-14  0:52 ` Jeff Garzik
2010-02-18  0:05   ` Pete Zaitcev
2010-02-18  1:18     ` Jeff Garzik
2010-02-19  1:35       ` Pete Zaitcev
2010-02-19  2:41         ` Jeff Garzik
2010-02-19 22:23           ` Pete Zaitcev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100208184649.51374774@redhat.com \
    --to=zaitcev@redhat.com \
    --cc=hail-devel@vger.kernel.org \
    --cc=jeff@garzik.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.