Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CA provider's threadAttach() doesn't disconnect an already-attached context #83

Closed
anjohnson opened this issue Jan 27, 2018 · 1 comment
Assignees
Labels

Comments

@anjohnson
Copy link
Member

If a program creates its own CA context and also happens to use the PVA CA provider, the threadAttach() method's call to

     ca_attach_context(current_context);

will fail silently, and subsequent CA calls inside the provider will fail. Fixing this will probably require some re-engineering of how the context is set to implement an RAII object that saves the CA context of the caller and temporarily instantiates our own, then restores theirs on exit if it was non-zero (similar to a mutex guard object).

Low priority since this isn't likely to be a common thing to want to do.

@anjohnson
Copy link
Member Author

Assume closed by #167

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants