diff options
author | midipix <writeonce@midipix.org> | 2015-12-31 03:30:03 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-01-01 22:50:25 -0500 |
commit | 7a622c84067e5298d9f9a3f3d78bc3da04896c96 (patch) | |
tree | c4b16edf2f1041fec314889f6378fddc4ea1cceb /src/driver | |
parent | 2e2787b729b930585459ca13e6698130b0d08978 (diff) | |
download | apimagic-7a622c84067e5298d9f9a3f3d78bc3da04896c96.tar.bz2 apimagic-7a622c84067e5298d9f9a3f3d78bc3da04896c96.tar.xz |
ammgc_get_unit_entities(): initial implementation and integration.
Diffstat (limited to 'src/driver')
-rw-r--r-- | src/driver/amgc_unit_ctx.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/driver/amgc_unit_ctx.c b/src/driver/amgc_unit_ctx.c index 4da986a..334ee32 100644 --- a/src/driver/amgc_unit_ctx.c +++ b/src/driver/amgc_unit_ctx.c @@ -22,6 +22,9 @@ static int amgc_free_unit_ctx_impl(struct amgc_unit_ctx_impl * ctx, int status) { if (ctx) { + if (ctx->entities) + amgc_free_unit_entities(ctx->entities); + amgc_unmap_input(&ctx->map); free(ctx); } @@ -155,9 +158,10 @@ int amgc_get_unit_ctx( ctx->uctx.map = &ctx->map; ctx->uctx.cctx = &ctx->cctx; ctx->uctx.meta = &ctx->meta; + ctx->uctx.entities = ctx->entities; ctx->uctx.ccunit= &ctx->ccunit; - if (amgc_init_unit_meta(&ctx->uctx,&ctx->meta)) + if (amgc_get_unit_entities(&ctx->uctx,&ctx->meta,&ctx->entities)) return amgc_free_unit_ctx_impl(ctx,-1); *pctx = &ctx->uctx; |