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
da30ff7d
Commit
da30ff7d
authored
Aug 13, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: unused get_credential methods and associated fields
Solution: remove them
parent
0b1589db
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
1 addition
and
102 deletions
+1
-102
client.cpp
src/client.cpp
+0
-5
client.hpp
src/client.hpp
+0
-1
dealer.cpp
src/dealer.cpp
+0
-6
dealer.hpp
src/dealer.hpp
+0
-1
dgram.cpp
src/dgram.cpp
+0
-6
dgram.hpp
src/dgram.hpp
+0
-3
dish.cpp
src/dish.cpp
+0
-5
dish.hpp
src/dish.hpp
+0
-1
fq.cpp
src/fq.cpp
+0
-6
fq.hpp
src/fq.hpp
+0
-4
gather.cpp
src/gather.cpp
+0
-5
gather.hpp
src/gather.hpp
+0
-1
pair.cpp
src/pair.cpp
+0
-6
pair.hpp
src/pair.hpp
+0
-3
pipe.cpp
src/pipe.cpp
+1
-9
pipe.hpp
src/pipe.hpp
+0
-2
pull.cpp
src/pull.cpp
+0
-5
pull.hpp
src/pull.hpp
+0
-1
router.cpp
src/router.cpp
+0
-5
router.hpp
src/router.hpp
+0
-1
server.cpp
src/server.cpp
+0
-5
server.hpp
src/server.hpp
+0
-3
socket_base.cpp
src/socket_base.cpp
+0
-7
socket_base.hpp
src/socket_base.hpp
+0
-5
xsub.cpp
src/xsub.cpp
+0
-5
xsub.hpp
src/xsub.hpp
+0
-1
No files found.
src/client.cpp
View file @
da30ff7d
...
...
@@ -96,11 +96,6 @@ bool zmq::client_t::xhas_out ()
return
_lb
.
has_out
();
}
const
zmq
::
blob_t
&
zmq
::
client_t
::
get_credential
()
const
{
return
_fq
.
get_credential
();
}
void
zmq
::
client_t
::
xread_activated
(
pipe_t
*
pipe_
)
{
_fq
.
activated
(
pipe_
);
...
...
src/client.hpp
View file @
da30ff7d
...
...
@@ -56,7 +56,6 @@ class client_t : public socket_base_t
int
xrecv
(
zmq
::
msg_t
*
msg_
);
bool
xhas_in
();
bool
xhas_out
();
const
blob_t
&
get_credential
()
const
;
void
xread_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xwrite_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xpipe_terminated
(
zmq
::
pipe_t
*
pipe_
);
...
...
src/dealer.cpp
View file @
da30ff7d
...
...
@@ -117,12 +117,6 @@ bool zmq::dealer_t::xhas_out ()
return
_lb
.
has_out
();
}
const
zmq
::
blob_t
&
zmq
::
dealer_t
::
get_credential
()
const
{
return
_fq
.
get_credential
();
}
void
zmq
::
dealer_t
::
xread_activated
(
pipe_t
*
pipe_
)
{
_fq
.
activated
(
pipe_
);
...
...
src/dealer.hpp
View file @
da30ff7d
...
...
@@ -59,7 +59,6 @@ class dealer_t : public socket_base_t
int
xrecv
(
zmq
::
msg_t
*
msg_
);
bool
xhas_in
();
bool
xhas_out
();
const
blob_t
&
get_credential
()
const
;
void
xread_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xwrite_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xpipe_terminated
(
zmq
::
pipe_t
*
pipe_
);
...
...
src/dgram.cpp
View file @
da30ff7d
...
...
@@ -72,7 +72,6 @@ void zmq::dgram_t::xpipe_terminated (pipe_t *pipe_)
{
if
(
pipe_
==
_pipe
)
{
if
(
_last_in
==
_pipe
)
{
_saved_credential
.
set_deep_copy
(
_last_in
->
get_credential
());
_last_in
=
NULL
;
}
_pipe
=
NULL
;
...
...
@@ -171,8 +170,3 @@ bool zmq::dgram_t::xhas_out ()
return
_pipe
->
check_write
();
}
const
zmq
::
blob_t
&
zmq
::
dgram_t
::
get_credential
()
const
{
return
_last_in
?
_last_in
->
get_credential
()
:
_saved_credential
;
}
src/dgram.hpp
View file @
da30ff7d
...
...
@@ -55,7 +55,6 @@ class dgram_t : public socket_base_t
int
xrecv
(
zmq
::
msg_t
*
msg_
);
bool
xhas_in
();
bool
xhas_out
();
const
blob_t
&
get_credential
()
const
;
void
xread_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xwrite_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xpipe_terminated
(
zmq
::
pipe_t
*
pipe_
);
...
...
@@ -65,8 +64,6 @@ class dgram_t : public socket_base_t
zmq
::
pipe_t
*
_last_in
;
blob_t
_saved_credential
;
// If true, more outgoing message parts are expected.
bool
_more_out
;
...
...
src/dish.cpp
View file @
da30ff7d
...
...
@@ -219,11 +219,6 @@ bool zmq::dish_t::xhas_in ()
return
true
;
}
const
zmq
::
blob_t
&
zmq
::
dish_t
::
get_credential
()
const
{
return
_fq
.
get_credential
();
}
void
zmq
::
dish_t
::
send_subscriptions
(
pipe_t
*
pipe_
)
{
for
(
subscriptions_t
::
iterator
it
=
_subscriptions
.
begin
(),
...
...
src/dish.hpp
View file @
da30ff7d
...
...
@@ -59,7 +59,6 @@ class dish_t : public socket_base_t
bool
xhas_out
();
int
xrecv
(
zmq
::
msg_t
*
msg_
);
bool
xhas_in
();
const
blob_t
&
get_credential
()
const
;
void
xread_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xwrite_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xhiccuped
(
pipe_t
*
pipe_
);
...
...
src/fq.cpp
View file @
da30ff7d
...
...
@@ -64,7 +64,6 @@ void zmq::fq_t::pipe_terminated (pipe_t *pipe_)
_pipes
.
erase
(
pipe_
);
if
(
_last_in
==
pipe_
)
{
_saved_credential
.
set_deep_copy
(
_last_in
->
get_credential
());
_last_in
=
NULL
;
}
}
...
...
@@ -149,8 +148,3 @@ bool zmq::fq_t::has_in ()
return
false
;
}
const
zmq
::
blob_t
&
zmq
::
fq_t
::
get_credential
()
const
{
return
_last_in
?
_last_in
->
get_credential
()
:
_saved_credential
;
}
src/fq.hpp
View file @
da30ff7d
...
...
@@ -55,7 +55,6 @@ class fq_t
int
recv
(
msg_t
*
msg_
);
int
recvpipe
(
msg_t
*
msg_
,
pipe_t
**
pipe_
);
bool
has_in
();
const
blob_t
&
get_credential
()
const
;
private
:
// Inbound pipes.
...
...
@@ -78,9 +77,6 @@ class fq_t
// there are following parts still waiting in the current pipe.
bool
_more
;
// Holds credential after the last_active_pipe has terminated.
blob_t
_saved_credential
;
fq_t
(
const
fq_t
&
);
const
fq_t
&
operator
=
(
const
fq_t
&
);
};
...
...
src/gather.cpp
View file @
da30ff7d
...
...
@@ -89,8 +89,3 @@ bool zmq::gather_t::xhas_in ()
{
return
_fq
.
has_in
();
}
const
zmq
::
blob_t
&
zmq
::
gather_t
::
get_credential
()
const
{
return
_fq
.
get_credential
();
}
src/gather.hpp
View file @
da30ff7d
...
...
@@ -52,7 +52,6 @@ class gather_t : public socket_base_t
bool
locally_initiated_
);
int
xrecv
(
zmq
::
msg_t
*
msg_
);
bool
xhas_in
();
const
blob_t
&
get_credential
()
const
;
void
xread_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xpipe_terminated
(
zmq
::
pipe_t
*
pipe_
);
...
...
src/pair.cpp
View file @
da30ff7d
...
...
@@ -68,7 +68,6 @@ void zmq::pair_t::xpipe_terminated (pipe_t *pipe_)
{
if
(
pipe_
==
_pipe
)
{
if
(
_last_in
==
_pipe
)
{
_saved_credential
.
set_deep_copy
(
_last_in
->
get_credential
());
_last_in
=
NULL
;
}
_pipe
=
NULL
;
...
...
@@ -137,8 +136,3 @@ bool zmq::pair_t::xhas_out ()
return
_pipe
->
check_write
();
}
const
zmq
::
blob_t
&
zmq
::
pair_t
::
get_credential
()
const
{
return
_last_in
?
_last_in
->
get_credential
()
:
_saved_credential
;
}
src/pair.hpp
View file @
da30ff7d
...
...
@@ -55,7 +55,6 @@ class pair_t : public socket_base_t
int
xrecv
(
zmq
::
msg_t
*
msg_
);
bool
xhas_in
();
bool
xhas_out
();
const
blob_t
&
get_credential
()
const
;
void
xread_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xwrite_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xpipe_terminated
(
zmq
::
pipe_t
*
pipe_
);
...
...
@@ -65,8 +64,6 @@ class pair_t : public socket_base_t
zmq
::
pipe_t
*
_last_in
;
blob_t
_saved_credential
;
pair_t
(
const
pair_t
&
);
const
pair_t
&
operator
=
(
const
pair_t
&
);
};
...
...
src/pipe.cpp
View file @
da30ff7d
...
...
@@ -143,11 +143,6 @@ const zmq::blob_t &zmq::pipe_t::get_routing_id () const
return
_router_socket_routing_id
;
}
const
zmq
::
blob_t
&
zmq
::
pipe_t
::
get_credential
()
const
{
return
_credential
;
}
bool
zmq
::
pipe_t
::
check_read
()
{
if
(
unlikely
(
!
_in_active
))
...
...
@@ -187,11 +182,8 @@ bool zmq::pipe_t::read (msg_t *msg_)
return
false
;
}
// If this is a credential,
save a copy
and receive next message.
// If this is a credential,
ignore it
and receive next message.
if
(
unlikely
(
msg_
->
is_credential
()))
{
const
unsigned
char
*
data
=
static_cast
<
const
unsigned
char
*>
(
msg_
->
data
());
_credential
.
set
(
data
,
msg_
->
size
());
const
int
rc
=
msg_
->
close
();
zmq_assert
(
rc
==
0
);
}
else
...
...
src/pipe.hpp
View file @
da30ff7d
...
...
@@ -92,8 +92,6 @@ class pipe_t : public object_t,
void
set_router_socket_routing_id
(
const
blob_t
&
router_socket_routing_id_
);
const
blob_t
&
get_routing_id
()
const
;
const
blob_t
&
get_credential
()
const
;
// Returns true if there is at least one message to read in the pipe.
bool
check_read
();
...
...
src/pull.cpp
View file @
da30ff7d
...
...
@@ -74,8 +74,3 @@ bool zmq::pull_t::xhas_in ()
{
return
_fq
.
has_in
();
}
const
zmq
::
blob_t
&
zmq
::
pull_t
::
get_credential
()
const
{
return
_fq
.
get_credential
();
}
src/pull.hpp
View file @
da30ff7d
...
...
@@ -54,7 +54,6 @@ class pull_t : public socket_base_t
bool
locally_initiated_
);
int
xrecv
(
zmq
::
msg_t
*
msg_
);
bool
xhas_in
();
const
blob_t
&
get_credential
()
const
;
void
xread_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xpipe_terminated
(
zmq
::
pipe_t
*
pipe_
);
...
...
src/router.cpp
View file @
da30ff7d
...
...
@@ -414,11 +414,6 @@ bool zmq::router_t::xhas_out ()
return
any_of_out_pipes
(
check_pipe_hwm
);
}
const
zmq
::
blob_t
&
zmq
::
router_t
::
get_credential
()
const
{
return
_fq
.
get_credential
();
}
int
zmq
::
router_t
::
get_peer_state
(
const
void
*
routing_id_
,
size_t
routing_id_size_
)
const
{
...
...
src/router.hpp
View file @
da30ff7d
...
...
@@ -67,7 +67,6 @@ class router_t : public routing_socket_base_t
protected
:
// Rollback any message parts that were sent but not yet flushed.
int
rollback
();
const
blob_t
&
get_credential
()
const
;
private
:
// Receive peer id and update lookup map
...
...
src/server.cpp
View file @
da30ff7d
...
...
@@ -179,8 +179,3 @@ bool zmq::server_t::xhas_out ()
// to be routed to.
return
true
;
}
const
zmq
::
blob_t
&
zmq
::
server_t
::
get_credential
()
const
{
return
_fq
.
get_credential
();
}
src/server.hpp
View file @
da30ff7d
...
...
@@ -63,9 +63,6 @@ class server_t : public socket_base_t
void
xwrite_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xpipe_terminated
(
zmq
::
pipe_t
*
pipe_
);
protected
:
const
blob_t
&
get_credential
()
const
;
private
:
// Fair queueing object for inbound pipes.
fq_t
_fq
;
...
...
src/socket_base.cpp
View file @
da30ff7d
...
...
@@ -1453,13 +1453,6 @@ int zmq::socket_base_t::xrecv (msg_t *)
return
-
1
;
}
static
const
zmq
::
blob_t
empty_blob
;
const
zmq
::
blob_t
&
zmq
::
socket_base_t
::
get_credential
()
const
{
return
empty_blob
;
}
void
zmq
::
socket_base_t
::
xread_activated
(
pipe_t
*
)
{
zmq_assert
(
false
);
...
...
src/socket_base.hpp
View file @
da30ff7d
...
...
@@ -167,11 +167,6 @@ class socket_base_t : public own_t,
virtual
bool
xhas_in
();
virtual
int
xrecv
(
zmq
::
msg_t
*
msg_
);
// Returns the credential for the peer from which we have received
// the last message. If no message has been received yet,
// the function returns empty credential.
virtual
const
blob_t
&
get_credential
()
const
;
// i_pipe_events will be forwarded to these functions.
virtual
void
xread_activated
(
pipe_t
*
pipe_
);
virtual
void
xwrite_activated
(
pipe_t
*
pipe_
);
...
...
src/xsub.cpp
View file @
da30ff7d
...
...
@@ -223,11 +223,6 @@ bool zmq::xsub_t::xhas_in ()
}
}
const
zmq
::
blob_t
&
zmq
::
xsub_t
::
get_credential
()
const
{
return
_fq
.
get_credential
();
}
bool
zmq
::
xsub_t
::
match
(
msg_t
*
msg_
)
{
bool
matching
=
_subscriptions
.
check
(
...
...
src/xsub.hpp
View file @
da30ff7d
...
...
@@ -57,7 +57,6 @@ class xsub_t : public socket_base_t
bool
xhas_out
();
int
xrecv
(
zmq
::
msg_t
*
msg_
);
bool
xhas_in
();
const
blob_t
&
get_credential
()
const
;
void
xread_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xwrite_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xhiccuped
(
pipe_t
*
pipe_
);
...
...
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