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

Re: [PATCH] Locally restart ssh_poll() upon EINTR.


Nice.  Thanks Aris!

On Mon, Feb 23, 2015 at 1:08 PM, Aris Adamantiadis <aris@xxxxxxxxxxxx>
wrote:

> Hi Seb,
>
> I found a way and commited your patch. Thanks!
>
> Aris
> Le 23/02/15 21:54, Aris Adamantiadis a écrit :
> > Hi Seb,
> >
> > I didn't see your email either, there should have been a problem the
> > first time. I want to merge your patch in but we've got some problems
> > with the redmine server (our ruby-on-rails fairy is still working on it:)
> > Could you send me again your patch in the git am format, to my email
> > address?
> >
> > Thanks,
> >
> > Aris
> > Le 18/02/15 21:51, Seb Boving a écrit :
> >> Anyone?
> >>
> >> (I don't see my post on http://www.libssh.org/archive/libssh/2015-02/,
> >> perhaps it didn't make it, but this should fix that.  Thanks!)
> >>
> >>
> >> On Thu, Feb 12, 2015 at 2:28 PM, Sebastien Boving <seb@xxxxxxxxxx
> >> <mailto:seb@xxxxxxxxxx>> wrote:
> >>
> >>     BUG: https://red.libssh.org/issues/186
> >>
> >>     Signed-off-by: Sebastien Boving <seb@xxxxxxxxxx
> >>     <mailto:seb@xxxxxxxxxx>>
> >>     ---
> >>      src/poll.c | 8 +++++++-
> >>      1 file changed, 7 insertions(+), 1 deletion(-)
> >>
> >>     diff --git a/src/poll.c b/src/poll.c
> >>     index 4e9f19f..dfa687a 100644
> >>     --- a/src/poll.c
> >>     +++ b/src/poll.c
> >>     @@ -597,11 +597,17 @@ int ssh_poll_ctx_dopoll(ssh_poll_ctx ctx,
> >>     int timeout) {
> >>        ssh_poll_handle p;
> >>        socket_t fd;
> >>        int revents;
> >>     +  struct ssh_timestamp ts;
> >>
> >>        if (!ctx->polls_used)
> >>          return SSH_ERROR;
> >>
> >>     -  rc = ssh_poll(ctx->pollfds, ctx->polls_used, timeout);
> >>     +  ssh_timestamp_init(&ts);
> >>     +  do {
> >>     +    int tm = ssh_timeout_update(&ts, timeout);
> >>     +    rc = ssh_poll(ctx->pollfds, ctx->polls_used, tm);
> >>     +  } while (rc == -1 && errno == EINTR);
> >>     +
> >>        if(rc < 0)
> >>          return SSH_ERROR;
> >>        if (rc == 0)
> >>     --
> >>     2.2.0.rc0.207.ga3a616c
> >>
> >>
> >
>
>
>

References:
Re: [PATCH] Locally restart ssh_poll() upon EINTR.Seb Boving <seb@xxxxxxxxxx>
Re: [PATCH] Locally restart ssh_poll() upon EINTR.Aris Adamantiadis <aris@xxxxxxxxxxxx>
Re: [PATCH] Locally restart ssh_poll() upon EINTR.Aris Adamantiadis <aris@xxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org