made hcl immune to an error number/message set in the log_write callback

This commit is contained in:
2018-02-22 04:35:55 +00:00
parent 6e4a8f6081
commit a39e38cc8d
5 changed files with 45 additions and 18 deletions

View File

@ -169,7 +169,7 @@ void hcl_fini (hcl_t* hcl)
{
/* flush pending log messages just in case. */
HCL_ASSERT (hcl, hcl->log.ptr != HCL_NULL);
hcl->vmprim.log_write (hcl, hcl->log.last_mask, hcl->log.ptr, hcl->log.len);
vmprim_log_write (hcl, hcl->log.last_mask, hcl->log.ptr, hcl->log.len);
}
for (cb = hcl->cblist; cb; cb = cb->next)
@ -184,7 +184,7 @@ void hcl_fini (hcl_t* hcl)
* this point because one of the callbacks could arrange to stop
* logging */
HCL_ASSERT (hcl, hcl->log.ptr != HCL_NULL);
hcl->vmprim.log_write (hcl, hcl->log.last_mask, hcl->log.ptr, hcl->log.len);
vmprim_log_write (hcl, hcl->log.last_mask, hcl->log.ptr, hcl->log.len);
}
/* deregister all callbacks */