revise Filip's patch so that it more closely mimics the select() path

This commit is contained in:
Nalin Dahyabhai 2012-09-10 18:47:48 -04:00
parent a4ad97ae22
commit 3e1f3982d4
2 changed files with 18 additions and 15 deletions

View File

@ -1,14 +1,17 @@
Filip Krska's patch to abort the current pass after poll() returns when When wrapping poll(), if we compute a negative timeout, just return a
we've given it an indefinite timeout. no-results status, as the krb5int_cm_call_select() wrapper for select()
does. Based on a patch by Filip Krska.
--- krb5/src/lib/krb5/os/sendto_kdc.c --- krb5/src/lib/krb5/os/sendto_kdc.c
+++ krb5/src/lib/krb5/os/sendto_kdc.c +++ krb5/src/lib/krb5/os/sendto_kdc.c
@@ -529,6 +529,8 @@ cm_select_or_poll(const struct select_st @@ -523,6 +523,10 @@ cm_select_or_poll(const struct select_st
*out = *in; return e;
*sret = poll(out->fds, out->nfds, timeout); timeout = (in->end_time.tv_sec - now.tv_sec) * 1000 +
e = SOCKET_ERRNO; (in->end_time.tv_usec - now.tv_usec) / 1000;
+ if (timeout < 0) + if (timeout < 0) {
+ return e; + *sret = 0;
return (*sret < 0) ? e : 0; + return 0;
#else + }
/* Use the select wrapper from cm.c. */ }
/* We don't need a separate copy of the selstate for poll, but use one
* anyone for consistency with the select wrapper. */

View File

@ -852,11 +852,11 @@ exit 0
%{_sbindir}/uuserver %{_sbindir}/uuserver
%changelog %changelog
* Fri Sep 6 2012 Nalin Dahyabhai <nalin@redhat.com> 1.10.3-5 * Mon Sep 10 2012 Nalin Dahyabhai <nalin@redhat.com> 1.10.3-5
- add patch from Filip Krska to abort a transmit attempt when we've given - add patch based on one from Filip Krska to not call poll() with a negative
poll() a negative timeout (#838548) timeout when the caller's intent is for us to just stop calling it (#838548)
* Fri Sep 6 2012 Nalin Dahyabhai <nalin@redhat.com> * Fri Sep 7 2012 Nalin Dahyabhai <nalin@redhat.com>
- on EL6, conflict with libsmbclient before 3.5.10-124, which is when it - on EL6, conflict with libsmbclient before 3.5.10-124, which is when it
stopped linking with a symbol which we no longer export (#771687) stopped linking with a symbol which we no longer export (#771687)
- pull up patch for RT#7063, in which not noticing a prompt for a long - pull up patch for RT#7063, in which not noticing a prompt for a long