- Mar 25, 2019
-
-
Nick Mathewson authored
Previously, I had used integers encoded as pointers. This introduced a flaw: NULL represented both the integer zero, and the absence of a setting. This in turn made the checks in cfg_msg_set_{type,chan}() not actually check for an altered value if the previous value had been set to zero. Also, I had previously kept a pointer to a dispatch_fypefns_t rather than making a copy of it. This meant that if the dispatch_typefns_t were changed between defining the typefns and creating the dispatcher, we'd get the modified version. Found while investigating coverage in pubsub_add_{pub,sub}_()
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
This is necessary to get the number of includes in main.c back under control. (In the future, we could just use the subsystem manager for this kind of stuff.)
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
(Our code to handle it was broken, too)
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
We want the DISPATCH_ADD_PUB() macro to count as making a DECLARE_PUBLISH() invocation "used", so let's try a new approach that preserves that idea. The old one apparently did not work for some versions of osx clang.
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
Also, add documentation, and fix a free-on-error bug.
-
Nick Mathewson authored
-
Nick Mathewson authored
(The header won't compile without it.)
-
Nick Mathewson authored
This commit has the necessary logic to run the publish/subscribe system from the mainloop, and to initialize it on startup and tear it down later.
-
Nick Mathewson authored
-
Nick Mathewson authored
When we clean up, we'd like to clear all the bindings that refer to a dispatch_t, so that they don't have dangling pointers to it.
-
Nick Mathewson authored
This code tries to prevent a large number of possible errors by enforcing different restrictions on the messages that different modules publish and subscribe to. Some of these rules are probably too strict, and some too lax: we should feel free to change them as needed as we move forward and learn more.
-
Nick Mathewson authored
This "publish/subscribe" layer sits on top of lib/dispatch, and tries to provide more type-safety and cross-checking for the lower-level layer. Even with this commit, we're still not done: more checking will come in the next commit, and a set of usability/typesafety macros will come after.
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
This module implements a way to send messages from one module to another, with associated data types. It does not yet do anything to ensure that messages are correct, that types match, or that other forms of consistency are preserved.
-
Nick Mathewson authored
We already do this in our log_debug() macro, but there are times when we'd like to avoid allocating or precomputing something that we are only going to log if debugging is on.
-
Nick Mathewson authored
Tests included.
-
Nick Mathewson authored
You use this when you're defining a macro to be used at file scope, and you want to require a semicolon afterwards.
-
Nick Mathewson authored
-
Nick Mathewson authored
We'll be using this for four kinds of identifier in dispatch.c
-
- Jan 15, 2019
-
-
Nick Mathewson authored
-
-
-
Nick Mathewson authored
-
-
-
-
- Jan 14, 2019
-
-
Nick Mathewson authored
-
Nick Mathewson authored
-