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
7c25feb5
Commit
7c25feb5
authored
Feb 03, 2010
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZMQII-55: At most one PGM/UDP transport can be opened
parent
9cee8f9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
18 deletions
+20
-18
pgm_socket.cpp
src/pgm_socket.cpp
+20
-18
No files found.
src/pgm_socket.cpp
View file @
7c25feb5
...
...
@@ -78,33 +78,35 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
nbytes_processed
=
0
;
pgm_msgv_processed
=
0
;
int
rc
;
GError
*
pgm_error
=
NULL
;
// Init PGM transport.
// Init PGM transport
if not already done
.
// Ensure threading enabled, ensure timer enabled and find PGM protocol id.
//
// Note that if you want to use gettimeofday and sleep for openPGM timing,
// set environment variables PGM_TIMER to "GTOD"
// and PGM_SLEEP to "USLEEP".
int
rc
=
pgm_init
(
&
pgm_error
);
if
(
rc
!=
TRUE
)
{
if
(
!
pgm_supported
())
{
rc
=
pgm_init
(
&
pgm_error
);
if
(
rc
!=
TRUE
)
{
if
(
pgm_error
->
domain
==
PGM_IF_ERROR
&&
(
pgm_error
->
code
==
PGM_IF_ERROR_INVAL
||
pgm_error
->
code
==
PGM_IF_ERROR_XDEV
||
pgm_error
->
code
==
PGM_IF_ERROR_NODEV
||
pgm_error
->
code
==
PGM_IF_ERROR_NOTUNIQ
||
pgm_error
->
code
==
PGM_IF_ERROR_ADDRFAMILY
||
pgm_error
->
code
==
PGM_IF_ERROR_FAMILY
||
pgm_error
->
code
==
PGM_IF_ERROR_NODATA
||
pgm_error
->
code
==
PGM_IF_ERROR_NONAME
||
pgm_error
->
code
==
PGM_IF_ERROR_SERVICE
))
{
errno
=
EINVAL
;
g_error_free
(
pgm_error
);
return
-
1
;
}
if
(
pgm_error
->
domain
==
PGM_IF_ERROR
&&
(
pgm_error
->
code
==
PGM_IF_ERROR_INVAL
||
pgm_error
->
code
==
PGM_IF_ERROR_XDEV
||
pgm_error
->
code
==
PGM_IF_ERROR_NODEV
||
pgm_error
->
code
==
PGM_IF_ERROR_NOTUNIQ
||
pgm_error
->
code
==
PGM_IF_ERROR_ADDRFAMILY
||
pgm_error
->
code
==
PGM_IF_ERROR_FAMILY
||
pgm_error
->
code
==
PGM_IF_ERROR_NODATA
||
pgm_error
->
code
==
PGM_IF_ERROR_NONAME
||
pgm_error
->
code
==
PGM_IF_ERROR_SERVICE
))
{
errno
=
EINVAL
;
g_error_free
(
pgm_error
);
return
-
1
;
zmq_assert
(
false
);
}
zmq_assert
(
false
);
}
// PGM transport GSI.
...
...
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