aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_controller_events.c
diff options
context:
space:
mode:
authorTaylor Yu <catalyst@torproject.org>2019-03-28 17:45:49 -0500
committerDavid Goulet <dgoulet@torproject.org>2019-06-11 11:59:30 -0400
commit0bce0c339d5f4c6ddeb90c21502a9716fb6cd17a (patch)
treeb578ef01c6480ac9bb1eca3fd239e6fd79dd53ed /src/test/test_controller_events.c
parenta8c0f4ddfe3f0a63bd499959c8d921346aa9766e (diff)
downloadtor-0bce0c339d5f4c6ddeb90c21502a9716fb6cd17a.tar.gz
tor-0bce0c339d5f4c6ddeb90c21502a9716fb6cd17a.zip
Rework origin circuit tracking to use pubsub
Part of ticket 29976.
Diffstat (limited to 'src/test/test_controller_events.c')
-rw-r--r--src/test/test_controller_events.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/test/test_controller_events.c b/src/test/test_controller_events.c
index 14fe4fd661..a8967bba50 100644
--- a/src/test/test_controller_events.c
+++ b/src/test/test_controller_events.c
@@ -417,13 +417,12 @@ send_orconn_state(const orconn_state_msg_t *msg_in, uint8_t state)
static void
send_ocirc_chan(uint32_t gid, uint64_t chan, bool onehop)
{
- ocirc_event_msg_t msg;
+ ocirc_chan_msg_t *msg = tor_malloc(sizeof(*msg));
- msg.type = OCIRC_MSGTYPE_CHAN;
- msg.u.chan.gid = gid;
- msg.u.chan.chan = chan;
- msg.u.chan.onehop = onehop;
- ocirc_event_publish(&msg);
+ msg->gid = gid;
+ msg->chan = chan;
+ msg->onehop = onehop;
+ ocirc_chan_publish(msg);
}
static void