Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
margo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
17
Issues
17
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
sds
margo
Commits
8106cda1
Commit
8106cda1
authored
Oct 11, 2016
by
Philip Carns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix HG_Init() arguments for clients
- makes cci/tcp work correctly with margo examples
parent
42d6da76
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
examples/client-timeout.c
examples/client-timeout.c
+7
-4
examples/client.c
examples/client.c
+7
-4
examples/sleep.c
examples/sleep.c
+2
-2
No files found.
examples/client-timeout.c
View file @
8106cda1
...
...
@@ -47,6 +47,7 @@ int main(int argc, char **argv)
hg_class_t
*
hg_class
;
hg_addr_t
svr_addr
=
HG_ADDR_NULL
;
hg_handle_t
handle
;
char
proto
[
12
]
=
{
0
};
if
(
argc
!=
2
)
{
...
...
@@ -56,11 +57,13 @@ int main(int argc, char **argv)
/* boilerplate HG initialization steps */
/***************************************/
/* NOTE: the reason for passing in the server address into HG_Init() on
* the client is just to make sure that Mercury initializes the right
*
transport.
/* initialize Mercury using the transport portion of the destination
*
address (i.e., the part before the first : character if present)
*/
hg_class
=
HG_Init
(
argv
[
1
],
HG_FALSE
);
for
(
i
=
0
;
i
<
11
&&
argv
[
1
][
i
]
!=
'\0'
&&
argv
[
1
][
i
]
!=
':'
;
i
++
)
proto
[
i
]
=
argv
[
1
][
i
];
hg_class
=
HG_Init
(
proto
,
HG_FALSE
);
if
(
!
hg_class
)
{
fprintf
(
stderr
,
"Error: HG_Init()
\n
"
);
...
...
examples/client.c
View file @
8106cda1
...
...
@@ -47,6 +47,7 @@ int main(int argc, char **argv)
hg_class_t
*
hg_class
;
hg_addr_t
svr_addr
=
HG_ADDR_NULL
;
hg_handle_t
handle
;
char
proto
[
12
]
=
{
0
};
if
(
argc
!=
2
)
{
...
...
@@ -56,11 +57,13 @@ int main(int argc, char **argv)
/* boilerplate HG initialization steps */
/***************************************/
/* NOTE: the reason for passing in the server address into HG_Init() on
* the client is just to make sure that Mercury initializes the right
*
transport.
/* initialize Mercury using the transport portion of the destination
*
address (i.e., the part before the first : character if present)
*/
hg_class
=
HG_Init
(
argv
[
1
],
HG_FALSE
);
for
(
i
=
0
;
i
<
11
&&
argv
[
1
][
i
]
!=
'\0'
&&
argv
[
1
][
i
]
!=
':'
;
i
++
)
proto
[
i
]
=
argv
[
1
][
i
];
hg_class
=
HG_Init
(
proto
,
HG_FALSE
);
if
(
!
hg_class
)
{
fprintf
(
stderr
,
"Error: HG_Init()
\n
"
);
...
...
examples/sleep.c
View file @
8106cda1
...
...
@@ -54,11 +54,11 @@ int main(int argc, char **argv)
/* boilerplate HG initialization steps */
/***************************************/
hg_class
=
HG_Init
(
"tcp
://localhost:1234
"
,
HG_FALSE
);
hg_class
=
HG_Init
(
"tcp"
,
HG_FALSE
);
if
(
!
hg_class
)
{
/* if tcp didn't work, try sm */
hg_class
=
HG_Init
(
"sm
://13/13
"
,
HG_FALSE
);
hg_class
=
HG_Init
(
"sm"
,
HG_FALSE
);
if
(
!
hg_class
)
{
fprintf
(
stderr
,
"Error: HG_Init()
\n
"
);
...
...
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