aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.c
Commit message (Collapse)AuthorAge
* Merge branch 'tor-fw-squashed2'Nick Mathewson2010-09-30
|\ | | | | | | | | Conflicts: src/common/util.c
| * Fix space and formatting issuesNick Mathewson2010-09-30
| |
| * #if-out the fw-helper code in util.c when building on windowsNick Mathewson2010-09-30
| |
| * Start tor-fw-helper in the background, and log whatever it outputsSteven Murdoch2010-09-30
| |
* | Fix check-spacesSebastian Hahn2010-09-30
|/
* Merge remote branch 'public/bug1954' into maint-0.2.2Nick Mathewson2010-09-27
|\
| * Consistency issues in load_windows_system_library patch. Thanks SebastianNick Mathewson2010-09-24
| |
| * New function to load windows system librariesNick Mathewson2010-09-21
| | | | | | | | | | | | This function uses GetSystemDirectory() to make sure we load the version of the library from c:\windows\system32 (or local equivalent) rather than whatever version lives in the cwd.
* | Note that the torrc format doesn't need nl at endSebastian Hahn2010-09-24
| |
* | Tweak continuation-and-comment logicNick Mathewson2010-09-23
| | | | | | | | | | I think there was a read-off-the-end-of-the-buffer bug that I fixed. At least I added some good comments, I hope.
* | Allow comments for multi-line torrc optionsSebastian Hahn2010-09-11
| |
* | Support mutli-line torrc options via the usual backslash syntaxNick Mathewson2010-09-10
|/
* Merge remote branch 'public/win_unicode_fixes'Nick Mathewson2010-09-06
|\
| * Make the windows build succeed with or without -DUNICODE enabled.Nick Mathewson2010-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This should keep WinCE working (unicode always-on) and get Win98 working again (unicode never-on). There are two places where we explicitly use ASCII-only APIs, still: in ntmain.c and in the unit tests. This patch also fixes a bug in windoes tor_listdir that would cause the first file to be listed an arbitrary number of times that was also introduced with WinCE support. Should fix bug 1797.
* | Fix some issues in rate-limiting noticed by SebastianNick Mathewson2010-08-31
| |
* | Add a generic rate-limited log mechanism, and use it in a few placesNick Mathewson2010-08-18
|/ | | | Incidentally fixes bug 1042.
* Rename log.h to torlog.hNick Mathewson2010-07-09
| | | | | | | | | | This should make us conflict less with system files named "log.h". Yes, we shouldn't have been conflicting with those anyway, but some people's compilers act very oddly. The actual change was done with one "git mv", by editing Makefile.am, and running find . -name '*.[ch]' | xargs perl -i -pe 'if (/^#include.*\Wlog.h/) {s/log.h/torlog.h/; }'
* Save a couple characters' allocation in esc_for_logFlorian Zumbiehl2010-06-14
|
* Reinstate warning when HOME isn't set.Nick Mathewson2010-06-07
| | | | | | | Having ~/.tor expand into /.tor is, after all, almost certainly not what the user wanted, and it deserves a warning message. Also, convert a guess-and-malloc-and-sprintf triple into an asprintf.
* Treat unset $HOME like empty $HOMESebastian Hahn2010-06-07
| | | | This means Tor no longer dies when it doesn't have a $HOME.
* Port Tor to work on Windows CEvalerino2010-05-24
| | | | | | | | | | | | Most of the changes here are switches to use APIs available on Windows CE. The most pervasive change is that Windows CE only provides the wide-character ("FooW") variants of most of the windows function, and doesn't support the older ASCII verions at all. This patch will require use of the wcecompat library to get working versions of the posix-style fd-based file IO functions. [commit message by nickm]
* 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
| |
* | Make expand_filename into a tor_strdup() alias on windows.Nick Mathewson2010-02-22
| | | | | | | | | | | | | | | | On Windows, we don't have a notion of ~ meaning "our homedir", so we were deliberately using an #ifdef to avoid calling expand_filename() in multiple places. This is silly: The right place to turn a function into a no-op on a single platform is in the function itself, not in every single call-site.
* | Remove duplicate words and a duplicate newline.Karsten Loesing2009-12-18
| |
* | Refactor out the 'find string at start of any line' logic.Nick Mathewson2009-12-17
| | | | | | | | | | | | | | | | We do this in too many places throughout the code; it's time to start clamping down. Also, refactor Karsten's patch to use strchr-then-strndup, rather than malloc-then-strlcpy-then-strchr-then-clear.
* | Refactor a bit so that it is safe to include math.h, and mostly not needed.Nick Mathewson2009-12-15
| |
* | Merge commit 'sebastian/fixes'Nick Mathewson2009-12-12
|\ \
| * | Fix typo in a commentSebastian Hahn2009-12-12
| | |
* | | Now that FOO_free(NULL) always works, remove checks before calling it.Nick Mathewson2009-12-12
|/ /
* | Merge branch 'microdesc'Nick Mathewson2009-10-19
|\ \
| * | Make start_writing_to_stdio_file() respect O_BINARY.Nick Mathewson2009-10-15
| | |
| * | Code to generate, store, and parse microdescriptors and consensuses.Nick Mathewson2009-10-15
| | | | | | | | | | | | | | | The consensus documents are not signed properly, not served, and not exchanged yet.
* | | Document some formerly undocumented functions.Nick Mathewson2009-10-19
|/ /
* | Fix compile on Snow LeopardSebastian Hahn2009-09-20
| |
* | Add a couple of time helper functions.Mike Perry2009-09-20
| | | | | | | | Also add rounding support to tv_mdiff().
* | Fix compile warnings on Snow LeopardSebastian Hahn2009-09-01
| | | | | | | | Big thanks to nickm and arma for helping me with this!
* | Merge commit 'origin/maint-0.2.1'Nick Mathewson2009-09-01
|\|
| * Fix compile warnings on Snow LeopardSebastian Hahn2009-09-01
| | | | | | | | Big thanks to nickm and arma for helping me with this!
* | typoSebastian Hahn2009-09-01
| |
* | Revise parsing of time and memory units to handle spaces.Nick Mathewson2009-08-31
| | | | | | | | | | | | | | | | When we added support for fractional units (like 1.5 MB) I broke support for giving units with no space (like 2MB). This patch should fix that. It also adds a propoer tor_parse_double(). Fix for bug 1076. Bugfix on 0.2.2.1-alpha.
* | Fix dirreq and cell stats on 32-bit architectures.Karsten Loesing2009-07-27
| | | | | | | | | | | | | | | | | | When determining how long directory requests take or how long cells spend in queues, we were comparing timestamps on microsecond detail only to convert results to second or millisecond detail later on. But on 32-bit architectures this means that 2^31 microseconds only cover time differences of up to 36 minutes. Instead, compare timestamps on millisecond detail.
* | Two tweaks to exit-port statistics.Karsten Loesing2009-07-13
|/ | | | | | | Add two functions for round_to_next_multiple_of() for uint32_t and uint64_t. Avoid division in every step of the loop over all ports.
* Don't attempt to log messages to a controller from a worker thread.Nick Mathewson2009-05-30
| | | | | | | | | | | This patch adds a function to determine whether we're in the main thread, and changes control_event_logmsg() to return immediately if we're in a subthread. This is necessary because otherwise we will call connection_write_to_buf, which modifies non-locked data structures. Bugfix on 0.2.0.x; fix for at least one of the things currently called "bug 977".
* Spelling fixes in comments and stringsNick Mathewson2009-05-27
|
* Stop using malloc_usable_size(): valgrind hates it.Nick Mathewson2009-05-17
|
* Update copyright to 2009.Karsten Loesing2009-05-04
|
* Actually use tor_sscanf() to parse untrusted input.Nick Mathewson2009-03-03
| | | | svn:r18761
* Add a simple locale-independent no-surprises sscanf replacement.Nick Mathewson2009-03-03
| | | | | | | | | | tor_sscanf() only handles %u and %s for now, which will make it adequate to replace sscanf() for date/time/IP parsing. We want this to prevent attackers from constructing weirdly formed descriptors, cells, addresses, HTTP responses, etc, that validate under some locales but not others. svn:r18760
* Support 64-bit time_t. Patch from Matthias Drochner. Partial backport ↵Nick Mathewson2009-01-22
| | | | | | candidate. svn:r18234