684b80 driver: slbt_get_driver_ctx(): properly record the envp parameter.

Authored and Committed by midipix 3 years ago
    driver: slbt_get_driver_ctx(): properly record the envp parameter.
    
        
file modified
+4 -2
src/driver/slbt_driver_ctx.c CHANGED
@@ -220,7 +220,8 @@ static struct slbt_driver_ctx_impl * slbt_driver_ctx_alloc(
220
220
struct argv_meta * meta,
221
221
const struct slbt_fd_ctx * fdctx,
222
222
const struct slbt_common_ctx * cctx,
223
- struct slbt_split_vector * sargv)
223
+ struct slbt_split_vector * sargv,
224
+ char ** envp)
224
225
{
225
226
struct slbt_driver_ctx_alloc * ictx;
226
227
size_t size;
@@ -237,6 +238,7 @@ static struct slbt_driver_ctx_impl * slbt_driver_ctx_alloc(
237
238
ictx->ctx.dargv = sargv->dargv;
238
239
ictx->ctx.targv = sargv->targv;
239
240
ictx->ctx.cargv = sargv->cargv;
241
+ ictx->ctx.envp = envp;
240
242
241
243
memcpy(&ictx->ctx.fdctx,fdctx,sizeof(*fdctx));
242
244
memcpy(&ictx->ctx.cctx,cctx,sizeof(*cctx));
@@ -1701,7 +1703,7 @@ int slbt_get_driver_ctx(
1701
1703
cctx.tag = SLBT_TAG_CC;
1702
1704
1703
1705
/* driver context */
1704
- if (!(ctx = slbt_driver_ctx_alloc(meta,fdctx,&cctx,&sargv)))
1706
+ if (!(ctx = slbt_driver_ctx_alloc(meta,fdctx,&cctx,&sargv,envp)))
1705
1707
return slbt_get_driver_ctx_fail(0,meta);
1706
1708
1707
1709
/* ctx */