diff --git a/include/toksvc/toksvc.h b/include/toksvc/toksvc.h index 894d496..b06b73f 100644 --- a/include/toksvc/toksvc.h +++ b/include/toksvc/toksvc.h @@ -183,6 +183,7 @@ struct toks_common_ctx { void * hroot; const char * sysroot; const char * logfile; + const char * refstr; char ** eargv; }; diff --git a/src/internal/toksvc_driver_impl.h b/src/internal/toksvc_driver_impl.h index 5e85ad3..8b112fe 100644 --- a/src/internal/toksvc_driver_impl.h +++ b/src/internal/toksvc_driver_impl.h @@ -341,10 +341,13 @@ static inline void toks_set_driver_refstr(const struct toks_driver_ctx * dctx, c if (ictx->refstr) { toks_free(ictx->refstr); ictx->refstr = 0; + ictx->cctx.refstr = 0; } - if (refstr && (ictx->refstr = toks_calloc(1,toks_strlen(refstr)+1))) + if (refstr && (ictx->refstr = toks_calloc(1,toks_strlen(refstr)+1))) { toks_strcpy(ictx->refstr,refstr); + ictx->cctx.refstr = ictx->refstr; + } } static inline void toks_query_performance_counters(const struct toks_driver_ctx * dctx, nt_filetime * ticks)