Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
bake
Commits
8466b850
Commit
8466b850
authored
Apr 18, 2016
by
Philip Carns
Browse files
svr argument to bb-shutdown
parent
6eeade93
Pipeline
#154
skipped
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
src/bb-shutdown.c
View file @
8466b850
...
...
@@ -28,10 +28,20 @@ int main(int argc, char **argv)
hg_addr_t
svr_addr
=
HG_ADDR_NULL
;
hg_handle_t
handle
;
if
(
argc
!=
2
)
{
fprintf
(
stderr
,
"Usage: bb-shutdown <server addr to stop>
\n
"
);
fprintf
(
stderr
,
" Example: ./bb-shutdown tcp://localhost:1234
\n
"
);
return
(
-
1
);
}
/* boilerplate HG initialization steps */
/***************************************/
/* TODO: fix addr */
hg_class
=
HG_Init
(
"tcp://localhost:1234"
,
HG_FALSE
);
/* NOTE: the listening address is not actually used in this case (the
* na_listen flag is false); but we pass in the *target* server address
* here to make sure that Mercury starts up the correct transport
*/
hg_class
=
HG_Init
(
argv
[
1
],
HG_FALSE
);
if
(
!
hg_class
)
{
fprintf
(
stderr
,
"Error: HG_Init()
\n
"
);
...
...
@@ -91,8 +101,7 @@ int main(int argc, char **argv)
/* send one rpc to server to shut it down */
/* find addr for server */
/* TODO: fix addr */
ret
=
margo_addr_lookup
(
mid
,
hg_context
,
"tcp://localhost:1234"
,
&
svr_addr
);
ret
=
margo_addr_lookup
(
mid
,
hg_context
,
argv
[
1
],
&
svr_addr
);
assert
(
ret
==
0
);
/* create handle */
...
...
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