Re: [Patch 1/1] CLD: Introduce the "New CLD" API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 08 Feb 2010 07:32:56 -0500
Jeff Garzik <jeff@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Fedora Clound]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux