aboutsummaryrefslogtreecommitdiff
path: root/src/zmq
diff options
context:
space:
mode:
authormruddy <6440430+mruddy@users.noreply.github.com>2018-06-30 10:32:33 -0400
committermruddy <6440430+mruddy@users.noreply.github.com>2018-09-11 16:33:05 -0400
commitf1bd03eb013b96ff040a8f835e4137fbd2a38cda (patch)
tree500b8111764fa52b15f75a504214af47a4812ac4 /src/zmq
parent4103cc31690e5be21854a9628f57c54b880ee195 (diff)
[depends, zmq, doc] upgrade zeromq to 4.2.5 and avoid deprecated zeromq api functions
Diffstat (limited to 'src/zmq')
-rw-r--r--src/zmq/zmqnotificationinterface.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/zmq/zmqnotificationinterface.cpp b/src/zmq/zmqnotificationinterface.cpp
index 8cbc969972..1d9f86d450 100644
--- a/src/zmq/zmqnotificationinterface.cpp
+++ b/src/zmq/zmqnotificationinterface.cpp
@@ -81,10 +81,14 @@ CZMQNotificationInterface* CZMQNotificationInterface::Create()
// Called at startup to conditionally set up ZMQ socket(s)
bool CZMQNotificationInterface::Initialize()
{
+ int major = 0, minor = 0, patch = 0;
+ zmq_version(&major, &minor, &patch);
+ LogPrint(BCLog::ZMQ, "zmq: version %d.%d.%d\n", major, minor, patch);
+
LogPrint(BCLog::ZMQ, "zmq: Initialize notification interface\n");
assert(!pcontext);
- pcontext = zmq_init(1);
+ pcontext = zmq_ctx_new();
if (!pcontext)
{
@@ -127,7 +131,7 @@ void CZMQNotificationInterface::Shutdown()
LogPrint(BCLog::ZMQ, " Shutdown notifier %s at %s\n", notifier->GetType(), notifier->GetAddress());
notifier->Shutdown();
}
- zmq_ctx_destroy(pcontext);
+ zmq_ctx_term(pcontext);
pcontext = nullptr;
}