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

On 02/08/2010 08:46 PM, Pete Zaitcev wrote:
> 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:

So it successfully exposed locations that failed to propagate logging 
support.  :)


> 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;
>

Logging pointer should be supplied by the caller...  that is the larger 
bug.  Needing a no-op log function is just an indication of that.

	Jeff


  reply	other threads:[~2010-02-09  2:06 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
2010-02-09  2:06     ` Jeff Garzik [this message]
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=4B70C319.6040005@garzik.org \
    --to=jeff@garzik.org \
    --cc=hail-devel@vger.kernel.org \
    --cc=zaitcev@redhat.com \
    /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.