All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Thiago Farina <tfransosi@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: socket_perror() "bug"?
Date: Thu, 03 Apr 2014 12:01:32 -0700	[thread overview]
Message-ID: <xmqq1txeqltf.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CACnwZYf30KLVLkaB4mNrW12DHwrf=RT7H-DBNvQYs0y6RqVGLw@mail.gmail.com> (Thiago Farina's message of "Wed, 2 Apr 2014 20:05:01 -0300")

Thiago Farina <tfransosi@gmail.com> writes:

> On Mon, Mar 31, 2014 at 5:50 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Thiago Farina <tfransosi@gmail.com> writes:
>>
>>> In imap-send.c:socket_perror() we pass |func| as a parameter, which I
>>> think it is the name of the function that "called" socket_perror, or
>>> the name of the function which generated an error.
>>>
>>> But at line 184 and 187 it always assume it was SSL_connect.
>>>
>>> Should we instead call perror() and ssl_socket_error() with func?
>>
>> Looks that way to me, at least from a cursory look.
> Would you accept such a patch?

This back-and-forth makes me wonder what is going on.  Why not send
a full patch with a proper proposed commit log message to the list
and see what happens?

> diff --git a/imap-send.c b/imap-send.c
> index 0bc6f7f..bb04768 100644
> --- a/imap-send.c
> +++ b/imap-send.c
> @@ -181,10 +181,10 @@ static void socket_perror(const char *func,
> struct imap_socket *sock, int ret)
>                 case SSL_ERROR_NONE:
>                         break;
>                 case SSL_ERROR_SYSCALL:
> -                       perror("SSL_connect");
> +                       perror(func);
>                         break;
>                 default:
> -                       ssl_socket_perror("SSL_connect");
> +                       ssl_socket_perror(func);
>                         break;
>                 }
>         } else
>
> --
> Thiago Farina

      reply	other threads:[~2014-04-03 19:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-30 19:32 socket_perror() "bug"? Thiago Farina
2014-03-31 20:50 ` Junio C Hamano
2014-04-02 23:05   ` Thiago Farina
2014-04-03 19:01     ` Junio C Hamano [this message]

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=xmqq1txeqltf.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=tfransosi@gmail.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.