Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
c5a9fa5b
Commit
c5a9fa5b
authored
Jun 20, 2013
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #578 from gonzus/master
Changes to sanity tag in ctx
parents
65c84abd
3b355fec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
.gitignore
.gitignore
+1
-1
ctx.cpp
src/ctx.cpp
+6
-3
No files found.
.gitignore
View file @
c5a9fa5b
...
@@ -67,6 +67,7 @@ bin/
...
@@ -67,6 +67,7 @@ bin/
lib/
lib/
obj/
obj/
builds/msvc/*.suo
builds/msvc/*.suo
builds/msvc/*.sdf
builds/msvc/*/*.user
builds/msvc/*/*.user
builds/msvc/*/*Debug
builds/msvc/*/*Debug
builds/msvc/*/*Release
builds/msvc/*/*Release
...
@@ -78,4 +79,3 @@ foreign/openpgm/*
...
@@ -78,4 +79,3 @@ foreign/openpgm/*
zeromq-*.tar.gz
zeromq-*.tar.gz
zeromq-*.zip
zeromq-*.zip
core
core
src/ctx.cpp
View file @
c5a9fa5b
...
@@ -35,8 +35,11 @@
...
@@ -35,8 +35,11 @@
#include "err.hpp"
#include "err.hpp"
#include "msg.hpp"
#include "msg.hpp"
#define ZMQ_CTX_TAG_VALUE_GOOD 0xabadcafe
#define ZMQ_CTX_TAG_VALUE_BAD 0xdeadbeef
zmq
::
ctx_t
::
ctx_t
()
:
zmq
::
ctx_t
::
ctx_t
()
:
tag
(
0xabadcafe
),
tag
(
ZMQ_CTX_TAG_VALUE_GOOD
),
starting
(
true
),
starting
(
true
),
terminating
(
false
),
terminating
(
false
),
reaper
(
NULL
),
reaper
(
NULL
),
...
@@ -50,7 +53,7 @@ zmq::ctx_t::ctx_t () :
...
@@ -50,7 +53,7 @@ zmq::ctx_t::ctx_t () :
bool
zmq
::
ctx_t
::
check_tag
()
bool
zmq
::
ctx_t
::
check_tag
()
{
{
return
tag
==
0xabadcafe
;
return
tag
==
ZMQ_CTX_TAG_VALUE_GOOD
;
}
}
zmq
::
ctx_t
::~
ctx_t
()
zmq
::
ctx_t
::~
ctx_t
()
...
@@ -78,7 +81,7 @@ zmq::ctx_t::~ctx_t ()
...
@@ -78,7 +81,7 @@ zmq::ctx_t::~ctx_t ()
free
(
slots
);
free
(
slots
);
// Remove the tag, so that the object is considered dead.
// Remove the tag, so that the object is considered dead.
tag
=
0xdeadbeef
;
tag
=
ZMQ_CTX_TAG_VALUE_BAD
;
}
}
int
zmq
::
ctx_t
::
terminate
()
int
zmq
::
ctx_t
::
terminate
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment