Commit Graph

322 Commits

Author SHA1 Message Date
Nick Mathewson
1af630d32c Bite the bullet and limit all our source lines to 80 characters, the way IBM intended.
svn:r5582
2005-12-14 20:40:40 +00:00
Roger Dingledine
58366ffd24 when we changed from log_fn to debug/info/notice/warn/err,
we screwed up the formatting in wild and unpredictable ways.

fix it before it becomes convention to format logs in wild and
unpredictable ways.

still need to do src/common/ someday.


svn:r5551
2005-12-10 09:36:26 +00:00
Roger Dingledine
9b0a40ec78 crank the max line limit down to 150 chars.
svn:r5550
2005-12-10 08:27:01 +00:00
Nick Mathewson
39265dd72e In my private little universe, terminals are still 80 columns. Impose a 160-character-per-line limit; this will creep down.
svn:r5548
2005-12-09 05:37:26 +00:00
Roger Dingledine
98f353fa7c actually listen when we try to route our dir connection via tor.
svn:r5432
2005-11-19 10:33:34 +00:00
Roger Dingledine
5c949fce51 Start obeying our firewall options more rigorously:
- If we can't get to a dirserver directly, try going via Tor.
  - Don't ever try to connect (as a client) to a place our firewall
    options forbid.
  - If we specify a proxy and also firewall options, obey the firewall
    options even when we're using the proxy: some proxies can only proxy
    to certain destinations.


svn:r5431
2005-11-19 10:12:10 +00:00
Nick Mathewson
b76f61ee66 If we stop knowing about a dirserver between request and answer, do not die.
svn:r5351
2005-11-08 22:30:17 +00:00
Nick Mathewson
75d85c8214 On directory servers, old_routers was wasting hundreds of bytes per superseded router descriptor. Roll the signed descriptor info and identifying info into a cache_info struct, and use only that for old_routers.
svn:r5349
2005-11-05 20:15:27 +00:00
Roger Dingledine
40ecaf4857 answer nick's XXX, and muck with some log domain choices
svn:r5339
2005-11-01 06:13:12 +00:00
Nick Mathewson
267af9ecf9 Fix a fun bug that was probably causing unnecessary downloads, and that coupld possibly have caused some segfaults: When post-processing a split fingerprint URL, we were trying to base16_decode() entries already in the fingerprint list, failing, and removing them. Ow.
svn:r5326
2005-10-27 23:16:08 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
e7e170a59e Change more files to new loggin interface. 3 left.
svn:r5310
2005-10-25 08:20:10 +00:00
Nick Mathewson
81dd50a942 Fix memory leak when retrieving networkstatus or routerdesc by malformed fingerprint
svn:r5307
2005-10-25 07:03:22 +00:00
Peter Palfrader
d8daa910a6 Make dirserv_get_routerdescs() return better http 404 error messages instead of a generic "Servers unavailable."
svn:r5274
2005-10-18 17:09:57 +00:00
Peter Palfrader
64a631e187 Some http status lines ended in a dot, others did not. Make it all the same and remove the period from all
svn:r5270
2005-10-18 14:57:46 +00:00
Peter Palfrader
0d9aedfcea Downgrade a few INFO level logs to DEBUG again. Also add two or three new
logs in cases where a calling function's log was downgraded and we wouldn't
get any log message otherwise.


svn:r5263
2005-10-17 16:21:42 +00:00
Roger Dingledine
435fb973c2 when providing content-type application/octet-stream for providing
server descriptors with .z, we were leaving out the content-encoding
header. oops. (everything tolerated this just fine, but that doesn't
mean we need to be part of the problem.)


svn:r5258
2005-10-17 02:32:33 +00:00
Peter Palfrader
7b15f77dd6 Make a few INFO log lines into DEBUG
svn:r5257
2005-10-17 02:13:36 +00:00
Nick Mathewson
6101468cbe Enable trivial "download by descriptor digest" functionality.
svn:r5250
2005-10-14 04:56:20 +00:00
Nick Mathewson
998cf8d622 Try to extract as many descriptors as possible from truncated http responses. (when DIR_PURPOSE_FETCH_ROUTERDESC)
svn:r5249
2005-10-14 02:26:13 +00:00
Nick Mathewson
11b76b9ca5 Allow tor_gzip_uncompress to extract as much as possible from truncated compressed data. Also, fix a bug where truncated compressed data could break tor_gzip_uncompress. [This last part is a backport candidate.]
svn:r5247
2005-10-13 22:48:09 +00:00
Nick Mathewson
972b7512c7 authorities do not replace server descriptors where nothing semantically relevant has changed since the last upload.
svn:r5240
2005-10-12 18:25:25 +00:00
Nick Mathewson
1ebbaf5c3a improve INFO-level logging for directory downloads. This is still too chatty, but it will help us analyze things.
svn:r5197
2005-10-05 20:45:18 +00:00
Roger Dingledine
adf04f121e size_t int printf mucking
svn:r5194
2005-10-05 04:52:55 +00:00
Nick Mathewson
1223310b69 Downgrade noisy log messages in preparation for an alpha release.
svn:r5188
2005-10-05 01:27:08 +00:00
Nick Mathewson
a608905070 Give a less frequent and more helpful warning on failed serverdesc downloads
svn:r5187
2005-10-05 00:22:56 +00:00
Nick Mathewson
42e17182da When we get an EOF or a timeout on a directory connection, note how many bytes of serverdesc we are dropping. This will help us determine whether it is smart to parse incomplete serverdesc responses.
svn:r5186
2005-10-04 22:34:09 +00:00
Nick Mathewson
fc3c0197f9 Resolve several DOCDOCs. Make non-mirrors only launch routerdesc downloads when they have more than 16 router descriptors to download, or when 10 minutes have passed since the last download.
svn:r5166
2005-09-30 20:04:55 +00:00
Roger Dingledine
13e709a0ff resolve nick's comment
svn:r5163
2005-09-30 02:08:57 +00:00
Nick Mathewson
edd15cb781 Note that there is incorrect behavior in directory.c code. Arma, please check this too.
svn:r5161
2005-09-30 01:38:09 +00:00
Nick Mathewson
92451f74a8 Reformat inconsistent function declarations.
svn:r5160
2005-09-30 01:09:52 +00:00
Roger Dingledine
ea18827cee do the other half of dirport reachability testing.
it should be back and working now.


svn:r5155
2005-09-29 23:59:36 +00:00
Roger Dingledine
f8d430653e better cleanups as i figure out what's going on
svn:r5154
2005-09-29 23:26:42 +00:00
Roger Dingledine
d4d8adaa6d move some code around when we're succeeding or failing at fetching
server descs.
also clean up some formatting.


svn:r5153
2005-09-29 23:06:48 +00:00
Nick Mathewson
126a1e3e32 Fix crash-on-wakeup bug in networkstatus download.
svn:r5144
2005-09-26 16:37:39 +00:00
Nick Mathewson
b726507d36 Log even less verbosely. Also, do not download old (frequently-updating) servers more than once every 2 hours.
svn:r5134
2005-09-23 21:25:29 +00:00
Nick Mathewson
f995edd516 Fix at least one overzealous download bug. (tor_malloc_zero new local_routerstatus_t objs); add a pile of logs back in; probe every 10sec; never autolaunch on failure. Let us see if this works better.
svn:r5125
2005-09-23 18:05:14 +00:00
Nick Mathewson
cdc912714e I love the smell of C in the morning. Make router-download rules smarter (download more so long as we dont duplicate existing requests; relaunch at staggered intervals); relaunch one a minute or on failure; reset 60 minutes; always open 3 requests if we can; add authority opinion to networkstatus; make naming rule correct. There is a remaining bug where we retry servers too quickly; We need to look at that harder.
svn:r5110
2005-09-22 06:34:29 +00:00
Nick Mathewson
6693031947 Use a separate type for "local view of router status". Also, even though I told arma there was no need, replace an ugly O ( n lg n ) algorithm with a nice O ( n ) algorithm when stepping through servers. Some ugliness is just too bad to stand.
svn:r5109
2005-09-22 01:51:14 +00:00
Roger Dingledine
959598fae6 content-type bugfixes:
http://seppia.noreply.org/tor/dir.z was being declared text/plain
and
http://seppia.noreply.org/tor/server/fp/719BE45DE224B607C53707D0E2143E2D423E74CF
was being declared application/octet-stream


svn:r5108
2005-09-22 00:17:41 +00:00
Nick Mathewson
283032960d Make give-up-on-failure actually work: it seems the servers gave me a real test case.
svn:r5091
2005-09-18 04:15:39 +00:00
Nick Mathewson
d118d5069a Prevent a "try forever to download an unobtainable descriptor" bug. Still remaining: the "give up forever" bug.
svn:r5090
2005-09-18 02:51:12 +00:00
Nick Mathewson
1fbe499bfe Remove a bunch of #if0d code that I no longer need to look at.
svn:r5083
2005-09-16 16:47:20 +00:00
Nick Mathewson
6d15a73548 Resolve/expand some XXXXs and improve a log message or two
svn:r5082
2005-09-16 16:41:45 +00:00
Nick Mathewson
d45badd9f4 Add a missing return
svn:r5079
2005-09-16 04:52:53 +00:00
Nick Mathewson
9c2ca40df3 Unify our "figure out which fingerprints we were downloading" code.
svn:r5077
2005-09-16 04:42:45 +00:00
Nick Mathewson
05bab28c7d Add some (notice, for now) log messages that imply confusing things are happening.
svn:r5076
2005-09-15 21:11:48 +00:00
Nick Mathewson
ed21abfe87 And some documentation before bed.
svn:r5073
2005-09-15 06:15:31 +00:00
Nick Mathewson
b16048917c Stop downloading directories and download routers instead. This still needs some work, but at last clients are finally on the new architecture. Next comes the tuning and bugfixing.
svn:r5070
2005-09-15 05:19:38 +00:00
Nick Mathewson
e3adcbdb95 Big commit: clients start downloading and using network-statuses.
Only caches need to get running-routers; nobody needs to parse, store,
or use it.  Same for the router-status line in the directories.  Add
many #if 0's that can get removed once I'm convinced they don't
contain anything I'm forgetting.

Start all newly-parsed routers as non-running and non-valid; update
them from the list of network statuses.

Update all routers when a new networkstatus comes in.

After 3 tries for a networkstatus, clients give up until they're told
to try again.

     "Let's get those missles ready to **DESTROY THE UNIVERSE**!"
				-TMBG


svn:r5063
2005-09-14 21:09:25 +00:00