added error immunity check for the log_write callback

This commit is contained in:
hyunghwan.chung
2018-02-22 04:44:34 +00:00
parent fb3919786f
commit 420ee09907
5 changed files with 49 additions and 17 deletions

View File

@@ -175,7 +175,7 @@ void moo_fini (moo_t* moo)
{
/* flush pending log messages just in case. */
MOO_ASSERT (moo, moo->log.ptr != MOO_NULL);
moo->vmprim.log_write (moo, moo->log.last_mask, moo->log.ptr, moo->log.len);
vmprim_log_write (moo, moo->log.last_mask, moo->log.ptr, moo->log.len);
}
for (cb = moo->cblist; cb; cb = cb->next)
@@ -191,7 +191,7 @@ void moo_fini (moo_t* moo)
* this point because one of the callbacks could arrange to stop
* logging */
MOO_ASSERT (moo, moo->log.ptr != MOO_NULL);
moo->vmprim.log_write (moo, moo->log.last_mask, moo->log.ptr, moo->log.len);
vmprim_log_write (moo, moo->log.last_mask, moo->log.ptr, moo->log.len);
}
/* deregister all callbacks */