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
770d0bc7
Commit
770d0bc7
authored
Jun 23, 2011
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MSVC build
Signed-off-by:
Martin Sustrik
<
sustrik@250bpm.com
>
parent
d1373792
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
51 additions
and
20 deletions
+51
-20
libzmq.vcproj
builds/msvc/libzmq/libzmq.vcproj
+24
-0
dist.cpp
src/dist.cpp
+2
-1
fq.cpp
src/fq.cpp
+2
-1
lb.cpp
src/lb.cpp
+3
-2
pipe.cpp
src/pipe.cpp
+1
-1
random.cpp
src/random.cpp
+1
-0
rep.cpp
src/rep.cpp
+1
-1
req.cpp
src/req.cpp
+1
-1
router.cpp
src/router.cpp
+3
-3
session.cpp
src/session.cpp
+2
-1
socket_base.cpp
src/socket_base.cpp
+3
-3
xpub.cpp
src/xpub.cpp
+2
-1
xrep.cpp
src/xrep.cpp
+3
-3
xsub.cpp
src/xsub.cpp
+3
-2
No files found.
builds/msvc/libzmq/libzmq.vcproj
View file @
770d0bc7
...
...
@@ -262,6 +262,10 @@
RelativePath=
"..\..\..\src\ctx.cpp"
>
</File>
<File
RelativePath=
"..\..\..\src\dealer.cpp"
>
</File>
<File
RelativePath=
"..\..\..\src\decoder.cpp"
>
...
...
@@ -378,6 +382,10 @@
RelativePath=
"..\..\..\src\push.cpp"
>
</File>
<File
RelativePath=
"..\..\..\src\random.cpp"
>
</File>
<File
RelativePath=
"..\..\..\src\reaper.cpp"
>
...
...
@@ -390,6 +398,10 @@
RelativePath=
"..\..\..\src\req.cpp"
>
</File>
<File
RelativePath=
"..\..\..\src\router.cpp"
>
</File>
<File
RelativePath=
"..\..\..\src\select.cpp"
>
...
...
@@ -516,6 +528,10 @@
RelativePath=
"..\..\..\src\ctx.hpp"
>
</File>
<File
RelativePath=
"..\..\..\src\dealer.hpp"
>
</File>
<File
RelativePath=
"..\..\..\src\decoder.hpp"
>
...
...
@@ -664,6 +680,10 @@
RelativePath=
"..\..\..\src\push.hpp"
>
</File>
<File
RelativePath=
"..\..\..\src\random.hpp"
>
</File>
<File
RelativePath=
"..\..\..\src\reaper.hpp"
>
...
...
@@ -676,6 +696,10 @@
RelativePath=
"..\..\..\src\req.hpp"
>
</File>
<File
RelativePath=
"..\..\..\src\router.hpp"
>
</File>
<File
RelativePath=
"..\..\..\src\select.hpp"
>
...
...
src/dist.cpp
View file @
770d0bc7
...
...
@@ -111,7 +111,8 @@ int zmq::dist_t::send_to_all (msg_t *msg_, int flags_)
int
zmq
::
dist_t
::
send_to_matching
(
msg_t
*
msg_
,
int
flags_
)
{
// Is this end of a multipart message?
bool
msg_more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
bool
msg_more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
// Push the message to matching pipes.
distribute
(
msg_
,
flags_
);
...
...
src/fq.cpp
View file @
770d0bc7
...
...
@@ -90,7 +90,8 @@ int zmq::fq_t::recvpipe (msg_t *msg_, int flags_, pipe_t **pipe_)
if
(
fetched
)
{
if
(
pipe_
)
*
pipe_
=
pipes
[
current
];
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
if
(
!
more
)
{
current
++
;
if
(
current
>=
active
)
...
...
src/lb.cpp
View file @
770d0bc7
...
...
@@ -75,7 +75,7 @@ int zmq::lb_t::send (msg_t *msg_, int flags_)
// switch back to non-dropping mode.
if
(
dropping
)
{
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
if
(
!
more
)
dropping
=
false
;
...
...
@@ -88,7 +88,8 @@ int zmq::lb_t::send (msg_t *msg_, int flags_)
while
(
active
>
0
)
{
if
(
pipes
[
current
]
->
write
(
msg_
))
{
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
break
;
}
...
...
src/pipe.cpp
View file @
770d0bc7
...
...
@@ -165,7 +165,7 @@ bool zmq::pipe_t::write (msg_t *msg_)
if
(
unlikely
(
!
check_write
(
msg_
)))
return
false
;
bool
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
bool
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
outpipe
->
write
(
*
msg_
,
more
);
if
(
!
more
)
msgs_written
++
;
...
...
src/random.cpp
View file @
770d0bc7
...
...
@@ -19,6 +19,7 @@
*/
#include "random.hpp"
#include "stdint.hpp"
#include "uuid.hpp"
#include "err.hpp"
...
...
src/rep.cpp
View file @
770d0bc7
...
...
@@ -42,7 +42,7 @@ int zmq::rep_t::xsend (msg_t *msg_, int flags_)
return
-
1
;
}
bool
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
bool
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
// Push message to the reply pipe.
int
rc
=
xrep_t
::
xsend
(
msg_
,
flags_
);
...
...
src/req.cpp
View file @
770d0bc7
...
...
@@ -65,7 +65,7 @@ int zmq::req_t::xsend (msg_t *msg_, int flags_)
message_begins
=
false
;
}
bool
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
bool
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
int
rc
=
xreq_t
::
xsend
(
msg_
,
flags_
);
if
(
rc
!=
0
)
...
...
src/router.cpp
View file @
770d0bc7
...
...
@@ -159,7 +159,7 @@ int zmq::router_t::xsend (msg_t *msg_, int flags_)
}
// Check whether this is the last part of the message.
more_out
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
more_out
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
// Push the message into the pipe. If there's no out pipe, just drop it.
if
(
current_out
)
{
...
...
@@ -188,7 +188,7 @@ int zmq::router_t::xrecv (msg_t *msg_, int flags_)
if
(
prefetched
)
{
int
rc
=
msg_
->
move
(
prefetched_msg
);
errno_assert
(
rc
==
0
);
more_in
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
more_in
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
prefetched
=
false
;
return
0
;
}
...
...
@@ -202,7 +202,7 @@ int zmq::router_t::xrecv (msg_t *msg_, int flags_)
zmq_assert
(
inpipes
[
current_in
].
active
);
bool
fetched
=
inpipes
[
current_in
].
pipe
->
read
(
msg_
);
zmq_assert
(
fetched
);
more_in
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
more_in
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
if
(
!
more_in
)
{
current_in
++
;
if
(
current_in
>=
inpipes
.
size
())
...
...
src/session.cpp
View file @
770d0bc7
...
...
@@ -71,7 +71,8 @@ bool zmq::session_t::read (msg_t *msg_)
if
(
!
pipe
->
read
(
msg_
))
return
false
;
incomplete_in
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
incomplete_in
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
return
true
;
}
...
...
src/socket_base.cpp
View file @
770d0bc7
...
...
@@ -582,7 +582,7 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_)
rcvlabel
=
msg_
->
flags
()
&
msg_t
::
label
;
if
(
rcvlabel
)
msg_
->
reset_flags
(
msg_t
::
label
);
rcvmore
=
msg_
->
flags
()
&
msg_t
::
more
;
rcvmore
=
msg_
->
flags
()
&
msg_t
::
more
?
true
:
false
;
if
(
rcvmore
)
msg_
->
reset_flags
(
msg_t
::
more
);
return
0
;
...
...
@@ -603,7 +603,7 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_)
rcvlabel
=
msg_
->
flags
()
&
msg_t
::
label
;
if
(
rcvlabel
)
msg_
->
reset_flags
(
msg_t
::
label
);
rcvmore
=
msg_
->
flags
()
&
msg_t
::
more
;
rcvmore
=
msg_
->
flags
()
&
msg_t
::
more
?
true
:
false
;
if
(
rcvmore
)
msg_
->
reset_flags
(
msg_t
::
more
);
return
0
;
...
...
@@ -642,7 +642,7 @@ int zmq::socket_base_t::recv (msg_t *msg_, int flags_)
rcvlabel
=
msg_
->
flags
()
&
msg_t
::
label
;
if
(
rcvlabel
)
msg_
->
reset_flags
(
msg_t
::
label
);
rcvmore
=
msg_
->
flags
()
&
msg_t
::
more
;
rcvmore
=
msg_
->
flags
()
&
msg_t
::
more
?
true
:
false
;
if
(
rcvmore
)
msg_
->
reset_flags
(
msg_t
::
more
);
return
0
;
...
...
src/xpub.cpp
View file @
770d0bc7
...
...
@@ -100,7 +100,8 @@ void zmq::xpub_t::mark_as_matching (pipe_t *pipe_, void *arg_)
int
zmq
::
xpub_t
::
xsend
(
msg_t
*
msg_
,
int
flags_
)
{
bool
msg_more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
bool
msg_more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
// For the first part of multi-part message, find the matching pipes.
if
(
!
more
)
...
...
src/xrep.cpp
View file @
770d0bc7
...
...
@@ -163,7 +163,7 @@ int zmq::xrep_t::xsend (msg_t *msg_, int flags_)
}
// Check whether this is the last part of the message.
more_out
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
more_out
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
// Push the message into the pipe. If there's no out pipe, just drop it.
if
(
current_out
)
{
...
...
@@ -192,7 +192,7 @@ int zmq::xrep_t::xrecv (msg_t *msg_, int flags_)
if
(
prefetched
)
{
int
rc
=
msg_
->
move
(
prefetched_msg
);
errno_assert
(
rc
==
0
);
more_in
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
more_in
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
prefetched
=
false
;
return
0
;
}
...
...
@@ -205,7 +205,7 @@ int zmq::xrep_t::xrecv (msg_t *msg_, int flags_)
// If we are in the middle of reading a message, just return the next part.
if
(
more_in
)
{
more_in
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
more_in
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
return
0
;
}
...
...
src/xsub.cpp
View file @
770d0bc7
...
...
@@ -116,7 +116,7 @@ int zmq::xsub_t::xrecv (msg_t *msg_, int flags_)
int
rc
=
msg_
->
move
(
message
);
errno_assert
(
rc
==
0
);
has_message
=
false
;
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
return
0
;
}
...
...
@@ -136,7 +136,8 @@ int zmq::xsub_t::xrecv (msg_t *msg_, int flags_)
// Check whether the message matches at least one subscription.
// Non-initial parts of the message are passed
if
(
more
||
!
options
.
filter
||
match
(
msg_
))
{
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
);
more
=
msg_
->
flags
()
&
(
msg_t
::
more
|
msg_t
::
label
)
?
true
:
false
;
return
0
;
}
...
...
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