ice/turn transport: make sure PJSIP is initialized before it's used
Using PJSIP functions without calling pj_init first can lead to subtle
non-deterministic bugs.
GitLab: #18
Change-Id: I9364fd247165c0ce19a8d0d42575fb66651b54a3
diff --git a/src/turn/turn_transport.h b/src/turn/turn_transport.h
index b872454..37626b8 100644
--- a/src/turn/turn_transport.h
+++ b/src/turn/turn_transport.h
@@ -17,6 +17,7 @@
#pragma once
#include "ip_utils.h"
+#include "pj_init_lock.h"
#include "turn_params.h"
#include <opendht/logger.h>
@@ -48,6 +49,7 @@
private:
TurnTransport() = delete;
+ PjInitLock pjInitLock_;
class Impl;
std::unique_ptr<Impl> pimpl_;
};