moved becbuf from hio to htts

This commit is contained in:
2023-02-21 01:08:28 +09:00
parent 2ecfc9be39
commit d055e7b0d5
9 changed files with 42 additions and 59 deletions

View File

@@ -24,7 +24,6 @@
#include "hio-prv.h"
#include <hio-fmt.h>
#include <hio-ecs.h>
#include <stdlib.h> /* malloc, free, etc */
#define DEV_CAP_ALL_WATCHED (HIO_DEV_CAP_IN_WATCHED | HIO_DEV_CAP_OUT_WATCHED | HIO_DEV_CAP_PRI_WATCHED)
@@ -124,9 +123,6 @@ int hio_init (hio_t* hio, hio_mmgr_t* mmgr, hio_cmgr_t* cmgr, hio_bitmask_t feat
hio->log.ptr = hio_allocmem(hio, (hio->log.capa + 1) * HIO_SIZEOF(*hio->log.ptr));
if (HIO_UNLIKELY(!hio->log.ptr)) goto oops;
hio->becbuf = hio_becs_open(hio, 0, 256);
if (HIO_UNLIKELY(!hio->becbuf)) goto oops;
/* inititalize the system-side logging */
if (HIO_UNLIKELY(hio_sys_init(hio) <= -1)) goto oops;
sys_inited = 1;
@@ -153,7 +149,6 @@ oops:
if (sys_inited) hio_sys_fini (hio);
if (hio->becbuf) hio_freemem (hio, hio->becbuf);
if (hio->log.ptr) hio_freemem (hio, hio->log.ptr);
hio->log.capa = 0;
return -1;
@@ -250,12 +245,6 @@ void hio_fini (hio_t* hio)
hio_sys_fini (hio); /* finalize the system dependent data */
if (hio->becbuf)
{
hio_becs_close (hio->becbuf);
hio->becbuf = HIO_NULL;
}
if (hio->log.ptr)
{
hio_freemem (hio, hio->log.ptr);