Commit Graph

11 Commits

Author SHA1 Message Date
Jason Rhinelander b0edf998f8
Fix python binding segfault
This fixes a segfault in the reply handling code, where the destructor
of a `py::function` wasn't necessarily happening with the GIL held,
which could make Python segfault.

The solution that was here to address this didn't work because it was
relying on std::optionals, but it is possible (and apparently sometimes
happens) that the std::function this lambda gets stuffed into gets moved
(or maybe copied?), which then results in *two* lambda destructions: we
were correctly dealing with the one that eventually gets called by
clearing things properly when it gets called, but the temporary
destructor also fires, and that is the one that broke.

This changes it to instead leak bare pointers into the lambda and then
recapture them inside when we get called; since we are guaranteed to be
called exactly once, this recaptures them without losing them but
doesn't incur destruction of a py::function deep in oxenmq (outside of
GIL scope).
2023-09-27 16:06:08 -03:00
Jason Rhinelander 6e50822bc9
Expose setting auth level on outgoing connection
This is necessary to allow a remote to issue authenticated commands back
to us.
2023-03-08 17:31:49 -04:00
Jason Rhinelander f62fa4916f
Remove base32z encoding
We have pyoxenc for that instead.
2022-08-04 13:31:22 -03:00
Jason Rhinelander 36e32066d0
Version bump 2021-12-03 13:10:19 -04:00
Jason Rhinelander 530280ac60
Fix allow function argument decoding error
Avoids a utf-8 decoding error when accepting a connection with an allow
function by properly wrapping the function in a version that passes
pubkey as a `bytes`.
2021-12-02 15:14:54 -04:00
Jason Rhinelander 6a382865b2 Remove cmake build system and submodules
setup.py works fine, and we don't need two separate build systems.

Remove the submodules as well because we aren't using them and don't
need them; you should install pybind11 and oxenmq outside this project.
2021-10-22 16:09:36 -03:00
Jason Rhinelander a98722a7da pyoxenmq overhaul
- Wrap much more of the OxenMQ
- Add extensive pydoc to everything
- Switch setup.py to pybind's built-in tools
2021-10-21 22:23:02 -03:00
Jeff Becker 4597f5ca6c
loki -> oxen refactor
* rename all namespaces so it compiles again
2021-02-01 10:48:27 -05:00
Jeff Becker 5ebc6ee614
add lokinet.auth package 2020-11-09 08:51:40 -05:00
Jeff Becker 3787a12fcd
package lokinet package 2020-11-09 08:32:28 -05:00
Jeff 8a6bdde9a1 add setuptools files 2020-09-24 11:35:25 -04:00