cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: issues with pre-login to pkcs11 slots when using NSS

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Mon, 13 Jul 2009 23:52:15 +0200

On Monday 13 of July 2009 23:36:47 Claes Jakobsson wrote:
> Yeah, without the \n it doesn't give me any linebreaks and looking at
> the rest of libcurl it seems that \n is used pretty much everywhere.
> Maybe Daniel can shed some light on this.

Are you sure? I can see a negligible difference between Curl_infof() and
Curl_failf():

    if(len < BUFSIZE - 1) {
      data->state.buffer[len] = '\n';
      data->state.buffer[++len] = '\0';
    }

In another error handling the additional \n is present, too:

    fprintf(config->errors, "curl: (%d) %s\n", res,
            errorbuffer[0]? errorbuffer:
            curl_easy_strerror((CURLcode)res));

So my conclusion is that we need to write \n in infof() messages, but not in
failf() messages.

Kamil
Received on 2009-07-13