aboutsummaryrefslogtreecommitdiff
path: root/src/or/hibernate.c
Commit message (Collapse)AuthorAge
* Fix typo, spotted by tmpname0901. Thanks!Sebastian Hahn2011-10-28
|
* Correctly check elapsed time in last hibernation periodSebastian Hahn2011-04-29
| | | | Fix bug 3020.
* Log more about soft-hibernationNick Mathewson2011-01-25
|
* Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-03
|\ | | | | | | | | | | Conflicts: src/common/test.h src/or/test.c
| * Bump copyright statements to 2011Nick Mathewson2011-01-03
| |
* | Fix a bug in calculating wakeup time on 64-bit machines.Nick Mathewson2010-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you had TIME_MAX > INT_MAX, and your "time_to_exhaust_bw = accountingmax/expected_bandwidth_usage * 60" calculation managed to overflow INT_MAX, then your time_to_consider value could underflow and wind up being rediculously low or high. "Low" was no problem; negative values got caught by the (time_to_consider <= 0) check. "High", however, would get you a wakeup time somewhere in the distant future. The fix is to check for time_to_exhaust_bw overflowing INT_MAX, not TIME_MAX: We don't allow any accounting interval longer than a month, so if time_to_exhaust_bw is significantly larger than 31*24*60*60, we can just clip it. This is a bugfix on 0.0.9pre6, when accounting was first introduced. It fixes bug 2146, unless there are other causes there too. The fix is from boboper. (I tweaked it slightly by removing an assignment that boboper marked as dead, and lowering a variable that no longer needed to be function-scoped.)
* | Don't crash when accountingmax is set in non-server TorsNick Mathewson2010-12-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We use a hash of the identity key to seed a prng to tell when an accounting period should end. But thanks to the bug998 changes, clients no longer have server-identity keys to use as a long-term seed in accounting calculations. In any case, their identity keys (as used in TLS) were never never fixed. So we can just set the wakeup time from a random seed instead there. Still open is whether everybody should be random. This patch fixes bug 2235, which was introduced in 0.2.2.18-alpha. Diagnosed with help from boboper on irc.
* | Maintain separate server and client identity keys when appropriate.Robert Ransom2010-10-04
| | | | | | | | Fixes a bug described in ticket #988.
* | Merge branch 'bug1511'Nick Mathewson2010-09-23
|\ \
| * | Even more accurate handling for shifting accounting intervalsNick Mathewson2010-09-21
| | | | | | | | | | | | | | | | | | | | | Roger correctly pointed out that my code was broken for accounting periods that shifted forwards, since start_of_accounting_period_containing(interval_start_time) would not be equal to interval_start_time, but potentially much earlier.
| * | Tolerate a little skew in accounting intervals.Nick Mathewson2010-09-03
| | | | | | | | | | | | | | | | | | | | | This will make changes for DST still work, and avoid double-spending bytes when there are slight changes to configurations. Fixes bug 1511; the DST issue is a bugfix on 0.0.9pre5.
* | | Bug1789 cleanups suggested by armaNick Mathewson2010-09-21
| | | | | | | | | | | | The significant one is that we look at RelayBandwidthRate if it is set.
* | | finish a comment, lower a variableNick Mathewson2010-09-15
| | |
* | | How many seconds until != timestamp of that dateSebastian Hahn2010-09-15
| | |
* | | Base our expected bw accounting usage on time before soft limitNick Mathewson2010-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we were also considering the time spent in soft-hibernation. If this was a long time, we would wind up underestimating our bandwidth by a lot, and skewing our wakeup time towards the start of the accounting interval. This patch also makes us store a few more fields in the state file, including the time at which we entered soft hibernation. Fixes bug 1789. Bugfix on 0.0.9pre5.
* | | Use a more sophisticated soft-hibernation-limit calculationNick Mathewson2010-09-03
| | | | | | | | | | | | This should help address bug 1789.
* | | Remove an obsolete comment from hibernate.cNick Mathewson2010-09-03
|/ /
* | Create main.hSebastian Hahn2010-07-27
| |
* | Create hibernate.hSebastian Hahn2010-07-27
| |
* | Create connection_edge.hSebastian Hahn2010-07-27
| |
* | Create connection.hSebastian Hahn2010-07-27
| |
* | Create config.hSebastian Hahn2010-07-27
| |
* | Create router.hSebastian Hahn2010-07-27
| |
* | Make the controller act more usefully when GETINFO failsNick Mathewson2010-07-18
| | | | | | | | | | | | | | | | | | | | | | Right now it says "552 internal error" because there's no way for getinfo_helper_*() countries to specify an error message. This patch changes the getinfo_helper_*() interface, and makes most of the getinfo helpers give useful error messages in response to failures. This should prevent recurrences of bug 1699, where a missing GeoIPFile line in the torrc made GETINFO ip-to-county/* fail in a "not obvious how to fix" way.
* | Merge remote branch 'origin/maint-0.2.1'Nick Mathewson2010-02-27
|\| | | | | | | | | | | Conflicts: src/common/test.h src/or/test.c
| * Update Tor Project copyright yearsNick Mathewson2010-02-27
| |
* | Fix/annotate deadcode for CID 402,403Nick Mathewson2009-10-26
|/
* Spell-check Tor.Nick Mathewson2009-05-27
|
* Update copyright to 2009.Karsten Loesing2009-05-04
|
* Return -1 in the error case from read_bandwidth_usage.Sebastian Hahn2009-04-23
| | | | svn:r19367
* Remove svn $Id$s from our source, and remove tor --version --version.Nick Mathewson2009-01-04
| | | | | | | | The subversion $Id$ fields made every commit force a rebuild of whatever file got committed. They were not actually useful for telling the version of Tor files in the wild. svn:r17867
* Document most undocumented variables.Nick Mathewson2008-12-23
| | | | svn:r17754
* Add DOCDOC entries for undocumented static and global variables.Nick Mathewson2008-12-22
| | | | svn:r17739
* r14399@tombo: nickm | 2008-02-22 14:09:38 -0500Nick Mathewson2008-02-22
| | | | | | | More 64-to-32 fixes. Partial backport candidate. still not done. svn:r13680
* Update some copyright notices: it is now 2008.Nick Mathewson2008-02-07
| | | | svn:r13412
* clean up copyrights, and assign 2007 copyrights to The Tor Project, IncRoger Dingledine2007-12-12
| | | | svn:r12786
* r15877@catbus: nickm | 2007-10-17 12:54:56 -0400Nick Mathewson2007-10-17
| | | | | | | Make unverified-consensus get removed when it is accepted or rejected. Make a new get_datadir_fname*() set of functions to eliminate the common code of "get the options, get the datadir, append some stuff". svn:r12000
* r15806@catbus: nickm | 2007-10-15 19:14:57 -0400Nick Mathewson2007-10-15
| | | | | | | Implement v3 networkstatus client code. Remove v2 networkstatus client code, except as needed for caches to fetch and serve v2 networkstatues and the routers they list. svn:r11957
* r15749@catbus: nickm | 2007-10-13 20:06:06 -0400Nick Mathewson2007-10-14
| | | | | | | Remove support for long-obsolete bw_accounting file. svn:r11917
* r14659@catbus: nickm | 2007-08-18 14:19:34 -0400Nick Mathewson2007-08-18
| | | | | | | When we are loading state info from disk, never believe any date in the future. Doing so can keep us from retrying guards, rotating onion keys, storing bandwidth info, etc. Fixes bug 434, and others. Backport candidate, once it has been tested. svn:r11166
* r13908@catbus: nickm | 2007-07-25 18:55:47 -0400Nick Mathewson2007-07-25
| | | | | | | Patch from Robert Hogan: set conn->dns_server_port correctly so that we can close dns server ports when they change, thus avoiding crashes and dangling references and other sources of unhappiness. svn:r10933
* irix64's cc doesn't think hibernate_state_t is necessarily an int.Roger Dingledine2007-05-24
| | | | | | | good point. svn:r10320
* r12768@catbus: nickm | 2007-05-16 17:25:33 -0400Nick Mathewson2007-05-16
| | | | | | | Fix GCC warnings related to local parameters/variables getting shadowed. svn:r10198
* r12643@0-41-wifi: nickm | 2007-03-23 14:56:35 -0400Nick Mathewson2007-03-24
| | | | | | | Refactor a bunch of functions that take edge_connection_t not to also take a crypt_path_t; the cpath is implicit. svn:r9899
* r12474@Kushana: nickm | 2007-03-06 16:10:05 -0500Nick Mathewson2007-03-09
| | | | | | | We have a PATH_SEPARATOR macro. How about we use it? svn:r9782
* r11826@catbus: nickm | 2007-02-16 14:58:38 -0500Nick Mathewson2007-02-16
| | | | | | | Resolve 56 DOCDOC comments. svn:r9594
* r11775@catbus: nickm | 2007-02-12 16:39:09 -0500Nick Mathewson2007-02-12
| | | | | | | Update copyright dates. svn:r9570
* r11686@catbus: nickm | 2007-02-07 01:50:14 -0500Nick Mathewson2007-02-07
| | | | | | | Set hibernate_end_time whenever we start hibernating. This fixes a problem where we would start hibernating upon startup (since it isn't time to wake up yet) but we would wind up setting the "stop hibernating" time not to the wakeup time, but to the end of the interval. Also, split hibernate_end_time from shutdown_time. Possible fix for bug 362. svn:r9512
* r11629@catbus: nickm | 2007-02-02 15:06:17 -0500Nick Mathewson2007-02-02
| | | | | | | Removing the last DOCDOC comment hurt so much that I had to use Doxygen to identify undocumented macros and comments, and add 150 more DOCDOCs to point out where they were. Oops. Hey, kids! Fixing some of these could be your first Tor patch! svn:r9477
* r9715@catbus: nickm | 2007-01-22 02:51:04 -0500Nick Mathewson2007-01-22
| | | | | | | Document a few undocumented functions and arguments. svn:r9385