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
aad54b2a
Commit
aad54b2a
authored
May 16, 2014
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace fixes
parent
a178097f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
ctx.cpp
src/ctx.cpp
+5
-3
No files found.
src/ctx.cpp
View file @
aad54b2a
...
...
@@ -42,7 +42,8 @@
int
clipped_maxsocket
(
int
max_requested
)
{
if
(
max_requested
>=
zmq
::
poller_t
::
max_fds
()
&&
zmq
::
poller_t
::
max_fds
()
!=
-
1
)
max_requested
=
zmq
::
poller_t
::
max_fds
()
-
1
;
// -1 because we need room for the repear mailbox.
// -1 because we need room for the reaper mailbox.
max_requested
=
zmq
::
poller_t
::
max_fds
()
-
1
;
return
max_requested
;
}
...
...
@@ -175,7 +176,8 @@ int zmq::ctx_t::shutdown ()
int
zmq
::
ctx_t
::
set
(
int
option_
,
int
optval_
)
{
int
rc
=
0
;
if
(
option_
==
ZMQ_MAX_SOCKETS
&&
optval_
>=
1
&&
optval_
==
clipped_maxsocket
(
optval_
))
{
if
(
option_
==
ZMQ_MAX_SOCKETS
&&
optval_
>=
1
&&
optval_
==
clipped_maxsocket
(
optval_
))
{
opt_sync
.
lock
();
max_sockets
=
optval_
;
opt_sync
.
unlock
();
...
...
@@ -233,7 +235,7 @@ zmq::socket_base_t *zmq::ctx_t::create_socket (int type_)
int
ios
=
io_thread_count
;
opt_sync
.
unlock
();
slot_count
=
mazmq
+
ios
+
2
;
slots
=
(
mailbox_t
**
)
malloc
(
sizeof
(
mailbox_t
*
)
*
slot_count
);
slots
=
(
mailbox_t
**
)
malloc
(
sizeof
(
mailbox_t
*
)
*
slot_count
);
alloc_assert
(
slots
);
// Initialise the infrastructure for zmq_ctx_term thread.
...
...
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