Skip to content

Instantly share code, notes, and snippets.

View ahf's full-sized avatar

Alexander Færøy ahf

View GitHub Profile
Where the timed events are
After tor starts, it never leaves run_main_loop_until_done() in main.c until it is ready to stop. That function just calls run_main_loop_once() over and over.
run_main_loop_until_done() calls scheduled events in a few different ways.
* Some events are run once every time the main loop is visited; see connection_ap_attach_pending() for one example. These are generally things that need to happen right away in response to any events, or once per second at the slowest.
* Some events are created as libevent timed events. These are ones that are added when event_add()'s second argument is non-NULL.
diff --git a/configure.ac b/configure.ac
index 3cb187b..a567b6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -952,6 +952,35 @@ if test "x$have_zstd" = "xyes"; then
AC_DEFINE(HAVE_ZSTD,1,[Have Zstd])
TOR_ZSTD_CFLAGS="${ZSTD_CFLAGS}"
TOR_ZSTD_LIBS="${ZSTD_LIBS}"
+
+ save_LIBS="$LIBS"
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 107b53a..92ec33f 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -2755,13 +2755,14 @@ crypto_strongest_rand_syscall(uint8_t *out, size_t out_len)
if (!provider_set) {
if (!CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT)) {
- log_warn(LD_CRYPTO, "Can't get CryptoAPI provider [1]");
+ log_notice(LD_CRYPTO, "Can't get CryptoAPI provider [1]."
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 107b53a..f6d2efe 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -2755,7 +2755,8 @@ crypto_strongest_rand_syscall(uint8_t *out, size_t out_len)
if (!provider_set) {
if (!CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT)) {
- log_warn(LD_CRYPTO, "Can't get CryptoAPI provider [1]");
+ log_notice(LD_CRYPTO, "Can't get CryptoAPI provider [1]."
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 107b53a..c9f5c0e 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -2755,7 +2755,8 @@ crypto_strongest_rand_syscall(uint8_t *out, size_t out_len)
if (!provider_set) {
if (!CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT)) {
- log_warn(LD_CRYPTO, "Can't get CryptoAPI provider [1]");
+ log_warn(LD_CRYPTO, "Can't get CryptoAPI provider [1]."
/*
* Generated by dtrace(1M).
*/
#ifndef _DTRACE_PROBES_H
#define _DTRACE_PROBES_H
#include <unistd.h>
#ifdef __cplusplus
/* orconfig.h. Generated from orconfig.h.in by configure. */
/* orconfig.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* tor's build directory */
#define BUILDDIR "/Users/ahf/src/gitlab.com/ahf/tor"
/* tor's configuration directory */
commit 64d401a058c7283a54024133071c07ea8956bfbc
Author: Alexander Færøy <ahf@torproject.org>
Date: Tue Apr 25 17:51:58 2017 +0200
Add stub function for libor-trace.
OS X's ar(1) doesn't allow us to create an archive with no object files.
This patch adds a stub file with a stub function in it to make OS X
happy again.
diff --git a/apps/gryphon_http/src/gryphon_http.app.src b/apps/gryphon_http/src/gryphon_http.app.src
index 5798b28..a0b76a7 100644
--- a/apps/gryphon_http/src/gryphon_http.app.src
+++ b/apps/gryphon_http/src/gryphon_http.app.src
@@ -9,10 +9,11 @@
cowboy_cors,
cowboy_raccoon,
crypto,
- gryphon_core,
graphql,
diff --git a/src/hydra_client.app.src b/src/hydra_client.app.src
index 84b60b7..07f8c5f 100644
--- a/src/hydra_client.app.src
+++ b/src/hydra_client.app.src
@@ -4,11 +4,12 @@
{modules, []},
{registered, []},
{applications, [
+ gproc,
+ jsx,