| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
This took some refactoring, and gave an opportunity to notice
a few error variants that weren't being used, or didn't mean
what they said on the tin.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Additionally, refactor the IoError out of tor_cell::Error:
nothing in TorCell created this; it was only used by tor_proto.
This required refactoring in tor_proto to use a new error type. Here I
decided to use a new CodecError for now, though we may refactor that
away soon too.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Refactor tor-netdoc a bit more, to use Bug right.
See merge request tpo/core/arti!316
|
| | | | | |
|
| | | |/
| |/| |
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
Move persistent state flush from client to circmgr
See merge request tpo/core/arti!321
|
| |/ / |
|
| | |
| |
| |
| | |
This is a followup for !314 and !310 to fix compilation on main.
|
| |\ \
| |/
|/|
| |
| | |
Refactor errors in tor-netdoc
See merge request tpo/core/arti!314
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This error type doesn't impement HasKind, since the kind will depend
on context.
However, the existing implementation was pretty messy and inconsistent:
Some errors had positions, some didn't.
Some took messages as str, some as String.
Some had internal errors that were somewhat orthogonal to their actual
types.
This commit refactors tor_netdoc::Error to use a ParseErrorKind, and
adds a set of convenience functions to add positions and
messages to the errors that need them.
|
| | |
| |
| |
| |
| | |
Every other case of tor_netdoc::Error means a parse failure. This one,
though, means a failure to construct a document.
|
| | |
| |
| |
| | |
Nothing creates this.
|
| |\ \
| | |
| | |
| | |
| | | |
New name and semantics for Bug (was BadArgument)
See merge request tpo/core/arti!310
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/310#note_2777626
The message from the kind is precisely right.
|
| | | |
| | |
| | |
| | | |
Now it maches the others
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/310#note_2777519
mutatis mutandi.
And, fix a leftover instance with an old idea of what this was called.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Including supporting machinery, new kind field, etc.
|
| |/ / |
|
| |\ \
| | |
| | |
| | |
| | | |
Provide, and use From impl for InternalError
See merge request tpo/core/arti!315
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adding this autoconversion is quite safe since every error generation
site is explicit and has its own context, and we don't really need to
add more.
This simplifies the code and will simplify future work.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
More docs for IntoTorAddr
Closes #253
See merge request tpo/core/arti!305
|
| | |/ / |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Simplify wait_for_bootstrap to use a Mutex.
Closes #337
See merge request tpo/core/arti!308
|
| | | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | | |
Since the only purpose of this function is to make sure that no
bootstrapping task is running, a simple futures::lock::Mutex
should do the job just fine.
Closes #337.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Change deny(clippy::all) to warn(clippy::all).
Closes #338
See merge request tpo/core/arti!306
|
| | |/ /
| | |
| | |
| | | |
Closes #338.
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We should not generally explicitly specify a kind for errors which
contain a more detailed error which itself has a kind. Stating the
kind literally is a latent bug, which becomes a real bug if the
contained type's kind changes or starts to vary.
(There may be exceptions to this principle but this isn't one of
them.)
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Split up ErrorKind::ProtocolViolation
See merge request tpo/core/arti!312
|
| | |/ / / |
|
| |\ \ \ \
| |_|_|/
|/| | |
| | | |
| | | | |
Split up ErrorKind::NoSupport
See merge request tpo/core/arti!311
|
| | | | | |
|
| | |/ / |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Clarify ErrorKind::InvalidConfigTransition
See merge request tpo/core/arti!309
|
| | |/ / |
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
dirmgr: Remove a useless Ok(x?)
See merge request tpo/core/arti!307
|
| | |/
| |
| |
| | |
Found by nightly clippy.
|
| |\ \
| |/
|/|
| |
| | |
Use atomic set-and-check to update OptTimestamps if none.
See merge request tpo/core/arti!297
|
| | |
| |
| |
| |
| |
| |
| | |
This fixes a tiny race condition in the previous code, where we
checked whether an OptTimestamp is None a bit before we set it.
Since std::atomic gives us compare_exchange, we might as well use
it.
|
| | |
| |
| |
| | |
(Looks like this one got missed.)
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Allow creating unbootstrapped `TorClient`s (and `DirMgr`s)
Closes #293
See merge request tpo/core/arti!298
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit changes how the `TorClient` type works, enabling it to be
constructed synchronously without initiating the bootstrapping process.
Daemon tasks are still started on construction (although some of them
won't do anything if the client isn't bootstrapped).
The old bootstrap() methods are now reimplemented in terms of the new
create_unbootstrapped() and bootstrap_existing() methods.
This required refactoring how the `DirMgr` works to enable the same sort
of thing there.
closes #293
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Write some examples for TorClient::connect()
See merge request tpo/core/arti!303
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
These should explain better what you can pass as an address, and
what you should do if you _really need_ to provide a SocketAddr or
something.
|