[SCM] Samba Shared Repository - branch v3-4-test updated
Karolin Seeger
kseeger at samba.org
Thu Oct 22 08:32:58 MDT 2009
The branch, v3-4-test has been updated
via a572c28... Fix bug 6828 - infinite timeout occurs when byte lock held outside of samba Jeremy.
from f383e5f... s3: Don't fail authentication when one or some group of require-membership-of is invalid.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test
- Log -----------------------------------------------------------------
commit a572c28ca3daa199d78fc340819c5c9ff53a3ed6
Author: Jeremy Allison <jra at samba.org>
Date: Tue Oct 20 18:10:30 2009 -0700
Fix bug 6828 - infinite timeout occurs when byte lock held outside of samba Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/blocking.c | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index 4284993..f4d88d8 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -48,6 +48,22 @@ static void brl_timeout_fn(struct event_context *event_ctx,
}
/****************************************************************************
+ We need a version of timeval_min that treats zero timval as infinite.
+****************************************************************************/
+
+static struct timeval timeval_brl_min(const struct timeval *tv1,
+ const struct timeval *tv2)
+{
+ if (timeval_is_zero(tv1)) {
+ return *tv2;
+ }
+ if (timeval_is_zero(tv2)) {
+ return *tv1;
+ }
+ return timeval_min(tv1, tv2);
+}
+
+/****************************************************************************
After a change to blocking_lock_queue, recalculate the timed_event for the
next processing.
****************************************************************************/
@@ -70,19 +86,13 @@ static bool recalc_brl_timeout(void)
*/
if (blr->blocking_pid == 0xFFFFFFFF) {
struct timeval psx_to = timeval_current_ofs(10, 0);
- next_timeout = timeval_min(&next_timeout, &psx_to);
+ next_timeout = timeval_brl_min(&next_timeout, &psx_to);
}
continue;
}
- if (timeval_is_zero(&next_timeout)) {
- next_timeout = blr->expire_time;
- }
- else {
- next_timeout = timeval_min(&next_timeout,
- &blr->expire_time);
- }
+ next_timeout = timeval_brl_min(&next_timeout, &blr->expire_time);
}
if (timeval_is_zero(&next_timeout)) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list