diff options
| author | mruddy <[email protected]> | 2018-06-30 10:32:33 -0400 |
|---|---|---|
| committer | mruddy <[email protected]> | 2018-09-11 16:33:05 -0400 |
| commit | f1bd03eb013b96ff040a8f835e4137fbd2a38cda (patch) | |
| tree | 500b8111764fa52b15f75a504214af47a4812ac4 /src/zmq/zmqnotificationinterface.cpp | |
| parent | Merge #14168: Remove ENABLE_WALLET from libbitcoin_server.a (diff) | |
| download | discoin-f1bd03eb013b96ff040a8f835e4137fbd2a38cda.tar.xz discoin-f1bd03eb013b96ff040a8f835e4137fbd2a38cda.zip | |
[depends, zmq, doc] upgrade zeromq to 4.2.5 and avoid deprecated zeromq api functions
Diffstat (limited to 'src/zmq/zmqnotificationinterface.cpp')
| -rw-r--r-- | src/zmq/zmqnotificationinterface.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/zmq/zmqnotificationinterface.cpp b/src/zmq/zmqnotificationinterface.cpp index 8cbc96997..1d9f86d45 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; } |