summaryrefslogtreecommitdiff
path: root/src/common/util.c
AgeCommit message (Collapse)Author
2008-12-23Document most undocumented variables.Nick Mathewson
svn:r17754
2008-12-22Make freelist_len in memarea.c static; document a few variables.Nick Mathewson
svn:r17741
2008-12-22Add DOCDOC entries for undocumented static and global variables.Nick Mathewson
svn:r17739
2008-12-22Fix most DOCDOCs remaining and/or added by redox.Nick Mathewson
svn:r17734
2008-12-22Add DOCDOC comments for all undocumented functions. Add missing *s to other ↵Nick Mathewson
comments so that they will get recognized as doxygen. svn:r17729
2008-12-22Fix all of the doxygen warnings not pertaining to missing documentation.Nick Mathewson
svn:r17727
2008-12-19Expose hex_decode_digit from util.cNick Mathewson
svn:r17706
2008-12-18Replace calls to time(NULL) that occur on the order of once per read, one ↵Nick Mathewson
per write, or once per cell with calls to a function that looks at a cached value of time. This is tricksy to benchmark, since it will only help on systems where time() is a syscall and syscalls are relatively slow. svn:r17690
2008-12-18Downlgrade tweak, and answer lots of XXX021s. No actual code fixes in this ↵Nick Mathewson
patch. svn:r17686
2008-12-18Log an error on win32 if directory listing fails.Nick Mathewson
svn:r17684
2008-12-02Do not use O_APPEND on fd-based operations that do not really want it; have ↵Nick Mathewson
them just lseek instead. svn:r17460
2008-11-05make read_all and write_all return ssize_t.Nick Mathewson
svn:r17194
2008-11-05Fix freebsd 7 compile by adding malloc_np.h header. Fix bug 850.Nick Mathewson
svn:r17190
2008-11-03Add a new memcmpstart to use instead of strcmpstart when the thing we are ↵Nick Mathewson
comparing is not nul-terminated. svn:r17187
2008-10-27Document some dmalloc stuff and some stupid C tricks.Nick Mathewson
svn:r17161
2008-10-26This patch changes some of the code in util.c to refactor calls toJacob Appelbaum
dmalloc_malloc, dmalloc_realloc and dmalloc_strdup. It only calls those functions if we're using the magic USE_DMALLOC macro. If we're not doing that, we call the normal malloc, realloc and strdup. This is my first night at malloc disambiguation club, so I had to disambiguate. Also, first commit, I have my commit bit now. Huzzzah!!! svn:r17157
2008-08-29remove a code path that should never happen (and if it did, we'd beRoger Dingledine
complaining about an errno set from some arbitrary previous problem). svn:r16684
2008-07-25 r17358@pc-10-8-1-079: nickm | 2008-07-25 16:41:03 +0200Nick Mathewson
Split out the address manipulation functions from compat and util: they were about 21% of the total of those, and spread out too much. svn:r16208
2008-07-24 r17346@aud-055: nickm | 2008-07-24 15:37:19 +0200Nick Mathewson
Make generic address manipulation functions work better. Switch address policy code to use tor_addr_t, so it can handle IPv6. That is a good place to start. svn:r16178
2008-07-03 r16689@tombo: nickm | 2008-07-03 11:03:14 -0400Nick Mathewson
Fix for bug 742: do not use O_CREAT on 2-option version of open(). Especially do not use it on /dev/null. Fix from Michael Scherer. Bugfix on 0.0.2pre19 (wow). svn:r15626
2008-06-10 r16127@tombo: nickm | 2008-06-10 14:03:01 -0400Nick Mathewson
Improved code for counting clients by country: support recording by number of directory status requests in addition to number of IPs seen. svn:r15097
2008-05-29New code to implement proposal for local geoip stats. Only enabled with ↵Nick Mathewson
--enable-geoip-stats passed to configure. svn:r14802
2008-05-16 r19795@catbus: nickm | 2008-05-16 14:54:24 -0400Nick Mathewson
Rename tor_addr_t manipulation functions for a consistent style. svn:r14639
2008-04-08 r15120@tombo: nickm | 2008-04-08 18:01:58 -0400Nick Mathewson
Add very short 0.2.1.x list based on discussion from arma. needs fleshing out and merging with other lists. svn:r14324
2008-03-18 r18929@catbus: nickm | 2008-03-18 12:08:16 -0400Nick Mathewson
Detect errors from directory listing correctly on win32. Bug found by lodger. svn:r14102
2008-03-17 r18890@catbus: nickm | 2008-03-17 13:19:29 -0400Nick Mathewson
Clarify documentation for file_status a little svn:r14079
2008-03-17 r18878@catbus: nickm | 2008-03-17 00:11:02 -0400Nick Mathewson
Clean up an overwide line. svn:r14072
2008-03-13I wonder what the DISGARD service isPeter Palfrader
svn:r13999
2008-02-28be a little bit more helpful than "Error reading directory."Roger Dingledine
make a note to try to be more helpful still. svn:r13776
2008-02-21 r14374@tombo: nickm | 2008-02-21 16:57:39 -0500Nick Mathewson
Fix all remaining shorten-64-to-32 errors in src/common. Some were genuine problems. Many were compatibility errors with libraries (openssl, zlib) that like predate size_t. Partial backport candidate. svn:r13665
2008-02-21 r14373@tombo: nickm | 2008-02-21 16:29:18 -0500Nick Mathewson
Apply warnings about implicit 64-to-32 conversions; some from Sebastian Hahn; some not. svn:r13664
2008-02-21 r18336@catbus: nickm | 2008-02-21 09:33:15 -0500Nick Mathewson
Patch from Sebastian Hahn: remove obsolete timeval manipulation functions. svn:r13653
2008-02-15 r14185@tombo: nickm | 2008-02-15 18:05:54 -0500Nick Mathewson
Replace the hefty tor_strpartition with a simple function to replace its only (trivial) use. svn:r13532
2008-02-09doxygen and other cleanupsRoger Dingledine
svn:r13440
2008-02-08 r17967@catbus: nickm | 2008-02-07 11:44:51 -0500Nick Mathewson
Fix some warnings identified by building with -D_FORTIFY_SOURCE=2. Remove a redundant (and nuts) definition of _FORTIFY_SOURCE from eventdns.c. svn:r13424
2008-02-07Update some copyright notices: it is now 2008.Nick Mathewson
svn:r13412
2008-02-06 r17947@catbus: nickm | 2008-02-06 11:57:53 -0500Nick Mathewson
Fix a bunch of DOCDOC items; document the --quiet flag; refactor a couple of XXXX020 items. svn:r13405
2008-02-05 r17903@catbus: nickm | 2008-02-05 14:40:03 -0500Nick Mathewson
Remove some dead code; fix some XXX020s; turn some XXX020s into XXXX_IP6s (i.e., "needs to be fixed when we add ipv6 support"). svn:r13382
2008-01-30 r13971@tombo: nickm | 2008-01-30 14:25:25 -0500Nick Mathewson
Write a new autoconf macro to test whether a function is declared. It is suboptimal and possibly buggy in some way, but it seems to work for me. use it to test for a declaration of malloc_good_size, so we can workaround operating systems (like older OSX) that have the function in their libc but do not deign to declare it in their headers. Should resolve bug 587. svn:r13339
2008-01-15 r17624@catbus: nickm | 2008-01-15 00:42:01 -0500Nick Mathewson
Fixes to more anonymously-reported typos and logic errors. svn:r13136
2008-01-09<tup> tor segfaults when reading a config value that contains a malformedRoger Dingledine
escape sequence; this patch fixes it svn:r13086
2008-01-06 r17472@catbus: nickm | 2008-01-05 22:10:19 -0500Nick Mathewson
Another test for the increasingly bad check-spaces style checker to check: #else\n#if is almost a sure sign of a failure to use #elif. Fortunately, we only did that 3 times. svn:r13039
2008-01-06 r17467@catbus: nickm | 2008-01-05 19:54:20 -0500Nick Mathewson
fix whitespace svn:r13035
2008-01-02 r15787@tombo: nickm | 2008-01-02 01:59:07 -0500Nick Mathewson
Allow config values in quotes to contain special characters, with full C escape syntax. With tests. Addresses bug 557. svn:r13021
2008-01-02 r15786@tombo: nickm | 2008-01-02 01:11:51 -0500Nick Mathewson
Push the strdups used for parsing configuration lines into parse_line_from_string(). This will make it easier to parse more complex value formats, which in turn will help fix bug 557 svn:r13020
2008-01-02 r15779@tombo: nickm | 2008-01-01 23:43:24 -0500Nick Mathewson
Use reference-counting to avoid allocating a zillion little addr_policy_t objects. (This is an old patch that had been sitting on my hard drive for a while.) svn:r13017
2007-12-28 r17423@catbus: nickm | 2007-12-28 01:54:42 -0500Nick Mathewson
Fix compilation with dmalloc svn:r12998
2007-12-26 r15691@tombo: nickm | 2007-12-25 18:13:54 -0500Nick Mathewson
New, slightly esoteric function, tor_malloc_roundup(). While tor_malloc(x) allocates x bytes, tor_malloc_roundup(&x) allocates the same size of chunk it would use to store x bytes, and sets x to the usable size of that chunk. svn:r12981
2007-12-12clean up copyrights, and assign 2007 copyrights to The Tor Project, IncRoger Dingledine
svn:r12786
2007-12-04 r15106@tombo: nickm | 2007-12-04 00:08:35 -0500Nick Mathewson
Change tor_addr_t to be a tagged union of in_addr and in6_addr, not of sockaddr_in and sockaddr_in6. It's hardly used in the main code as it is, but let's get it right before it gets popular. svn:r12660