From dad0cabdf7fb858d946de657beea01ca1e27527f Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Thu, 30 May 2013 15:24:41 +0100 Subject: [PATCH] Guard the calls to mps_io_flush so that it can only be called after mps_io_create. Copied from Perforce Change: 182322 ServerID: perforce.ravenbrook.com --- mps/code/event.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mps/code/event.c b/mps/code/event.c index 4afa03c63ab..288b43afa17 100644 --- a/mps/code/event.c +++ b/mps/code/event.c @@ -1,7 +1,7 @@ /* event.c: EVENT LOGGING * * $Id$ - * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. + * Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license. * * .sources: mps.design.event * @@ -142,11 +142,12 @@ void EventSync(void) } } - /* If we wrote out events, send an EventClockSync event */ - if (wrote) + /* If we wrote out events, send an EventClockSync event and flush + the telemetry stream. */ + if (wrote) { (void)eventClockSync(); - - (void)mps_io_flush(eventIO); + (void)mps_io_flush(eventIO); + } } @@ -515,7 +516,7 @@ extern void EventDump(mps_lib_FILE *stream) /* C. COPYRIGHT AND LICENSE * - * Copyright (C) 2001-2002 Ravenbrook Limited . + * Copyright (C) 2001-2013 Ravenbrook Limited . * All rights reserved. This is an open source license. Contact * Ravenbrook for commercial licensing options. *