| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
| |
When shutting down we can't join on _thread unless the socket receives data
because we didn't have a timeout. This issues a 20 ms timeout on socket reads
and cleans up _thread when we close.
|
| |
|
|
| |
Also remove some traceback debugging statements.
|
| |
|
|
| |
It may be silently killing the bwauths on some platforms..
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| |\ \
| |/ |
|
| | | |
|
| |/
|
|
| |
Useful to grab the original raw event for debugging/logging.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
It was tracking the Tor client's notion of the consensus, in a poor way. It
now can do one or the other, depending on constructor option.
Also, add some APIs that are helpful for torperf.
|
| |\ |
|
| | | |
|
| | |
| |
| |
| |
| | |
Oops - apparently I used a Python 2.5ism in trying to remove a
Python 2.5ism :)
|
| |/
|
|
|
| |
Commit 33bf5a0a4a9 broke python 2.4 compat by using string.partition(),
introduced in Python 2.5. Use string.split() instead.
|
| |
|
|
|
| |
Now that copyright infringement is the #1 priority of the FBI,
we need to stop doing quite so much of it.
|
| |
|
|
|
| |
Need to escape the dot character to get the intended
behavior.
|
| |
|
|
|
|
| |
By only running one regular expression per descriptor line and
performing a slightly better way of checking which line type
we're handling, we cut the run time of build_from_desc in half.
|
| |
|
|
|
|
|
| |
Allow callers to handle a specific status code as an integer as well as
the associated message within an ErrorReply exception. Should be API-compatible
as the associated keyword arguments are popped from the **kwarg dict before
being passed to the parent exception class.
|
| |
|
|
|
|
|
|
|
| |
If an unknown exception is raised on one NS document during
read_routers, it's very likely it's going to be raised again on the
next, and the next... (e.g., TorCtlClosed).
Instead of printing out the traceback and continuing, allow it to
unwind the stack and let the caller handle it.
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch converts plog() to map to Python's logging module without
changing API compatibility. If an application wishes to integrate
its own Python logger with TorCtl, it can call TorUtil.plog_use_logger
with the name of the desired logger. Otherwise, TorUtil will create
its own logger that retains its original log format and emission behavior.
This patch retains the standard plog() loglevels and maps them to
logging constants where appropriate.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Do not return from wait_for_consensus unless we have at least 95% of all of
our router descriptors.
Also, sanity check that we aren't storing waay too many router descriptors.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
I should really figure out why this is happening, and which other queries
might need this... SQLAlchemy said we needed it on this line (in some rare
case - not always). Possible SQLAlchemy bug/corruption?
|
| | |
|
| |
|
|
|
|
| |
Previous expression "\d+.\d+.\d+.\d+" matches many many things which are
probably not intended. Use "(\d{1,3}\.){3}\d{1,3}$" instead and compile it for
efficiency.
|
| |
|
|
|
|
|
|
|
| |
ExitPolicyLine parses IP/netmask combinations and supports CIDR notation.
The previous method for calculating an IPv4 netmask from a CIDR prefix length
causes the result to exceed 32 bits, but the result is never truncated,
causing a DeprecationWarning on 64-bit platforms when the integer is packed.
Use a better method for the calculation that always fits in 32 bits.
|
| | |
|
| |
|
|
| |
git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@22439 55e972cd-5a19-0410-ae62-a4d7a52db4cd
|
| |
|
|
|
|
|
|
| |
Python 2.5+.
git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@22379 55e972cd-5a19-0410-ae62-a4d7a52db4cd
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
this provides a more reliable indication as to when we are
done processing events on the connection.
For some reason python's socket.close() does not cause a
concurrent blocking readline() to return immediately.. This
prevents the 'TorThread' (the _loop() thread) from
terminating until more data arrives.
git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@22378 55e972cd-5a19-0410-ae62-a4d7a52db4cd
|
| |
|
|
|
|
|
|
|
| |
track down a rare bw authority stall bug that may be related
to excessive server load/queue delay.
git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@22376 55e972cd-5a19-0410-ae62-a4d7a52db4cd
|
| |
|
|
|
|
|
|
| |
time to fetch them.
git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@21779 55e972cd-5a19-0410-ae62-a4d7a52db4cd
|
| |
|
|
| |
git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@21710 55e972cd-5a19-0410-ae62-a4d7a52db4cd
|
| |
|
|
|
|
|
|
|
|
|
| |
hates.
Also wait a bit more for stray descriptors to arrive before
deciding to update our consensus statistics.
git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@21685 55e972cd-5a19-0410-ae62-a4d7a52db4cd
|
| |
|
|
| |
git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@21409 55e972cd-5a19-0410-ae62-a4d7a52db4cd
|
| |
|
|
| |
git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@21401 55e972cd-5a19-0410-ae62-a4d7a52db4cd
|
| |
|
|
| |
git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@21242 55e972cd-5a19-0410-ae62-a4d7a52db4cd
|
| |
|
|
|
|
|
|
| |
occasionally during consensus updates.
git-svn-id: https://svn.torproject.org/svn/torctl/trunk/python/TorCtl@21104 55e972cd-5a19-0410-ae62-a4d7a52db4cd
|