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
d8d5a627
Commit
d8d5a627
authored
May 16, 2011
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Duplicate initialisation of PGM_MULTICAST_HOPS removed
Signed-off-by:
Martin Sustrik
<
sustrik@250bpm.com
>
parent
5d0cffc5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
pgm_socket.cpp
src/pgm_socket.cpp
+11
-15
No files found.
src/pgm_socket.cpp
View file @
d8d5a627
...
...
@@ -169,7 +169,6 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
}
{
// Propagate various socket options to the OpenPGM layer.
const
int
rcvbuf
=
(
int
)
options
.
rcvbuf
;
if
(
rcvbuf
)
{
if
(
!
pgm_setsockopt
(
sock
,
SOL_SOCKET
,
SO_RCVBUF
,
&
rcvbuf
,
...
...
@@ -188,11 +187,6 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
if
(
!
pgm_setsockopt
(
sock
,
IPPROTO_PGM
,
PGM_MTU
,
&
max_tpdu
,
sizeof
(
max_tpdu
)))
goto
err_abort
;
const
int
multicast_hops
=
(
int
)
options
.
multicast_hops
;
if
(
!
pgm_setsockopt
(
sock
,
IPPROTO_PGM
,
PGM_MULTICAST_HOPS
,
&
multicast_hops
,
sizeof
(
int
)))
goto
err_abort
;
}
if
(
receiver
)
{
...
...
@@ -317,21 +311,23 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
// Set IP level parameters.
{
const
int
nonblocking
=
1
,
multicast_loop
=
0
,
multicast_hops
=
16
,
// Expedited Forwarding PHB for network elements, no ECN.
dscp
=
0x2e
<<
2
;
const
int
multicast_loop
=
0
;
if
(
!
pgm_setsockopt
(
sock
,
IPPROTO_PGM
,
PGM_MULTICAST_LOOP
,
&
multicast_loop
,
sizeof
(
multicast_loop
))
||
!
pgm_setsockopt
(
sock
,
IPPROTO_PGM
,
PGM_MULTICAST_HOPS
,
&
multicast_loop
,
sizeof
(
multicast_loop
)))
goto
err_abort
;
const
int
multicast_hops
=
options
.
multicast_hops
;
if
(
!
pgm_setsockopt
(
sock
,
IPPROTO_PGM
,
PGM_MULTICAST_HOPS
,
&
multicast_hops
,
sizeof
(
multicast_hops
)))
goto
err_abort
;
// Expedited Forwarding PHB for network elements, no ECN.
const
int
dscp
=
0x2e
<<
2
;
if
(
AF_INET6
!=
sa_family
&&
!
pgm_setsockopt
(
sock
,
IPPROTO_PGM
,
PGM_TOS
,
&
dscp
,
sizeof
(
dscp
)))
goto
err_abort
;
const
int
nonblocking
=
1
;
if
(
!
pgm_setsockopt
(
sock
,
IPPROTO_PGM
,
PGM_NOBLOCK
,
&
nonblocking
,
sizeof
(
nonblocking
)))
goto
err_abort
;
...
...
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