From 6bcfe2f60e77d864ab6307a81cdf2e8621a822e0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 19 Jan 2002 23:47:28 +0000 Subject: 2002-01-19 Roland McGrath * demuxer.c (pager_demuxer): Fix last change so it works. Add comment. --- libpager/demuxer.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libpager/demuxer.c b/libpager/demuxer.c index 0bd56b4e..87a640ee 100644 --- a/libpager/demuxer.c +++ b/libpager/demuxer.c @@ -29,7 +29,7 @@ pager_demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp); extern int _pager_seqnos_notify_server (mach_msg_header_t *inp, mach_msg_header_t *outp); - + int result = _pager_seqnos_memory_object_server (inp, outp) || _pager_seqnos_notify_server (inp, outp); if (!result) @@ -39,15 +39,14 @@ pager_demuxer (mach_msg_header_t *inp, p = ports_lookup_port (0, inp->msgh_remote_port, _pager_class); if (p) { + /* Synchronize our bookkeeping of the port's seqno with + the one consumed by this bogus message. */ mutex_lock (&p->interlock); - _pager_wait_for_seqno (p, seqno); - _pager_release_seqno (p, seqno); + _pager_wait_for_seqno (p, inp->msgh_seqno); + _pager_release_seqno (p, inp->msgh_seqno); mutex_unlock (&p->interlock); ports_port_deref (p); } } return result; } - - - -- cgit v1.2.3