aboutsummaryrefslogtreecommitdiff
path: root/libpager/demuxer.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpager/demuxer.c')
-rw-r--r--libpager/demuxer.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/libpager/demuxer.c b/libpager/demuxer.c
index f233d1c0..79c0ddc5 100644
--- a/libpager/demuxer.c
+++ b/libpager/demuxer.c
@@ -1,5 +1,5 @@
/* Demuxer for pager library
- Copyright (C) 1994, 1995 Free Software Foundation
+ Copyright (C) 1994, 1995, 2002, 2011 Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -20,7 +20,7 @@
#include "notify_S.h"
/* Demultiplex a single message directed at a pager port; INP is the
- message received; fille OUTP with the reply. */
+ message received; fill OUTP with the reply. */
int
pager_demuxer (mach_msg_header_t *inp,
mach_msg_header_t *outp)
@@ -29,8 +29,12 @@ 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);
-
- return (_pager_seqnos_memory_object_server (inp, outp)
- || _pager_seqnos_notify_server (inp, outp));
-}
+ int result = _pager_seqnos_memory_object_server (inp, outp)
+ || _pager_seqnos_notify_server (inp, outp);
+ if (!result)
+ /* Synchronize our bookkeeping of the port's seqno with the one consumed by
+ this bogus message. */
+ _pager_update_seqno (inp->msgh_local_port, inp->msgh_seqno);
+ return result;
+}