aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.c
Commit message (Collapse)AuthorAge
* r11639@catbus: nickm | 2007-02-05 13:33:38 -0500Nick Mathewson2007-02-05
| | | | | | | Add documentation to src/common/*.h; improve documentation for SMARTLIST_FOREACH; remove never-used options and corresponding tests from tor_strpartition. svn:r9483
* 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
* r11620@catbus: nickm | 2007-02-01 13:06:27 -0500Nick Mathewson2007-02-01
| | | | | | | Call stat() slightly less often; use fstat() when possible. svn:r9472
* r11987@Kushana: nickm | 2007-01-19 14:57:28 -0500Nick Mathewson2007-01-19
| | | | | | | Implement SOCKS_BAD_HOSTNAME status event. Defer remaining status events. Clean up control-spec.txt a little, and fill in recommendations for events. svn:r9374
* r9776@totoro: nickm | 2007-01-18 14:37:01 -0500Nick Mathewson2007-01-18
| | | | | | | Yes, apparently saying strcpy in front of openbsd is like saying "intellectual property" in front of RMS. They both have a point, I guess, even though they extend it to contexts where it is completely irrelevant. svn:r9370
* r11978@Kushana: nickm | 2007-01-15 18:54:25 -0500Nick Mathewson2007-01-15
| | | | | | | Apparently, the OpenBSD linker thinks it knows C better than I do, and gets to call me names for having strcat and strcpy and sprintf in my code--whether I use them safely or not. All right, OpenBSD. You win... this round. svn:r9360
* r11749@Kushana: nickm | 2006-12-29 00:51:42 -0500Nick Mathewson2006-12-29
| | | | | | | Remove dead code; make targets of addressmap commands/configs use AllowNonRFC953Hostnames svn:r9211
* r11670@Kushana: nickm | 2006-12-21 12:23:55 -0500Nick Mathewson2006-12-21
| | | | | | | Clean up logic in parse_port_range(); accept 0 on low end and 65536 on high end for people who are bad at math. svn:r9169
* r11668@Kushana: nickm | 2006-12-20 22:22:53 -0500Nick Mathewson2006-12-21
| | | | | | | Fix bug found by Keith Skinner: Treat malformed max-ports in address ranges as an error, and dont ignore errors with min-ports even if a max-port is present. svn:r9168
* r11597@Kushana: nickm | 2006-12-15 15:49:27 -0500Nick Mathewson2006-12-15
| | | | | | | Add a rudimentary line-wrapping function for use in dumping comments in config files. svn:r9132
* r11581@Kushana: nickm | 2006-12-15 00:12:24 -0500Nick Mathewson2006-12-15
| | | | | | | Make PIDFile work on windows. Reported by Arrakis. svn:r9116
* r9315@totoro: nickm | 2006-11-13 22:40:59 -0500Nick Mathewson2006-11-14
| | | | | | | Fix a build warning on angela-sid svn:r8949
* r9313@totoro: nickm | 2006-11-13 20:07:41 -0500Nick Mathewson2006-11-14
| | | | | | | | | | | | | | | | | | | | | | | Try to compile with fewer warnings on irix64's MIPSpro compiler / environment, which apparently believes that: - off_t can be bigger than size_t. - only mean kids assign things they do not subsequently inspect. I don't try to fix the "error" that makes it say: cc-3970 cc: WARNING File = main.c, Line = 1277 conversion from pointer to same-sized integral type (potential portability problem) uintptr_t sig = (uintptr_t)arg; Because really, what can you do about a compiler that claims to be c99 but doesn't understand that void* x = NULL; uintptr_t y = (uintptr_t) x; is safe? svn:r8948
* r9274@Kushana: nickm | 2006-10-19 16:16:58 -0400Nick Mathewson2006-10-19
| | | | | | | Add unit tests for tor_mmap_file(); make tor_mmap_t.size always be the size of the file (not the size of the mapping); add an extra argument to read_file_to_str() so it can return the size of the result string. svn:r8762
* Add missing return so this builds on mingw.Andrew Lewman2006-10-08
| | | | svn:r8649
* r8923@totoro: nickm | 2006-10-07 11:44:33 -0400Nick Mathewson2006-10-07
| | | | | | | More doxygen comments svn:r8637
* more minor cleanupsRoger Dingledine2006-10-07
| | | | svn:r8630
* r8851@totoro: nickm | 2006-10-02 18:13:27 -0400Nick Mathewson2006-10-02
| | | | | | | Remove/clarify some XXXs for no longer being accurate; for begin things we do not indend to fix; for already being parts of big todo issues (like "/* XXX ipv6 */"); etc. Also fix some spaces. svn:r8580
* r8846@totoro: nickm | 2006-10-02 16:59:57 -0400Nick Mathewson2006-10-02
| | | | | | | Move is_local_IP to config.c; have it check for same-/24; make it used only for reachability (not for banwidth, because that is probably not what we want). Fixes an XXX. svn:r8578
* r8845@totoro: nickm | 2006-10-02 16:34:58 -0400Nick Mathewson2006-10-02
| | | | | | | Fix an XXXX: make path_is_relative work on windows even though we never use it there. svn:r8577
* r9025@Kushana: nickm | 2006-09-29 18:33:13 -0400Nick Mathewson2006-09-29
| | | | | | | Differentiate more duplicated log entries svn:r8542
* r9023@Kushana: nickm | 2006-09-29 17:27:24 -0400Nick Mathewson2006-09-29
| | | | | | | Make distinct all non-bug messages at notice or higher that appear 3 or more times. svn:r8541
* r9008@Kushana: nickm | 2006-09-29 13:50:10 -0400Nick Mathewson2006-09-29
| | | | | | | Doxygen comments for code in common. Also simplify a few code paths to be more clear/speedy/correct. svn:r8536
* r8974@Kushana: nickm | 2006-09-28 17:05:59 -0400Nick Mathewson2006-09-28
| | | | | | | Improvement to last entry guards patch: track when we last attempted to connect to a node in our state file along with how long it has been unreachable. Also clarify behavior of parse_iso_time() when it gets extra characters. svn:r8520
* r8878@Kushana: nickm | 2006-09-21 17:15:47 -0400Nick Mathewson2006-09-21
| | | | | | | Trivial whitespace cleanups. svn:r8443
* Speed up eat_whitespace by a lot.Nick Mathewson2006-09-19
| | | | svn:r8434
* NEEDS REVIEW. Act on previous comment, and handle named servers differently: ↵Nick Mathewson2006-09-19
| | | | | | now, we allow multiple servers with the same name in the routerlist even if that name is reserved, but we check whether names are reserved when we try to look up routers by nickname. This is a minor security fix. This makes router_add_to_routerlist O(1). This is a backport candidate. svn:r8433
* Malloc and friends are critical-path: Thus, add an it-wont-happen branch ↵Nick Mathewson2006-09-19
| | | | | | prediction for NULL returns, and skip the malloc(0) check on platforms where malloc(0) returns a pointer. svn:r8431
* Switch routerlist.c to using memcmp on digests rather than ↵Nick Mathewson2006-09-19
| | | | | | crypto_pk_cmp_keys(); speed up find_whitespace a lot (8x for me) by using a switch statement. This should speed parsing a lot of routers at once by a lot. svn:r8430
* Merge in some bsockets calls, all wrapped inside #if defined(USE_BSOCKETS)Nick Mathewson2006-09-19
| | | | svn:r8427
* parameterize the loudness of get_interface_address()Roger Dingledine2006-09-09
| | | | svn:r8358
* fix typo, add log messageRoger Dingledine2006-09-09
| | | | svn:r8357
* r8692@Kushana: nickm | 2006-08-31 13:38:07 -0400Nick Mathewson2006-08-31
| | | | | | | Fix bug 327 (part 2): Cast char to unsigned char before passing to toupper/tolower. (Follow the same idiom as with isupper and friends, in case we run into the same problem on SGI or whereever it was.) svn:r8310
* r6993@Kushana: nickm | 2006-07-31 16:19:21 -0400Nick Mathewson2006-07-31
| | | | | | | Interesting how much a ! can change the behavior of an assert. svn:r6962
* r6980@Kushana: nickm | 2006-07-31 13:18:22 -0400Nick Mathewson2006-07-31
| | | | | | | Add a utility function to verify that a string has been through strlower. svn:r6959
* Whitespace fixNick Mathewson2006-07-23
| | | | svn:r6816
* Add a mem_is_zero function (I think we will need this) and a STRUCT_OFFSET ↵Nick Mathewson2006-07-23
| | | | | | macro (we already need this). svn:r6810
* when an exit node gets a malformed begin cell, don't complain toRoger Dingledine2006-07-06
| | | | | | | the node operator, since he can't do anything about it. svn:r6733
* remove non-germane commentNick Mathewson2006-06-18
| | | | svn:r6640
* Add a memdup function to utilNick Mathewson2006-06-18
| | | | svn:r6635
* Another escape() fix, for picky sprintfs.Nick Mathewson2006-06-09
| | | | svn:r6579
* Override our notion of printability for esc_for_log. 127 and up are never ↵Nick Mathewson2006-06-09
| | | | | | printable. Take that, locales. svn:r6578
* Add a new warning to our "warn a lot" list: unused parameters. This means ↵Nick Mathewson2006-06-04
| | | | | | we have to explicitly "use" unuseds, but it can catch bugs. (It caught two coding mistakes so far.) svn:r6532
* resolve an unused variableRoger Dingledine2006-05-26
| | | | svn:r6503
* Stop being picky about what the arguments to mapaddress look like.Roger Dingledine2006-05-25
| | | | | | | | | we were refusing names that had $ in them, which people who specify $key.exit will be sad about. There are likely other examples. If people can think of reasons why we should be picky, let me know. svn:r6496
* All these headers we get via torint.hPeter Palfrader2006-05-10
| | | | svn:r6452
* mainline branch. Remove some more dead XXXs.Nick Mathewson2006-04-18
| | | | svn:r6401
* "" is not a plausible address for addressmaps.Roger Dingledine2006-04-03
| | | | svn:r6299
* add tor_strisprint() back in, this time with comments.Roger Dingledine2006-03-15
| | | | svn:r6170
* and remove now-extraneous functionRoger Dingledine2006-03-15
| | | | svn:r6168